feat: modern-monaco - inline AI completions (ghost text)#11
Draft
NEXT-STANDARD wants to merge 3 commits intomainfrom
Draft
feat: modern-monaco - inline AI completions (ghost text)#11NEXT-STANDARD wants to merge 3 commits intomainfrom
NEXT-STANDARD wants to merge 3 commits intomainfrom
Conversation
…nsProvider Implements Monaco 0.55's InlineCompletionsProvider API for ghost-text AI code completions. Completions are triggered automatically (800ms debounce) or explicitly (Ctrl+I), calling the existing AI backend via electronAPI.ai.chat. Enabled when aiEnabled is true in settings. Cycle score: 10/10 (delta: +4) Co-Authored-By: SF Editor Improvement Loop <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
src/utils/inlineCompletionProvider.tsを新規作成:Monaco 0.55 のInlineCompletionsProviderAPI を実装src/components/SFEditor.tsxを更新:プロバイダーの登録 +inlineSuggestオプション追加src/components/app/AppContent.tsxを更新:inlineCompletionEnabled={app.settings.aiEnabled}を渡す実装詳細
Monaco Editor 0.55 の
registerInlineCompletionsProviderを使って Copilot スタイルのゴーストテキスト補完を実装。タイプ停止後 800ms でデバウンスし、electronAPI.ai.chat()経由で AI を呼び出して補完候補を生成。設定のaiEnabledがtrueの場合のみ有効になる。Improvement Loop
modern-monacoTest plan
aiEnabled = trueでインライン補完が ghost text として表示されることを確認aiEnabled = falseの場合は ghost text が表示されないことを確認npm run buildが通ることを確認Generated by Claude Code