@codingame/monaco-vscode-chat-service-override 16.1.0 → 17.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 (188) hide show
  1. package/index.js +6 -6
  2. package/package.json +30 -27
  3. package/vscode/src/vs/base/common/objectCache.d.ts +1 -1
  4. package/vscode/src/vs/base/common/objectCache.js +1 -1
  5. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +41 -41
  6. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.d.ts +2 -2
  7. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +16 -15
  8. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.d.ts +4 -6
  9. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +410 -443
  10. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +6 -6
  11. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +2 -2
  12. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +4 -4
  13. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatGettingStarted.d.ts +1 -7
  14. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatGettingStarted.js +3 -18
  15. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +6 -6
  16. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatMoveActions.js +9 -12
  17. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +9 -9
  18. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTransfer.js +1 -1
  19. package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.d.ts +4 -2
  20. package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +32 -28
  21. package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/chatAttachInstructionsAction.d.ts +10 -0
  22. package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/chatAttachInstructionsAction.js +61 -0
  23. package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/chatRunPromptAction.d.ts +4 -0
  24. package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/chatRunPromptAction.js +159 -0
  25. package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/chatSaveToPromptAction.d.ts +9 -0
  26. package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/chatSaveToPromptAction.js +140 -0
  27. package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/dialogs/askToSelectPrompt/promptFilePickers.d.ts +32 -0
  28. package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/dialogs/askToSelectPrompt/promptFilePickers.js +244 -0
  29. package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/dialogs/askToSelectPrompt/utils/attachInstructions.d.ts +12 -0
  30. package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/dialogs/askToSelectPrompt/utils/attachInstructions.js +30 -0
  31. package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/dialogs/askToSelectPrompt/utils/runPrompt.d.ts +15 -0
  32. package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/dialogs/askToSelectPrompt/utils/runPrompt.js +12 -0
  33. package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/index.d.ts +2 -0
  34. package/vscode/src/vs/workbench/contrib/chat/browser/actions/promptActions/index.js +13 -0
  35. package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +171 -168
  36. package/vscode/src/vs/workbench/contrib/chat/browser/chatAccessibilityService.d.ts +1 -1
  37. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatMarkdownAnchorService.d.ts +1 -1
  38. package/vscode/src/vs/workbench/contrib/chat/browser/chatEdinputInputContentProvider.js +1 -1
  39. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.d.ts +5 -5
  40. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +48 -45
  41. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.d.ts +5 -5
  42. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +46 -44
  43. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +118 -123
  44. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.d.ts +5 -7
  45. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.js +45 -29
  46. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.d.ts +12 -7
  47. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.js +48 -34
  48. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.d.ts +3 -3
  49. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.js +53 -20
  50. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.d.ts +2 -2
  51. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.js +32 -15
  52. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.d.ts +9 -23
  53. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +80 -268
  54. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSessionStorage.d.ts +36 -0
  55. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSessionStorage.js +214 -0
  56. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingModifiedNotebookDiff.js +1 -1
  57. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingModifiedNotebookSnapshot.js +1 -1
  58. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookCellEntry.d.ts +7 -6
  59. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookCellEntry.js +26 -10
  60. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.d.ts +7 -7
  61. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.js +186 -106
  62. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/overlayToolbarDecorator.d.ts +19 -0
  63. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/overlayToolbarDecorator.js +129 -0
  64. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/simpleBrowserEditorOverlay.d.ts +9 -0
  65. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/simpleBrowserEditorOverlay.js +313 -0
  66. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditor.d.ts +4 -6
  67. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditor.js +12 -16
  68. package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.d.ts +0 -4
  69. package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +42 -181
  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 +3 -3
  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 +15 -1
  74. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup.d.ts +2 -5
  75. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup.js +484 -384
  76. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus.d.ts +2 -2
  77. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus.js +187 -101
  78. package/vscode/src/vs/workbench/contrib/chat/browser/chatStatusItemService.d.ts +4 -1
  79. package/vscode/src/vs/workbench/contrib/chat/browser/chatVariables.d.ts +3 -12
  80. package/vscode/src/vs/workbench/contrib/chat/browser/chatVariables.js +8 -52
  81. package/vscode/src/vs/workbench/contrib/chat/browser/chatViewPane.d.ts +53 -0
  82. package/vscode/src/vs/workbench/contrib/chat/browser/chatViewPane.js +264 -0
  83. package/vscode/src/vs/workbench/contrib/chat/browser/codeBlockContextProviderService.d.ts +1 -1
  84. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputEditorContrib.js +28 -22
  85. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputEditorHover.d.ts +1 -1
  86. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputEditorHover.js +3 -3
  87. package/vscode/src/vs/workbench/contrib/chat/browser/languageModelToolsService.d.ts +2 -1
  88. package/vscode/src/vs/workbench/contrib/chat/browser/languageModelToolsService.js +41 -45
  89. package/vscode/src/vs/workbench/contrib/chat/browser/media/chatEditingEditorOverlay.css +8 -32
  90. package/vscode/src/vs/workbench/contrib/chat/browser/media/chatSetup.css +2 -18
  91. package/vscode/src/vs/workbench/contrib/chat/browser/media/chatStatus.css +20 -4
  92. package/vscode/src/vs/workbench/contrib/chat/browser/media/simpleBrowserOverlay.css +67 -0
  93. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/attachInstructionsCommand.d.ts +6 -0
  94. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/attachInstructionsCommand.js +73 -0
  95. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/createPromptCommand.d.ts +2 -1
  96. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/createPromptCommand.js +82 -67
  97. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/dialogs/askForPromptName.d.ts +4 -1
  98. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/dialogs/askForPromptName.js +44 -14
  99. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/dialogs/askForPromptSourceFolder.d.ts +5 -4
  100. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/dialogs/askForPromptSourceFolder.js +24 -14
  101. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/errors.js +2 -2
  102. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/createPromptCommand/utils/createPromptFile.js +2 -2
  103. package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +6 -6
  104. package/vscode/src/vs/workbench/contrib/chat/common/chatCodeMapperService.d.ts +2 -0
  105. package/vscode/src/vs/workbench/contrib/chat/common/chatProgressTypes/chatToolInvocation.d.ts +7 -1
  106. package/vscode/src/vs/workbench/contrib/chat/common/chatProgressTypes/chatToolInvocation.js +14 -1
  107. package/vscode/src/vs/workbench/contrib/chat/common/chatServiceImpl.d.ts +8 -7
  108. package/vscode/src/vs/workbench/contrib/chat/common/chatServiceImpl.js +84 -80
  109. package/vscode/src/vs/workbench/contrib/chat/common/chatSessionStore.d.ts +1 -1
  110. package/vscode/src/vs/workbench/contrib/chat/common/chatSessionStore.js +3 -3
  111. package/vscode/src/vs/workbench/contrib/chat/common/chatSlashCommands.d.ts +1 -0
  112. package/vscode/src/vs/workbench/contrib/chat/common/chatTransferService.d.ts +5 -1
  113. package/vscode/src/vs/workbench/contrib/chat/common/chatTransferService.js +27 -3
  114. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/configMigration.d.ts +5 -0
  115. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/configMigration.js +62 -0
  116. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/index.d.ts +3 -0
  117. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/index.js +16 -0
  118. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/index.d.ts +2 -0
  119. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/index.js +17 -0
  120. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/decorations/frontMatterDecoration.d.ts +29 -0
  121. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/decorations/frontMatterDecoration.js +74 -0
  122. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/decorations/frontMatterMarkerDecoration.d.ts +14 -0
  123. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/decorations/frontMatterMarkerDecoration.js +40 -0
  124. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/decorations/utils/decorationBase.d.ts +23 -0
  125. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/decorations/utils/decorationBase.js +40 -0
  126. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/decorations/utils/index.d.ts +5 -0
  127. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/decorations/utils/index.js +9 -0
  128. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/decorations/utils/reactiveDecorationBase.d.ts +23 -0
  129. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/decorations/utils/reactiveDecorationBase.js +68 -0
  130. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/decorations/utils/types.d.ts +13 -0
  131. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/promptDecorationsProvider.d.ts +19 -0
  132. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/promptDecorationsProvider.js +121 -0
  133. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/types.d.ts +13 -0
  134. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/decorationsProvider/types.js +13 -0
  135. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/promptHeaderDiagnosticsProvider.d.ts +15 -0
  136. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/promptHeaderDiagnosticsProvider.js +62 -0
  137. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/promptLinkDiagnosticsProvider.d.ts +15 -0
  138. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/promptLinkDiagnosticsProvider.js +65 -0
  139. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/{languageFeatures → contributions/languageFeatures/providers}/promptLinkProvider.js +3 -8
  140. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/{languageFeatures → contributions/languageFeatures/providers}/promptPathAutocompletion.d.ts +2 -2
  141. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/{languageFeatures → contributions/languageFeatures/providers}/promptPathAutocompletion.js +14 -19
  142. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/providerInstanceBase.d.ts +11 -0
  143. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/providerInstanceBase.js +22 -0
  144. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/providerInstanceManagerBase.d.ts +17 -0
  145. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contributions/languageFeatures/providers/providerInstanceManagerBase.js +83 -0
  146. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/textModelPromptParser.d.ts +4 -3
  147. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/textModelPromptParser.js +8 -6
  148. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService.d.ts +17 -5
  149. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService.js +223 -21
  150. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.d.ts +5 -4
  151. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.js +28 -22
  152. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/treeUtils.d.ts +10 -0
  153. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/treeUtils.js +25 -0
  154. package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.js +20 -31
  155. package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.d.ts +1 -1
  156. package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +2 -2
  157. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.js +15 -12
  158. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAccessibilityHelp.js +1 -1
  159. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAccessibleView.js +2 -2
  160. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatCurrentLine.js +12 -12
  161. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatNotebook.js +3 -3
  162. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookModifiedCellDecorator.d.ts +2 -2
  163. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookModifiedCellDecorator.js +2 -2
  164. package/vscode/src/vs/workbench/services/workspaces/common/workspaceUtils.d.ts +0 -2
  165. package/vscode/src/vs/workbench/services/workspaces/common/workspaceUtils.js +1 -14
  166. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/chatAttachPromptAction.d.ts +0 -10
  167. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/chatAttachPromptAction.js +0 -54
  168. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/askToSelectPrompt.d.ts +0 -25
  169. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/askToSelectPrompt.js +0 -79
  170. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/constants.d.ts +0 -7
  171. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/constants.js +0 -27
  172. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/utils/attachPrompts.d.ts +0 -5
  173. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/utils/attachPrompts.js +0 -53
  174. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/utils/createPlaceholderText.d.ts +0 -2
  175. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/utils/createPlaceholderText.js +0 -19
  176. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/utils/createPromptPickItem.d.ts +0 -5
  177. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/utils/createPromptPickItem.js +0 -27
  178. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/utils/handleButtonClick.d.ts +0 -13
  179. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAttachPromptAction/dialogs/askToSelectPrompt/utils/handleButtonClick.js +0 -49
  180. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/usePromptCommand.d.ts +0 -6
  181. package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/contributions/usePromptCommand.js +0 -80
  182. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/constants.d.ts +0 -3
  183. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/constants.js +0 -13
  184. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contentProviders/textModelContentsProvider.d.ts +0 -21
  185. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contentProviders/textModelContentsProvider.js +0 -64
  186. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageFeatures/promptLinkDiagnosticsProvider.d.ts +0 -9
  187. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageFeatures/promptLinkDiagnosticsProvider.js +0 -117
  188. /package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/{languageFeatures → contributions/languageFeatures/providers}/promptLinkProvider.d.ts +0 -0
@@ -1,7 +1,7 @@
1
1
  import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
2
2
  import { IWorkbenchContribution } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/contributions";
3
3
  import { IStatusbarService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/statusbar/browser/statusbar.service";
4
- import { ChatEntitlementService } from "@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/chat/common/chatEntitlementService";
4
+ import { ChatEntitlementService } from "@codingame/monaco-vscode-fab30422-b487-5f4e-8d30-8b4d266e3fcd-common/vscode/vs/workbench/contrib/chat/common/chatEntitlementService";
5
5
  import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
6
6
  import { IEditorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service";
7
7
  import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
@@ -16,7 +16,7 @@ export declare class ChatStatusBarEntry extends Disposable implements IWorkbench
16
16
  private dashboard;
17
17
  private readonly activeCodeEditorListener;
18
18
  constructor(chatEntitlementService: ChatEntitlementService, instantiationService: IInstantiationService, statusbarService: IStatusbarService, editorService: IEditorService, configurationService: IConfigurationService);
19
- private create;
19
+ private update;
20
20
  private registerListeners;
21
21
  private onDidActiveEditorChange;
22
22
  private getEntryProps;
@@ -9,7 +9,7 @@ import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
9
9
  import { StatusbarAlignment, ShowTooltipCommand } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/statusbar/browser/statusbar';
10
10
  import { IStatusbarService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/statusbar/browser/statusbar.service';
11
11
  import { $, clearNode, append, EventType, addDisposableListener, EventHelper } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
12
- import { ChatSentiment, ChatEntitlement } from '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/chat/common/chatEntitlementService';
12
+ import { ChatSentiment, ChatEntitlement } from '@codingame/monaco-vscode-fab30422-b487-5f4e-8d30-8b4d266e3fcd-common/vscode/vs/workbench/contrib/chat/common/chatEntitlementService';
13
13
  import { IChatEntitlementService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatEntitlementService.service';
14
14
  import { defaultButtonStyles, defaultCheckboxStyles } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/browser/defaultStyles';
15
15
  import { Checkbox } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/toggle/toggle';
@@ -27,6 +27,7 @@ import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/mini
27
27
  import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/miscColors';
28
28
  import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/quickpickColors';
29
29
  import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/searchColors';
30
+ import { nativeHoverDelegate } from '@codingame/monaco-vscode-api/vscode/vs/platform/hover/browser/hover';
30
31
  import { IHoverService } from '@codingame/monaco-vscode-api/vscode/vs/platform/hover/browser/hover.service';
31
32
  import { Color } from '@codingame/monaco-vscode-api/vscode/vs/base/common/color';
32
33
  import { Gesture, EventType as EventType$1 } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/touch';
@@ -37,6 +38,7 @@ import { ILanguageService } from '@codingame/monaco-vscode-api/vscode/vs/editor/
37
38
  import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
38
39
  import { Button } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/button/button';
39
40
  import { renderLabelWithIcons } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/iconLabel/iconLabels';
41
+ import { toAction } from '@codingame/monaco-vscode-api/vscode/vs/base/common/actions';
40
42
  import { parseLinkedText } from '@codingame/monaco-vscode-api/vscode/vs/base/common/linkedText';
41
43
  import { Link } from '@codingame/monaco-vscode-api/vscode/vs/platform/opener/browser/link';
42
44
  import { IOpenerService } from '@codingame/monaco-vscode-api/vscode/vs/platform/opener/common/opener.service';
@@ -45,6 +47,10 @@ import { IChatStatusItemService } from '@codingame/monaco-vscode-api/vscode/vs/w
45
47
  import { ITextResourceConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/textResourceConfiguration.service';
46
48
  import { EditorResourceAccessor, SideBySideEditor } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor';
47
49
  import { getCodeEditor } from '@codingame/monaco-vscode-api/vscode/vs/editor/browser/editorBrowser';
50
+ import { ActionBar } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/actionbar/actionbar';
51
+ import { ThemeIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/themables';
52
+ import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
53
+ import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
48
54
 
49
55
  registerCss(chatStatus);
50
56
  const gaugeBackground = registerColor('gauge.background', {
@@ -52,47 +58,48 @@ const gaugeBackground = registerColor('gauge.background', {
52
58
  light: inputValidationInfoBorder,
53
59
  hcDark: contrastBorder,
54
60
  hcLight: contrastBorder
55
- }, ( localize(4841, "Gauge background color.")));
61
+ }, ( localize(4901, "Gauge background color.")));
56
62
  registerColor('gauge.foreground', {
57
63
  dark: ( transparent(gaugeBackground, 0.3)),
58
64
  light: ( transparent(gaugeBackground, 0.3)),
59
65
  hcDark: Color.white,
60
66
  hcLight: Color.white
61
- }, ( localize(4842, "Gauge foreground color.")));
67
+ }, ( localize(4902, "Gauge foreground color.")));
62
68
  registerColor('gauge.border', {
63
69
  dark: null,
64
70
  light: null,
65
71
  hcDark: contrastBorder,
66
72
  hcLight: contrastBorder
67
- }, ( localize(4843, "Gauge border color.")));
73
+ }, ( localize(4903, "Gauge border color.")));
68
74
  const gaugeWarningBackground = registerColor('gauge.warningBackground', {
69
75
  dark: inputValidationWarningBorder,
70
76
  light: inputValidationWarningBorder,
71
77
  hcDark: contrastBorder,
72
78
  hcLight: contrastBorder
73
- }, ( localize(4844, "Gauge warning background color.")));
79
+ }, ( localize(4904, "Gauge warning background color.")));
74
80
  registerColor('gauge.warningForeground', {
75
81
  dark: ( transparent(gaugeWarningBackground, 0.3)),
76
82
  light: ( transparent(gaugeWarningBackground, 0.3)),
77
83
  hcDark: Color.white,
78
84
  hcLight: Color.white
79
- }, ( localize(4845, "Gauge warning foreground color.")));
85
+ }, ( localize(4905, "Gauge warning foreground color.")));
80
86
  const gaugeErrorBackground = registerColor('gauge.errorBackground', {
81
87
  dark: inputValidationErrorBorder,
82
88
  light: inputValidationErrorBorder,
83
89
  hcDark: contrastBorder,
84
90
  hcLight: contrastBorder
85
- }, ( localize(4846, "Gauge error background color.")));
91
+ }, ( localize(4906, "Gauge error background color.")));
86
92
  registerColor('gauge.errorForeground', {
87
93
  dark: ( transparent(gaugeErrorBackground, 0.3)),
88
94
  light: ( transparent(gaugeErrorBackground, 0.3)),
89
95
  hcDark: Color.white,
90
96
  hcLight: Color.white
91
- }, ( localize(4847, "Gauge error foreground color.")));
97
+ }, ( localize(4907, "Gauge error foreground color.")));
92
98
  const defaultChat = {
93
- extensionId: product.defaultChatAgent?.extensionId ?? '',
94
99
  completionsEnablementSetting: product.defaultChatAgent?.completionsEnablementSetting ?? '',
95
- nextEditSuggestionsSetting: product.defaultChatAgent?.nextEditSuggestionsSetting ?? ''
100
+ nextEditSuggestionsSetting: product.defaultChatAgent?.nextEditSuggestionsSetting ?? '',
101
+ manageSettingsUrl: product.defaultChatAgent?.manageSettingsUrl ?? '',
102
+ manageOverageUrl: product.defaultChatAgent?.manageOverageUrl ?? '',
96
103
  };
97
104
  let ChatStatusBarEntry = class ChatStatusBarEntry extends Disposable {
98
105
  static { this.ID = 'workbench.contrib.chatStatusBarEntry'; }
@@ -106,16 +113,17 @@ let ChatStatusBarEntry = class ChatStatusBarEntry extends Disposable {
106
113
  this.entry = undefined;
107
114
  this.dashboard = ( new Lazy(() => this.instantiationService.createInstance(ChatStatusDashboard)));
108
115
  this.activeCodeEditorListener = this._register(( new MutableDisposable()));
109
- this.create();
116
+ this.update();
110
117
  this.registerListeners();
111
118
  }
112
- async create() {
113
- const hidden = this.chatEntitlementService.sentiment === ChatSentiment.Disabled;
114
- if (!hidden) {
115
- this.entry ||= this.statusbarService.addEntry(this.getEntryProps(), 'chat.statusBarEntry', StatusbarAlignment.RIGHT, { location: { id: 'status.editor.mode', priority: 100.1 }, alignment: StatusbarAlignment.RIGHT });
116
- const completionsStatusId = `${defaultChat.extensionId}.status`;
117
- this.statusbarService.updateEntryVisibility(completionsStatusId, false);
118
- this.statusbarService.overrideEntry(completionsStatusId, { name: ( localize(4848, "Copilot Code Completions")), text: ( localize(4849, "$(copilot) Completions")) });
119
+ update() {
120
+ if (this.chatEntitlementService.sentiment !== ChatSentiment.Disabled) {
121
+ if (!this.entry) {
122
+ this.entry = this.statusbarService.addEntry(this.getEntryProps(), 'chat.statusBarEntry', StatusbarAlignment.RIGHT, { location: { id: 'status.editor.mode', priority: 100.1 }, alignment: StatusbarAlignment.RIGHT });
123
+ }
124
+ else {
125
+ this.entry.update(this.getEntryProps());
126
+ }
119
127
  }
120
128
  else {
121
129
  this.entry?.dispose();
@@ -123,60 +131,61 @@ let ChatStatusBarEntry = class ChatStatusBarEntry extends Disposable {
123
131
  }
124
132
  }
125
133
  registerListeners() {
126
- this._register(this.chatEntitlementService.onDidChangeQuotaExceeded(() => this.entry?.update(this.getEntryProps())));
127
- this._register(this.chatEntitlementService.onDidChangeSentiment(() => this.entry?.update(this.getEntryProps())));
128
- this._register(this.chatEntitlementService.onDidChangeEntitlement(() => this.entry?.update(this.getEntryProps())));
134
+ this._register(this.chatEntitlementService.onDidChangeQuotaExceeded(() => this.update()));
135
+ this._register(this.chatEntitlementService.onDidChangeSentiment(() => this.update()));
136
+ this._register(this.chatEntitlementService.onDidChangeEntitlement(() => this.update()));
129
137
  this._register(this.editorService.onDidActiveEditorChange(() => this.onDidActiveEditorChange()));
130
138
  this._register(this.configurationService.onDidChangeConfiguration(e => {
131
139
  if (e.affectsConfiguration(defaultChat.completionsEnablementSetting)) {
132
- this.entry?.update(this.getEntryProps());
140
+ this.update();
133
141
  }
134
142
  }));
135
143
  }
136
144
  onDidActiveEditorChange() {
137
- this.entry?.update(this.getEntryProps());
145
+ this.update();
138
146
  this.activeCodeEditorListener.clear();
139
147
  const activeCodeEditor = getCodeEditor(this.editorService.activeTextEditorControl);
140
148
  if (activeCodeEditor) {
141
149
  this.activeCodeEditorListener.value = activeCodeEditor.onDidChangeModelLanguage(() => {
142
- this.entry?.update(this.getEntryProps());
150
+ this.update();
143
151
  });
144
152
  }
145
153
  }
146
154
  getEntryProps() {
147
155
  let text = '$(copilot)';
148
- let ariaLabel = ( localize(4850, "Copilot Status"));
156
+ let ariaLabel = ( localize(4908, "Copilot Status"));
149
157
  let kind;
150
158
  if (!isNewUser(this.chatEntitlementService)) {
151
- const { chatQuotaExceeded, completionsQuotaExceeded } = this.chatEntitlementService.quotas;
159
+ const chatQuotaExceeded = this.chatEntitlementService.quotas.chat?.percentRemaining === 0;
160
+ const completionsQuotaExceeded = this.chatEntitlementService.quotas.completions?.percentRemaining === 0;
152
161
  if (this.chatEntitlementService.entitlement === ChatEntitlement.Unknown) {
153
- const signedOutWarning = ( localize(4851, "Signed out"));
162
+ const signedOutWarning = ( localize(4909, "Signed out"));
154
163
  text = `$(copilot-not-connected) ${signedOutWarning}`;
155
164
  ariaLabel = signedOutWarning;
156
165
  kind = 'prominent';
157
166
  }
158
- else if (chatQuotaExceeded || completionsQuotaExceeded) {
167
+ else if (this.chatEntitlementService.entitlement === ChatEntitlement.Limited && (chatQuotaExceeded || completionsQuotaExceeded)) {
159
168
  let quotaWarning;
160
169
  if (chatQuotaExceeded && !completionsQuotaExceeded) {
161
- quotaWarning = ( localize(4852, "Chat limit reached"));
170
+ quotaWarning = ( localize(4910, "Chat quota reached"));
162
171
  }
163
172
  else if (completionsQuotaExceeded && !chatQuotaExceeded) {
164
- quotaWarning = ( localize(4853, "Completions limit reached"));
173
+ quotaWarning = ( localize(4911, "Completions quota reached"));
165
174
  }
166
175
  else {
167
- quotaWarning = ( localize(4854, "Limit reached"));
176
+ quotaWarning = ( localize(4912, "Quota reached"));
168
177
  }
169
178
  text = `$(copilot-warning) ${quotaWarning}`;
170
179
  ariaLabel = quotaWarning;
171
180
  kind = 'prominent';
172
181
  }
173
182
  else if (this.editorService.activeTextEditorLanguageId && !isCompletionsEnabled(this.configurationService, this.editorService.activeTextEditorLanguageId)) {
174
- text = `$(copilot-not-connected)`;
175
- ariaLabel = ( localize(4855, "Code Completions Disabled"));
183
+ text = `$(copilot-unavailable)`;
184
+ ariaLabel = ( localize(4913, "Code Completions Disabled"));
176
185
  }
177
186
  }
178
187
  return {
179
- name: ( localize(4850, "Copilot Status")),
188
+ name: ( localize(4908, "Copilot Status")),
180
189
  text,
181
190
  ariaLabel,
182
191
  command: ShowTooltipCommand,
@@ -205,8 +214,9 @@ function isNewUser(chatEntitlementService) {
205
214
  function canUseCopilot(chatEntitlementService) {
206
215
  const newUser = isNewUser(chatEntitlementService);
207
216
  const signedOut = chatEntitlementService.entitlement === ChatEntitlement.Unknown;
208
- const allQuotaReached = chatEntitlementService.quotas.chatQuotaExceeded && chatEntitlementService.quotas.completionsQuotaExceeded;
209
- return !newUser && !signedOut && !allQuotaReached;
217
+ const limited = chatEntitlementService.entitlement === ChatEntitlement.Limited;
218
+ const allFreeQuotaReached = limited && chatEntitlementService.quotas.chat?.percentRemaining === 0 && chatEntitlementService.quotas.completions?.percentRemaining === 0;
219
+ return !newUser && !signedOut && !allFreeQuotaReached;
210
220
  }
211
221
  function isCompletionsEnabled(configurationService, modeId = '*') {
212
222
  const result = configurationService.getValue(defaultChat.completionsEnablementSetting);
@@ -242,90 +252,126 @@ let ChatStatusDashboard = class ChatStatusDashboard extends Disposable {
242
252
  const disposables = this.entryDisposables.value = ( new DisposableStore());
243
253
  disposables.add(token.onCancellationRequested(() => disposables.dispose()));
244
254
  let needsSeparator = false;
245
- const addSeparator = (label) => {
255
+ const addSeparator = (label, action) => {
246
256
  if (needsSeparator) {
247
257
  this.element.appendChild($('hr'));
248
- needsSeparator = false;
249
258
  }
250
- if (label) {
251
- this.element.appendChild($('div.header', undefined, label));
259
+ if (label || action) {
260
+ this.renderHeader(this.element, disposables, label ?? '', action);
252
261
  }
253
262
  needsSeparator = true;
254
263
  };
255
- if (this.chatEntitlementService.entitlement === ChatEntitlement.Limited) {
256
- const { chatTotal, chatRemaining, completionsTotal, completionsRemaining, quotaResetDate, chatQuotaExceeded, completionsQuotaExceeded } = this.chatEntitlementService.quotas;
257
- addSeparator(( localize(4856, "Copilot Free Plan Usage")));
258
- const chatQuotaIndicator = this.createQuotaIndicator(this.element, chatTotal, chatRemaining, ( localize(4857, "Chat messages")));
259
- const completionsQuotaIndicator = this.createQuotaIndicator(this.element, completionsTotal, completionsRemaining, ( localize(4858, "Code completions")));
260
- this.element.appendChild($('div.description', undefined, ( localize(
261
- 4859,
262
- "Limits will reset on {0}.",
263
- this.dateFormatter.value.format(quotaResetDate)
264
- ))));
265
- if (chatQuotaExceeded || completionsQuotaExceeded) {
266
- const upgradePlanButton = disposables.add(( new Button(
264
+ const { chat: chatQuota, completions: completionsQuota, premiumChat: premiumChatQuota, resetDate } = this.chatEntitlementService.quotas;
265
+ if (chatQuota || completionsQuota || premiumChatQuota) {
266
+ addSeparator(( localize(4914, "Copilot Usage")), toAction({
267
+ id: 'workbench.action.manageCopilot',
268
+ label: ( localize(4915, "Manage Copilot")),
269
+ tooltip: ( localize(4916, "Manage Copilot")),
270
+ class: ThemeIcon.asClassName(Codicon.settings),
271
+ run: () => this.runCommandAndClose(() => this.openerService.open(( URI.parse(defaultChat.manageSettingsUrl)))),
272
+ }));
273
+ const completionsQuotaIndicator = completionsQuota ? this.createQuotaIndicator(this.element, disposables, completionsQuota, ( localize(4917, "Code completions")), false) : undefined;
274
+ const chatQuotaIndicator = chatQuota ? this.createQuotaIndicator(this.element, disposables, chatQuota, ( localize(4918, "Chat messages")), false) : undefined;
275
+ const premiumChatQuotaIndicator = premiumChatQuota ? this.createQuotaIndicator(this.element, disposables, premiumChatQuota, ( localize(4919, "Premium requests")), true) : undefined;
276
+ if (resetDate) {
277
+ this.element.appendChild($('div.description', undefined, ( localize(
278
+ 4920,
279
+ "Allowance resets {0}.",
280
+ this.dateFormatter.value.format(( new Date(resetDate)))
281
+ ))));
282
+ }
283
+ if (this.chatEntitlementService.entitlement === ChatEntitlement.Limited && (Number(chatQuota?.percentRemaining) <= 25 || Number(completionsQuota?.percentRemaining) <= 25)) {
284
+ const upgradeProButton = disposables.add(( new Button(
267
285
  this.element,
268
286
  { ...defaultButtonStyles, secondary: canUseCopilot(this.chatEntitlementService) }
269
287
  )));
270
- upgradePlanButton.label = ( localize(4860, "Upgrade to Copilot Pro"));
271
- disposables.add(upgradePlanButton.onDidClick(() => this.runCommandAndClose('workbench.action.chat.upgradePlan')));
288
+ upgradeProButton.label = ( localize(4921, "Upgrade to Copilot Pro"));
289
+ disposables.add(upgradeProButton.onDidClick(() => this.runCommandAndClose('workbench.action.chat.upgradePlan')));
272
290
  }
273
291
  (async () => {
274
292
  await this.chatEntitlementService.update(token);
275
293
  if (token.isCancellationRequested) {
276
294
  return;
277
295
  }
278
- const { chatTotal, chatRemaining, completionsTotal, completionsRemaining } = this.chatEntitlementService.quotas;
279
- chatQuotaIndicator(chatTotal, chatRemaining);
280
- completionsQuotaIndicator(completionsTotal, completionsRemaining);
296
+ const { chat: chatQuota, completions: completionsQuota, premiumChat: premiumChatQuota } = this.chatEntitlementService.quotas;
297
+ if (completionsQuota) {
298
+ completionsQuotaIndicator?.(completionsQuota);
299
+ }
300
+ if (chatQuota) {
301
+ chatQuotaIndicator?.(chatQuota);
302
+ }
303
+ if (premiumChatQuota) {
304
+ premiumChatQuotaIndicator?.(premiumChatQuota);
305
+ }
281
306
  })();
282
307
  }
283
308
  {
284
309
  for (const item of this.chatStatusItemService.getEntries()) {
285
- addSeparator(undefined);
286
- const chatItemDisposables = disposables.add(( new MutableDisposable()));
310
+ addSeparator();
311
+ const itemDisposables = disposables.add(( new MutableDisposable()));
287
312
  let rendered = this.renderContributedChatStatusItem(item);
288
- chatItemDisposables.value = rendered.disposables;
313
+ itemDisposables.value = rendered.disposables;
289
314
  this.element.appendChild(rendered.element);
290
315
  disposables.add(this.chatStatusItemService.onDidChange(e => {
291
316
  if (e.entry.id === item.id) {
292
- const oldEl = rendered.element;
317
+ const previousElement = rendered.element;
293
318
  rendered = this.renderContributedChatStatusItem(e.entry);
294
- chatItemDisposables.value = rendered.disposables;
295
- oldEl.replaceWith(rendered.element);
319
+ itemDisposables.value = rendered.disposables;
320
+ previousElement.replaceWith(rendered.element);
296
321
  }
297
322
  }));
298
323
  }
299
324
  }
300
325
  {
301
- addSeparator(( localize(4861, "Settings")));
326
+ addSeparator(( localize(4922, "Settings")), this.chatEntitlementService.sentiment === ChatSentiment.Installed ? toAction({
327
+ id: 'workbench.action.openChatSettings',
328
+ label: ( localize(4923, "Settings")),
329
+ tooltip: ( localize(4924, "Open Settings")),
330
+ class: ThemeIcon.asClassName(Codicon.settingsGear),
331
+ run: () => this.runCommandAndClose(() => this.commandService.executeCommand('workbench.action.openSettings', { query: `@id:${defaultChat.completionsEnablementSetting} @id:${defaultChat.nextEditSuggestionsSetting}` })),
332
+ }) : undefined);
302
333
  this.createSettings(this.element, disposables);
303
334
  }
304
335
  {
305
336
  const newUser = isNewUser(this.chatEntitlementService);
306
337
  const signedOut = this.chatEntitlementService.entitlement === ChatEntitlement.Unknown;
307
338
  if (newUser || signedOut) {
308
- addSeparator(undefined);
309
- this.element.appendChild($('div.description', undefined, newUser ? ( localize(4862, "Set up Copilot to use AI features.")) : ( localize(4863, "Sign in to use Copilot AI features."))));
339
+ addSeparator();
340
+ this.element.appendChild($('div.description', undefined, newUser ? ( localize(4925, "Set up Copilot to use AI features.")) : ( localize(4926, "Sign in to use Copilot AI features."))));
310
341
  const button = disposables.add(( new Button(this.element, { ...defaultButtonStyles })));
311
- button.label = newUser ? ( localize(4864, "Set up Copilot")) : ( localize(4865, "Sign in to use Copilot"));
342
+ button.label = newUser ? ( localize(4927, "Set up Copilot")) : ( localize(4928, "Sign in to use Copilot"));
312
343
  disposables.add(button.onDidClick(() => this.runCommandAndClose(newUser ? 'workbench.action.chat.triggerSetup' : () => this.chatEntitlementService.requests?.value.signIn())));
313
344
  }
314
345
  }
315
346
  return this.element;
316
347
  }
348
+ renderHeader(container, disposables, label, action) {
349
+ const header = container.appendChild($('div.header', undefined, label ?? ''));
350
+ if (action) {
351
+ const toolbar = disposables.add(( new ActionBar(header, { hoverDelegate: nativeHoverDelegate })));
352
+ toolbar.push([action], { icon: true, label: false });
353
+ }
354
+ }
317
355
  renderContributedChatStatusItem(item) {
318
356
  const disposables = ( new DisposableStore());
319
- const entryEl = $('div.contribution');
320
- entryEl.appendChild($('div.header', undefined, item.label));
321
- const bodyEl = entryEl.appendChild($('div.body'));
322
- const descriptionEl = bodyEl.appendChild($('span.description'));
323
- this.renderTextPlus(descriptionEl, item.description, disposables);
357
+ const itemElement = $('div.contribution');
358
+ const headerLabel = typeof item.label === 'string' ? item.label : item.label.label;
359
+ const headerLink = typeof item.label === 'string' ? undefined : item.label.link;
360
+ this.renderHeader(itemElement, disposables, headerLabel, headerLink ? toAction({
361
+ id: 'workbench.action.openChatStatusItemLink',
362
+ label: ( localize(4929, "Learn More")),
363
+ tooltip: ( localize(4929, "Learn More")),
364
+ class: ThemeIcon.asClassName(Codicon.linkExternal),
365
+ run: () => this.runCommandAndClose(() => this.openerService.open(( URI.parse(headerLink)))),
366
+ }) : undefined);
367
+ const itemBody = itemElement.appendChild($('div.body'));
368
+ const description = itemBody.appendChild($('span.description'));
369
+ this.renderTextPlus(description, item.description, disposables);
324
370
  if (item.detail) {
325
- const itemElement = bodyEl.appendChild($('div.detail-item'));
326
- this.renderTextPlus(itemElement, item.detail, disposables);
371
+ const detail = itemBody.appendChild($('div.detail-item'));
372
+ this.renderTextPlus(detail, item.detail, disposables);
327
373
  }
328
- return { element: entryEl, disposables };
374
+ return { element: itemElement, disposables };
329
375
  }
330
376
  renderTextPlus(target, text, store) {
331
377
  for (const node of parseLinkedText(text).nodes) {
@@ -348,29 +394,57 @@ let ChatStatusDashboard = class ChatStatusDashboard extends Disposable {
348
394
  }
349
395
  this.hoverService.hideHover(true);
350
396
  }
351
- createQuotaIndicator(container, total, remaining, label) {
352
- const quotaText = $('span');
397
+ createQuotaIndicator(container, disposables, quota, label, supportsOverage) {
398
+ const quotaValue = $('span.quota-value');
353
399
  const quotaBit = $('div.quota-bit');
354
- const quotaIndicator = container.appendChild($('div.quota-indicator', undefined, $('div.quota-label', undefined, $('span', undefined, label), quotaText), $('div.quota-bar', undefined, quotaBit)));
355
- const update = (total, remaining) => {
400
+ const overageLabel = $('span.overage-label');
401
+ const quotaIndicator = container.appendChild($('div.quota-indicator', undefined, $('div.quota-label', undefined, $('span', undefined, label), quotaValue), $('div.quota-bar', undefined, quotaBit), $('div.description', undefined, overageLabel)));
402
+ if (supportsOverage && (this.chatEntitlementService.entitlement === ChatEntitlement.Pro || this.chatEntitlementService.entitlement === ChatEntitlement.ProPlus)) {
403
+ const manageOverageButton = disposables.add(( new Button(quotaIndicator, { ...defaultButtonStyles, secondary: true })));
404
+ manageOverageButton.label = ( localize(4930, "Manage paid premium requests"));
405
+ disposables.add(manageOverageButton.onDidClick(() => this.runCommandAndClose(() => this.openerService.open(( URI.parse(defaultChat.manageOverageUrl))))));
406
+ }
407
+ const update = (quota) => {
356
408
  quotaIndicator.classList.remove('error');
357
409
  quotaIndicator.classList.remove('warning');
358
- if (typeof total === 'number' && typeof remaining === 'number') {
359
- let usedPercentage = Math.round(((total - remaining) / total) * 100);
360
- if (total !== remaining && usedPercentage === 0) {
361
- usedPercentage = 1;
362
- }
363
- quotaText.textContent = ( localize(4866, "{0}%", usedPercentage));
364
- quotaBit.style.width = `${usedPercentage}%`;
365
- if (usedPercentage >= 90) {
366
- quotaIndicator.classList.add('error');
410
+ let usedPercentage;
411
+ if (quota.unlimited) {
412
+ usedPercentage = 0;
413
+ }
414
+ else {
415
+ usedPercentage = Math.max(0, 100 - quota.percentRemaining);
416
+ }
417
+ const quotaPercentageFormatter = new Intl.NumberFormat(undefined, { maximumFractionDigits: 1, minimumFractionDigits: 0 });
418
+ const overageFormatter = new Intl.NumberFormat(undefined, { maximumFractionDigits: 2, minimumFractionDigits: 0 });
419
+ if (quota.unlimited) {
420
+ quotaValue.textContent = ( localize(4931, "Included"));
421
+ }
422
+ else if (quota.overageCount) {
423
+ quotaValue.textContent = ( localize(4932, "+{0} requests", overageFormatter.format(quota.overageCount)));
424
+ }
425
+ else {
426
+ quotaValue.textContent = ( localize(4933, "{0}%", quotaPercentageFormatter.format(usedPercentage)));
427
+ }
428
+ quotaBit.style.width = `${usedPercentage}%`;
429
+ if (usedPercentage >= 90) {
430
+ quotaIndicator.classList.add('error');
431
+ }
432
+ else if (usedPercentage >= 75) {
433
+ quotaIndicator.classList.add('warning');
434
+ }
435
+ if (supportsOverage) {
436
+ if (quota.overageEnabled) {
437
+ overageLabel.textContent = ( localize(4934, "Additional paid premium requests enabled."));
367
438
  }
368
- else if (usedPercentage >= 75) {
369
- quotaIndicator.classList.add('warning');
439
+ else {
440
+ overageLabel.textContent = ( localize(4935, "Additional paid premium requests disabled."));
370
441
  }
371
442
  }
443
+ else {
444
+ overageLabel.textContent = '';
445
+ }
372
446
  };
373
- update(total, remaining);
447
+ update(quota);
374
448
  return update;
375
449
  }
376
450
  createSettings(container, disposables) {
@@ -378,11 +452,11 @@ let ChatStatusDashboard = class ChatStatusDashboard extends Disposable {
378
452
  const settings = container.appendChild($('div.settings'));
379
453
  {
380
454
  const globalSetting = append(settings, $('div.setting'));
381
- this.createCodeCompletionsSetting(globalSetting, ( localize(4867, "Code Completions (all files)")), '*', disposables);
455
+ this.createCodeCompletionsSetting(globalSetting, ( localize(4936, "Code Completions (all files)")), '*', disposables);
382
456
  if (modeId) {
383
457
  const languageSetting = append(settings, $('div.setting'));
384
458
  this.createCodeCompletionsSetting(languageSetting, ( localize(
385
- 4868,
459
+ 4937,
386
460
  "Code Completions ({0})",
387
461
  this.languageService.getLanguageName(modeId) ?? modeId
388
462
  )), modeId, disposables);
@@ -390,11 +464,11 @@ let ChatStatusDashboard = class ChatStatusDashboard extends Disposable {
390
464
  }
391
465
  {
392
466
  const setting = append(settings, $('div.setting'));
393
- this.createNextEditSuggestionsSetting(setting, ( localize(4869, "Next Edit Suggestions")), modeId, this.getCompletionsSettingAccessor(modeId), disposables);
467
+ this.createNextEditSuggestionsSetting(setting, ( localize(4938, "Next Edit Suggestions")), this.getCompletionsSettingAccessor(modeId), disposables);
394
468
  }
395
469
  return settings;
396
470
  }
397
- createSetting(container, settingId, label, accessor, disposables) {
471
+ createSetting(container, settingIdsToReEvaluate, label, accessor, disposables) {
398
472
  const checkbox = disposables.add(( new Checkbox(label, Boolean(accessor.readSetting()), defaultCheckboxStyles)));
399
473
  container.appendChild(checkbox.domNode);
400
474
  const settingLabel = append(container, $('span.setting-label', undefined, label));
@@ -413,24 +487,30 @@ let ChatStatusDashboard = class ChatStatusDashboard extends Disposable {
413
487
  accessor.writeSetting(checkbox.checked);
414
488
  }));
415
489
  disposables.add(this.configurationService.onDidChangeConfiguration(e => {
416
- if (e.affectsConfiguration(settingId)) {
490
+ if (( settingIdsToReEvaluate.some(id => e.affectsConfiguration(id)))) {
417
491
  checkbox.checked = Boolean(accessor.readSetting());
418
492
  }
419
493
  }));
420
494
  if (!canUseCopilot(this.chatEntitlementService)) {
421
495
  container.classList.add('disabled');
422
496
  checkbox.disable();
497
+ checkbox.checked = false;
423
498
  }
424
499
  return checkbox;
425
500
  }
426
501
  createCodeCompletionsSetting(container, label, modeId, disposables) {
427
- this.createSetting(container, defaultChat.completionsEnablementSetting, label, this.getCompletionsSettingAccessor(modeId), disposables);
502
+ this.createSetting(container, [defaultChat.completionsEnablementSetting], label, this.getCompletionsSettingAccessor(modeId), disposables);
428
503
  }
429
504
  getCompletionsSettingAccessor(modeId = '*') {
430
505
  const settingId = defaultChat.completionsEnablementSetting;
431
506
  return {
432
507
  readSetting: () => isCompletionsEnabled(this.configurationService, modeId),
433
508
  writeSetting: (value) => {
509
+ this.telemetryService.publicLog2('chatStatus.settingChanged', {
510
+ settingIdentifier: settingId,
511
+ settingMode: modeId,
512
+ settingEnablement: value ? 'enabled' : 'disabled'
513
+ });
434
514
  let result = this.configurationService.getValue(settingId);
435
515
  if (!isObject(result)) {
436
516
  result = Object.create(null);
@@ -439,13 +519,19 @@ let ChatStatusDashboard = class ChatStatusDashboard extends Disposable {
439
519
  }
440
520
  };
441
521
  }
442
- createNextEditSuggestionsSetting(container, label, modeId, completionsSettingAccessor, disposables) {
522
+ createNextEditSuggestionsSetting(container, label, completionsSettingAccessor, disposables) {
443
523
  const nesSettingId = defaultChat.nextEditSuggestionsSetting;
444
524
  const completionsSettingId = defaultChat.completionsEnablementSetting;
445
525
  const resource = EditorResourceAccessor.getOriginalUri(this.editorService.activeEditor, { supportSideBySide: SideBySideEditor.PRIMARY });
446
- const checkbox = this.createSetting(container, nesSettingId, label, {
447
- readSetting: () => this.textResourceConfigurationService.getValue(resource, nesSettingId),
448
- writeSetting: (value) => this.textResourceConfigurationService.updateValue(resource, nesSettingId, value)
526
+ const checkbox = this.createSetting(container, [nesSettingId, completionsSettingId], label, {
527
+ readSetting: () => completionsSettingAccessor.readSetting() && this.textResourceConfigurationService.getValue(resource, nesSettingId),
528
+ writeSetting: (value) => {
529
+ this.telemetryService.publicLog2('chatStatus.settingChanged', {
530
+ settingIdentifier: nesSettingId,
531
+ settingEnablement: value ? 'enabled' : 'disabled'
532
+ });
533
+ return this.textResourceConfigurationService.updateValue(resource, nesSettingId, value);
534
+ }
449
535
  }, disposables);
450
536
  if (!completionsSettingAccessor.readSetting()) {
451
537
  container.classList.add('disabled');
@@ -4,7 +4,10 @@ export interface IChatStatusItemChangeEvent {
4
4
  }
5
5
  export type ChatStatusEntry = {
6
6
  id: string;
7
- label: string;
7
+ label: string | {
8
+ label: string;
9
+ link: string;
10
+ };
8
11
  description: string;
9
12
  detail: string | undefined;
10
13
  };
@@ -1,20 +1,11 @@
1
- import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
2
- import { Location } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/languages";
3
- import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
4
- import { IViewsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/views/common/viewsService.service";
5
- import { IChatRequestVariableData, IChatRequestVariableEntry } from "@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/chat/common/chatModel";
6
- import { IParsedChatRequest } from "@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/chat/common/chatParserTypes";
7
1
  import { IDynamicVariable } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatVariables";
8
2
  import { IChatVariablesService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatVariables.service";
9
- import { ChatAgentLocation } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants";
3
+ import { IToolData } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModelToolsService";
10
4
  import { IChatWidgetService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service";
11
5
  export declare class ChatVariablesService implements IChatVariablesService {
12
6
  private readonly chatWidgetService;
13
- private readonly viewsService;
14
- private readonly configurationService;
15
7
  _serviceBrand: undefined;
16
- constructor(chatWidgetService: IChatWidgetService, viewsService: IViewsService, configurationService: IConfigurationService);
17
- resolveVariables(prompt: IParsedChatRequest, attachedContextVariables: IChatRequestVariableEntry[] | undefined): IChatRequestVariableData;
8
+ constructor(chatWidgetService: IChatWidgetService);
18
9
  getDynamicVariables(sessionId: string): ReadonlyArray<IDynamicVariable>;
19
- attachContext(name: string, value: string | URI | Location, location: ChatAgentLocation): Promise<void>;
10
+ getSelectedTools(sessionId: string): ReadonlyArray<IToolData>;
20
11
  }