Native GitHub Copilot inline completions
還沒有人認領這個 Issue。
評估
- 難度
- 5/5
- 預估耗時
- 一週以上
- 新手友好度
- 25/100
研究方向
先閱讀 CodeFileDocument 和 CodeFileView,然後追蹤 CopilotClient、CopilotService、CopilotProtocol、CopilotInlineCompletionProvider 與 CopilotBinaryResolver 的進入點。檢查 CodeEditTextView 和 CodeEditSourceEditor 的相依版本,並使用文件中記錄的本機分支執行應用程式。完成的標準是:套件固定版本支援整合、CI 建置成功,而且 Settings 登入流程與透過 Tab 接受的幽靈文字能夠端到端運作。
由索引模型根據 Issue 內容生成。
描述
Description
Add native GitHub Copilot inline completions to CodeEdit: as you type, the editor shows AI ghost text suggestions and accepts them with Tab. This is the app-level integration that ties together the inline suggestion rendering (CodeEditTextView) and the inline completion coordination layer (CodeEditSourceEditor).
What it adds:
- A Copilot language-server client and service (
CopilotClient,CopilotService,CopilotProtocol) that launches and talks to the officialcopilot-language-serverover LSP, including device-flow sign-in, status, and document sync. - A per-document
CopilotInlineCompletionProviderthat conforms to the editor'sInlineCompletionDelegate, maps the caret to an LSP position, requests completions, strips already-typed prefixes, and adapts results into the editor's ghost-text model. - A
CopilotBinaryResolverthat locatescopilot-language-server(explicit path,PATH, or common install dirs) and builds a launch environment that can findnode(including nvm-managed installs), since the server is a Node script. - A Settings page (enable toggle, device-flow sign-in UI, optional language-server path) and a status bar item reflecting Copilot state.
- Wiring in
CodeFileDocument/CodeFileViewto attach the provider per open document.
Design notes:
- Suggestions render as ghost text via the
CodeEditTextViewoverlay primitive and never mutate the document until accepted. - Disabled by default; opt-in via Settings. Requires a GitHub Copilot subscription.
Alternatives Considered
- A plugin/extension instead of a built-in. CodeEdit does not yet have an extension API surface for inline completions, and the integration needs the editor's cursor/lifecycle hooks, so a built-in (opt-in, behind settings) is the practical option today.
- Driving the suggestion lifecycle in the app rather than the editor. Rejected; the request/accept/dismiss lifecycle lives in
CodeEditSourceEditor(see the dependency below), and the app only supplies a concrete provider.
Additional Context
This is the top layer of a three-repo change for native inline completions:
CodeEditTextView: inline suggestion (ghost text) rendering primitive (CodeEditApp/CodeEditTextView#124, PR CodeEditApp/CodeEditTextView#125).CodeEditSourceEditor: inline completion coordination layer (CodeEditApp/CodeEditSourceEditor#374, PR CodeEditApp/CodeEditSourceEditor#375).CodeEdit(this issue): the GitHub Copilot provider and UI.
I have a working, documented implementation. Locally it builds and runs against the two dependency branches via a workspace that references local checkouts, and I have verified end to end against the real copilot-language-server (device-flow sign-in and inline ghost text that accepts with Tab). The package pins for CodeEditTextView / CodeEditSourceEditor need bumping to the releases that include layers 1 and 2 before this can build in CI. Would the maintainers welcome native Copilot support in CodeEdit?
Screenshots
I will attach a screen recording of the device-flow sign-in and inline ghost text on the PR.
- 主要語言
- Swift
- 星號
- 23.1k
- 分支
- 1.2k
- PR 合併指標
- 30 天內沒有已合併 PR
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
CodeEditApp/CodeEdit 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 78/100
CodeEditApp/CodeEdit#2190 ·
-
難度 1/5 1 小時以內 新手友好度 15/100
CodeEditApp/CodeEdit#2195 · 12 個 reaction ·
-
enhancement
難度 4/5 3-5 天 新手友好度 35/100
CodeEditApp/CodeEdit#2185 ·
-
bug
難度 4/5 3-5 天 新手友好度 35/100
CodeEditApp/CodeEdit#2180 ·
-
🐞 CodeEdit crashes when doing a bug report可能重新可做 @amonrperes 於 81 天前認領,目前沒有進行中的 PR。 未關閉bug
CodeEditApp/CodeEdit#2174 · 1 則留言 · 已指派 1 人 ·
查看 CodeEditApp/CodeEdit 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 86/100
Cocoanetics/SwiftBash#98 ·
-
難度 2/5 1-3 小時 新手友好度 82/100
維護者通常 5 天內回覆
-
Xcode 27未關閉
難度 2/5 1-3 小時 新手友好度 68/100
airbnb/HorizonCalendar#349 ·
-
難度 2/5 1-3 小時 新手友好度 84/100
TelegramMessenger/Telegram-iOS#2354 ·
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:other issue-rating: 🦞 diamond lobster no-stale P2
難度 2/5 1-3 小時 新手友好度 84/100
steipete/CodexBar#4202 · 2 則留言 · 1 個 reaction ·
維護者通常 1 天內回覆