@codingame/monaco-vscode-chat-service-override 17.2.1 → 18.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (159) hide show
  1. package/index.js +7 -4
  2. package/package.json +36 -30
  3. package/vscode/src/vs/base/common/objectCache.d.ts +2 -2
  4. package/vscode/src/vs/base/common/objectCache.js +3 -3
  5. package/vscode/src/vs/platform/browserElements/common/browserElements.d.ts +10 -0
  6. package/vscode/src/vs/platform/browserElements/common/browserElements.js +9 -0
  7. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +40 -40
  8. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatClearActions.d.ts +6 -0
  9. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatClearActions.js +158 -0
  10. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.d.ts +1 -1
  11. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +13 -13
  12. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContext.d.ts +8 -0
  13. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContext.js +256 -0
  14. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.d.ts +3 -4
  15. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +234 -572
  16. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +4 -4
  17. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +4 -3
  18. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +4 -4
  19. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatGettingStarted.js +1 -1
  20. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +5 -5
  21. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatMoveActions.js +29 -19
  22. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.d.ts +1 -1
  23. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +11 -11
  24. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.d.ts +1 -0
  25. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.js +107 -0
  26. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.d.ts +3 -0
  27. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.js +344 -0
  28. package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.d.ts +4 -3
  29. package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +84 -37
  30. package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/chatAttachInstructionsAction.d.ts +18 -3
  31. package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/chatAttachInstructionsAction.js +137 -14
  32. package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/chatModeActions.d.ts +1 -0
  33. package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/chatModeActions.js +54 -0
  34. package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/chatRunPromptAction.js +40 -10
  35. package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/chatSaveToPromptAction.d.ts +1 -1
  36. package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/chatSaveToPromptAction.js +3 -3
  37. package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/dialogs/askToSelectPrompt/promptFilePickers.d.ts +15 -5
  38. package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/dialogs/askToSelectPrompt/promptFilePickers.js +171 -101
  39. package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/dialogs/askToSelectPrompt/utils/attachInstructions.d.ts +2 -2
  40. package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/dialogs/askToSelectPrompt/utils/attachInstructions.js +2 -2
  41. package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/dialogs/askToSelectPrompt/utils/runPrompt.d.ts +1 -1
  42. package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/index.d.ts +0 -1
  43. package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/index.js +2 -1
  44. package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +176 -69
  45. package/vscode/src/vs/workbench/contrib/chat/browser/chatAccessibilityService.d.ts +1 -1
  46. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +15 -29
  47. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorAccessibility.js +2 -2
  48. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +22 -22
  49. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +35 -29
  50. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.d.ts +1 -0
  51. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.js +80 -32
  52. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.d.ts +5 -3
  53. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.js +11 -9
  54. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.js +12 -11
  55. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.js +13 -11
  56. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.d.ts +2 -2
  57. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +15 -13
  58. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSessionStorage.js +3 -5
  59. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookCellEntry.js +10 -9
  60. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.js +18 -8
  61. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/overlayToolbarDecorator.d.ts +1 -1
  62. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/overlayToolbarDecorator.js +1 -1
  63. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/simpleBrowserEditorOverlay.js +118 -33
  64. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditor.d.ts +2 -2
  65. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditor.js +5 -5
  66. package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.d.ts +1 -3
  67. package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +46 -48
  68. package/vscode/src/vs/workbench/contrib/chat/browser/chatPasteProviders.d.ts +49 -0
  69. package/vscode/src/vs/workbench/contrib/chat/browser/chatPasteProviders.js +379 -0
  70. package/vscode/src/vs/workbench/contrib/chat/browser/chatQuick.d.ts +1 -1
  71. package/vscode/src/vs/workbench/contrib/chat/browser/chatQuick.js +1 -1
  72. package/vscode/src/vs/workbench/contrib/chat/browser/chatResponseAccessibleView.d.ts +1 -1
  73. package/vscode/src/vs/workbench/contrib/chat/browser/chatResponseAccessibleView.js +31 -10
  74. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup.d.ts +2 -1
  75. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup.js +382 -152
  76. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus.d.ts +1 -1
  77. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus.js +99 -56
  78. package/vscode/src/vs/workbench/contrib/chat/browser/chatVariables.d.ts +2 -1
  79. package/vscode/src/vs/workbench/contrib/chat/browser/chatVariables.js +11 -1
  80. package/vscode/src/vs/workbench/contrib/chat/browser/chatViewPane.d.ts +1 -3
  81. package/vscode/src/vs/workbench/contrib/chat/browser/chatViewPane.js +9 -21
  82. package/vscode/src/vs/workbench/contrib/chat/browser/codeBlockContextProviderService.d.ts +1 -1
  83. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputEditorContrib.js +10 -6
  84. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputEditorHover.js +1 -1
  85. package/vscode/src/vs/workbench/contrib/chat/browser/languageModelToolsService.d.ts +18 -5
  86. package/vscode/src/vs/workbench/contrib/chat/browser/languageModelToolsService.js +95 -24
  87. package/vscode/src/vs/workbench/contrib/chat/browser/media/chatSetup.css +92 -5
  88. package/vscode/src/vs/workbench/contrib/chat/browser/media/github.svg +1 -0
  89. package/vscode/src/vs/workbench/contrib/chat/browser/media/google.svg +6 -0
  90. package/vscode/src/vs/workbench/contrib/chat/browser/media/simpleBrowserOverlay.css +10 -4
  91. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/createPromptCommand.d.ts +1 -0
  92. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/createPromptCommand.js +111 -111
  93. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/dialogs/askForPromptName.d.ts +3 -4
  94. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/dialogs/askForPromptName.js +36 -10
  95. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/dialogs/askForPromptSourceFolder.d.ts +5 -17
  96. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/dialogs/askForPromptSourceFolder.js +91 -17
  97. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/errors.js +2 -2
  98. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/utils/createPromptFile.d.ts +1 -4
  99. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/utils/createPromptFile.js +4 -5
  100. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolsCodeLensProvider.d.ts +1 -0
  101. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolsCodeLensProvider.js +95 -0
  102. package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolSetsContribution.d.ts +24 -0
  103. package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolSetsContribution.js +348 -0
  104. package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +5 -5
  105. package/vscode/src/vs/workbench/contrib/chat/common/chatProgressTypes/chatToolInvocation.d.ts +2 -2
  106. package/vscode/src/vs/workbench/contrib/chat/common/chatProgressTypes/chatToolInvocation.js +2 -2
  107. package/vscode/src/vs/workbench/contrib/chat/common/chatResponseResourceFileSystemProvider.d.ts +30 -0
  108. package/vscode/src/vs/workbench/contrib/chat/common/chatResponseResourceFileSystemProvider.js +93 -0
  109. package/vscode/src/vs/workbench/contrib/chat/common/chatServiceImpl.d.ts +5 -2
  110. package/vscode/src/vs/workbench/contrib/chat/common/chatServiceImpl.js +46 -36
  111. package/vscode/src/vs/workbench/contrib/chat/common/chatSessionStore.js +2 -2
  112. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/configMigration.d.ts +5 -1
  113. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/configMigration.js +21 -11
  114. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/index.js +6 -1
  115. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/index.js +3 -2
  116. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/promptHeaderDiagnosticsProvider.d.ts +4 -3
  117. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/promptHeaderDiagnosticsProvider.js +12 -8
  118. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/promptLinkDiagnosticsProvider.d.ts +3 -3
  119. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/promptLinkDiagnosticsProvider.js +1 -2
  120. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/promptLinkProvider.js +3 -3
  121. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/promptPathAutocompletion.js +5 -5
  122. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/providerInstanceBase.d.ts +2 -1
  123. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/providerInstanceBase.js +9 -5
  124. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/providerInstanceManagerBase.d.ts +3 -2
  125. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/providerInstanceManagerBase.js +12 -8
  126. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/textModelPromptParser.d.ts +1 -1
  127. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/textModelPromptParser.js +3 -3
  128. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService.d.ts +21 -10
  129. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService.js +111 -124
  130. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.d.ts +22 -8
  131. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.js +159 -97
  132. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/treeUtils.d.ts +15 -3
  133. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/treeUtils.js +2 -14
  134. package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.d.ts +8 -2
  135. package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.js +198 -33
  136. package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +1 -1
  137. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.js +7 -7
  138. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAccessibleView.js +1 -1
  139. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatCurrentLine.js +28 -18
  140. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatNotebook.js +1 -1
  141. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookModifiedCellDecorator.d.ts +1 -1
  142. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookModifiedCellDecorator.js +2 -2
  143. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/attachInstructionsCommand.d.ts +0 -6
  144. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/attachInstructionsCommand.js +0 -73
  145. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/decorations/frontMatterDecoration.d.ts +0 -29
  146. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/decorations/frontMatterDecoration.js +0 -74
  147. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/decorations/frontMatterMarkerDecoration.d.ts +0 -14
  148. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/decorations/frontMatterMarkerDecoration.js +0 -40
  149. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/decorations/utils/decorationBase.d.ts +0 -23
  150. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/decorations/utils/decorationBase.js +0 -40
  151. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/decorations/utils/index.d.ts +0 -5
  152. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/decorations/utils/index.js +0 -9
  153. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/decorations/utils/reactiveDecorationBase.d.ts +0 -23
  154. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/decorations/utils/reactiveDecorationBase.js +0 -68
  155. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/decorations/utils/types.d.ts +0 -13
  156. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/promptDecorationsProvider.d.ts +0 -19
  157. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/promptDecorationsProvider.js +0 -121
  158. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/types.d.ts +0 -13
  159. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/types.js +0 -13
@@ -20,16 +20,16 @@ import { ILabelService } from '@codingame/monaco-vscode-api/vscode/vs/platform/l
20
20
  import { TerminalLocation } from '@codingame/monaco-vscode-api/vscode/vs/platform/terminal/common/terminal';
21
21
  import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
22
22
  import { accessibleViewInCodeBlock } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration';
23
- import { reviewEdits } from '@codingame/monaco-vscode-9f229325-8261-585c-a552-16085958c680-common/vscode/vs/workbench/contrib/inlineChat/browser/inlineChatController';
23
+ import { reviewEdits } from '@codingame/monaco-vscode-6c0f93b9-169c-58c3-a9cb-7d60698eb52c-common/vscode/vs/workbench/contrib/inlineChat/browser/inlineChatController';
24
24
  import { ITerminalService, ITerminalEditorService, ITerminalGroupService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminal/browser/terminal.service';
25
25
  import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatContextKeys';
26
26
  import { ChatCopyKind } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService';
27
27
  import { IChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService.service';
28
- import { isResponseVM } from '@codingame/monaco-vscode-fab30422-b487-5f4e-8d30-8b4d266e3fcd-common/vscode/vs/workbench/contrib/chat/common/chatViewModel';
28
+ import { isResponseVM } from '@codingame/monaco-vscode-3a35f433-1297-5707-ab58-c261b8180e6d-common/vscode/vs/workbench/contrib/chat/common/chatViewModel';
29
29
  import { ChatAgentLocation } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
30
30
  import { IChatWidgetService, IChatCodeBlockContextProviderService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
31
31
  import { DefaultChatTextEditor } from '@codingame/monaco-vscode-c465110a-57c0-59d7-a6b2-be0a4db7e517-common/vscode/vs/workbench/contrib/chat/browser/codeBlockPart';
32
- import { CHAT_CATEGORY } from '@codingame/monaco-vscode-fab30422-b487-5f4e-8d30-8b4d266e3fcd-common/vscode/vs/workbench/contrib/chat/browser/actions/chatActions';
32
+ import { CHAT_CATEGORY } from '@codingame/monaco-vscode-3a35f433-1297-5707-ab58-c261b8180e6d-common/vscode/vs/workbench/contrib/chat/browser/actions/chatActions';
33
33
  import { ApplyCodeBlockOperation, InsertCodeBlockOperation } from './codeBlockOperations.js';
34
34
 
35
35
  const shellLangIds = [
@@ -81,7 +81,7 @@ let CodeBlockActionRendering = class CodeBlockActionRendering extends Disposable
81
81
  const context = this._context;
82
82
  if (isCodeBlockActionContext(context) && context.codemapperUri) {
83
83
  const label = labelService.getUriLabel(context.codemapperUri, { relative: true });
84
- return localize(4389, "Apply to {0}", label);
84
+ return localize(4423, "Apply to {0}", label);
85
85
  }
86
86
  return super.getTooltip();
87
87
  }
@@ -104,7 +104,7 @@ function registerChatCodeBlockActions() {
104
104
  constructor() {
105
105
  super({
106
106
  id: 'workbench.action.chat.copyCodeBlock',
107
- title: ( localize2(4390, "Copy")),
107
+ title: ( localize2(4424, "Copy")),
108
108
  f1: false,
109
109
  category: CHAT_CATEGORY,
110
110
  icon: Codicon.copy,
@@ -189,7 +189,7 @@ function registerChatCodeBlockActions() {
189
189
  constructor() {
190
190
  super({
191
191
  id: APPLY_IN_EDITOR_ID,
192
- title: ( localize2(4391, "Apply in Editor")),
192
+ title: ( localize2(4425, "Apply in Editor")),
193
193
  precondition: ChatContextKeys.enabled,
194
194
  f1: true,
195
195
  category: CHAT_CATEGORY,
@@ -225,7 +225,7 @@ function registerChatCodeBlockActions() {
225
225
  constructor() {
226
226
  super({
227
227
  id: 'workbench.action.chat.insertCodeBlock',
228
- title: ( localize2(4392, "Insert At Cursor")),
228
+ title: ( localize2(4426, "Insert At Cursor")),
229
229
  precondition: ChatContextKeys.enabled,
230
230
  f1: true,
231
231
  category: CHAT_CATEGORY,
@@ -259,7 +259,7 @@ function registerChatCodeBlockActions() {
259
259
  constructor() {
260
260
  super({
261
261
  id: 'workbench.action.chat.insertIntoNewFile',
262
- title: ( localize2(4393, "Insert into New File")),
262
+ title: ( localize2(4427, "Insert into New File")),
263
263
  precondition: ChatContextKeys.enabled,
264
264
  f1: true,
265
265
  category: CHAT_CATEGORY,
@@ -300,7 +300,7 @@ function registerChatCodeBlockActions() {
300
300
  constructor() {
301
301
  super({
302
302
  id: 'workbench.action.chat.runInTerminal',
303
- title: ( localize2(4394, "Insert into Terminal")),
303
+ title: ( localize2(4428, "Insert into Terminal")),
304
304
  precondition: ChatContextKeys.enabled,
305
305
  f1: true,
306
306
  category: CHAT_CATEGORY,
@@ -394,7 +394,7 @@ function registerChatCodeBlockActions() {
394
394
  constructor() {
395
395
  super({
396
396
  id: 'workbench.action.chat.nextCodeBlock',
397
- title: ( localize2(4395, "Next Code Block")),
397
+ title: ( localize2(4429, "Next Code Block")),
398
398
  keybinding: {
399
399
  primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.PageDown,
400
400
  mac: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.PageDown, },
@@ -414,7 +414,7 @@ function registerChatCodeBlockActions() {
414
414
  constructor() {
415
415
  super({
416
416
  id: 'workbench.action.chat.previousCodeBlock',
417
- title: ( localize2(4396, "Previous Code Block")),
417
+ title: ( localize2(4430, "Previous Code Block")),
418
418
  keybinding: {
419
419
  primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.PageUp,
420
420
  mac: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.PageUp, },
@@ -473,7 +473,7 @@ function registerChatCodeCompareBlockActions() {
473
473
  constructor() {
474
474
  super({
475
475
  id: 'workbench.action.chat.applyCompareEdits',
476
- title: ( localize2(4397, "Apply Edits")),
476
+ title: ( localize2(4431, "Apply Edits")),
477
477
  f1: false,
478
478
  category: CHAT_CATEGORY,
479
479
  icon: Codicon.gitPullRequestGoToChanges,
@@ -515,7 +515,7 @@ function registerChatCodeCompareBlockActions() {
515
515
  constructor() {
516
516
  super({
517
517
  id: 'workbench.action.chat.discardCompareEdits',
518
- title: ( localize2(4398, "Discard Edits")),
518
+ title: ( localize2(4432, "Discard Edits")),
519
519
  f1: false,
520
520
  category: CHAT_CATEGORY,
521
521
  icon: Codicon.trash,
@@ -0,0 +1,8 @@
1
+ import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
2
+ import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
3
+ import { IWorkbenchContribution } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/contributions";
4
+ import { IChatContextPickService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatContextPickService.service";
5
+ export declare class ChatContextContributions extends Disposable implements IWorkbenchContribution {
6
+ static readonly ID = "chat.contextContributions";
7
+ constructor(instantiationService: IInstantiationService, contextPickService: IChatContextPickService);
8
+ }
@@ -0,0 +1,256 @@
1
+
2
+ import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
3
+ import { CancellationToken } from '@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation';
4
+ import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
5
+ import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
6
+ import { isElectron } from '@codingame/monaco-vscode-api/vscode/vs/base/common/platform';
7
+ import { dirname } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
8
+ import { ThemeIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/themables';
9
+ import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
10
+ import { IClipboardService } from '@codingame/monaco-vscode-api/vscode/vs/platform/clipboard/common/clipboardService.service';
11
+ import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
12
+ import { ILabelService } from '@codingame/monaco-vscode-api/vscode/vs/platform/label/common/label.service';
13
+ import { EditorResourceAccessor, SideBySideEditor } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor';
14
+ import { DiffEditorInput } from '@codingame/monaco-vscode-9c72783f-914c-50be-b9ef-da16356d81a8-common/vscode/vs/workbench/common/editor/diffEditorInput';
15
+ import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
16
+ import { IHostService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/host/browser/host.service';
17
+ import { UntitledTextEditorInput } from '@codingame/monaco-vscode-f5d4b045-44e8-55a8-b683-308656a412fa-common/vscode/vs/workbench/services/untitled/common/untitledTextEditorInput';
18
+ import { FileEditorInput } from '@codingame/monaco-vscode-f5d4b045-44e8-55a8-b683-308656a412fa-common/vscode/vs/workbench/contrib/files/browser/editors/fileEditorInput';
19
+ import { NotebookEditorInput } from '@codingame/monaco-vscode-4372ad43-a220-5e78-83e6-95a9cfd64384-common/vscode/vs/workbench/contrib/notebook/common/notebookEditorInput';
20
+ import { IChatContextPickService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatContextPickService.service';
21
+ import { IChatEditingService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatEditingService.service';
22
+ import { OmittedState } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatModel';
23
+ import { ToolSet, ToolDataSource } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModelToolsService';
24
+ import { isImage } from '../chatPasteProviders.js';
25
+ import { convertBufferToScreenshotVariable } from '@codingame/monaco-vscode-3a35f433-1297-5707-ab58-c261b8180e6d-common/vscode/vs/workbench/contrib/chat/browser/contrib/screenshot';
26
+ import { ChatInstructionsPickerPick } from './promptActions/chatAttachInstructionsAction.js';
27
+ import { imageToHash } from '@codingame/monaco-vscode-1cb11a73-359e-5a2f-9e95-6989cc9858ee-common/vscode/vs/workbench/contrib/chat/browser/imageUtils';
28
+
29
+ let ChatContextContributions = class ChatContextContributions extends Disposable {
30
+ static { this.ID = 'chat.contextContributions'; }
31
+ constructor(instantiationService, contextPickService) {
32
+ super();
33
+ this._store.add(contextPickService.registerChatContextItem(instantiationService.createInstance(ToolsContextPickerPick)));
34
+ this._store.add(contextPickService.registerChatContextItem(instantiationService.createInstance(ChatInstructionsPickerPick)));
35
+ this._store.add(contextPickService.registerChatContextItem(instantiationService.createInstance(OpenEditorContextValuePick)));
36
+ this._store.add(contextPickService.registerChatContextItem(instantiationService.createInstance(RelatedFilesContextPickerPick)));
37
+ this._store.add(contextPickService.registerChatContextItem(instantiationService.createInstance(ClipboardImageContextValuePick)));
38
+ this._store.add(contextPickService.registerChatContextItem(instantiationService.createInstance(ScreenshotContextValuePick)));
39
+ }
40
+ };
41
+ ChatContextContributions = ( __decorate([
42
+ ( __param(0, IInstantiationService)),
43
+ ( __param(1, IChatContextPickService))
44
+ ], ChatContextContributions));
45
+ class ToolsContextPickerPick {
46
+ constructor() {
47
+ this.type = 'pickerPick';
48
+ this.label = ( localize(4433, 'Tools...'));
49
+ this.icon = Codicon.tools;
50
+ this.ordinal = -500;
51
+ }
52
+ asPicker(widget) {
53
+ const items = [];
54
+ for (const entry of widget.input.selectedToolsModel.entries.get()) {
55
+ if (entry instanceof ToolSet) {
56
+ items.push({
57
+ toolInfo: ToolDataSource.classify(entry.source),
58
+ label: entry.referenceName,
59
+ description: entry.description,
60
+ asAttachment: () => this._asToolSetAttachment(entry)
61
+ });
62
+ }
63
+ else {
64
+ items.push({
65
+ toolInfo: ToolDataSource.classify(entry.source),
66
+ label: entry.toolReferenceName ?? entry.displayName,
67
+ description: entry.userDescription ?? entry.modelDescription,
68
+ asAttachment: () => this._asToolAttachment(entry)
69
+ });
70
+ }
71
+ }
72
+ items.sort((a, b) => {
73
+ let res = a.toolInfo.ordinal - b.toolInfo.ordinal;
74
+ if (res === 0) {
75
+ res = a.toolInfo.label.localeCompare(b.toolInfo.label);
76
+ }
77
+ if (res === 0) {
78
+ res = a.label.localeCompare(b.label);
79
+ }
80
+ return res;
81
+ });
82
+ let lastGroupLabel;
83
+ const picks = [];
84
+ for (const item of items) {
85
+ if (lastGroupLabel !== item.toolInfo.label) {
86
+ picks.push({ type: 'separator', label: item.toolInfo.label });
87
+ lastGroupLabel = item.toolInfo.label;
88
+ }
89
+ picks.push(item);
90
+ }
91
+ return {
92
+ placeholder: ( localize(4434, 'Select a tool')),
93
+ picks: Promise.resolve(picks)
94
+ };
95
+ }
96
+ _asToolAttachment(entry) {
97
+ return {
98
+ kind: 'tool',
99
+ id: entry.id,
100
+ icon: ThemeIcon.isThemeIcon(entry.icon) ? entry.icon : undefined,
101
+ name: entry.displayName,
102
+ value: undefined,
103
+ };
104
+ }
105
+ _asToolSetAttachment(entry) {
106
+ return {
107
+ kind: 'toolset',
108
+ id: entry.id,
109
+ icon: entry.icon,
110
+ name: entry.referenceName,
111
+ value: ( Array.from(entry.getTools()).map(t => this._asToolAttachment(t))),
112
+ };
113
+ }
114
+ }
115
+ let OpenEditorContextValuePick = class OpenEditorContextValuePick {
116
+ constructor(_editorService, _labelService) {
117
+ this._editorService = _editorService;
118
+ this._labelService = _labelService;
119
+ this.type = 'valuePick';
120
+ this.label = ( localize(4435, 'Open Editors'));
121
+ this.icon = Codicon.file;
122
+ this.ordinal = 800;
123
+ }
124
+ isEnabled() {
125
+ return this._editorService.editors.filter(e => e instanceof FileEditorInput || e instanceof DiffEditorInput || e instanceof UntitledTextEditorInput).length > 0;
126
+ }
127
+ async asAttachment() {
128
+ const result = [];
129
+ for (const editor of this._editorService.editors) {
130
+ if (!(editor instanceof FileEditorInput || editor instanceof DiffEditorInput || editor instanceof UntitledTextEditorInput || editor instanceof NotebookEditorInput)) {
131
+ continue;
132
+ }
133
+ const uri = EditorResourceAccessor.getOriginalUri(editor, { supportSideBySide: SideBySideEditor.PRIMARY });
134
+ if (!uri) {
135
+ continue;
136
+ }
137
+ result.push({
138
+ kind: 'file',
139
+ id: ( uri.toString()),
140
+ value: uri,
141
+ name: this._labelService.getUriBasenameLabel(uri),
142
+ });
143
+ }
144
+ return result;
145
+ }
146
+ };
147
+ OpenEditorContextValuePick = ( __decorate([
148
+ ( __param(0, IEditorService)),
149
+ ( __param(1, ILabelService))
150
+ ], OpenEditorContextValuePick));
151
+ let RelatedFilesContextPickerPick = class RelatedFilesContextPickerPick {
152
+ constructor(_chatEditingService, _labelService) {
153
+ this._chatEditingService = _chatEditingService;
154
+ this._labelService = _labelService;
155
+ this.type = 'pickerPick';
156
+ this.label = ( localize(4436, 'Related Files'));
157
+ this.icon = Codicon.sparkle;
158
+ this.ordinal = 300;
159
+ }
160
+ isEnabled(widget) {
161
+ return this._chatEditingService.hasRelatedFilesProviders() && (Boolean(widget.getInput()) || widget.attachmentModel.fileAttachments.length > 0);
162
+ }
163
+ asPicker(widget) {
164
+ const picks = (async () => {
165
+ const chatSessionId = widget.viewModel?.sessionId;
166
+ if (!chatSessionId) {
167
+ return [];
168
+ }
169
+ const relatedFiles = await this._chatEditingService.getRelatedFiles(chatSessionId, widget.getInput(), widget.attachmentModel.fileAttachments, CancellationToken.None);
170
+ if (!relatedFiles) {
171
+ return [];
172
+ }
173
+ const attachments = widget.attachmentModel.getAttachmentIDs();
174
+ return this._chatEditingService.getRelatedFiles(chatSessionId, widget.getInput(), widget.attachmentModel.fileAttachments, CancellationToken.None)
175
+ .then((files) => (files ?? []).reduce((acc, cur) => {
176
+ acc.push({ type: 'separator', label: cur.group });
177
+ for (const file of cur.files) {
178
+ const label = this._labelService.getUriBasenameLabel(file.uri);
179
+ acc.push({
180
+ label: label,
181
+ description: this._labelService.getUriLabel(dirname(file.uri), { relative: true }),
182
+ disabled: ( attachments.has(( file.uri.toString()))),
183
+ asAttachment: () => {
184
+ return {
185
+ kind: 'file',
186
+ id: ( file.uri.toString()),
187
+ value: file.uri,
188
+ name: label,
189
+ omittedState: OmittedState.NotOmitted
190
+ };
191
+ }
192
+ });
193
+ }
194
+ return acc;
195
+ }, []));
196
+ })();
197
+ return {
198
+ placeholder: ( localize(4437, 'Add related files to your working set')),
199
+ picks,
200
+ };
201
+ }
202
+ };
203
+ RelatedFilesContextPickerPick = ( __decorate([
204
+ ( __param(0, IChatEditingService)),
205
+ ( __param(1, ILabelService))
206
+ ], RelatedFilesContextPickerPick));
207
+ let ClipboardImageContextValuePick = class ClipboardImageContextValuePick {
208
+ constructor(_clipboardService) {
209
+ this._clipboardService = _clipboardService;
210
+ this.type = 'valuePick';
211
+ this.label = ( localize(4438, 'Image from Clipboard'));
212
+ this.icon = Codicon.fileMedia;
213
+ }
214
+ async isEnabled(widget) {
215
+ if (!widget.input.selectedLanguageModel?.metadata.capabilities?.vision) {
216
+ return false;
217
+ }
218
+ const imageData = await this._clipboardService.readImage();
219
+ return isImage(imageData);
220
+ }
221
+ async asAttachment() {
222
+ const fileBuffer = await this._clipboardService.readImage();
223
+ return {
224
+ id: await imageToHash(fileBuffer),
225
+ name: ( localize(4439, 'Pasted Image')),
226
+ fullName: ( localize(4439, 'Pasted Image')),
227
+ value: fileBuffer,
228
+ kind: 'image',
229
+ };
230
+ }
231
+ };
232
+ ClipboardImageContextValuePick = ( __decorate([
233
+ ( __param(0, IClipboardService))
234
+ ], ClipboardImageContextValuePick));
235
+ let ScreenshotContextValuePick = class ScreenshotContextValuePick {
236
+ constructor(_hostService) {
237
+ this._hostService = _hostService;
238
+ this.type = 'valuePick';
239
+ this.icon = Codicon.deviceCamera;
240
+ this.label = (isElectron
241
+ ? ( localize(4440, 'Screenshot Window'))
242
+ : ( localize(4441, 'Screenshot')));
243
+ }
244
+ async isEnabled(widget) {
245
+ return !!widget.input.selectedLanguageModel?.metadata.capabilities?.vision;
246
+ }
247
+ async asAttachment() {
248
+ const blob = await this._hostService.getScreenshot();
249
+ return blob && convertBufferToScreenshotVariable(blob);
250
+ }
251
+ };
252
+ ScreenshotContextValuePick = ( __decorate([
253
+ ( __param(0, IHostService))
254
+ ], ScreenshotContextValuePick));
255
+
256
+ export { ChatContextContributions };
@@ -8,10 +8,9 @@ export declare class AttachSearchResultAction extends Action2 {
8
8
  }
9
9
  export declare class AttachContextAction extends Action2 {
10
10
  constructor();
11
- private _getFileContextId;
12
- private _attachContext;
13
11
  run(accessor: ServicesAccessor, ...args: any[]): Promise<void>;
14
- private _showDiagnosticsPick;
15
12
  private _show;
16
- private _showFolders;
13
+ private _handleQPPick;
14
+ private _handleContextPick;
15
+ private _handleContextPickerItem;
17
16
  }