feat: add 'Add To Context' code action

- Add new command registration and menu item
- Add new code action type and command ID
- Add support prompt config for adding code to context
- Add message handling in webview for setting chat box content
- Add logic to append selected code to existing chat input
This commit is contained in:
sam hoang
2025-01-30 17:23:12 +07:00
parent 35a7e433f2
commit 2e56149620
7 changed files with 76 additions and 10 deletions

View File

@@ -50,7 +50,7 @@ export interface ExtensionMessage {
| "historyButtonClicked"
| "promptsButtonClicked"
| "didBecomeVisible"
invoke?: "sendMessage" | "primaryButtonClick" | "secondaryButtonClick"
invoke?: "sendMessage" | "primaryButtonClick" | "secondaryButtonClick" | "setChatBoxMessage"
state?: ExtensionState
images?: string[]
ollamaModels?: string[]