Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the chat input editor to support “prompt completions” by enabling the inline completions contribution on the chat input CodeEditorWidget, and adjusting editor/model options to fit that experience.
Changes:
- Adds
InlineCompletionsControllerto the chat input editor’s contributions list. - Disables
quickSuggestionsfor the chat input editor. - Changes the chat input model creation to use
isForSimpleWidget = false.
| let inputModel = this.modelService.getModel(this.inputUri); | ||
| if (!inputModel) { | ||
| inputModel = this.modelService.createModel('', null, this.inputUri, true); | ||
| inputModel = this.modelService.createModel('', null, this.inputUri, false); |
There was a problem hiding this comment.
Changing createModel(..., /*isForSimpleWidget*/ false) makes the chat input text model eligible for synchronization to the extension host (shouldSynchronizeModel filters out only model.isForSimpleWidget). This is a significant behavior change: extensions will start receiving open/change events for chatSessionInput: documents, which can both expose user-entered prompts and add per-keystroke IPC/extension overhead. If the goal is to enable inline/prompt completions, consider keeping this model as a simple widget and proxy only the data needed for completions, or otherwise add an explicit rationale/guardrails for syncing this scheme to extensions.
| inputModel = this.modelService.createModel('', null, this.inputUri, false); | |
| // Mark as simple widget to avoid synchronizing chat input to the extension host | |
| inputModel = this.modelService.createModel('', null, this.inputUri, true); |
No description provided.