@codingame/monaco-vscode-chat-service-override 15.0.2 → 16.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 (147) hide show
  1. package/index.js +11 -8
  2. package/package.json +29 -20
  3. package/vscode/src/vs/editor/common/diff/documentDiffProvider.d.ts +22 -0
  4. package/vscode/src/vs/editor/common/diff/documentDiffProvider.js +10 -0
  5. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.d.ts +9 -2
  6. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +80 -55
  7. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/chatAttachPromptAction.d.ts +2 -2
  8. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/chatAttachPromptAction.js +17 -3
  9. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/{askToSelectPrompt.d.ts → askToSelectPrompt/askToSelectPrompt.d.ts} +9 -1
  10. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/askToSelectPrompt.js +79 -0
  11. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/constants.d.ts +7 -0
  12. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/constants.js +27 -0
  13. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/utils/attachPrompts.d.ts +5 -0
  14. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/utils/attachPrompts.js +53 -0
  15. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/utils/createPlaceholderText.d.ts +2 -0
  16. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/utils/createPlaceholderText.js +19 -0
  17. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/utils/createPromptPickItem.d.ts +5 -0
  18. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/utils/createPromptPickItem.js +27 -0
  19. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/utils/handleButtonClick.d.ts +13 -0
  20. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/utils/handleButtonClick.js +49 -0
  21. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +11 -11
  22. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.d.ts +6 -1
  23. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +163 -72
  24. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +2 -2
  25. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +22 -2
  26. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +2 -2
  27. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatGettingStarted.js +4 -1
  28. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +3 -3
  29. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatMoveActions.js +17 -17
  30. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +9 -8
  31. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTransfer.d.ts +7 -0
  32. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTransfer.js +17 -0
  33. package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +15 -15
  34. package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +242 -74
  35. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditing.d.ts +4 -0
  36. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditing.js +15 -0
  37. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.d.ts +47 -0
  38. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +688 -0
  39. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.d.ts +28 -0
  40. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +355 -0
  41. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +11 -11
  42. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.d.ts +71 -0
  43. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.js +395 -0
  44. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.d.ts +98 -0
  45. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.js +216 -0
  46. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.d.ts +97 -0
  47. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.js +831 -0
  48. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.d.ts +7 -4
  49. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.js +32 -47
  50. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.d.ts +110 -0
  51. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +985 -0
  52. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelContentProviders.d.ts +20 -0
  53. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelContentProviders.js +69 -0
  54. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingModifiedNotebookDiff.d.ts +15 -0
  55. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingModifiedNotebookDiff.js +67 -0
  56. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingModifiedNotebookSnapshot.d.ts +26 -0
  57. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingModifiedNotebookSnapshot.js +147 -0
  58. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookCellEntry.d.ts +56 -0
  59. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookCellEntry.js +284 -0
  60. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.d.ts +38 -0
  61. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.js +578 -0
  62. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookFileSystemProvider.d.ts +45 -0
  63. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookFileSystemProvider.js +122 -0
  64. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/helpers.d.ts +15 -0
  65. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/helpers.js +320 -0
  66. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/notebookCellChanges.d.ts +31 -0
  67. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/notebookCellChanges.js +50 -0
  68. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditor.d.ts +5 -3
  69. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditor.js +22 -5
  70. package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.d.ts +4 -0
  71. package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +166 -62
  72. package/vscode/src/vs/workbench/contrib/chat/browser/chatQuick.js +1 -1
  73. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup.d.ts +6 -104
  74. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup.js +704 -732
  75. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus.d.ts +10 -25
  76. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus.js +329 -236
  77. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatusItemService.d.ts +19 -0
  78. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatusItemService.js +27 -0
  79. package/vscode/src/vs/workbench/contrib/chat/browser/chatVariables.d.ts +4 -2
  80. package/vscode/src/vs/workbench/contrib/chat/browser/chatVariables.js +14 -6
  81. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputEditorContrib.js +3 -3
  82. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputEditorHover.d.ts +1 -1
  83. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputEditorHover.js +1 -1
  84. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/editorHoverWrapper.d.ts +1 -1
  85. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/editorHoverWrapper.js +1 -1
  86. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/media/editorHoverWrapper.css +3 -0
  87. package/vscode/src/vs/workbench/contrib/chat/browser/languageModelToolsService.d.ts +17 -1
  88. package/vscode/src/vs/workbench/contrib/chat/browser/languageModelToolsService.js +217 -18
  89. package/vscode/src/vs/workbench/contrib/chat/browser/media/chatEditingEditorOverlay.css +114 -0
  90. package/vscode/src/vs/workbench/contrib/chat/browser/media/chatEditorController.css +30 -0
  91. package/vscode/src/vs/workbench/contrib/chat/browser/media/chatSetup.css +56 -0
  92. package/vscode/src/vs/workbench/contrib/chat/browser/media/chatStatus.css +90 -0
  93. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/createPromptCommand.js +65 -19
  94. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/dialogs/askForPromptName.js +2 -2
  95. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/dialogs/askForPromptSourceFolder.js +4 -4
  96. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/errors.js +2 -2
  97. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/utils/createPromptFile.d.ts +2 -2
  98. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/utils/createPromptFile.js +3 -3
  99. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/usePromptCommand.js +14 -12
  100. package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +5 -5
  101. package/vscode/src/vs/workbench/contrib/chat/common/chatProgressTypes/chatToolInvocation.d.ts +5 -3
  102. package/vscode/src/vs/workbench/contrib/chat/common/chatProgressTypes/chatToolInvocation.js +5 -2
  103. package/vscode/src/vs/workbench/contrib/chat/common/chatServiceImpl.d.ts +16 -8
  104. package/vscode/src/vs/workbench/contrib/chat/common/chatServiceImpl.js +175 -57
  105. package/vscode/src/vs/workbench/contrib/chat/common/chatSessionStore.d.ts +66 -0
  106. package/vscode/src/vs/workbench/contrib/chat/common/chatSessionStore.js +313 -0
  107. package/vscode/src/vs/workbench/contrib/chat/common/chatSlashCommands.d.ts +3 -2
  108. package/vscode/src/vs/workbench/contrib/chat/common/chatSlashCommands.js +4 -2
  109. package/vscode/src/vs/workbench/contrib/chat/common/chatTransferService.d.ts +14 -0
  110. package/vscode/src/vs/workbench/contrib/chat/common/chatTransferService.js +30 -0
  111. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/constants.d.ts +2 -3
  112. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/constants.js +6 -2
  113. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contentProviders/textModelContentsProvider.d.ts +10 -2
  114. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contentProviders/textModelContentsProvider.js +18 -3
  115. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageFeatures/promptLinkDiagnosticsProvider.d.ts +9 -0
  116. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageFeatures/promptLinkDiagnosticsProvider.js +117 -0
  117. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageFeatures/promptPathAutocompletion.js +3 -4
  118. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/textModelPromptParser.js +2 -2
  119. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService.js +2 -2
  120. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.d.ts +6 -4
  121. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.js +157 -65
  122. package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.d.ts +2 -1
  123. package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.js +39 -21
  124. package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.d.ts +0 -1
  125. package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +2 -3
  126. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.js +4 -4
  127. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatCurrentLine.js +11 -10
  128. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatNotebook.js +1 -1
  129. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookModifiedCellDecorator.d.ts +10 -0
  130. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookModifiedCellDecorator.js +47 -0
  131. package/vscode/src/vs/workbench/services/workspaces/common/workspaceUtils.d.ts +5 -0
  132. package/vscode/src/vs/workbench/services/workspaces/common/workspaceUtils.js +26 -0
  133. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt.js +0 -142
  134. package/vscode/src/vs/workbench/contrib/chat/browser/chatPasteProviders.d.ts +0 -52
  135. package/vscode/src/vs/workbench/contrib/chat/browser/chatPasteProviders.js +0 -331
  136. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputRelatedFilesContrib.d.ts +0 -15
  137. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputRelatedFilesContrib.js +0 -110
  138. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/media/editorHoverWrapper.css.js +0 -6
  139. package/vscode/src/vs/workbench/contrib/chat/browser/media/chatEditingEditorOverlay.css.js +0 -6
  140. package/vscode/src/vs/workbench/contrib/chat/browser/media/chatStatus.css.js +0 -6
  141. package/vscode/src/vs/workbench/contrib/chat/browser/media/chatViewSetup.css.js +0 -6
  142. package/vscode/src/vs/workbench/contrib/chat/common/chatEntitlementsService.d.ts +0 -19
  143. package/vscode/src/vs/workbench/contrib/chat/common/chatEntitlementsService.js +0 -13
  144. package/vscode/src/vs/workbench/contrib/chat/common/chatQuotasService.d.ts +0 -31
  145. package/vscode/src/vs/workbench/contrib/chat/common/chatQuotasService.js +0 -85
  146. package/vscode/src/vs/workbench/contrib/chat/common/tools/tools.d.ts +0 -11
  147. package/vscode/src/vs/workbench/contrib/chat/common/tools/tools.js +0 -22
@@ -1,6 +1,7 @@
1
1
 
2
2
  import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
3
3
  import { timeout } from '@codingame/monaco-vscode-api/vscode/vs/base/common/async';
4
+ import { Event } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
4
5
  import { isMarkdownString, MarkdownString } from '@codingame/monaco-vscode-api/vscode/vs/base/common/htmlContent';
5
6
  import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
6
7
  import { Schemas } from '@codingame/monaco-vscode-api/vscode/vs/base/common/network';
@@ -14,36 +15,45 @@ import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platf
14
15
  import { SyncDescriptor } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/descriptors';
15
16
  import '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/extensions';
16
17
  import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
18
+ import product from '@codingame/monaco-vscode-api/vscode/vs/platform/product/common/product';
17
19
  import { IProductService } from '@codingame/monaco-vscode-api/vscode/vs/platform/product/common/productService.service';
20
+ import { PromptsConfig } from '@codingame/monaco-vscode-a1eb43d5-da63-5f76-8ad4-acf0d6c3b749-common/vscode/vs/platform/prompts/common/config';
21
+ import { DEFAULT_SOURCE_FOLDER, PROMPT_FILE_EXTENSION } from '@codingame/monaco-vscode-a1eb43d5-da63-5f76-8ad4-acf0d6c3b749-common/vscode/vs/platform/prompts/common/constants';
18
22
  import { Registry } from '@codingame/monaco-vscode-api/vscode/vs/platform/registry/common/platform';
19
23
  import { EditorPaneDescriptor } from '@codingame/monaco-vscode-12c5f9eb-72d3-57ca-babd-5bef7aa9de3b-common/vscode/vs/workbench/browser/editor';
20
24
  import { Extensions as Extensions$1 } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/configuration';
21
25
  import { registerWorkbenchContribution2, WorkbenchPhase } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/contributions';
22
26
  import { EditorExtensions } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor';
23
27
  import { IWorkbenchAssignmentService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/assignment/common/assignmentService.service';
28
+ import { mcpSchemaId } from '@codingame/monaco-vscode-2b1a9082-790f-527f-b013-d1b29d6265a3-common/vscode/vs/workbench/services/configuration/common/configuration';
24
29
  import { RegisteredEditorPriority } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorResolverService';
25
30
  import { IEditorResolverService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorResolverService.service';
26
- import { ChatAgentLocation } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatAgents';
31
+ import { mcpDiscoverySection, allDiscoverySources, discoverySourceLabel, mcpConfigurationSection, mcpSchemaExampleServers, mcpEnabledSection } from '@codingame/monaco-vscode-ec21d4de-4d65-574c-8715-bb1a6bbad376-common/vscode/vs/workbench/contrib/mcp/common/mcpConfiguration';
32
+ import '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/chat/common/chatAgents';
27
33
  import { IChatAgentService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatAgents.service';
28
34
  import '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/chat/common/chatColors';
29
35
  import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatContextKeys';
36
+ import { ChatEntitlement } from '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/chat/common/chatEntitlementService';
37
+ import { IChatEntitlementService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatEntitlementService.service';
30
38
  import { chatVariableLeader } from '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/chat/common/chatParserTypes';
31
39
  import '../common/chatServiceImpl.js';
32
40
  import '../common/chatSlashCommands.js';
33
41
  import { IChatSlashCommandService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSlashCommands.service';
42
+ import '../common/chatTransferService.js';
34
43
  import { IChatVariablesService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatVariables.service';
35
44
  import '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/chat/common/chatWidgetHistoryService';
45
+ import { ChatConfiguration, ChatAgentLocation, ChatMode } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
36
46
  import '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModels';
37
47
  import '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/chat/common/languageModelStats';
48
+ import { DOCUMENTATION_URL } from '../common/promptSyntax/constants.js';
49
+ import '../common/promptSyntax/languageFeatures/promptLinkDiagnosticsProvider.js';
38
50
  import '../common/promptSyntax/languageFeatures/promptLinkProvider.js';
39
51
  import '../common/promptSyntax/languageFeatures/promptPathAutocompletion.js';
40
52
  import '../common/promptSyntax/service/promptsService.js';
41
- import './promptSyntax/contributions/usePromptCommand.js';
42
- import './promptSyntax/contributions/createPromptCommand/createPromptCommand.js';
43
53
  import { LanguageModelToolsExtensionPointHandler } from '../common/tools/languageModelToolsContribution.js';
44
- import { BuiltinToolsContribution } from '../common/tools/tools.js';
54
+ import { BuiltinToolsContribution } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/tools';
45
55
  import '../common/voiceChatService.js';
46
- import { PanelChatAccessibilityHelp, QuickChatAccessibilityHelp, EditsChatAccessibilityHelp } from './actions/chatAccessibilityHelp.js';
56
+ import { PanelChatAccessibilityHelp, QuickChatAccessibilityHelp, EditsChatAccessibilityHelp, AgentChatAccessibilityHelp } from './actions/chatAccessibilityHelp.js';
47
57
  import { CopilotTitleBarMenuRendering, registerChatActions } from '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/chat/browser/actions/chatActions';
48
58
  import { ACTION_ID_NEW_CHAT, registerNewChatActions } from '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/chat/browser/actions/chatClearActions';
49
59
  import { CodeBlockActionRendering, registerChatCodeBlockActions, registerChatCodeCompareBlockActions } from './actions/chatCodeblockActions.js';
@@ -57,72 +67,70 @@ import { registerChatExportActions } from './actions/chatImportExport.js';
57
67
  import { registerMoveActions } from './actions/chatMoveActions.js';
58
68
  import { registerQuickChatActions } from './actions/chatQuickInputActions.js';
59
69
  import { registerChatTitleActions } from '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/chat/browser/actions/chatTitleActions';
70
+ import { registerChatToolActions } from '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/chat/browser/actions/chatToolActions';
71
+ import { ChatTransferContribution } from './actions/chatTransfer.js';
60
72
  import './chatAccessibilityService.js';
61
73
  import '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/chat/browser/chatAttachmentModel';
62
74
  import '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
63
75
  import { ChatInputBoxContentProvider } from './chatEdinputInputContentProvider.js';
64
76
  import { ChatEditingEditorAccessibility } from './chatEditing/chatEditingEditorAccessibility.js';
65
- import { registerChatEditorActions } from '@codingame/monaco-vscode-e4d0fd26-1b26-5583-b3f7-582e08d7b389-common/vscode/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions';
77
+ import { registerChatEditorActions } from './chatEditing/chatEditingEditorActions.js';
78
+ import { ChatEditingEditorContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorContextKeys';
66
79
  import { ChatEditingEditorOverlay } from './chatEditing/chatEditingEditorOverlay.js';
67
80
  import './chatEditing/chatEditingServiceImpl.js';
81
+ import { ChatEditingNotebookFileSystemProviderContrib } from './chatEditing/notebook/chatEditingNotebookFileSystemProvider.js';
68
82
  import { ChatEditor } from './chatEditor.js';
69
83
  import { ChatEditorInput, ChatEditorInputSerializer } from '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/chat/browser/chatEditorInput';
70
84
  import { agentToMarkdown, agentSlashCommandToMarkdown } from '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/chat/browser/chatMarkdownDecorationsRenderer';
71
85
  import { ChatExtensionPointHandler, ChatCompatibilityNotifier } from './chatParticipant.contribution.js';
72
- import { ChatPasteProvidersFeature } from './chatPasteProviders.js';
86
+ import { ChatPasteProvidersFeature } from '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/chat/browser/chatPasteProviders';
73
87
  import './chatQuick.js';
74
- import '../common/chatQuotasService.js';
75
88
  import { ChatResponseAccessibleView } from './chatResponseAccessibleView.js';
76
89
  import { ChatSetupContribution } from './chatSetup.js';
90
+ import { ChatStatusBarEntry } from './chatStatus.js';
77
91
  import './chatVariables.js';
78
92
  import '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/chat/browser/chatWidget';
79
93
  import { ChatImplicitContextContribution } from '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/chat/browser/contrib/chatImplicitContext';
80
- import '@codingame/monaco-vscode-e4d0fd26-1b26-5583-b3f7-582e08d7b389-common/vscode/vs/workbench/contrib/chat/browser/contrib/chatInputCompletions';
94
+ import '@codingame/monaco-vscode-bba55be6-41a2-50cd-a3cc-8bafa35bfa89-common/vscode/vs/workbench/contrib/chat/browser/contrib/chatInputCompletions';
81
95
  import './contrib/chatInputEditorContrib.js';
82
96
  import './contrib/chatInputEditorHover.js';
83
- import { ChatRelatedFilesContribution } from './contrib/chatInputRelatedFilesContrib.js';
97
+ import { ChatRelatedFilesContribution } from '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/chat/browser/contrib/chatInputRelatedFilesContrib';
84
98
  import './languageModelToolsService.js';
99
+ import './promptSyntax/contributions/createPromptCommand/createPromptCommand.js';
100
+ import './promptSyntax/contributions/usePromptCommand.js';
85
101
  import { ChatViewsWelcomeHandler } from './viewsWelcome/chatViewsWelcomeHandler.js';
86
- import { ChatEditingEditorContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorContextKeys';
87
- import { PromptsConfig } from '@codingame/monaco-vscode-52bb4d5b-ba1a-57fd-9bee-b28824214eac-common/vscode/vs/platform/prompts/common/config';
88
- import { PROMPT_FILE_EXTENSION } from '@codingame/monaco-vscode-52bb4d5b-ba1a-57fd-9bee-b28824214eac-common/vscode/vs/platform/prompts/common/constants';
89
- import { DOCUMENTATION_URL } from '../common/promptSyntax/constants.js';
90
- import { registerChatToolActions } from '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/chat/browser/actions/chatToolActions';
91
- import { ChatStatusBarEntry } from './chatStatus.js';
92
- import product from '@codingame/monaco-vscode-api/vscode/vs/platform/product/common/product';
93
- import { ChatEditingNotebookFileSystemProviderContrib } from '@codingame/monaco-vscode-e4d0fd26-1b26-5583-b3f7-582e08d7b389-common/vscode/vs/workbench/contrib/chat/browser/chatEditing/chatEditingNotebookFileSystemProvider';
94
102
 
95
103
  const configurationRegistry = ( Registry.as(Extensions.Configuration));
96
104
  configurationRegistry.registerConfiguration({
97
105
  id: 'chatSidebar',
98
- title: ( localize(4430, "Chat")),
106
+ title: ( localize(4499, "Chat")),
99
107
  type: 'object',
100
108
  properties: {
101
109
  'chat.editor.fontSize': {
102
110
  type: 'number',
103
- description: ( localize(4431, "Controls the font size in pixels in chat codeblocks.")),
111
+ description: ( localize(4500, "Controls the font size in pixels in chat codeblocks.")),
104
112
  default: isMacintosh ? 12 : 14,
105
113
  },
106
114
  'chat.editor.fontFamily': {
107
115
  type: 'string',
108
- description: ( localize(4432, "Controls the font family in chat codeblocks.")),
116
+ description: ( localize(4501, "Controls the font family in chat codeblocks.")),
109
117
  default: 'default'
110
118
  },
111
119
  'chat.editor.fontWeight': {
112
120
  type: 'string',
113
- description: ( localize(4433, "Controls the font weight in chat codeblocks.")),
121
+ description: ( localize(4502, "Controls the font weight in chat codeblocks.")),
114
122
  default: 'default'
115
123
  },
116
124
  'chat.editor.wordWrap': {
117
125
  type: 'string',
118
- description: ( localize(4434, "Controls whether lines should wrap in chat codeblocks.")),
126
+ description: ( localize(4503, "Controls whether lines should wrap in chat codeblocks.")),
119
127
  default: 'off',
120
128
  enum: ['on', 'off']
121
129
  },
122
130
  'chat.editor.lineHeight': {
123
131
  type: 'number',
124
132
  description: ( localize(
125
- 4435,
133
+ 4504,
126
134
  "Controls the line height in pixels in chat codeblocks. Use 0 to compute the line height from the font size."
127
135
  )),
128
136
  default: 0
@@ -130,7 +138,7 @@ configurationRegistry.registerConfiguration({
130
138
  'chat.commandCenter.enabled': {
131
139
  type: 'boolean',
132
140
  markdownDescription: ( localize(
133
- 4436,
141
+ 4505,
134
142
  "Controls whether the command center shows a menu for actions to control Copilot (requires {0}).",
135
143
  '`#window.commandCenter#`'
136
144
  )),
@@ -140,17 +148,17 @@ configurationRegistry.registerConfiguration({
140
148
  type: 'object',
141
149
  tags: ['experimental'],
142
150
  description: ( localize(
143
- 4437,
151
+ 4506,
144
152
  "Enables automatically using the active editor as chat context for specified chat locations."
145
153
  )),
146
154
  additionalProperties: {
147
155
  type: 'string',
148
156
  enum: ['never', 'first', 'always'],
149
- description: ( localize(4438, "The value for the implicit context.")),
157
+ description: ( localize(4507, "The value for the implicit context.")),
150
158
  enumDescriptions: [
151
- ( localize(4439, "Implicit context is never enabled.")),
152
- ( localize(4440, "Implicit context is enabled for the first interaction.")),
153
- ( localize(4441, "Implicit context is always enabled."))
159
+ ( localize(4508, "Implicit context is never enabled.")),
160
+ ( localize(4509, "Implicit context is enabled for the first interaction.")),
161
+ ( localize(4510, "Implicit context is always enabled."))
154
162
  ]
155
163
  },
156
164
  default: {
@@ -161,7 +169,7 @@ configurationRegistry.registerConfiguration({
161
169
  'chat.editing.autoAcceptDelay': {
162
170
  type: 'number',
163
171
  markdownDescription: ( localize(
164
- 4442,
172
+ 4511,
165
173
  "Delay after which changes made by chat are automatically accepted. Values are in seconds, `0` means disabled and `100` seconds is the maximum."
166
174
  )),
167
175
  default: 0,
@@ -172,7 +180,7 @@ configurationRegistry.registerConfiguration({
172
180
  type: 'boolean',
173
181
  scope: ConfigurationScope.APPLICATION,
174
182
  markdownDescription: ( localize(
175
- 4443,
183
+ 4512,
176
184
  "Whether to show a confirmation before removing a request and its associated edits."
177
185
  )),
178
186
  default: true,
@@ -181,7 +189,7 @@ configurationRegistry.registerConfiguration({
181
189
  type: 'boolean',
182
190
  scope: ConfigurationScope.APPLICATION,
183
191
  markdownDescription: ( localize(
184
- 4444,
192
+ 4513,
185
193
  "Whether to show a confirmation before retrying a request and its associated edits."
186
194
  )),
187
195
  default: true,
@@ -189,39 +197,149 @@ configurationRegistry.registerConfiguration({
189
197
  'chat.experimental.detectParticipant.enabled': {
190
198
  type: 'boolean',
191
199
  deprecationMessage: ( localize(
192
- 4445,
200
+ 4514,
193
201
  "This setting is deprecated. Please use `chat.detectParticipant.enabled` instead."
194
202
  )),
195
- description: ( localize(4446, "Enables chat participant autodetection for panel chat.")),
203
+ description: ( localize(4515, "Enables chat participant autodetection for panel chat.")),
196
204
  default: null
197
205
  },
198
206
  'chat.detectParticipant.enabled': {
199
207
  type: 'boolean',
200
- description: ( localize(4447, "Enables chat participant autodetection for panel chat.")),
208
+ description: ( localize(4516, "Enables chat participant autodetection for panel chat.")),
201
209
  default: true
202
210
  },
203
211
  'chat.renderRelatedFiles': {
204
212
  type: 'boolean',
205
213
  description: ( localize(
206
- 4448,
214
+ 4517,
207
215
  "Controls whether related files should be rendered in the chat input."
208
216
  )),
209
217
  default: false
210
218
  },
211
- 'chat.experimental.statusIndicator.enabled': {
219
+ 'chat.setupFromDialog': {
212
220
  type: 'boolean',
213
221
  description: ( localize(
214
- 4449,
215
- "Controls whether a Copilot related status indicator appears in the lower right corner."
222
+ 4518,
223
+ "Controls whether Copilot setup starts from a dialog or from the welcome view."
216
224
  )),
217
225
  default: product.quality !== 'stable',
218
226
  tags: ['experimental', 'onExp']
219
227
  },
220
- [PromptsConfig.CONFIG_KEY]: {
228
+ 'chat.focusWindowOnConfirmation': {
229
+ type: 'boolean',
230
+ description: ( localize(
231
+ 4519,
232
+ "Controls whether the Copilot window should be focused when a confirmation is needed."
233
+ )),
234
+ default: true,
235
+ },
236
+ 'chat.tools.autoApprove': {
237
+ default: false,
238
+ description: ( localize(
239
+ 4520,
240
+ "Controls whether tool use should be automatically approved ('YOLO mode')."
241
+ )),
242
+ type: 'boolean',
243
+ tags: ['experimental'],
244
+ policy: {
245
+ name: 'ChatToolsAutoApprove',
246
+ minimumVersion: '1.99',
247
+ previewFeature: true,
248
+ defaultValue: false
249
+ }
250
+ },
251
+ [mcpEnabledSection]: {
252
+ type: 'boolean',
253
+ description: ( localize(
254
+ 4521,
255
+ "Enables integration with Model Context Protocol servers to provide additional tools and functionality."
256
+ )),
257
+ default: true,
258
+ tags: ['preview'],
259
+ policy: {
260
+ name: 'ChatMCP',
261
+ minimumVersion: '1.99',
262
+ previewFeature: true,
263
+ defaultValue: false
264
+ }
265
+ },
266
+ [mcpConfigurationSection]: {
267
+ type: 'object',
268
+ default: {
269
+ inputs: [],
270
+ servers: mcpSchemaExampleServers,
271
+ },
272
+ description: ( localize(4522, "Model Context Protocol server configurations")),
273
+ $ref: mcpSchemaId
274
+ },
275
+ [ChatConfiguration.UnifiedChatView]: {
276
+ type: 'boolean',
277
+ description: ( localize(
278
+ 4523,
279
+ "Enables the unified view with Ask, Edit, and Agent modes in one view."
280
+ )),
281
+ default: true,
282
+ tags: ['preview'],
283
+ },
284
+ [ChatConfiguration.UseFileStorage]: {
285
+ type: 'boolean',
286
+ description: ( localize(
287
+ 4524,
288
+ "Enables storing chat sessions on disk instead of in the storage service. Enabling this does a one-time per-workspace migration of existing sessions to the new format."
289
+ )),
290
+ default: true,
291
+ tags: ['experimental'],
292
+ },
293
+ [ChatConfiguration.Edits2Enabled]: {
294
+ type: 'boolean',
295
+ description: ( localize(
296
+ 4525,
297
+ "Enable the new Edits mode that is based on tool-calling. When this is enabled, models that don't support tool-calling are unavailable for Edits mode."
298
+ )),
299
+ default: true,
300
+ tags: ['onExp'],
301
+ },
302
+ [ChatConfiguration.ExtensionToolsEnabled]: {
303
+ type: 'boolean',
304
+ description: ( localize(
305
+ 4526,
306
+ "Enable using tools contributed by third-party extensions in Copilot Chat agent mode."
307
+ )),
308
+ default: true,
309
+ policy: {
310
+ name: 'ChatAgentExtensionTools',
311
+ minimumVersion: '1.99',
312
+ description: ( localize(
313
+ 4527,
314
+ "Enable using tools contributed by third-party extensions in Copilot Chat agent mode."
315
+ )),
316
+ previewFeature: true,
317
+ defaultValue: false
318
+ }
319
+ },
320
+ [mcpDiscoverySection]: {
321
+ oneOf: [
322
+ { type: 'boolean' },
323
+ {
324
+ type: 'object',
325
+ default: Object.fromEntries(( allDiscoverySources.map(k => [k, true]))),
326
+ properties: Object.fromEntries(( allDiscoverySources.map(k => [
327
+ k,
328
+ { type: 'boolean', description: ( localize(4528, "Enables discovery of {0} servers", discoverySourceLabel[k])) }
329
+ ]))),
330
+ }
331
+ ],
332
+ default: true,
333
+ markdownDescription: ( localize(
334
+ 4529,
335
+ "Configures discovery of Model Context Protocol servers on the machine. It may be set to `true` or `false` to disable or enable all sources, and an mapping sources you wish to enable."
336
+ )),
337
+ },
338
+ [PromptsConfig.KEY]: {
221
339
  type: 'boolean',
222
- title: ( localize(4450, "Prompt Files")),
340
+ title: ( localize(4530, "Prompt Files")),
223
341
  markdownDescription: ( localize(
224
- 4451,
342
+ 4531,
225
343
  "Enable reusable prompt files (`*{0}`) in Chat, Edits, and Inline Chat sessions. [Learn More]({1}).",
226
344
  PROMPT_FILE_EXTENSION,
227
345
  DOCUMENTATION_URL
@@ -230,38 +348,46 @@ configurationRegistry.registerConfiguration({
230
348
  restricted: true,
231
349
  disallowConfigurationDefault: true,
232
350
  tags: ['experimental', 'prompts', 'reusable prompts', 'prompt snippets', 'instructions'],
351
+ policy: {
352
+ name: 'ChatPromptFiles',
353
+ minimumVersion: '1.99',
354
+ description: ( localize(
355
+ 4532,
356
+ "Enables reusable prompt files in Chat, Edits, and Inline Chat sessions."
357
+ )),
358
+ previewFeature: true,
359
+ defaultValue: false
360
+ }
233
361
  },
234
- [PromptsConfig.LOCATIONS_CONFIG_KEY]: {
362
+ [PromptsConfig.LOCATIONS_KEY]: {
235
363
  type: 'object',
236
- title: ( localize(4452, "Prompt File Locations")),
364
+ title: ( localize(4533, "Prompt File Locations")),
237
365
  markdownDescription: ( localize(
238
- 4453,
366
+ 4534,
239
367
  "Specify location(s) of reusable prompt files (`*{0}`) that can be attached in Chat, Edits, and Inline Chat sessions. [Learn More]({1}).\n\nRelative paths are resolved from the root folder(s) of your workspace.",
240
368
  PROMPT_FILE_EXTENSION,
241
369
  DOCUMENTATION_URL
242
370
  )),
243
371
  default: {
244
- [PromptsConfig.DEFAULT_SOURCE_FOLDER]: true,
372
+ [DEFAULT_SOURCE_FOLDER]: true,
245
373
  },
246
- required: [PromptsConfig.DEFAULT_SOURCE_FOLDER],
247
374
  additionalProperties: { type: 'boolean' },
248
375
  unevaluatedProperties: { type: 'boolean' },
249
376
  restricted: true,
250
- disallowConfigurationDefault: true,
251
377
  tags: ['experimental', 'prompts', 'reusable prompts', 'prompt snippets', 'instructions'],
252
378
  examples: [
253
379
  {
254
- [PromptsConfig.DEFAULT_SOURCE_FOLDER]: true,
380
+ [DEFAULT_SOURCE_FOLDER]: true,
255
381
  },
256
382
  {
257
- [PromptsConfig.DEFAULT_SOURCE_FOLDER]: true,
383
+ [DEFAULT_SOURCE_FOLDER]: true,
258
384
  '/Users/vscode/repos/prompts': true,
259
385
  },
260
386
  ],
261
387
  },
262
388
  }
263
389
  });
264
- ( Registry.as(EditorExtensions.EditorPane)).registerEditorPane(EditorPaneDescriptor.create(ChatEditor, ChatEditorInput.EditorID, ( localize(4454, "Chat"))), [
390
+ ( Registry.as(EditorExtensions.EditorPane)).registerEditorPane(EditorPaneDescriptor.create(ChatEditor, ChatEditorInput.EditorID, ( localize(4535, "Chat"))), [
265
391
  ( new SyncDescriptor(ChatEditorInput))
266
392
  ]);
267
393
  ( Registry.as(Extensions$1.ConfigurationMigration)).registerConfigurationMigrations([
@@ -279,7 +405,7 @@ let ChatResolverContribution = class ChatResolverContribution extends Disposable
279
405
  super();
280
406
  this._register(editorResolverService.registerEditor(`${Schemas.vscodeChatSesssion}:**/**`, {
281
407
  id: ChatEditorInput.EditorID,
282
- label: ( localize(4454, "Chat")),
408
+ label: ( localize(4535, "Chat")),
283
409
  priority: RegisteredEditorPriority.builtin
284
410
  }, {
285
411
  singlePerResource: true,
@@ -295,47 +421,56 @@ ChatResolverContribution = ( __decorate([
295
421
  ( __param(0, IEditorResolverService)),
296
422
  ( __param(1, IInstantiationService))
297
423
  ], ChatResolverContribution));
298
- let ChatAgentSettingContribution = class ChatAgentSettingContribution {
424
+ let ChatAgentSettingContribution = class ChatAgentSettingContribution extends Disposable {
299
425
  static { this.ID = 'workbench.contrib.chatAgentSetting'; }
300
- constructor(experimentService, productService, contextKeyService) {
426
+ constructor(experimentService, productService, contextKeyService, entitlementService) {
427
+ super();
428
+ this.experimentService = experimentService;
301
429
  this.productService = productService;
430
+ this.entitlementService = entitlementService;
302
431
  if (this.productService.quality !== 'stable') {
303
- this.registerSetting();
432
+ this.registerEnablementSetting();
304
433
  }
305
434
  const expDisabledKey = ChatContextKeys.Editing.agentModeDisallowed.bindTo(contextKeyService);
306
435
  experimentService.getTreatment('chatAgentEnabled').then(enabled => {
307
- if (enabled) {
308
- this.registerSetting();
436
+ if (enabled || typeof enabled !== 'boolean') {
437
+ this.registerEnablementSetting();
309
438
  expDisabledKey.set(false);
310
439
  }
311
- else if (enabled === false) {
440
+ else {
312
441
  this.deregisterSetting();
313
442
  expDisabledKey.set(true);
314
443
  }
315
444
  });
445
+ this.registerMaxRequestsSetting();
316
446
  }
317
- registerSetting() {
447
+ registerEnablementSetting() {
318
448
  if (this.registeredNode) {
319
449
  return;
320
450
  }
321
- this.registeredNode = {
451
+ this.registeredNode = configurationRegistry.registerConfiguration({
322
452
  id: 'chatAgent',
323
- title: ( localize(4430, "Chat")),
453
+ title: ( localize(4499, "Chat")),
324
454
  type: 'object',
325
455
  properties: {
326
- 'chat.agent.enabled': {
456
+ [ChatConfiguration.AgentEnabled]: {
327
457
  type: 'boolean',
328
458
  description: ( localize(
329
- 4455,
330
- "Enable agent mode for {0}. When this is enabled, a dropdown appears in the {0} view to toggle agent mode.",
331
- 'Copilot Edits'
459
+ 4536,
460
+ "Enable agent mode for {0}. When this is enabled, a dropdown appears in the view to toggle agent mode.",
461
+ 'Copilot Chat'
332
462
  )),
333
463
  default: this.productService.quality !== 'stable',
334
- tags: ['experimental', 'onExp'],
464
+ tags: ['onExp'],
465
+ policy: {
466
+ name: 'ChatAgentMode',
467
+ minimumVersion: '1.99',
468
+ previewFeature: false,
469
+ defaultValue: false
470
+ }
335
471
  },
336
472
  }
337
- };
338
- configurationRegistry.registerConfiguration(this.registeredNode);
473
+ });
339
474
  }
340
475
  deregisterSetting() {
341
476
  if (this.registeredNode) {
@@ -343,16 +478,47 @@ let ChatAgentSettingContribution = class ChatAgentSettingContribution {
343
478
  this.registeredNode = undefined;
344
479
  }
345
480
  }
481
+ registerMaxRequestsSetting() {
482
+ let lastNode;
483
+ const registerMaxRequestsSetting = () => {
484
+ const treatmentId = this.entitlementService.entitlement === ChatEntitlement.Limited ?
485
+ 'chatAgentMaxRequestsFree' :
486
+ 'chatAgentMaxRequestsPro';
487
+ this.experimentService.getTreatment(treatmentId).then(value => {
488
+ const defaultValue = value ?? (this.entitlementService.entitlement === ChatEntitlement.Limited ? 5 : 15);
489
+ const node = {
490
+ id: 'chatSidebar',
491
+ title: ( localize(4499, "Chat")),
492
+ type: 'object',
493
+ properties: {
494
+ 'chat.agent.maxRequests': {
495
+ type: 'number',
496
+ markdownDescription: ( localize(
497
+ 4537,
498
+ "The maximum number of requests to allow Copilot Edits to use per-turn in agent mode. When the limit is reached, Copilot will ask the user to confirm that it should keep working. \n\n> **Note**: For users on the Copilot Free plan, note that each agent mode request currently uses one chat request."
499
+ )),
500
+ default: defaultValue,
501
+ },
502
+ }
503
+ };
504
+ configurationRegistry.updateConfigurations({ remove: lastNode ? [lastNode] : [], add: [node] });
505
+ lastNode = node;
506
+ });
507
+ };
508
+ this._register(Event.runAndSubscribe(Event.debounce(this.entitlementService.onDidChangeEntitlement, () => { }, 1000), () => registerMaxRequestsSetting()));
509
+ }
346
510
  };
347
511
  ChatAgentSettingContribution = ( __decorate([
348
512
  ( __param(0, IWorkbenchAssignmentService)),
349
513
  ( __param(1, IProductService)),
350
- ( __param(2, IContextKeyService))
514
+ ( __param(2, IContextKeyService)),
515
+ ( __param(3, IChatEntitlementService))
351
516
  ], ChatAgentSettingContribution));
352
517
  AccessibleViewRegistry.register(( new ChatResponseAccessibleView()));
353
518
  AccessibleViewRegistry.register(( new PanelChatAccessibilityHelp()));
354
519
  AccessibleViewRegistry.register(( new QuickChatAccessibilityHelp()));
355
520
  AccessibleViewRegistry.register(( new EditsChatAccessibilityHelp()));
521
+ AccessibleViewRegistry.register(( new AgentChatAccessibilityHelp()));
356
522
  registerEditorFeature(ChatInputBoxContentProvider);
357
523
  let ChatSlashStaticSlashCommandsContribution = class ChatSlashStaticSlashCommandsContribution extends Disposable {
358
524
  static { this.ID = 'workbench.contrib.chatSlashStaticSlashCommands'; }
@@ -360,7 +526,7 @@ let ChatSlashStaticSlashCommandsContribution = class ChatSlashStaticSlashCommand
360
526
  super();
361
527
  this._store.add(slashCommandService.registerSlashCommand({
362
528
  command: 'clear',
363
- detail: ( localize(4456, "Start a new chat")),
529
+ detail: ( localize(4538, "Start a new chat")),
364
530
  sortText: 'z2_clear',
365
531
  executeImmediately: true,
366
532
  locations: [ChatAgentLocation.Panel]
@@ -372,7 +538,8 @@ let ChatSlashStaticSlashCommandsContribution = class ChatSlashStaticSlashCommand
372
538
  detail: '',
373
539
  sortText: 'z1_help',
374
540
  executeImmediately: true,
375
- locations: [ChatAgentLocation.Panel]
541
+ locations: [ChatAgentLocation.Panel],
542
+ modes: [ChatMode.Ask]
376
543
  }, async (prompt, progress) => {
377
544
  const defaultAgent = chatAgentService.getDefaultAgent(ChatAgentLocation.Panel);
378
545
  const agents = chatAgentService.getAgents();
@@ -386,7 +553,7 @@ let ChatSlashStaticSlashCommandsContribution = class ChatSlashStaticSlashCommand
386
553
  progress.report({ content: ( new MarkdownString('\n\n')), kind: 'markdownContent' });
387
554
  }
388
555
  const agentText = (await Promise.all(( agents
389
- .filter(a => a.id !== defaultAgent?.id)
556
+ .filter(a => a.id !== defaultAgent?.id && !a.isCore)
390
557
  .filter(a => a.locations.includes(ChatAgentLocation.Panel))
391
558
  .map(async (a) => {
392
559
  const description = a.description ? `- ${a.description}` : '';
@@ -408,7 +575,7 @@ let ChatSlashStaticSlashCommandsContribution = class ChatSlashStaticSlashCommand
408
575
  progress.report({ content: ( new MarkdownString(defaultAgent.metadata.helpTextVariablesPrefix)), kind: 'markdownContent' });
409
576
  }
410
577
  const variables = [
411
- { name: 'file', description: ( localize(4457, "Choose a file in the workspace")) }
578
+ { name: 'file', description: ( localize(4539, "Choose a file in the workspace")) }
412
579
  ];
413
580
  const variableText = ( variables
414
581
  .map(v => `* \`${chatVariableLeader}${v.name}\` - ${v.description}`))
@@ -454,6 +621,7 @@ registerWorkbenchContribution2(ChatAgentSettingContribution.ID, ChatAgentSetting
454
621
  registerWorkbenchContribution2(ChatEditingEditorAccessibility.ID, ChatEditingEditorAccessibility, WorkbenchPhase.AfterRestored);
455
622
  registerWorkbenchContribution2(ChatEditingEditorOverlay.ID, ChatEditingEditorOverlay, WorkbenchPhase.AfterRestored);
456
623
  registerWorkbenchContribution2(ChatEditingEditorContextKeys.ID, ChatEditingEditorContextKeys, WorkbenchPhase.AfterRestored);
624
+ registerWorkbenchContribution2(ChatTransferContribution.ID, ChatTransferContribution, WorkbenchPhase.BlockRestore);
457
625
  registerChatActions();
458
626
  registerChatCopyActions();
459
627
  registerChatCodeBlockActions();
@@ -0,0 +1,4 @@
1
+ import { ICodeEditor } from "@codingame/monaco-vscode-api/vscode/vs/editor/browser/editorBrowser";
2
+ import { ServicesAccessor } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
3
+ import { IModifiedFileEntry } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatEditingService";
4
+ export declare function isTextDiffEditorForEntry(accessor: ServicesAccessor, entry: IModifiedFileEntry, editor: ICodeEditor): boolean;
@@ -0,0 +1,15 @@
1
+
2
+ import { isEqual } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
3
+ import { findDiffEditorContainingCodeEditor } from '@codingame/monaco-vscode-api/vscode/vs/editor/browser/widget/diffEditor/commands';
4
+
5
+ function isTextDiffEditorForEntry(accessor, entry, editor) {
6
+ const diffEditor = findDiffEditorContainingCodeEditor(accessor, editor);
7
+ if (!diffEditor) {
8
+ return false;
9
+ }
10
+ const originalModel = diffEditor.getOriginalEditor().getModel();
11
+ const modifiedModel = diffEditor.getModifiedEditor().getModel();
12
+ return isEqual(originalModel?.uri, entry.originalURI) && isEqual(modifiedModel?.uri, entry.modifiedURI);
13
+ }
14
+
15
+ export { isTextDiffEditorForEntry };