@codingame/monaco-vscode-chat-service-override 17.2.0 → 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
package/index.js CHANGED
@@ -20,8 +20,8 @@ import { ILanguageModelStatsService } from '@codingame/monaco-vscode-api/vscode/
20
20
  import { LanguageModelsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModels';
21
21
  import { ILanguageModelsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModels.service';
22
22
  import { IInlineChatSessionService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.service';
23
- import { InlineChatSessionServiceImpl } from '@codingame/monaco-vscode-9f229325-8261-585c-a552-16085958c680-common/vscode/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl';
24
- import { LanguageModelStatsService } from '@codingame/monaco-vscode-fab30422-b487-5f4e-8d30-8b4d266e3fcd-common/vscode/vs/workbench/contrib/chat/common/languageModelStats';
23
+ import { InlineChatSessionServiceImpl } from '@codingame/monaco-vscode-6c0f93b9-169c-58c3-a9cb-7d60698eb52c-common/vscode/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl';
24
+ import { LanguageModelStatsService } from '@codingame/monaco-vscode-3a35f433-1297-5707-ab58-c261b8180e6d-common/vscode/vs/workbench/contrib/chat/common/languageModelStats';
25
25
  import { ILanguageModelToolsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModelToolsService.service';
26
26
  import { LanguageModelToolsService } from './vscode/src/vs/workbench/contrib/chat/browser/languageModelToolsService.js';
27
27
  import { ICodeMapperService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatCodeMapperService.service';
@@ -32,7 +32,7 @@ import { ILanguageModelIgnoredFilesService } from '@codingame/monaco-vscode-api/
32
32
  import { IChatMarkdownAnchorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatContentParts/chatMarkdownAnchorService.service';
33
33
  import { ChatMarkdownAnchorService } from './vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatMarkdownAnchorService.js';
34
34
  import { ChatEditingService } from './vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.js';
35
- import { ChatEntitlementService } from '@codingame/monaco-vscode-fab30422-b487-5f4e-8d30-8b4d266e3fcd-common/vscode/vs/workbench/contrib/chat/common/chatEntitlementService';
35
+ import { ChatEntitlementService } from '@codingame/monaco-vscode-3a35f433-1297-5707-ab58-c261b8180e6d-common/vscode/vs/workbench/contrib/chat/common/chatEntitlementService';
36
36
  import { PromptsService } from './vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService.js';
37
37
  import { IChatEntitlementService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatEntitlementService.service';
38
38
  import { IPromptsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/service/types.service';
@@ -42,6 +42,8 @@ import { IChatStatusItemService } from '@codingame/monaco-vscode-api/vscode/vs/w
42
42
  import { ChatStatusItemService } from './vscode/src/vs/workbench/contrib/chat/browser/chatStatusItemService.js';
43
43
  import './vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js';
44
44
  import './vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.js';
45
+ import { IChatContextPickService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatContextPickService.service';
46
+ import { ChatContextPickService } from '@codingame/monaco-vscode-f338ac19-278c-5fe1-bec8-b588de04a788-common/vscode/vs/workbench/contrib/chat/browser/chatContextPickService';
45
47
 
46
48
  function getServiceOverride() {
47
49
  return {
@@ -66,7 +68,8 @@ function getServiceOverride() {
66
68
  [IChatMarkdownAnchorService.toString()]: new SyncDescriptor(ChatMarkdownAnchorService, [], true),
67
69
  [IChatEntitlementService.toString()]: new SyncDescriptor(ChatEntitlementService, [], true),
68
70
  [IPromptsService.toString()]: new SyncDescriptor(PromptsService, [], true),
69
- [IChatStatusItemService.toString()]: new SyncDescriptor(ChatStatusItemService, [], true)
71
+ [IChatStatusItemService.toString()]: new SyncDescriptor(ChatStatusItemService, [], true),
72
+ [IChatContextPickService.toString()]: new SyncDescriptor(ChatContextPickService, [], true)
70
73
  };
71
74
  }
72
75
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingame/monaco-vscode-chat-service-override",
3
- "version": "17.2.0",
3
+ "version": "18.0.0",
4
4
  "private": false,
5
5
  "description": "VSCode public API plugged on the monaco editor - chat service-override",
6
6
  "keywords": [],
@@ -15,35 +15,41 @@
15
15
  },
16
16
  "type": "module",
17
17
  "dependencies": {
18
- "@codingame/monaco-vscode-1021b67c-93e5-5c78-a270-cbdb2574d980-common": "17.2.0",
19
- "@codingame/monaco-vscode-1cb11a73-359e-5a2f-9e95-6989cc9858ee-common": "17.2.0",
20
- "@codingame/monaco-vscode-1cc4ea0a-c5b6-54ed-bb60-078a99119b55-common": "17.2.0",
21
- "@codingame/monaco-vscode-25a9b730-95ad-54d3-8807-71421ad9b891-common": "17.2.0",
22
- "@codingame/monaco-vscode-324f9a6e-6231-5bfc-af17-e147abd2dfd2-common": "17.2.0",
23
- "@codingame/monaco-vscode-42931eb9-e564-530c-bafc-fa23ab43a070-common": "17.2.0",
24
- "@codingame/monaco-vscode-4a0e04a7-c3bd-5fb7-9d3b-4fd047cc9e59-common": "17.2.0",
25
- "@codingame/monaco-vscode-51fed910-d648-5620-9b80-9232cd79d116-common": "17.2.0",
26
- "@codingame/monaco-vscode-5945a5e2-a66c-5a82-bd2c-1965724b29eb-common": "17.2.0",
27
- "@codingame/monaco-vscode-64322fa2-7385-5f46-935b-8f243d98004b-common": "17.2.0",
28
- "@codingame/monaco-vscode-65619f8f-0eab-5d8b-855a-43b6353fe527-common": "17.2.0",
29
- "@codingame/monaco-vscode-8c844347-a703-5de1-9eeb-5e0c7f503a58-common": "17.2.0",
30
- "@codingame/monaco-vscode-97284942-b044-5fbb-b53b-3f46d2468746-common": "17.2.0",
31
- "@codingame/monaco-vscode-9c72783f-914c-50be-b9ef-da16356d81a8-common": "17.2.0",
32
- "@codingame/monaco-vscode-9f229325-8261-585c-a552-16085958c680-common": "17.2.0",
33
- "@codingame/monaco-vscode-a7c9ae3c-16d2-5d17-86b2-981be7094566-common": "17.2.0",
34
- "@codingame/monaco-vscode-api": "17.2.0",
35
- "@codingame/monaco-vscode-bb83fe45-f4c7-5673-b9f1-5c409a63f19c-common": "17.2.0",
36
- "@codingame/monaco-vscode-bba55be6-41a2-50cd-a3cc-8bafa35bfa89-common": "17.2.0",
37
- "@codingame/monaco-vscode-c3c61c00-c254-5856-9dc9-d7929c1f9062-common": "17.2.0",
38
- "@codingame/monaco-vscode-c465110a-57c0-59d7-a6b2-be0a4db7e517-common": "17.2.0",
39
- "@codingame/monaco-vscode-d0fb86d3-2a47-594e-955b-9a24631a7124-common": "17.2.0",
40
- "@codingame/monaco-vscode-e28ac690-06d5-5ee9-92d1-02df70296354-common": "17.2.0",
41
- "@codingame/monaco-vscode-e4d0fd26-1b26-5583-b3f7-582e08d7b389-common": "17.2.0",
42
- "@codingame/monaco-vscode-e67a0dae-5b2c-54e6-8d61-90102c78362d-common": "17.2.0",
43
- "@codingame/monaco-vscode-ea14e352-8f1c-5569-b79a-8a96a53e8abe-common": "17.2.0",
44
- "@codingame/monaco-vscode-ecf3436d-6064-5fbd-a760-37a211ce79c7-common": "17.2.0",
45
- "@codingame/monaco-vscode-f1bbc6d3-6129-583c-a2ba-c80b832993d2-common": "17.2.0",
46
- "@codingame/monaco-vscode-fab30422-b487-5f4e-8d30-8b4d266e3fcd-common": "17.2.0"
18
+ "@codingame/monaco-vscode-07eaa805-9dea-5ec6-a422-a4f04872424d-common": "18.0.0",
19
+ "@codingame/monaco-vscode-1021b67c-93e5-5c78-a270-cbdb2574d980-common": "18.0.0",
20
+ "@codingame/monaco-vscode-1cb11a73-359e-5a2f-9e95-6989cc9858ee-common": "18.0.0",
21
+ "@codingame/monaco-vscode-1cc4ea0a-c5b6-54ed-bb60-078a99119b55-common": "18.0.0",
22
+ "@codingame/monaco-vscode-3a35f433-1297-5707-ab58-c261b8180e6d-common": "18.0.0",
23
+ "@codingame/monaco-vscode-4372ad43-a220-5e78-83e6-95a9cfd64384-common": "18.0.0",
24
+ "@codingame/monaco-vscode-47472025-cc45-5680-86cd-09ceaba921a1-common": "18.0.0",
25
+ "@codingame/monaco-vscode-501b06ab-3f58-516b-8a1a-c29d375d3da4-common": "18.0.0",
26
+ "@codingame/monaco-vscode-64322fa2-7385-5f46-935b-8f243d98004b-common": "18.0.0",
27
+ "@codingame/monaco-vscode-6c0f93b9-169c-58c3-a9cb-7d60698eb52c-common": "18.0.0",
28
+ "@codingame/monaco-vscode-7adbeffb-8051-54a9-8c9b-b62ce9e5836f-common": "18.0.0",
29
+ "@codingame/monaco-vscode-85f7fb0f-70f5-5a5e-831b-15c743a8bd11-common": "18.0.0",
30
+ "@codingame/monaco-vscode-8c844347-a703-5de1-9eeb-5e0c7f503a58-common": "18.0.0",
31
+ "@codingame/monaco-vscode-924e8f00-6faf-5059-b518-e43427d29ab3-common": "18.0.0",
32
+ "@codingame/monaco-vscode-937ecbdf-94c7-5b16-aefa-ad78ae557a93-common": "18.0.0",
33
+ "@codingame/monaco-vscode-97284942-b044-5fbb-b53b-3f46d2468746-common": "18.0.0",
34
+ "@codingame/monaco-vscode-9c72783f-914c-50be-b9ef-da16356d81a8-common": "18.0.0",
35
+ "@codingame/monaco-vscode-9ed6fe06-a052-57c2-a234-5d9b94d2e7e0-common": "18.0.0",
36
+ "@codingame/monaco-vscode-a8d3bd74-e63e-5327-96e8-4f931661e329-common": "18.0.0",
37
+ "@codingame/monaco-vscode-aa9ead53-dfd3-59da-b9e7-f163d201de8d-common": "18.0.0",
38
+ "@codingame/monaco-vscode-api": "18.0.0",
39
+ "@codingame/monaco-vscode-bba55be6-41a2-50cd-a3cc-8bafa35bfa89-common": "18.0.0",
40
+ "@codingame/monaco-vscode-bc8c28cd-7a80-54a9-af1a-e6b1e7a7f34a-common": "18.0.0",
41
+ "@codingame/monaco-vscode-c3c61c00-c254-5856-9dc9-d7929c1f9062-common": "18.0.0",
42
+ "@codingame/monaco-vscode-c465110a-57c0-59d7-a6b2-be0a4db7e517-common": "18.0.0",
43
+ "@codingame/monaco-vscode-c87fff3a-2aa9-52ab-ba4d-17e8d1e5e185-common": "18.0.0",
44
+ "@codingame/monaco-vscode-ce7c734f-7712-563c-9335-d7acb43306af-common": "18.0.0",
45
+ "@codingame/monaco-vscode-dcfc2191-2da1-54c7-8fb7-e92c5d11ecef-common": "18.0.0",
46
+ "@codingame/monaco-vscode-e28ac690-06d5-5ee9-92d1-02df70296354-common": "18.0.0",
47
+ "@codingame/monaco-vscode-e4d0fd26-1b26-5583-b3f7-582e08d7b389-common": "18.0.0",
48
+ "@codingame/monaco-vscode-ea14e352-8f1c-5569-b79a-8a96a53e8abe-common": "18.0.0",
49
+ "@codingame/monaco-vscode-f1bbc6d3-6129-583c-a2ba-c80b832993d2-common": "18.0.0",
50
+ "@codingame/monaco-vscode-f338ac19-278c-5fe1-bec8-b588de04a788-common": "18.0.0",
51
+ "@codingame/monaco-vscode-f5d4b045-44e8-55a8-b683-308656a412fa-common": "18.0.0",
52
+ "@codingame/monaco-vscode-fab30422-b487-5f4e-8d30-8b4d266e3fcd-common": "18.0.0"
47
53
  },
48
54
  "main": "index.js",
49
55
  "module": "index.js",
@@ -4,10 +4,10 @@ export declare class ObjectCache<TValue extends ObservableDisposable, TKey exten
4
4
  private readonly factory;
5
5
  private readonly cache;
6
6
  constructor(factory: (key: TKey) => TValue & {
7
- disposed: false;
7
+ isDisposed: false;
8
8
  });
9
9
  get(key: TKey): TValue & {
10
- disposed: false;
10
+ isDisposed: false;
11
11
  };
12
12
  remove(key: TKey, dispose: boolean): this;
13
13
  }
@@ -10,7 +10,7 @@ class ObjectCache extends Disposable {
10
10
  }
11
11
  get(key) {
12
12
  let object = this.cache.get(key);
13
- if (object?.disposed) {
13
+ if (object?.isDisposed) {
14
14
  this.cache.deleteAndLeak(key);
15
15
  object = undefined;
16
16
  }
@@ -20,9 +20,9 @@ class ObjectCache extends Disposable {
20
20
  }
21
21
  object = this.factory(key);
22
22
  assertNotDisposed(object, 'Newly created object must not be disposed.');
23
- object.onDispose(() => {
23
+ object.addDisposables(object.onDispose(() => {
24
24
  this.cache.deleteAndLeak(key);
25
- });
25
+ }));
26
26
  this.cache.set(key, object);
27
27
  return object;
28
28
  }
@@ -0,0 +1,10 @@
1
+ import { IRectangle } from "@codingame/monaco-vscode-api/vscode/vs/platform/window/common/window";
2
+ export interface IElementData {
3
+ readonly outerHTML: string;
4
+ readonly computedStyle: string;
5
+ readonly bounds: IRectangle;
6
+ }
7
+ export declare enum BrowserType {
8
+ SimpleBrowser = "simpleBrowser",
9
+ LiveServer = "liveServer"
10
+ }
@@ -0,0 +1,9 @@
1
+
2
+
3
+ var BrowserType;
4
+ (function (BrowserType) {
5
+ BrowserType["SimpleBrowser"] = "simpleBrowser";
6
+ BrowserType["LiveServer"] = "liveServer";
7
+ })(BrowserType || (BrowserType = {}));
8
+
9
+ export { BrowserType };
@@ -72,55 +72,55 @@ function getAccessibilityHelpText(type, keybindingService) {
72
72
  if (type === 'panelChat' || type === 'quickChat') {
73
73
  if (type === 'quickChat') {
74
74
  content.push(( localize(
75
- 4301,
75
+ 4329,
76
76
  'The quick chat view is comprised of an input box and a request/response list. The input box is used to make requests and the list is used to display responses.'
77
77
  )));
78
78
  content.push(( localize(
79
- 4302,
79
+ 4330,
80
80
  'The quick chat view is a transient interface for making and viewing requests, while the panel chat view is a persistent interface that also supports navigating suggested follow-up questions.'
81
81
  )));
82
82
  }
83
83
  if (type === 'panelChat') {
84
84
  content.push(( localize(
85
- 4303,
85
+ 4331,
86
86
  'The panel chat view is a persistent interface that also supports navigating suggested follow-up questions, while the quick chat view is a transient interface for making and viewing requests.'
87
87
  )));
88
88
  content.push(( localize(
89
- 4304,
89
+ 4332,
90
90
  'In the input box, navigate to the suggested follow up question (Shift+Tab) and press Enter to run it.'
91
91
  )));
92
92
  }
93
93
  content.push(( localize(
94
- 4305,
94
+ 4333,
95
95
  'In the input box, use up and down arrows to navigate your request history. Edit input and use enter or the submit button to run a new request.'
96
96
  )));
97
97
  content.push(( localize(
98
- 4306,
98
+ 4334,
99
99
  'In the input box, inspect the last response in the accessible view{0}.',
100
100
  '<keybinding:editor.action.accessibleView>'
101
101
  )));
102
102
  content.push(( localize(
103
- 4307,
103
+ 4335,
104
104
  'Chat responses will be announced as they come in. A response will indicate the number of code blocks, if any, and then the rest of the response.'
105
105
  )));
106
106
  content.push(( localize(
107
- 4308,
107
+ 4336,
108
108
  'To focus the chat request/response list, which can be navigated with up and down arrows, invoke the Focus Chat command{0}.',
109
109
  getChatFocusKeybindingLabel(keybindingService, type, false)
110
110
  )));
111
111
  content.push(( localize(
112
- 4309,
112
+ 4337,
113
113
  'To focus the input box for chat requests, invoke the Focus Chat Input command{0}.',
114
114
  getChatFocusKeybindingLabel(keybindingService, type, true)
115
115
  )));
116
116
  content.push(( localize(
117
- 4310,
117
+ 4338,
118
118
  'To focus the next code block within a response, invoke the Chat: Next Code Block command{0}.',
119
119
  '<keybinding:workbench.action.chat.nextCodeBlock>'
120
120
  )));
121
121
  if (type === 'panelChat') {
122
122
  content.push(( localize(
123
- 4311,
123
+ 4339,
124
124
  'To create a new chat session, invoke the New Chat command{0}.',
125
125
  '<keybinding:workbench.action.chat.new>'
126
126
  )));
@@ -129,118 +129,118 @@ function getAccessibilityHelpText(type, keybindingService) {
129
129
  if (type === 'editsView' || type === 'agentView') {
130
130
  if (type === 'agentView') {
131
131
  content.push(( localize(
132
- 4312,
132
+ 4340,
133
133
  'The chat agent view is used to apply edits across files in your workspace, enable running commands in the terminal, and more.'
134
134
  )));
135
135
  }
136
136
  else {
137
- content.push(( localize(4313, 'The chat editing view is used to apply edits across files.')));
137
+ content.push(( localize(4341, 'The chat editing view is used to apply edits across files.')));
138
138
  }
139
139
  content.push(( localize(
140
- 4314,
140
+ 4342,
141
141
  'It is comprised of an input box and a file working set (Shift+Tab).'
142
142
  )));
143
143
  content.push(( localize(
144
- 4315,
144
+ 4343,
145
145
  'When a request is made, a progress indicator will play while the edits are being applied.'
146
146
  )));
147
147
  content.push(( localize(
148
- 4316,
148
+ 4344,
149
149
  'Once the edits are applied, a sound will play to indicate the document has been opened and is ready for review. The sound can be disabled with accessibility.signals.chatEditModifiedFile.'
150
150
  )));
151
151
  content.push(( localize(
152
- 4317,
152
+ 4345,
153
153
  'Navigate between edits in the editor with navigate previous{0} and next{1}',
154
154
  '<keybinding:chatEditor.action.navigatePrevious>',
155
155
  '<keybinding:chatEditor.action.navigateNext>'
156
156
  )));
157
157
  content.push(( localize(
158
- 4318,
158
+ 4346,
159
159
  'In the editor, Keep{0}, Undo{1}, or Toggle the Diff{2} for the current Change.',
160
160
  '<keybinding:chatEditor.action.acceptHunk>',
161
161
  '<keybinding:chatEditor.action.undoHunk>',
162
162
  '<keybinding:chatEditor.action.toggleDiff>'
163
163
  )));
164
164
  content.push(( localize(
165
- 4319,
165
+ 4347,
166
166
  'Sounds will play when a change is accepted or undone. The sounds can be disabled with accessibility.signals.editsKept and accessibility.signals.editsUndone.'
167
167
  )));
168
168
  if (type === 'agentView') {
169
169
  content.push(( localize(
170
- 4320,
170
+ 4348,
171
171
  'An alert will indicate when user action is required. For example, if the agent wants to run something in the terminal, you will hear Action Required: Run Command in Terminal.'
172
172
  )));
173
173
  content.push(( localize(
174
- 4321,
174
+ 4349,
175
175
  'To take the action, use the accept tool command{0}.',
176
176
  '<keybinding:workbench.action.chat.acceptTool>'
177
177
  )));
178
178
  }
179
- content.push(( localize(4322, 'Some helpful commands include:')));
180
- content.push(( localize(4323, '- Undo Edits{0}.', '<keybinding:workbench.action.chat.undoEdits>')));
179
+ content.push(( localize(4350, 'Some helpful commands include:')));
180
+ content.push(( localize(4351, '- Undo Edits{0}.', '<keybinding:workbench.action.chat.undoEdits>')));
181
181
  content.push(( localize(
182
- 4324,
182
+ 4352,
183
183
  '- Attach Files{0}.',
184
184
  '<keybinding:workbench.action.chat.editing.attachFiles>'
185
185
  )));
186
186
  content.push(( localize(
187
- 4325,
187
+ 4353,
188
188
  '- Remove File from Working Set{0}.',
189
189
  '<keybinding:chatEditing.removeFileFromWorkingSet>'
190
190
  )));
191
191
  content.push(( localize(
192
- 4326,
192
+ 4354,
193
193
  '- Keep{0} and Undo File{1}.',
194
194
  '<keybinding:chatEditing.acceptFile>',
195
195
  '<keybinding:chatEditing.discardFile>'
196
196
  )));
197
- content.push(( localize(4327, '- Save All Files{0}.', '<keybinding:chatEditing.saveAllFiles>')));
198
- content.push(( localize(4328, '- Keep All Edits{0}.', '<keybinding:chatEditing.acceptAllFiles>')));
199
- content.push(( localize(4329, '- Undo All Edits{0}.', '<keybinding:chatEditing.discardAllFiles>')));
200
- content.push(( localize(4330, '- Open File in Diff{0}.', '<keybinding:chatEditing.openFileInDiff>')));
201
- content.push(( localize(4331, '- View Changes{0}.', '<keybinding:chatEditing.viewChanges>')));
197
+ content.push(( localize(4355, '- Save All Files{0}.', '<keybinding:chatEditing.saveAllFiles>')));
198
+ content.push(( localize(4356, '- Keep All Edits{0}.', '<keybinding:chatEditing.acceptAllFiles>')));
199
+ content.push(( localize(4357, '- Undo All Edits{0}.', '<keybinding:chatEditing.discardAllFiles>')));
200
+ content.push(( localize(4358, '- Open File in Diff{0}.', '<keybinding:chatEditing.openFileInDiff>')));
201
+ content.push(( localize(4359, '- View Changes{0}.', '<keybinding:chatEditing.viewChanges>')));
202
202
  }
203
203
  else {
204
204
  content.push(( localize(
205
- 4332,
205
+ 4360,
206
206
  "Inline chat occurs within a code editor and takes into account the current selection. It is useful for making changes to the current editor. For example, fixing diagnostics, documenting or refactoring code. Keep in mind that AI generated code may be incorrect."
207
207
  )));
208
208
  content.push(( localize(
209
- 4333,
209
+ 4361,
210
210
  "It can be activated via code actions or directly using the command: Inline Chat: Start Inline Chat{0}.",
211
211
  '<keybinding:inlineChat.start>'
212
212
  )));
213
213
  content.push(( localize(
214
- 4334,
214
+ 4362,
215
215
  'In the input box, use Show Previous{0} and Show Next{1} to navigate your request history. Edit input and use enter or the submit button to run a new request.',
216
216
  '<keybinding:history.showPrevious>',
217
217
  '<keybinding:history.showNext>'
218
218
  )));
219
219
  content.push(( localize(
220
- 4335,
220
+ 4363,
221
221
  'In the input box, inspect the response in the accessible view{0}.',
222
222
  '<keybinding:editor.action.accessibleView>'
223
223
  )));
224
224
  content.push(( localize(
225
- 4336,
225
+ 4364,
226
226
  "Context menu actions may run a request prefixed with a /. Type / to discover such ready-made commands."
227
227
  )));
228
228
  content.push(( localize(
229
- 4337,
229
+ 4365,
230
230
  "If a fix action is invoked, a response will indicate the problem with the current code. A diff editor will be rendered and can be reached by tabbing."
231
231
  )));
232
232
  content.push(( localize(
233
- 4338,
233
+ 4366,
234
234
  "Once in the diff editor, enter review mode with{0}. Use up and down arrows to navigate lines with the proposed changes.",
235
235
  AccessibleDiffViewerNext.id
236
236
  )));
237
237
  content.push(( localize(
238
- 4339,
238
+ 4367,
239
239
  "Use tab to reach conditional parts like commands, status, message responses and more."
240
240
  )));
241
241
  }
242
242
  content.push(( localize(
243
- 4340,
243
+ 4368,
244
244
  "Accessibility Signals can be changed via settings with a prefix of signals.chat. By default, if a request takes more than 4 seconds, you will hear a sound indicating that progress is still occurring."
245
245
  )));
246
246
  return content.join('\n');
@@ -0,0 +1,6 @@
1
+ export interface INewEditSessionActionContext {
2
+ inputValue?: string;
3
+ agentMode?: boolean;
4
+ isPartialQuery?: boolean;
5
+ }
6
+ export declare function registerNewChatActions(): void;
@@ -0,0 +1,158 @@
1
+
2
+ import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
3
+ import { KeyMod, KeyCode } from '@codingame/monaco-vscode-api/vscode/vs/base/common/keyCodes';
4
+ import { localize2 } from '@codingame/monaco-vscode-api/vscode/vs/nls';
5
+ import { AccessibilitySignal } from '@codingame/monaco-vscode-api/vscode/vs/platform/accessibilitySignal/browser/accessibilitySignalService';
6
+ import { IAccessibilitySignalService } from '@codingame/monaco-vscode-api/vscode/vs/platform/accessibilitySignal/browser/accessibilitySignalService.service';
7
+ import { registerAction2, Action2, MenuId } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
8
+ import { CommandsRegistry } from '@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands';
9
+ import { ContextKeyExpr } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey';
10
+ import { IDialogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/common/dialogs.service';
11
+ import { KeybindingWeight } from '@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybindingsRegistry';
12
+ import { ActiveEditorContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/contextkeys';
13
+ import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatContextKeys';
14
+ import { ChatMode } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
15
+ import { ChatViewId } from '@codingame/monaco-vscode-7adbeffb-8051-54a9-8c9b-b62ce9e5836f-common/vscode/vs/workbench/contrib/chat/browser/chat';
16
+ import { EditingSessionAction } from '@codingame/monaco-vscode-fab30422-b487-5f4e-8d30-8b4d266e3fcd-common/vscode/vs/workbench/contrib/chat/browser/chatEditing/chatEditingActions';
17
+ import { ChatEditorInput } from '@codingame/monaco-vscode-3a35f433-1297-5707-ab58-c261b8180e6d-common/vscode/vs/workbench/contrib/chat/browser/chatEditorInput';
18
+ import { CHAT_CATEGORY, ACTION_ID_NEW_CHAT, handleCurrentEditingSession, ACTION_ID_NEW_EDIT_SESSION } from '@codingame/monaco-vscode-3a35f433-1297-5707-ab58-c261b8180e6d-common/vscode/vs/workbench/contrib/chat/browser/actions/chatActions';
19
+ import { clearChatEditor } from '@codingame/monaco-vscode-3a35f433-1297-5707-ab58-c261b8180e6d-common/vscode/vs/workbench/contrib/chat/browser/actions/chatClear';
20
+
21
+ function registerNewChatActions() {
22
+ registerAction2(class NewChatEditorAction extends Action2 {
23
+ constructor() {
24
+ super({
25
+ id: 'workbench.action.chatEditor.newChat',
26
+ title: ( localize2(4419, "New Chat")),
27
+ icon: Codicon.plus,
28
+ f1: false,
29
+ precondition: ChatContextKeys.enabled,
30
+ menu: ( [MenuId.EditorTitle, MenuId.CompactWindowEditorTitle].map(id => ({
31
+ id,
32
+ group: 'navigation',
33
+ when: ( ActiveEditorContext.isEqualTo(ChatEditorInput.EditorID)),
34
+ order: 1
35
+ })))
36
+ });
37
+ }
38
+ async run(accessor, ...args) {
39
+ announceChatCleared(accessor.get(IAccessibilitySignalService));
40
+ await clearChatEditor(accessor);
41
+ }
42
+ });
43
+ registerAction2(class NewChatAction extends EditingSessionAction {
44
+ constructor() {
45
+ super({
46
+ id: ACTION_ID_NEW_CHAT,
47
+ title: ( localize2(4420, "New Chat")),
48
+ category: CHAT_CATEGORY,
49
+ icon: Codicon.plus,
50
+ precondition: ( ContextKeyExpr.and(ChatContextKeys.enabled, ChatContextKeys.editingParticipantRegistered)),
51
+ f1: true,
52
+ menu: [{
53
+ id: MenuId.ChatContext,
54
+ group: 'z_clear'
55
+ },
56
+ {
57
+ id: MenuId.ViewTitle,
58
+ when: ( ContextKeyExpr.equals('view', ChatViewId)),
59
+ group: 'navigation',
60
+ order: -1
61
+ }],
62
+ keybinding: {
63
+ weight: KeybindingWeight.WorkbenchContrib,
64
+ primary: KeyMod.CtrlCmd | KeyCode.KeyL,
65
+ mac: {
66
+ primary: KeyMod.WinCtrl | KeyCode.KeyL
67
+ },
68
+ when: ChatContextKeys.inChatSession
69
+ }
70
+ });
71
+ }
72
+ async runEditingSessionAction(accessor, editingSession, widget, ...args) {
73
+ const context = args[0];
74
+ const accessibilitySignalService = accessor.get(IAccessibilitySignalService);
75
+ const dialogService = accessor.get(IDialogService);
76
+ if (!(await handleCurrentEditingSession(editingSession, undefined, dialogService))) {
77
+ return;
78
+ }
79
+ announceChatCleared(accessibilitySignalService);
80
+ await editingSession.stop();
81
+ widget.clear();
82
+ await widget.waitForReady();
83
+ widget.attachmentModel.clear(true);
84
+ widget.input.relatedFiles?.clear();
85
+ widget.focusInput();
86
+ if (!context) {
87
+ return;
88
+ }
89
+ if (typeof context.agentMode === 'boolean') {
90
+ widget.input.setChatMode(context.agentMode ? ChatMode.Agent : ChatMode.Edit);
91
+ }
92
+ if (context.inputValue) {
93
+ if (context.isPartialQuery) {
94
+ widget.setInput(context.inputValue);
95
+ }
96
+ else {
97
+ widget.acceptInput(context.inputValue);
98
+ }
99
+ }
100
+ }
101
+ });
102
+ CommandsRegistry.registerCommandAlias(ACTION_ID_NEW_EDIT_SESSION, ACTION_ID_NEW_CHAT);
103
+ registerAction2(class UndoChatEditInteractionAction extends EditingSessionAction {
104
+ constructor() {
105
+ super({
106
+ id: 'workbench.action.chat.undoEdit',
107
+ title: ( localize2(4421, "Undo Last Request")),
108
+ category: CHAT_CATEGORY,
109
+ icon: Codicon.discard,
110
+ precondition: ( ContextKeyExpr.and(
111
+ ChatContextKeys.chatEditingCanUndo,
112
+ ChatContextKeys.enabled,
113
+ ChatContextKeys.editingParticipantRegistered
114
+ )),
115
+ f1: true,
116
+ menu: [{
117
+ id: MenuId.ViewTitle,
118
+ when: ( ContextKeyExpr.equals('view', ChatViewId)),
119
+ group: 'navigation',
120
+ order: -3
121
+ }]
122
+ });
123
+ }
124
+ async runEditingSessionAction(accessor, editingSession) {
125
+ await editingSession.undoInteraction();
126
+ }
127
+ });
128
+ registerAction2(class RedoChatEditInteractionAction extends EditingSessionAction {
129
+ constructor() {
130
+ super({
131
+ id: 'workbench.action.chat.redoEdit',
132
+ title: ( localize2(4422, "Redo Last Request")),
133
+ category: CHAT_CATEGORY,
134
+ icon: Codicon.redo,
135
+ precondition: ( ContextKeyExpr.and(
136
+ ChatContextKeys.chatEditingCanRedo,
137
+ ChatContextKeys.enabled,
138
+ ChatContextKeys.editingParticipantRegistered
139
+ )),
140
+ f1: true,
141
+ menu: [{
142
+ id: MenuId.ViewTitle,
143
+ when: ( ContextKeyExpr.equals('view', ChatViewId)),
144
+ group: 'navigation',
145
+ order: -2
146
+ }]
147
+ });
148
+ }
149
+ async runEditingSessionAction(accessor, editingSession) {
150
+ await editingSession.redoInteraction();
151
+ }
152
+ });
153
+ }
154
+ function announceChatCleared(accessibilitySignalService) {
155
+ accessibilitySignalService.playSignal(AccessibilitySignal.clear);
156
+ }
157
+
158
+ export { registerNewChatActions };
@@ -3,7 +3,7 @@ import { IActionViewItemService } from "@codingame/monaco-vscode-api/vscode/vs/p
3
3
  import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
4
4
  import { ILabelService } from "@codingame/monaco-vscode-api/vscode/vs/platform/label/common/label.service";
5
5
  import { IWorkbenchContribution } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/contributions";
6
- import { IChatResponseViewModel } from "@codingame/monaco-vscode-fab30422-b487-5f4e-8d30-8b4d266e3fcd-common/vscode/vs/workbench/contrib/chat/common/chatViewModel";
6
+ import { IChatResponseViewModel } from "@codingame/monaco-vscode-3a35f433-1297-5707-ab58-c261b8180e6d-common/vscode/vs/workbench/contrib/chat/common/chatViewModel";
7
7
  import { ICodeBlockActionContext, ICodeCompareBlockActionContext } from "@codingame/monaco-vscode-c465110a-57c0-59d7-a6b2-be0a4db7e517-common/vscode/vs/workbench/contrib/chat/browser/codeBlockPart";
8
8
  export interface IChatCodeBlockActionContext extends ICodeBlockActionContext {
9
9
  element: IChatResponseViewModel;