@codingame/monaco-vscode-chat-service-override 25.1.2 → 26.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 (334) hide show
  1. package/index.js +24 -3
  2. package/package.json +5 -5
  3. package/vscode/src/vs/platform/browserElements/common/browserElements.d.ts +23 -3
  4. package/vscode/src/vs/platform/browserElements/common/browserElements.js +13 -6
  5. package/vscode/src/vs/platform/domWidget/browser/domWidget.js +4 -4
  6. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityService.d.ts +1 -1
  7. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityService.js +42 -27
  8. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.d.ts +14 -0
  9. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatResponseAccessibleView.js +218 -74
  10. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatTerminalOutputAccessibleView.js +6 -8
  11. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityActions.js +14 -9
  12. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +165 -168
  13. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAgentRecommendationActions.js +27 -25
  14. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +141 -140
  15. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +189 -121
  16. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +14 -15
  17. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCustomizationDiagnosticsAction.d.ts +60 -0
  18. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCustomizationDiagnosticsAction.js +435 -0
  19. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +28 -12
  20. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +10 -12
  21. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatGettingStarted.d.ts +3 -1
  22. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatGettingStarted.js +37 -16
  23. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.d.ts +11 -0
  24. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +54 -24
  25. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatLanguageModelActions.js +73 -34
  26. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatMoveActions.js +71 -30
  27. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatNewActions.js +151 -89
  28. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPromptNavigationActions.js +12 -15
  29. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +39 -40
  30. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.js +90 -125
  31. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.d.ts +5 -2
  32. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.js +263 -143
  33. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTransfer.js +4 -4
  34. package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +188 -126
  35. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.contribution.d.ts +1 -1
  36. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.contribution.js +37 -28
  37. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.d.ts +21 -9
  38. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.js +392 -226
  39. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsPicker.js +31 -27
  40. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsQuickAccess.js +25 -23
  41. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsService.js +1 -3
  42. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjection.d.ts +2 -0
  43. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjection.js +13 -0
  44. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionActions.d.ts +20 -0
  45. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionActions.js +83 -0
  46. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionService.d.ts +68 -0
  47. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionService.js +319 -0
  48. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionsExperiments.contribution.d.ts +1 -0
  49. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionsExperiments.contribution.js +215 -0
  50. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.d.ts +179 -0
  51. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentTitleBarStatusWidget.js +951 -0
  52. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/media/agentsessionprojection.css +20 -0
  53. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/media/agenttitlebarstatuswidget.css +388 -0
  54. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/media/unifiedQuickAccess.css +195 -0
  55. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccess.d.ts +120 -0
  56. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccess.js +394 -0
  57. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccessActions.d.ts +38 -0
  58. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/unifiedQuickAccessActions.js +95 -0
  59. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/localAgentSessionsProvider.d.ts +3 -1
  60. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/localAgentSessionsProvider.js +31 -29
  61. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentResolveService.js +49 -47
  62. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatVariables.js +4 -6
  63. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/media/simpleBrowserOverlay.css +0 -1
  64. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/simpleBrowserEditorOverlay.js +188 -151
  65. package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +1012 -639
  66. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCheckpointTimelineImpl.js +256 -151
  67. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.d.ts +8 -1
  68. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +182 -101
  69. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingDeletedFileEntry.d.ts +79 -0
  70. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingDeletedFileEntry.js +193 -0
  71. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorAccessibility.js +9 -7
  72. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationModelManager.d.ts +68 -0
  73. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationModelManager.js +253 -0
  74. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.d.ts +4 -5
  75. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.js +69 -50
  76. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.d.ts +3 -4
  77. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.js +52 -33
  78. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.d.ts +5 -6
  79. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.js +274 -155
  80. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingOperations.js +1 -1
  81. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.d.ts +2 -10
  82. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.js +130 -104
  83. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.d.ts +12 -2
  84. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +385 -160
  85. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSessionStorage.js +53 -36
  86. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelChangeService.js +112 -75
  87. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelContentProviders.js +19 -10
  88. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/media/chatEditorController.css +31 -11
  89. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingModifiedNotebookSnapshot.js +39 -17
  90. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNewNotebookContentEdits.js +10 -14
  91. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookCellEntry.d.ts +0 -2
  92. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookCellEntry.js +25 -16
  93. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.d.ts +1 -1
  94. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.js +265 -203
  95. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookFileSystemProvider.js +29 -26
  96. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/helpers.js +114 -60
  97. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/notebookCellChanges.js +16 -19
  98. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/overlayToolbarDecorator.js +44 -30
  99. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagement.contribution.js +119 -45
  100. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditor.d.ts +1 -0
  101. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditor.js +152 -136
  102. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.js +12 -8
  103. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsViewModel.d.ts +51 -31
  104. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsViewModel.js +323 -217
  105. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.d.ts +4 -3
  106. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.js +653 -401
  107. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatUsageWidget.js +52 -40
  108. package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/media/chatModelsWidget.css +22 -3
  109. package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.d.ts +5 -2
  110. package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.js +43 -28
  111. package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +182 -136
  112. package/vscode/src/vs/workbench/contrib/chat/browser/chatRepoInfo.d.ts +33 -0
  113. package/vscode/src/vs/workbench/contrib/chat/browser/chatRepoInfo.js +548 -0
  114. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.d.ts +0 -1
  115. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupContributions.js +222 -138
  116. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.d.ts +3 -3
  117. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupController.js +151 -113
  118. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.d.ts +6 -4
  119. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupProviders.js +453 -217
  120. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.d.ts +1 -1
  121. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetupRunner.js +162 -88
  122. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/media/chatSetup.css +2 -1
  123. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatus.d.ts +0 -2
  124. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatus.js +1 -13
  125. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.d.ts +1 -0
  126. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusDashboard.js +309 -233
  127. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusEntry.js +55 -53
  128. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus/chatStatusItemService.js +3 -1
  129. package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.d.ts +37 -0
  130. package/vscode/src/vs/workbench/contrib/chat/browser/chatTipService.js +109 -0
  131. package/vscode/src/vs/workbench/contrib/chat/browser/chatWindowNotifier.js +35 -23
  132. package/vscode/src/vs/workbench/contrib/chat/browser/contextContrib/chatContextService.d.ts +9 -4
  133. package/vscode/src/vs/workbench/contrib/chat/browser/contextContrib/chatContextService.js +73 -33
  134. package/vscode/src/vs/workbench/contrib/chat/browser/languageModelsConfigurationService.d.ts +47 -0
  135. package/vscode/src/vs/workbench/contrib/chat/browser/languageModelsConfigurationService.js +333 -0
  136. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/chatModeActions.js +39 -25
  137. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptCodingAgentActionContribution.js +9 -5
  138. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptCodingAgentActionOverlay.js +23 -20
  139. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptFileActions.js +2 -0
  140. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolsCodeLensProvider.js +20 -16
  141. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptUrlHandler.js +65 -57
  142. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/runPromptAction.js +48 -36
  143. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/saveAsPromptFileActions.js +20 -12
  144. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/skillActions.d.ts +4 -0
  145. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/skillActions.js +52 -0
  146. package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsConfirmationService.js +155 -159
  147. package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.d.ts +24 -14
  148. package/vscode/src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.js +521 -246
  149. package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolSetsContribution.js +107 -76
  150. package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +28 -24
  151. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownAnchorService.js +10 -6
  152. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolOutputStateCache.d.ts +16 -0
  153. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolOutputStateCache.js +57 -0
  154. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatLayoutService.js +4 -6
  155. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidgetService.js +56 -44
  156. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatStatusWidget.d.ts +0 -3
  157. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatStatusWidget.js +37 -47
  158. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatEditorInputContentProvider.js +5 -7
  159. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.d.ts +10 -0
  160. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.js +1284 -0
  161. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorContrib.js +179 -125
  162. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputEditorHover.js +9 -11
  163. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/editorHoverWrapper.js +7 -6
  164. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/chatQuick.js +96 -78
  165. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditor.js +58 -53
  166. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.d.ts +25 -11
  167. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.js +484 -292
  168. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewTitleControl.d.ts +1 -6
  169. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewTitleControl.js +65 -92
  170. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatViewPane.css +16 -19
  171. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatViewTitleControl.css +1 -0
  172. package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.d.ts +9 -1
  173. package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.js +331 -189
  174. package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatServiceTelemetry.js +81 -93
  175. package/vscode/src/vs/workbench/contrib/chat/common/ignoredFiles.js +1 -3
  176. package/vscode/src/vs/workbench/contrib/chat/common/model/chatModelStore.d.ts +5 -3
  177. package/vscode/src/vs/workbench/contrib/chat/common/model/chatModelStore.js +6 -7
  178. package/vscode/src/vs/workbench/contrib/chat/common/model/chatProgressTypes/chatToolInvocation.d.ts +36 -8
  179. package/vscode/src/vs/workbench/contrib/chat/common/model/chatProgressTypes/chatToolInvocation.js +169 -31
  180. package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionOperationLog.d.ts +6 -0
  181. package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionOperationLog.js +141 -0
  182. package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.d.ts +6 -4
  183. package/vscode/src/vs/workbench/contrib/chat/common/model/chatSessionStore.js +218 -144
  184. package/vscode/src/vs/workbench/contrib/chat/common/model/chatTransferService.js +20 -10
  185. package/vscode/src/vs/workbench/contrib/chat/common/model/objectMutationLog.d.ts +109 -0
  186. package/vscode/src/vs/workbench/contrib/chat/common/model/objectMutationLog.js +349 -0
  187. package/vscode/src/vs/workbench/contrib/chat/common/participants/chatSlashCommands.js +9 -8
  188. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.d.ts +9 -0
  189. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.js +139 -36
  190. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/PromptHeaderDefinitionProvider.js +3 -6
  191. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptBodyAutocompletion.js +64 -51
  192. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptCodeActions.js +49 -34
  193. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptDocumentSemanticTokensProvider.js +21 -13
  194. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.d.ts +1 -1
  195. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.js +125 -97
  196. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.js +91 -131
  197. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptLinkProvider.js +8 -5
  198. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.d.ts +5 -0
  199. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.js +488 -222
  200. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/promptFileContributions.js +32 -12
  201. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.d.ts +58 -13
  202. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.js +717 -200
  203. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.d.ts +79 -18
  204. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.js +371 -130
  205. package/vscode/src/vs/workbench/contrib/chat/common/tools/chatTodoListService.d.ts +0 -1
  206. package/vscode/src/vs/workbench/contrib/chat/common/tools/chatTodoListService.js +3 -7
  207. package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +79 -61
  208. package/vscode/src/vs/workbench/contrib/chat/common/widget/chatResponseResourceFileSystemProvider.js +27 -21
  209. package/vscode/src/vs/workbench/contrib/editTelemetry/browser/telemetry/aiEditTelemetry/aiEditTelemetryServiceImpl.js +7 -10
  210. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.d.ts +1 -1
  211. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.js +26 -32
  212. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAccessibilityHelp.js +2 -2
  213. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.d.ts +8 -60
  214. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +115 -426
  215. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatDefaultModel.d.ts +15 -0
  216. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatDefaultModel.js +127 -0
  217. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatNotebook.js +1 -37
  218. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.d.ts +16 -0
  219. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.js +21 -0
  220. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.d.ts +51 -0
  221. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +334 -0
  222. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpPromptArgumentPick.d.ts +41 -0
  223. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpPromptArgumentPick.js +424 -0
  224. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chat/notebookChatUtils.d.ts +4 -0
  225. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chat/notebookChatUtils.js +58 -0
  226. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.d.ts +7 -0
  227. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.js +195 -0
  228. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.d.ts +8 -0
  229. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.js +368 -0
  230. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext.d.ts +2 -0
  231. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext.js +7 -0
  232. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookModifiedCellDecorator.d.ts +1 -1
  233. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookModifiedCellDecorator.js +1 -1
  234. package/vscode/src/vs/workbench/contrib/remoteCodingAgents/browser/remoteCodingAgents.contribution.js +23 -25
  235. package/vscode/src/vs/workbench/contrib/remoteCodingAgents/common/remoteCodingAgentsService.js +7 -8
  236. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatAccessibilityHelp.js +34 -38
  237. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatAccessibleView.js +8 -12
  238. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatActions.js +103 -95
  239. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatController.js +28 -16
  240. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatEnabler.js +4 -5
  241. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatService.d.ts +12 -8
  242. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatService.js +65 -54
  243. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.js +86 -60
  244. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/alternativeRecommendation.js +13 -26
  245. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/commandParsers/commandFileWriteParser.d.ts +24 -0
  246. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/commandParsers/sedFileWriteParser.d.ts +26 -0
  247. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/commandParsers/sedFileWriteParser.js +142 -0
  248. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.d.ts +2 -1
  249. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.js +56 -46
  250. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/executeStrategy.d.ts +2 -2
  251. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/executeStrategy.js +63 -31
  252. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/noneExecuteStrategy.d.ts +2 -1
  253. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/noneExecuteStrategy.js +35 -30
  254. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.d.ts +2 -1
  255. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.js +44 -37
  256. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/strategyHelpers.js +3 -4
  257. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/outputHelpers.js +3 -3
  258. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.d.ts +11 -0
  259. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.js +70 -50
  260. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalToolTelemetry.js +26 -394
  261. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/taskHelpers.js +85 -49
  262. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.js +68 -27
  263. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/toolTerminalCreator.d.ts +1 -0
  264. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/toolTerminalCreator.js +67 -45
  265. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/awaitTerminalTool.d.ts +12 -0
  266. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/awaitTerminalTool.js +106 -0
  267. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/commandLineAutoApprover.d.ts +2 -2
  268. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/commandLineAutoApprover.js +177 -97
  269. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/npmScriptAutoApprover.js +136 -49
  270. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAnalyzer.d.ts +2 -1
  271. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.js +128 -112
  272. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.js +51 -49
  273. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineSandboxAnalyzer.d.ts +8 -0
  274. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineSandboxAnalyzer.js +25 -0
  275. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/commandLinePresenter.d.ts +41 -0
  276. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/nodeCommandLinePresenter.d.ts +19 -0
  277. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/nodeCommandLinePresenter.js +37 -0
  278. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/pythonCommandLinePresenter.d.ts +19 -0
  279. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/pythonCommandLinePresenter.js +37 -0
  280. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/rubyCommandLinePresenter.d.ts +19 -0
  281. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/rubyCommandLinePresenter.js +44 -0
  282. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/sandboxedCommandLinePresenter.d.ts +12 -0
  283. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/sandboxedCommandLinePresenter.js +21 -0
  284. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineCdPrefixRewriter.js +5 -14
  285. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLinePreventHistoryRewriter.js +2 -4
  286. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineRewriter.d.ts +1 -0
  287. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineSandboxRewriter.d.ts +8 -0
  288. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineSandboxRewriter.js +29 -0
  289. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalLastCommandTool.js +30 -31
  290. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalOutputTool.js +16 -17
  291. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalSelectionTool.js +19 -20
  292. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/killTerminalTool.d.ts +11 -0
  293. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/killTerminalTool.js +58 -0
  294. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.d.ts +31 -3
  295. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.js +325 -199
  296. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/types.d.ts +1 -1
  297. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/types.js +1 -1
  298. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.js +33 -38
  299. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.d.ts +45 -5
  300. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.js +746 -456
  301. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/createAndRunTaskTool.js +145 -98
  302. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/getTaskOutputTool.js +88 -37
  303. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/runTaskTool.js +120 -51
  304. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/taskHelpers.js +25 -28
  305. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalCommandArtifactCollector.d.ts +5 -0
  306. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalCommandArtifactCollector.js +58 -12
  307. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/toolIds.d.ts +12 -0
  308. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/toolIds.js +17 -0
  309. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/treeSitterCommandParser.d.ts +8 -1
  310. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/treeSitterCommandParser.js +47 -28
  311. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.d.ts +37 -0
  312. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.js +171 -0
  313. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.d.ts +0 -58
  314. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.js +0 -213
  315. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.d.ts +0 -39
  316. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.js +0 -243
  317. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsOpener.d.ts +0 -7
  318. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsOpener.js +0 -41
  319. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.d.ts +0 -166
  320. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.js +0 -607
  321. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/media/agentsessionsviewer.css +0 -255
  322. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.d.ts +0 -46
  323. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +0 -396
  324. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.d.ts +0 -9
  325. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +0 -379
  326. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/media/chatEditingEditorOverlay.css +0 -117
  327. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.d.ts +0 -141
  328. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.js +0 -961
  329. package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.d.ts +0 -36
  330. package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.js +0 -447
  331. package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsParametersSchema.d.ts +0 -6
  332. package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsParametersSchema.js +0 -251
  333. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAccessibleView.d.ts +0 -10
  334. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAccessibleView.js +0 -42
@@ -0,0 +1,41 @@
1
+ import type { MaybePromise } from "@codingame/monaco-vscode-api/vscode/vs/base/common/async";
2
+ import type { OperatingSystem } from "@codingame/monaco-vscode-api/vscode/vs/base/common/platform";
3
+ export interface ICommandLinePresenter {
4
+ /**
5
+ * Attempts to create a presentation for the given command line.
6
+ * Command line presenters allow displaying an extracted/transformed version
7
+ * of a command (e.g., Python code from `python -c "..."`) with appropriate
8
+ * syntax highlighting, while the actual command remains unchanged.
9
+ *
10
+ * @returns The presentation result if this presenter handles the command, undefined otherwise.
11
+ */
12
+ present(options: ICommandLinePresenterOptions): MaybePromise<ICommandLinePresenterResult | undefined>;
13
+ }
14
+ export interface ICommandLinePresenterOptions {
15
+ commandLine: ICommandLinePresentationInput;
16
+ shell: string;
17
+ os: OperatingSystem;
18
+ }
19
+ export interface ICommandLinePresentationInput {
20
+ original?: string;
21
+ forDisplay: string;
22
+ }
23
+ export interface ICommandLinePresenterResult {
24
+ /**
25
+ * The extracted/transformed command to display (e.g., the Python code).
26
+ */
27
+ commandLine: string;
28
+ /**
29
+ * The language ID for syntax highlighting (e.g., 'python').
30
+ */
31
+ language?: string;
32
+ /**
33
+ * A human-readable name for the language (e.g., 'Python') used in UI labels.
34
+ */
35
+ languageDisplayName?: string;
36
+ /**
37
+ * Whether other presenters should still process the command line.
38
+ * Defaults to false - once a presenter handles a command, no further processing is done.
39
+ */
40
+ processOtherPresenters?: boolean;
41
+ }
@@ -0,0 +1,19 @@
1
+ import { OperatingSystem } from "@codingame/monaco-vscode-api/vscode/vs/base/common/platform";
2
+ import type { ICommandLinePresenter, ICommandLinePresenterOptions, ICommandLinePresenterResult } from "./commandLinePresenter.js";
3
+ /**
4
+ * Command line presenter for Node.js inline commands (`node -e "..."`).
5
+ * Extracts the JavaScript code and sets up JavaScript syntax highlighting.
6
+ */
7
+ export declare class NodeCommandLinePresenter implements ICommandLinePresenter {
8
+ present(options: ICommandLinePresenterOptions): ICommandLinePresenterResult | undefined;
9
+ }
10
+ /**
11
+ * Extracts the JavaScript code from a `node -e "..."` or `node -e '...'` command,
12
+ * returning the code with properly unescaped quotes.
13
+ *
14
+ * @param commandLine The full command line to parse
15
+ * @param shell The shell path (to determine quote escaping style)
16
+ * @param os The operating system
17
+ * @returns The extracted JavaScript code, or undefined if not a node -e/--eval command
18
+ */
19
+ export declare function extractNodeCommand(commandLine: string, shell: string, os: OperatingSystem): string | undefined;
@@ -0,0 +1,37 @@
1
+
2
+ import { isPowerShell } from '../../runInTerminalHelpers.js';
3
+
4
+ class NodeCommandLinePresenter {
5
+ present(options) {
6
+ const commandLine = options.commandLine.forDisplay;
7
+ const extractedNode = extractNodeCommand(commandLine, options.shell, options.os);
8
+ if (extractedNode) {
9
+ return {
10
+ commandLine: extractedNode,
11
+ language: 'javascript',
12
+ languageDisplayName: 'Node.js',
13
+ };
14
+ }
15
+ return undefined;
16
+ }
17
+ }
18
+ function extractNodeCommand(commandLine, shell, os) {
19
+ const doubleQuoteMatch = commandLine.match(/^node(?:js)?\s+(?:-e|--eval)\s+"(?<code>.+)"$/s);
20
+ if (doubleQuoteMatch?.groups?.code) {
21
+ let jsCode = doubleQuoteMatch.groups.code.trim();
22
+ if (isPowerShell(shell, os)) {
23
+ jsCode = jsCode.replace(/`"/g, '"');
24
+ }
25
+ else {
26
+ jsCode = jsCode.replace(/\\"/g, '"');
27
+ }
28
+ return jsCode;
29
+ }
30
+ const singleQuoteMatch = commandLine.match(/^node(?:js)?\s+(?:-e|--eval)\s+'(?<code>.+)'$/s);
31
+ if (singleQuoteMatch?.groups?.code) {
32
+ return singleQuoteMatch.groups.code.trim();
33
+ }
34
+ return undefined;
35
+ }
36
+
37
+ export { NodeCommandLinePresenter, extractNodeCommand };
@@ -0,0 +1,19 @@
1
+ import { OperatingSystem } from "@codingame/monaco-vscode-api/vscode/vs/base/common/platform";
2
+ import type { ICommandLinePresenter, ICommandLinePresenterOptions, ICommandLinePresenterResult } from "./commandLinePresenter.js";
3
+ /**
4
+ * Command line presenter for Python inline commands (`python -c "..."`).
5
+ * Extracts the Python code and sets up Python syntax highlighting.
6
+ */
7
+ export declare class PythonCommandLinePresenter implements ICommandLinePresenter {
8
+ present(options: ICommandLinePresenterOptions): ICommandLinePresenterResult | undefined;
9
+ }
10
+ /**
11
+ * Extracts the Python code from a `python -c "..."` or `python -c '...'` command,
12
+ * returning the code with properly unescaped quotes.
13
+ *
14
+ * @param commandLine The full command line to parse
15
+ * @param shell The shell path (to determine quote escaping style)
16
+ * @param os The operating system
17
+ * @returns The extracted Python code, or undefined if not a python -c command
18
+ */
19
+ export declare function extractPythonCommand(commandLine: string, shell: string, os: OperatingSystem): string | undefined;
@@ -0,0 +1,37 @@
1
+
2
+ import { isPowerShell } from '../../runInTerminalHelpers.js';
3
+
4
+ class PythonCommandLinePresenter {
5
+ present(options) {
6
+ const commandLine = options.commandLine.forDisplay;
7
+ const extractedPython = extractPythonCommand(commandLine, options.shell, options.os);
8
+ if (extractedPython) {
9
+ return {
10
+ commandLine: extractedPython,
11
+ language: 'python',
12
+ languageDisplayName: 'Python',
13
+ };
14
+ }
15
+ return undefined;
16
+ }
17
+ }
18
+ function extractPythonCommand(commandLine, shell, os) {
19
+ const doubleQuoteMatch = commandLine.match(/^python(?:3)?\s+-c\s+"(?<python>.+)"$/s);
20
+ if (doubleQuoteMatch?.groups?.python) {
21
+ let pythonCode = doubleQuoteMatch.groups.python.trim();
22
+ if (isPowerShell(shell, os)) {
23
+ pythonCode = pythonCode.replace(/`"/g, '"');
24
+ }
25
+ else {
26
+ pythonCode = pythonCode.replace(/\\"/g, '"');
27
+ }
28
+ return pythonCode;
29
+ }
30
+ const singleQuoteMatch = commandLine.match(/^python(?:3)?\s+-c\s+'(?<python>.+)'$/s);
31
+ if (singleQuoteMatch?.groups?.python) {
32
+ return singleQuoteMatch.groups.python.trim();
33
+ }
34
+ return undefined;
35
+ }
36
+
37
+ export { PythonCommandLinePresenter, extractPythonCommand };
@@ -0,0 +1,19 @@
1
+ import { OperatingSystem } from "@codingame/monaco-vscode-api/vscode/vs/base/common/platform";
2
+ import type { ICommandLinePresenter, ICommandLinePresenterOptions, ICommandLinePresenterResult } from "./commandLinePresenter.js";
3
+ /**
4
+ * Command line presenter for Ruby inline commands (`ruby -e "..."`).
5
+ * Extracts the Ruby code and sets up Ruby syntax highlighting.
6
+ */
7
+ export declare class RubyCommandLinePresenter implements ICommandLinePresenter {
8
+ present(options: ICommandLinePresenterOptions): ICommandLinePresenterResult | undefined;
9
+ }
10
+ /**
11
+ * Extracts the Ruby code from a `ruby -e "..."` or `ruby -e '...'` command,
12
+ * returning the code with properly unescaped quotes.
13
+ *
14
+ * @param commandLine The full command line to parse
15
+ * @param shell The shell path (to determine quote escaping style)
16
+ * @param os The operating system
17
+ * @returns The extracted Ruby code, or undefined if not a ruby -e command
18
+ */
19
+ export declare function extractRubyCommand(commandLine: string, shell: string, os: OperatingSystem): string | undefined;
@@ -0,0 +1,44 @@
1
+
2
+ import { isPowerShell } from '../../runInTerminalHelpers.js';
3
+
4
+ class RubyCommandLinePresenter {
5
+ present(options) {
6
+ const commandLine = options.commandLine.forDisplay;
7
+ const extractedRuby = extractRubyCommand(commandLine, options.shell, options.os);
8
+ if (extractedRuby) {
9
+ return {
10
+ commandLine: extractedRuby,
11
+ language: 'ruby',
12
+ languageDisplayName: 'Ruby',
13
+ };
14
+ }
15
+ return undefined;
16
+ }
17
+ }
18
+ function extractRubyCommand(commandLine, shell, os) {
19
+ const doubleQuoteMatch = commandLine.match(/^ruby\s+-e\s+"(?<code>.+)"$/s);
20
+ if (doubleQuoteMatch?.groups?.code) {
21
+ let rubyCode = doubleQuoteMatch.groups.code.trim();
22
+ if (!rubyCode) {
23
+ return undefined;
24
+ }
25
+ if (isPowerShell(shell, os)) {
26
+ rubyCode = rubyCode.replace(/`"/g, '"');
27
+ }
28
+ else {
29
+ rubyCode = rubyCode.replace(/\\"/g, '"');
30
+ }
31
+ return rubyCode;
32
+ }
33
+ const singleQuoteMatch = commandLine.match(/^ruby\s+-e\s+'(?<code>.+)'$/s);
34
+ if (singleQuoteMatch?.groups?.code) {
35
+ const rubyCode = singleQuoteMatch.groups.code.trim();
36
+ if (!rubyCode) {
37
+ return undefined;
38
+ }
39
+ return rubyCode;
40
+ }
41
+ return undefined;
42
+ }
43
+
44
+ export { RubyCommandLinePresenter, extractRubyCommand };
@@ -0,0 +1,12 @@
1
+ import { ITerminalSandboxService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.service";
2
+ import type { ICommandLinePresenter, ICommandLinePresenterOptions, ICommandLinePresenterResult } from "./commandLinePresenter.js";
3
+ /**
4
+ * Command line presenter for sandboxed commands.
5
+ * Extracts the original command from the sandbox wrapper for cleaner display,
6
+ * while the actual sandboxed command runs unchanged.
7
+ */
8
+ export declare class SandboxedCommandLinePresenter implements ICommandLinePresenter {
9
+ private readonly _sandboxService;
10
+ constructor(_sandboxService: ITerminalSandboxService);
11
+ present(options: ICommandLinePresenterOptions): Promise<ICommandLinePresenterResult | undefined>;
12
+ }
@@ -0,0 +1,21 @@
1
+
2
+ import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
3
+ import { ITerminalSandboxService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.service';
4
+
5
+ let SandboxedCommandLinePresenter = class SandboxedCommandLinePresenter {
6
+ constructor(_sandboxService) {
7
+ this._sandboxService = _sandboxService;
8
+ }
9
+ async present(options) {
10
+ if (!(await this._sandboxService.isEnabled())) {
11
+ return undefined;
12
+ }
13
+ return {
14
+ commandLine: options.commandLine.original ?? options.commandLine.forDisplay,
15
+ processOtherPresenters: true
16
+ };
17
+ }
18
+ };
19
+ SandboxedCommandLinePresenter = ( __decorate([( __param(0, ITerminalSandboxService))], SandboxedCommandLinePresenter));
20
+
21
+ export { SandboxedCommandLinePresenter };
@@ -1,32 +1,23 @@
1
1
 
2
2
  import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
3
3
  import { OperatingSystem } from '@codingame/monaco-vscode-api/vscode/vs/base/common/platform';
4
- import { isPowerShell } from '../../runInTerminalHelpers.js';
4
+ import { extractCdPrefix } from '../../runInTerminalHelpers.js';
5
5
 
6
6
  class CommandLineCdPrefixRewriter extends Disposable {
7
7
  rewrite(options) {
8
8
  if (!options.cwd) {
9
9
  return undefined;
10
10
  }
11
- const isPwsh = isPowerShell(options.shell, options.os);
12
- const cdPrefixMatch = options.commandLine.match(isPwsh
13
- ? /^(?:cd(?: \/d)?|Set-Location(?: -Path)?) (?<dir>[^\s]+) ?(?:&&|;)\s+(?<suffix>.+)$/i
14
- : /^cd (?<dir>[^\s]+) &&\s+(?<suffix>.+)$/);
15
- const cdDir = cdPrefixMatch?.groups?.dir;
16
- const cdSuffix = cdPrefixMatch?.groups?.suffix;
17
- if (cdDir && cdSuffix) {
18
- let cdDirPath = cdDir;
19
- if (cdDirPath.startsWith('"') && cdDirPath.endsWith('"')) {
20
- cdDirPath = cdDirPath.slice(1, -1);
21
- }
22
- cdDirPath = cdDirPath.replace(/(?:[\\\/])$/, '');
11
+ const extracted = extractCdPrefix(options.commandLine, options.shell, options.os);
12
+ if (extracted) {
13
+ let cdDirPath = extracted.directory.replace(/(?:[\\\/])$/, '');
23
14
  let cwdFsPath = options.cwd.fsPath.replace(/(?:[\\\/])$/, '');
24
15
  if (options.os === OperatingSystem.Windows) {
25
16
  cdDirPath = cdDirPath.toLowerCase();
26
17
  cwdFsPath = cwdFsPath.toLowerCase();
27
18
  }
28
19
  if (cdDirPath === cwdFsPath) {
29
- return { rewritten: cdSuffix, reasoning: 'Removed redundant cd command' };
20
+ return { rewritten: extracted.command, reasoning: 'Removed redundant cd command' };
30
21
  }
31
22
  }
32
23
  return undefined;
@@ -18,14 +18,12 @@ let CommandLinePreventHistoryRewriter = class CommandLinePreventHistoryRewriter
18
18
  if (isBash(options.shell, options.os) || isZsh(options.shell, options.os)) {
19
19
  return {
20
20
  rewritten: ` ${options.commandLine}`,
21
- reasoning: 'Prepended with a space to exclude from shell history'
21
+ reasoning: "Prepended with a space to exclude from shell history"
22
22
  };
23
23
  }
24
24
  return undefined;
25
25
  }
26
26
  };
27
- CommandLinePreventHistoryRewriter = ( __decorate([
28
- ( __param(0, IConfigurationService))
29
- ], CommandLinePreventHistoryRewriter));
27
+ CommandLinePreventHistoryRewriter = ( __decorate([( __param(0, IConfigurationService))], CommandLinePreventHistoryRewriter));
30
28
 
31
29
  export { CommandLinePreventHistoryRewriter };
@@ -14,4 +14,5 @@ export interface ICommandLineRewriterOptions {
14
14
  export interface ICommandLineRewriterResult {
15
15
  rewritten: string;
16
16
  reasoning: string;
17
+ forDisplay?: string;
17
18
  }
@@ -0,0 +1,8 @@
1
+ import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
2
+ import { ITerminalSandboxService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.service";
3
+ import type { ICommandLineRewriter, ICommandLineRewriterOptions, ICommandLineRewriterResult } from "./commandLineRewriter.js";
4
+ export declare class CommandLineSandboxRewriter extends Disposable implements ICommandLineRewriter {
5
+ private readonly _sandboxService;
6
+ constructor(_sandboxService: ITerminalSandboxService);
7
+ rewrite(options: ICommandLineRewriterOptions): Promise<ICommandLineRewriterResult | undefined>;
8
+ }
@@ -0,0 +1,29 @@
1
+
2
+ import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
3
+ import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
4
+ import { ITerminalSandboxService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.service';
5
+
6
+ let CommandLineSandboxRewriter = class CommandLineSandboxRewriter extends Disposable {
7
+ constructor(_sandboxService) {
8
+ super();
9
+ this._sandboxService = _sandboxService;
10
+ }
11
+ async rewrite(options) {
12
+ if (!(await this._sandboxService.isEnabled())) {
13
+ return undefined;
14
+ }
15
+ const sandboxConfigPath = await this._sandboxService.getSandboxConfigPath();
16
+ if (!sandboxConfigPath) {
17
+ return undefined;
18
+ }
19
+ const wrappedCommand = this._sandboxService.wrapCommand(options.commandLine);
20
+ return {
21
+ rewritten: wrappedCommand,
22
+ reasoning: "Wrapped command for sandbox execution",
23
+ forDisplay: options.commandLine
24
+ };
25
+ }
26
+ };
27
+ CommandLineSandboxRewriter = ( __decorate([( __param(0, ITerminalSandboxService))], CommandLineSandboxRewriter));
28
+
29
+ export { CommandLineSandboxRewriter };
@@ -6,15 +6,16 @@ import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
6
6
  import { TerminalCapability } from '@codingame/monaco-vscode-api/vscode/vs/platform/terminal/common/capabilities/capabilities';
7
7
  import { ToolDataSource } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService';
8
8
  import { ITerminalService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminal/browser/terminal.service';
9
+ import { TerminalToolId } from './toolIds.js';
9
10
 
10
11
  const GetTerminalLastCommandToolData = {
11
- id: 'terminal_last_command',
12
- toolReferenceName: 'terminalLastCommand',
13
- legacyToolReferenceFullNames: ['runCommands/terminalLastCommand'],
14
- displayName: ( localize(12036, 'Get Terminal Last Command')),
15
- modelDescription: 'Get the last command run in the active terminal.',
12
+ id: TerminalToolId.TerminalLastCommand,
13
+ toolReferenceName: "terminalLastCommand",
14
+ legacyToolReferenceFullNames: ["runCommands/terminalLastCommand"],
15
+ displayName: ( localize(12367, "Get Terminal Last Command")),
16
+ modelDescription: "Get the last command run in the active terminal.",
16
17
  source: ToolDataSource.Internal,
17
- icon: Codicon.terminal,
18
+ icon: Codicon.terminal
18
19
  };
19
20
  let GetTerminalLastCommandTool = class GetTerminalLastCommandTool extends Disposable {
20
21
  constructor(_terminalService) {
@@ -23,8 +24,8 @@ let GetTerminalLastCommandTool = class GetTerminalLastCommandTool extends Dispos
23
24
  }
24
25
  async prepareToolInvocation(context, token) {
25
26
  return {
26
- invocationMessage: ( localize(12037, "Getting last terminal command")),
27
- pastTenseMessage: ( localize(12038, "Got last terminal command")),
27
+ invocationMessage: ( localize(12368, "Getting last terminal command")),
28
+ pastTenseMessage: ( localize(12369, "Got last terminal command"))
28
29
  };
29
30
  }
30
31
  async invoke(invocation, _countTokens, _progress, token) {
@@ -32,54 +33,54 @@ let GetTerminalLastCommandTool = class GetTerminalLastCommandTool extends Dispos
32
33
  if (!activeInstance) {
33
34
  return {
34
35
  content: [{
35
- kind: 'text',
36
- value: 'No active terminal instance found.'
37
- }]
36
+ kind: "text",
37
+ value: "No active terminal instance found."
38
+ }]
38
39
  };
39
40
  }
40
41
  const commandDetection = activeInstance.capabilities.get(TerminalCapability.CommandDetection);
41
42
  if (!commandDetection) {
42
43
  return {
43
44
  content: [{
44
- kind: 'text',
45
- value: 'No command detection capability available in the active terminal.'
46
- }]
45
+ kind: "text",
46
+ value: "No command detection capability available in the active terminal."
47
+ }]
47
48
  };
48
49
  }
49
50
  const executingCommand = commandDetection.executingCommand;
50
51
  if (executingCommand) {
51
52
  const userPrompt = [];
52
- userPrompt.push('The following command is currently executing in the terminal:');
53
+ userPrompt.push("The following command is currently executing in the terminal:");
53
54
  userPrompt.push(executingCommand);
54
55
  const cwd = commandDetection.cwd;
55
56
  if (cwd) {
56
- userPrompt.push('It is running in the directory:');
57
+ userPrompt.push("It is running in the directory:");
57
58
  userPrompt.push(cwd);
58
59
  }
59
60
  return {
60
61
  content: [{
61
- kind: 'text',
62
- value: userPrompt.join('\n')
63
- }]
62
+ kind: "text",
63
+ value: userPrompt.join("\n")
64
+ }]
64
65
  };
65
66
  }
66
67
  const commands = commandDetection.commands;
67
68
  if (!commands || commands.length === 0) {
68
69
  return {
69
70
  content: [{
70
- kind: 'text',
71
- value: 'No command has been run in the active terminal.'
72
- }]
71
+ kind: "text",
72
+ value: "No command has been run in the active terminal."
73
+ }]
73
74
  };
74
75
  }
75
76
  const lastCommand = commands[commands.length - 1];
76
77
  const userPrompt = [];
77
78
  if (lastCommand.command) {
78
- userPrompt.push('The following is the last command run in the terminal:');
79
+ userPrompt.push("The following is the last command run in the terminal:");
79
80
  userPrompt.push(lastCommand.command);
80
81
  }
81
82
  if (lastCommand.cwd) {
82
- userPrompt.push('It was run in the directory:');
83
+ userPrompt.push("It was run in the directory:");
83
84
  userPrompt.push(lastCommand.cwd);
84
85
  }
85
86
  if (lastCommand.exitCode !== undefined) {
@@ -88,20 +89,18 @@ let GetTerminalLastCommandTool = class GetTerminalLastCommandTool extends Dispos
88
89
  if (lastCommand.hasOutput() && lastCommand.getOutput) {
89
90
  const output = lastCommand.getOutput();
90
91
  if (output && output.trim().length > 0) {
91
- userPrompt.push('It has the following output:');
92
+ userPrompt.push("It has the following output:");
92
93
  userPrompt.push(output);
93
94
  }
94
95
  }
95
96
  return {
96
97
  content: [{
97
- kind: 'text',
98
- value: userPrompt.join('\n')
99
- }]
98
+ kind: "text",
99
+ value: userPrompt.join("\n")
100
+ }]
100
101
  };
101
102
  }
102
103
  };
103
- GetTerminalLastCommandTool = ( __decorate([
104
- ( __param(0, ITerminalService))
105
- ], GetTerminalLastCommandTool));
104
+ GetTerminalLastCommandTool = ( __decorate([( __param(0, ITerminalService))], GetTerminalLastCommandTool));
106
105
 
107
106
  export { GetTerminalLastCommandTool, GetTerminalLastCommandToolData };
@@ -4,42 +4,41 @@ import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/l
4
4
  import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
5
5
  import { ToolDataSource } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService';
6
6
  import { RunInTerminalTool } from './runInTerminalTool.js';
7
+ import { TerminalToolId } from './toolIds.js';
7
8
 
8
9
  const GetTerminalOutputToolData = {
9
- id: 'get_terminal_output',
10
- toolReferenceName: 'getTerminalOutput',
11
- legacyToolReferenceFullNames: ['runCommands/getTerminalOutput'],
12
- displayName: ( localize(12039, 'Get Terminal Output')),
13
- modelDescription: 'Get the output of a terminal command previously started with run_in_terminal',
10
+ id: TerminalToolId.GetTerminalOutput,
11
+ toolReferenceName: "getTerminalOutput",
12
+ legacyToolReferenceFullNames: ["runCommands/getTerminalOutput"],
13
+ displayName: ( localize(12370, "Get Terminal Output")),
14
+ modelDescription: `Get the output of a terminal command previously started with ${TerminalToolId.RunInTerminal}`,
14
15
  icon: Codicon.terminal,
15
16
  source: ToolDataSource.Internal,
16
17
  inputSchema: {
17
- type: 'object',
18
+ type: "object",
18
19
  properties: {
19
20
  id: {
20
- type: 'string',
21
- description: 'The ID of the terminal to check.'
22
- },
21
+ type: "string",
22
+ description: "The ID of the terminal to check."
23
+ }
23
24
  },
24
- required: [
25
- 'id',
26
- ]
25
+ required: ["id"]
27
26
  }
28
27
  };
29
28
  class GetTerminalOutputTool extends Disposable {
30
29
  async prepareToolInvocation(context, token) {
31
30
  return {
32
- invocationMessage: ( localize(12040, "Checking background terminal output")),
33
- pastTenseMessage: ( localize(12041, "Checked background terminal output")),
31
+ invocationMessage: ( localize(12371, "Checking background terminal output")),
32
+ pastTenseMessage: ( localize(12372, "Checked background terminal output"))
34
33
  };
35
34
  }
36
35
  async invoke(invocation, _countTokens, _progress, token) {
37
36
  const args = invocation.parameters;
38
37
  return {
39
38
  content: [{
40
- kind: 'text',
41
- value: `Output of terminal ${args.id}:\n${RunInTerminalTool.getBackgroundOutput(args.id)}`
42
- }]
39
+ kind: "text",
40
+ value: `Output of terminal ${args.id}:\n${RunInTerminalTool.getBackgroundOutput(args.id)}`
41
+ }]
43
42
  };
44
43
  }
45
44
  }
@@ -5,15 +5,16 @@ import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/l
5
5
  import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
6
6
  import { ToolDataSource } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService';
7
7
  import { ITerminalService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminal/browser/terminal.service';
8
+ import { TerminalToolId } from './toolIds.js';
8
9
 
9
10
  const GetTerminalSelectionToolData = {
10
- id: 'terminal_selection',
11
- toolReferenceName: 'terminalSelection',
12
- legacyToolReferenceFullNames: ['runCommands/terminalSelection'],
13
- displayName: ( localize(12042, 'Get Terminal Selection')),
14
- modelDescription: 'Get the current selection in the active terminal.',
11
+ id: TerminalToolId.TerminalSelection,
12
+ toolReferenceName: "terminalSelection",
13
+ legacyToolReferenceFullNames: ["runCommands/terminalSelection"],
14
+ displayName: ( localize(12373, "Get Terminal Selection")),
15
+ modelDescription: "Get the current selection in the active terminal.",
15
16
  source: ToolDataSource.Internal,
16
- icon: Codicon.terminal,
17
+ icon: Codicon.terminal
17
18
  };
18
19
  let GetTerminalSelectionTool = class GetTerminalSelectionTool extends Disposable {
19
20
  constructor(_terminalService) {
@@ -22,8 +23,8 @@ let GetTerminalSelectionTool = class GetTerminalSelectionTool extends Disposable
22
23
  }
23
24
  async prepareToolInvocation(context, token) {
24
25
  return {
25
- invocationMessage: ( localize(12043, "Reading terminal selection")),
26
- pastTenseMessage: ( localize(12044, "Read terminal selection")),
26
+ invocationMessage: ( localize(12374, "Reading terminal selection")),
27
+ pastTenseMessage: ( localize(12375, "Read terminal selection"))
27
28
  };
28
29
  }
29
30
  async invoke(invocation, _countTokens, _progress, token) {
@@ -31,30 +32,28 @@ let GetTerminalSelectionTool = class GetTerminalSelectionTool extends Disposable
31
32
  if (!activeInstance) {
32
33
  return {
33
34
  content: [{
34
- kind: 'text',
35
- value: 'No active terminal instance found.'
36
- }]
35
+ kind: "text",
36
+ value: "No active terminal instance found."
37
+ }]
37
38
  };
38
39
  }
39
40
  const selection = activeInstance.selection;
40
41
  if (!selection) {
41
42
  return {
42
43
  content: [{
43
- kind: 'text',
44
- value: 'No text is currently selected in the active terminal.'
45
- }]
44
+ kind: "text",
45
+ value: "No text is currently selected in the active terminal."
46
+ }]
46
47
  };
47
48
  }
48
49
  return {
49
50
  content: [{
50
- kind: 'text',
51
- value: `The active terminal's selection:\n${selection}`
52
- }]
51
+ kind: "text",
52
+ value: `The active terminal's selection:\n${selection}`
53
+ }]
53
54
  };
54
55
  }
55
56
  };
56
- GetTerminalSelectionTool = ( __decorate([
57
- ( __param(0, ITerminalService))
58
- ], GetTerminalSelectionTool));
57
+ GetTerminalSelectionTool = ( __decorate([( __param(0, ITerminalService))], GetTerminalSelectionTool));
59
58
 
60
59
  export { GetTerminalSelectionTool, GetTerminalSelectionToolData };
@@ -0,0 +1,11 @@
1
+ import type { CancellationToken } from "@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation";
2
+ import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
3
+ import { type CountTokensCallback, type IPreparedToolInvocation, type IToolData, type IToolImpl, type IToolInvocation, type IToolInvocationPreparationContext, type IToolResult, type ToolProgress } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService";
4
+ export declare const KillTerminalToolData: IToolData;
5
+ export interface IKillTerminalInputParams {
6
+ id: string;
7
+ }
8
+ export declare class KillTerminalTool extends Disposable implements IToolImpl {
9
+ prepareToolInvocation(_context: IToolInvocationPreparationContext, _token: CancellationToken): Promise<IPreparedToolInvocation | undefined>;
10
+ invoke(invocation: IToolInvocation, _countTokens: CountTokensCallback, _progress: ToolProgress, _token: CancellationToken): Promise<IToolResult>;
11
+ }