@codingame/monaco-vscode-katex-common 29.1.0 → 30.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 (180) hide show
  1. package/package.json +2 -2
  2. package/vscode/src/vs/platform/actions/browser/buttonbar.js +14 -13
  3. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityProvider.js +16 -16
  4. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContinueInAction.js +9 -9
  5. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatElicitationActions.js +1 -1
  6. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.js +34 -34
  7. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTitleActions.js +12 -20
  8. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.d.ts +14 -0
  9. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.js +208 -0
  10. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.d.ts +22 -0
  11. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.js +637 -0
  12. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionApprovalModel.d.ts +1 -0
  13. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionApprovalModel.js +1 -0
  14. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionHoverWidget.js +8 -8
  15. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.d.ts +9 -1
  16. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.js +202 -13
  17. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.d.ts +4 -0
  18. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.js +17 -8
  19. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsOpener.js +1 -1
  20. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.d.ts +53 -5
  21. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.js +296 -63
  22. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/media/agentsessionsviewer.css +59 -23
  23. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgets.js +55 -42
  24. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/implicitContextAttachment.js +12 -12
  25. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingActions.js +110 -59
  26. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +14 -14
  27. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +7 -7
  28. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationWidget.js +12 -12
  29. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionPickerActionItem.js +1 -1
  30. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/searchableOptionPickerActionItem.js +5 -4
  31. package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolSetsContribution.d.ts +24 -0
  32. package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolSetsContribution.js +384 -0
  33. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatAgentHover.js +2 -2
  34. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatArtifactsWidget.d.ts +12 -7
  35. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatArtifactsWidget.js +220 -61
  36. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentMarkdownRenderer.js +1 -2
  37. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAgentCommandContentPart.js +1 -1
  38. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAnonymousRateLimitedPart.js +2 -2
  39. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAttachmentsContentPart.d.ts +6 -0
  40. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAttachmentsContentPart.js +14 -1
  41. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatChangesSummaryPart.js +1 -1
  42. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCodeCitationContentPart.js +1 -1
  43. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCommandContentPart.js +1 -1
  44. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationContentPart.js +2 -2
  45. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationWidget.js +1 -1
  46. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatContentCodePools.js +5 -4
  47. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatDisabledClaudeHooksContentPart.js +3 -3
  48. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatExtensionsContentPart.js +1 -1
  49. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatHookContentPart.js +1 -1
  50. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatInlineAnchorWidget.d.ts +5 -0
  51. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatInlineAnchorWidget.js +14 -14
  52. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownContentPart.d.ts +11 -0
  53. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownContentPart.js +40 -12
  54. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMcpServersInteractionContentPart.js +8 -8
  55. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMultiDiffContentPart.js +4 -4
  56. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatProgressContentPart.js +2 -2
  57. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuestionCarouselPart.d.ts +1 -0
  58. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuestionCarouselPart.js +97 -54
  59. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuotaExceededPart.js +5 -4
  60. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatReferencesContentPart.js +6 -6
  61. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatResourceGroupWidget.js +5 -5
  62. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentContentPart.js +6 -6
  63. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSuggestNextWidget.js +8 -7
  64. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTextEditContentPart.js +1 -1
  65. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatThinkingContentPart.d.ts +15 -2
  66. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatThinkingContentPart.js +155 -22
  67. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTipContentPart.js +9 -9
  68. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTodoListWidget.d.ts +3 -1
  69. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTodoListWidget.js +36 -19
  70. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolInputOutputContentPart.js +2 -2
  71. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTreeContentPart.js +1 -1
  72. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatWorkspaceEditContentPart.js +3 -3
  73. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/codeBlockPart.js +14 -14
  74. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatThinkingContent.css +13 -0
  75. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/abstractToolConfirmationSubPart.js +1 -1
  76. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatExtensionsInstallToolSubPart.js +4 -4
  77. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppModel.js +1 -1
  78. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppSubPart.js +3 -3
  79. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMissingSandboxDepsConfirmationSubPart.d.ts +17 -0
  80. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMissingSandboxDepsConfirmationSubPart.js +68 -0
  81. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatModifiedFilesConfirmationSubPart.js +6 -6
  82. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolConfirmationSubPart.js +16 -16
  83. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.js +33 -25
  84. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolConfirmationSubPart.js +7 -7
  85. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolInvocationPart.js +12 -3
  86. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolOutputPart.js +2 -2
  87. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPartUtilities.js +5 -5
  88. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPostExecuteConfirmationPart.js +5 -5
  89. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatDragAndDrop.js +11 -11
  90. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.d.ts +4 -13
  91. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.js +37 -113
  92. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListWidget.js +1 -1
  93. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidget.d.ts +10 -3
  94. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidget.js +66 -39
  95. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatFollowups.js +1 -1
  96. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.d.ts +13 -2
  97. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.js +103 -61
  98. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelPicker.d.ts +2 -1
  99. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelPicker.js +35 -23
  100. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/delegationSessionPickerActionItem.d.ts +4 -4
  101. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/delegationSessionPickerActionItem.js +6 -6
  102. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modePickerActionItem.js +5 -5
  103. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem2.d.ts +1 -0
  104. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem2.js +4 -1
  105. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/permissionPickerActionItem.d.ts +2 -1
  106. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/permissionPickerActionItem.js +39 -24
  107. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/sessionTargetPickerActionItem.d.ts +6 -5
  108. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/sessionTargetPickerActionItem.js +44 -18
  109. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/workspacePickerActionItem.js +3 -3
  110. package/vscode/src/vs/workbench/contrib/chat/browser/widget/media/chat.css +60 -10
  111. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageDetails.js +7 -7
  112. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageWidget.js +2 -2
  113. package/vscode/src/vs/workbench/contrib/chat/common/chatImageExtraction.js +6 -6
  114. package/vscode/src/vs/workbench/contrib/chat/common/widget/chatColors.js +15 -15
  115. package/vscode/src/vs/workbench/contrib/chat/common/widget/codeBlockModelCollection.js +4 -0
  116. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.js +4 -4
  117. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatOverlayWidget.js +5 -5
  118. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.d.ts +4 -1
  119. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.js +5 -2
  120. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.js +6 -11
  121. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatZoneWidget.js +1 -1
  122. package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.js +39 -39
  123. package/vscode/src/vs/workbench/contrib/interactive/browser/replInputHintContentWidget.js +3 -3
  124. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/executionStatusBarItemController.js +7 -7
  125. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindWidget.js +2 -2
  126. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOperations.d.ts +26 -0
  127. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOperations.js +746 -0
  128. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.d.ts +13 -0
  129. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.js +300 -0
  130. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffCellEditorOptions.d.ts +8 -0
  131. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffCellEditorOptions.js +55 -0
  132. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffComponents.d.ts +273 -0
  133. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffComponents.js +1963 -0
  134. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementOutputs.d.ts +50 -0
  135. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementOutputs.js +314 -0
  136. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementViewModel.d.ts +258 -0
  137. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementViewModel.js +886 -0
  138. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffNestedCellViewModel.d.ts +41 -0
  139. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffNestedCellViewModel.js +118 -0
  140. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/editorHeightCalculator.d.ts +17 -0
  141. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/editorHeightCalculator.js +71 -0
  142. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/eventDispatcher.d.ts +27 -0
  143. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/eventDispatcher.js +40 -0
  144. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookCellDiffDecorator.d.ts +23 -0
  145. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookCellDiffDecorator.js +313 -0
  146. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookDeletedCellDecorator.d.ts +51 -0
  147. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookDeletedCellDecorator.js +265 -0
  148. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInlineDiff.d.ts +24 -0
  149. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInlineDiff.js +185 -0
  150. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInlineDiffWidget.d.ts +28 -0
  151. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInlineDiffWidget.js +104 -0
  152. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInsertedCellDecorator.d.ts +10 -0
  153. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInsertedCellDecorator.js +43 -0
  154. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalCellModelFactory.d.ts +21 -0
  155. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalCellModelFactory.js +41 -0
  156. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalModelRefFactory.d.ts +25 -0
  157. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalModelRefFactory.js +69 -0
  158. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiff.css +469 -0
  159. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor.d.ts +149 -0
  160. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor.js +933 -0
  161. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditorBrowser.d.ts +180 -0
  162. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditorBrowser.js +32 -0
  163. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffList.d.ts +102 -0
  164. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffList.js +643 -0
  165. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffOverviewRuler.d.ts +30 -0
  166. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffOverviewRuler.js +197 -0
  167. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffViewModel.d.ts +75 -0
  168. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffViewModel.js +539 -0
  169. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/unchangedEditorRegions.d.ts +13 -0
  170. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/unchangedEditorRegions.js +39 -0
  171. package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookMetadataTextModel.d.ts +19 -0
  172. package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookMetadataTextModel.js +90 -0
  173. package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiff.d.ts +26 -0
  174. package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiff.js +92 -0
  175. package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditor.js +1 -1
  176. package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditorInput.js +1 -1
  177. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.d.ts +0 -152
  178. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.js +0 -1317
  179. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/internalCustomizations/internalPromptFileSystem.d.ts +0 -47
  180. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/internalCustomizations/internalPromptFileSystem.js +0 -95
@@ -24,6 +24,7 @@ import { isEqual, extUri } from '@codingame/monaco-vscode-api/vscode/vs/base/com
24
24
  import { MicrotaskDelay } from '@codingame/monaco-vscode-api/vscode/vs/base/common/symbols';
25
25
  import { isDefined } from '@codingame/monaco-vscode-api/vscode/vs/base/common/types';
26
26
  import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
27
+ import { markChat, ChatPerfMark } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatPerf';
27
28
  import { ICodeEditorService } from '@codingame/monaco-vscode-api/vscode/vs/editor/browser/services/codeEditorService.service';
28
29
  import { OffsetRange } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/core/ranges/offsetRange';
29
30
  import { Range } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/core/range';
@@ -56,12 +57,11 @@ import { ChatRequestQueueKind, ChatSendResult } from '@codingame/monaco-vscode-a
56
57
  import { IChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService.service';
57
58
  import { IChatSessionsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService.service';
58
59
  import { IChatSlashCommandService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/participants/chatSlashCommands.service';
59
- import { IChatArtifactsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/chatArtifactsService.service';
60
60
  import { IChatTodoListService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/chatTodoListService.service';
61
61
  import { isWorkspaceVariableEntry, isPromptFileVariableEntry, isPromptTextVariableEntry, toPromptFileVariableEntry, PromptFileVariableKind } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/attachments/chatVariableEntries';
62
62
  import { isResponseVM, isRequestVM, ChatViewModel } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatViewModel';
63
63
  import { CodeBlockModelCollection } from '../../common/widget/codeBlockModelCollection.js';
64
- import { ChatModeKind, ChatPermissionLevel, ChatConfiguration, ThinkingDisplayMode } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
64
+ import { ChatModeKind, ChatPermissionLevel, ChatConfiguration, ThinkingDisplayMode, ChatAgentLocation } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
65
65
  import { isToolSet } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService';
66
66
  import { ILanguageModelToolsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService.service';
67
67
  import { ComputeAutomaticInstructions } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/computeAutomaticInstructions';
@@ -112,7 +112,7 @@ const supportsAllAttachments = {
112
112
  supportsPromptAttachments: true,
113
113
  supportsHandOffs: true
114
114
  };
115
- const DISCLAIMER = ( localize(6962, "AI responses may be inaccurate"));
115
+ const DISCLAIMER = ( localize(7016, "AI responses may be inaccurate"));
116
116
  let ChatWidget = class ChatWidget extends Disposable {
117
117
  static {
118
118
  ChatWidget_1 = this;
@@ -213,7 +213,6 @@ let ChatWidget = class ChatWidget extends Disposable {
213
213
  chatSessionsService,
214
214
  agentSessionsService,
215
215
  chatTodoListService,
216
- chatArtifactsService,
217
216
  lifecycleService,
218
217
  chatAttachmentResolveService,
219
218
  chatTipService,
@@ -243,7 +242,6 @@ let ChatWidget = class ChatWidget extends Disposable {
243
242
  this.chatSessionsService = chatSessionsService;
244
243
  this.agentSessionsService = agentSessionsService;
245
244
  this.chatTodoListService = chatTodoListService;
246
- this.chatArtifactsService = chatArtifactsService;
247
245
  this.lifecycleService = lifecycleService;
248
246
  this.chatAttachmentResolveService = chatAttachmentResolveService;
249
247
  this.chatTipService = chatTipService;
@@ -478,11 +476,6 @@ let ChatWidget = class ChatWidget extends Disposable {
478
476
  this.inputPart.renderChatTodoListWidget(sessionResource);
479
477
  }
480
478
  }));
481
- this._register(this.chatArtifactsService.onDidUpdateArtifacts(sessionResource => {
482
- if (isEqual(this.viewModel?.sessionResource, sessionResource)) {
483
- this.inputPart.renderArtifactsWidget(sessionResource);
484
- }
485
- }));
486
479
  }
487
480
  set lastSelectedAgent(agent) {
488
481
  this.parsedChatRequest = undefined;
@@ -764,6 +757,7 @@ let ChatWidget = class ChatWidget extends Disposable {
764
757
  this.unlockFromCodingAgent();
765
758
  }
766
759
  this.inputPart.clearTodoListWidget(this.viewModel?.sessionResource, true);
760
+ this.inputPart.clearArtifactsWidget();
767
761
  this.chatSuggestNextWidget.hide();
768
762
  await this.viewOptions.clear?.();
769
763
  }
@@ -827,7 +821,7 @@ let ChatWidget = class ChatWidget extends Disposable {
827
821
  if (this.chatEntitlementService.anonymous && !this.chatEntitlementService.sentiment.installed) {
828
822
  const providers = product.defaultChatAgent.provider;
829
823
  additionalMessage = ( new MarkdownString(( localize(
830
- 6963,
824
+ 7017,
831
825
  "By continuing with {0} Copilot, you agree to {1}'s [Terms]({2}) and [Privacy Statement]({3}).",
832
826
  providers.default.name,
833
827
  providers.default.name,
@@ -909,7 +903,7 @@ let ChatWidget = class ChatWidget extends Disposable {
909
903
  return ( new MarkdownString(""));
910
904
  } else if (this._instructionFilesExist === false) {
911
905
  return (new MarkdownString(localize(
912
- 6964,
906
+ 7018,
913
907
  "[Generate Agent Instructions]({0}) to onboard AI onto your codebase.",
914
908
  `command:${GENERATE_AGENT_INSTRUCTIONS_COMMAND_ID}`
915
909
  ), {
@@ -935,19 +929,19 @@ let ChatWidget = class ChatWidget extends Disposable {
935
929
  const providerTitle = contribution?.welcomeTitle;
936
930
  const providerMessage = contribution?.welcomeMessage;
937
931
  const message = providerMessage ? ( new MarkdownString(providerMessage)) : (this._lockedAgent?.prefix === "@copilot " ? ( new MarkdownString(( localize(
938
- 6965,
932
+ 7019,
939
933
  "This chat session will be forwarded to the {0} [coding agent]({1}) where work is completed in the background. ",
940
934
  this._lockedAgent.prefix,
941
935
  "https://aka.ms/coding-agent-docs"
942
936
  )) + DISCLAIMER, {
943
937
  isTrusted: true
944
938
  })) : ( new MarkdownString(( localize(
945
- 6966,
939
+ 7020,
946
940
  "This chat session will be forwarded to the {0} coding agent where work is completed in the background. ",
947
941
  this._lockedAgent?.prefix
948
942
  )) + DISCLAIMER)));
949
943
  return {
950
- title: providerTitle ?? ( localize(6967, "Delegate to {0}", this._lockedAgent?.prefix)),
944
+ title: providerTitle ?? ( localize(7021, "Delegate to {0}", this._lockedAgent?.prefix)),
951
945
  message,
952
946
  icon: providerIcon ?? Codicon.sendToRemoteAgent,
953
947
  additionalMessage,
@@ -956,11 +950,11 @@ let ChatWidget = class ChatWidget extends Disposable {
956
950
  }
957
951
  let title;
958
952
  if (this.input.currentModeKind === ChatModeKind.Ask) {
959
- title = ( localize(6968, "Ask about your code"));
953
+ title = ( localize(7022, "Ask about your code"));
960
954
  } else if (this.input.currentModeKind === ChatModeKind.Edit) {
961
- title = ( localize(6969, "Edit in context"));
955
+ title = ( localize(7023, "Edit in context"));
962
956
  } else {
963
- title = ( localize(6970, "Build with Agent"));
957
+ title = ( localize(7024, "Build with Agent"));
964
958
  }
965
959
  return {
966
960
  title,
@@ -1478,7 +1472,7 @@ let ChatWidget = class ChatWidget extends Disposable {
1478
1472
  return;
1479
1473
  }
1480
1474
  if (this.bodyDimension) {
1481
- this.layout(this.bodyDimension.height, this.bodyDimension.width);
1475
+ this._layoutListForInputHeight();
1482
1476
  }
1483
1477
  this._onDidChangeContentHeight.fire();
1484
1478
  }));
@@ -1613,6 +1607,7 @@ let ChatWidget = class ChatWidget extends Disposable {
1613
1607
  this.finishedEditing();
1614
1608
  }
1615
1609
  this.inputPart.clearTodoListWidget(model.sessionResource, false);
1610
+ this.inputPart.clearArtifactsWidget();
1616
1611
  this.chatSuggestNextWidget.hide();
1617
1612
  this.chatTipService.resetSession();
1618
1613
  this._gettingStartedTipPartRef = undefined;
@@ -1628,7 +1623,7 @@ let ChatWidget = class ChatWidget extends Disposable {
1628
1623
  let placeholder = this.chatSessionsService.getChatSessionContribution(this._lockedAgent.id)?.inputPlaceholder;
1629
1624
  if (!placeholder) {
1630
1625
  placeholder = ( localize(
1631
- 6971,
1626
+ 7025,
1632
1627
  "Chat with {0}",
1633
1628
  this._lockedAgent.displayName || this._lockedAgent.name
1634
1629
  ));
@@ -1682,7 +1677,7 @@ let ChatWidget = class ChatWidget extends Disposable {
1682
1677
  this._hasPendingRequestsContextKey.set(pendingCount > 0);
1683
1678
  const steeringCount = pendingRequests.filter(pending => pending.kind === ChatRequestQueueKind.Steering).length;
1684
1679
  if (announceSteering && steeringCount > 0 && lastSteeringCount === 0) {
1685
- status(( localize(6972, "Steering")));
1680
+ status(( localize(7026, "Steering")));
1686
1681
  }
1687
1682
  lastSteeringCount = steeringCount;
1688
1683
  };
@@ -1811,6 +1806,9 @@ let ChatWidget = class ChatWidget extends Disposable {
1811
1806
  this.input.logInputHistory();
1812
1807
  }
1813
1808
  async acceptInput(query, options) {
1809
+ if (this.viewModel) {
1810
+ markChat(this.viewModel.sessionResource, ChatPerfMark.RequestStart);
1811
+ }
1814
1812
  return this._acceptInput(query ? {
1815
1813
  query
1816
1814
  } : undefined, options);
@@ -1954,7 +1952,9 @@ let ChatWidget = class ChatWidget extends Disposable {
1954
1952
  return;
1955
1953
  }
1956
1954
  await this._applyPromptFileIfSet(requestInputs);
1955
+ markChat(this.viewModel.sessionResource, ChatPerfMark.WillCollectInstructions);
1957
1956
  await this._autoAttachInstructions(requestInputs);
1957
+ markChat(this.viewModel.sessionResource, ChatPerfMark.DidCollectInstructions);
1958
1958
  if (this.viewOptions.enableWorkingSet !== undefined && this.input.currentModeKind === ChatModeKind.Edit) {
1959
1959
  const uniqueWorkingSetEntries = ( new ResourceSet());
1960
1960
  const editingSessionAttachedContext = requestInputs.attachedContext;
@@ -2076,16 +2076,16 @@ let ChatWidget = class ChatWidget extends Disposable {
2076
2076
  }
2077
2077
  const promptResult = await this.dialogService.prompt({
2078
2078
  type: "question",
2079
- message: ( localize(6973, "You already have pending requests.")),
2079
+ message: ( localize(7027, "You already have pending requests.")),
2080
2080
  detail: ( localize(
2081
- 6974,
2081
+ 7028,
2082
2082
  "Do you want to keep them in the queue or remove them before sending this message?"
2083
2083
  )),
2084
2084
  buttons: [{
2085
- label: ( localize(6975, "Keep Pending Requests")),
2085
+ label: ( localize(7029, "Keep Pending Requests")),
2086
2086
  run: () => "keep"
2087
2087
  }, {
2088
- label: ( localize(6976, "Remove Pending Requests")),
2088
+ label: ( localize(7030, "Remove Pending Requests")),
2089
2089
  run: () => "remove"
2090
2090
  }],
2091
2091
  cancelButton: true
@@ -2135,15 +2135,34 @@ let ChatWidget = class ChatWidget extends Disposable {
2135
2135
  focusResponseItem(lastFocused) {
2136
2136
  this.listWidget.focusLastItem(lastFocused);
2137
2137
  }
2138
+ setInputPartMaxHeightOverride(maxHeight) {
2139
+ this.inputPartMaxHeightOverride = maxHeight;
2140
+ }
2138
2141
  layout(height, width) {
2139
2142
  width = Math.min(width, this.viewOptions.renderStyle === "minimal" ? width : 950);
2140
2143
  this.bodyDimension = new Dimension(width, height);
2141
2144
  if (this.viewModel?.editing) {
2142
2145
  this.inlineInputPart?.layout(width);
2143
2146
  }
2147
+ const chatSuggestNextWidgetHeight = this.chatSuggestNextWidget.height;
2148
+ const inputMaxHeight = this._dynamicMessageLayoutData || this.location !== ChatAgentLocation.Chat ? undefined : this.inputPartMaxHeightOverride !== undefined ? Math.max(
2149
+ 0,
2150
+ this.inputPartMaxHeightOverride - chatSuggestNextWidgetHeight - MIN_LIST_HEIGHT
2151
+ ) : Math.max(0, height - chatSuggestNextWidgetHeight - MIN_LIST_HEIGHT);
2152
+ this.inputPart.setMaxHeight(inputMaxHeight);
2144
2153
  this.inputPart.layout(width);
2145
- const inputHeight = this.inputPart.height.get();
2154
+ this._layoutListForInputHeight();
2155
+ }
2156
+ _layoutListForInputHeight() {
2157
+ if (!this.bodyDimension) {
2158
+ return;
2159
+ }
2160
+ const {
2161
+ height,
2162
+ width
2163
+ } = this.bodyDimension;
2146
2164
  const chatSuggestNextWidgetHeight = this.chatSuggestNextWidget.height;
2165
+ const inputHeight = this.inputPart.height.get();
2147
2166
  const lastElementVisible = this.listWidget.isScrolledToBottom;
2148
2167
  const lastItem = this.listWidget.lastItem;
2149
2168
  const contentHeight = Math.max(0, height - inputHeight - chatSuggestNextWidgetHeight);
@@ -2311,23 +2330,31 @@ let ChatWidget = class ChatWidget extends Disposable {
2311
2330
  );
2312
2331
  return;
2313
2332
  }
2314
- this.logService.debug(`ChatWidget#_autoAttachInstructions: prompt files are enabled`);
2315
- const enabledTools = this.input.currentModeKind === ChatModeKind.Agent ? this.input.selectedToolsModel.userSelectedTools.get() : undefined;
2316
- const enabledSubAgents = this.input.currentModeKind === ChatModeKind.Agent ? this.input.currentModeObs.get().agents?.get() : undefined;
2317
- const sessionResource = this._viewModel?.model.sessionResource;
2318
- const computer = this.instantiationService.createInstance(
2319
- ComputeAutomaticInstructions,
2320
- this.input.currentModeKind,
2321
- enabledTools,
2322
- enabledSubAgents,
2323
- sessionResource
2324
- );
2325
- await computer.collect(attachedContext, CancellationToken.None);
2333
+ try {
2334
+ this.logService.debug(`ChatWidget#_autoAttachInstructions: prompt files are enabled`);
2335
+ const enabledTools = this.input.currentModeKind === ChatModeKind.Agent ? this.input.selectedToolsModel.userSelectedTools.get() : undefined;
2336
+ const enabledSubAgents = this.input.currentModeKind === ChatModeKind.Agent ? this.input.currentModeObs.get().agents?.get() : undefined;
2337
+ const sessionResource = this._viewModel?.model.sessionResource;
2338
+ const computer = this.instantiationService.createInstance(
2339
+ ComputeAutomaticInstructions,
2340
+ this.input.currentModeKind,
2341
+ enabledTools,
2342
+ enabledSubAgents,
2343
+ sessionResource
2344
+ );
2345
+ await computer.collect(attachedContext, CancellationToken.None);
2346
+ } catch (err) {
2347
+ this.logService.error(
2348
+ `ChatWidget#_autoAttachInstructions: failed to compute automatic instructions`,
2349
+ err
2350
+ );
2351
+ }
2326
2352
  }
2327
2353
  delegateScrollFromMouseWheelEvent(browserEvent) {
2328
2354
  this.listWidget.delegateScrollFromMouseWheelEvent(browserEvent);
2329
2355
  }
2330
2356
  };
2331
- ChatWidget = ChatWidget_1 = ( __decorate([( __param(4, ICodeEditorService)), ( __param(5, IConfigurationService)), ( __param(6, IDialogService)), ( __param(7, IContextKeyService)), ( __param(8, IInstantiationService)), ( __param(9, IChatService)), ( __param(10, IChatAgentService)), ( __param(11, IChatWidgetService)), ( __param(12, IChatAccessibilityService)), ( __param(13, ILogService)), ( __param(14, IThemeService)), ( __param(15, IChatSlashCommandService)), ( __param(16, IChatEditingService)), ( __param(17, ITelemetryService)), ( __param(18, IPromptsService)), ( __param(19, ILanguageModelToolsService)), ( __param(20, IChatModeService)), ( __param(21, IChatLayoutService)), ( __param(22, IChatEntitlementService)), ( __param(23, IChatSessionsService)), ( __param(24, IAgentSessionsService)), ( __param(25, IChatTodoListService)), ( __param(26, IChatArtifactsService)), ( __param(27, ILifecycleService)), ( __param(28, IChatAttachmentResolveService)), ( __param(29, IChatTipService)), ( __param(30, IChatDebugService))], ChatWidget));
2357
+ ChatWidget = ChatWidget_1 = ( __decorate([( __param(4, ICodeEditorService)), ( __param(5, IConfigurationService)), ( __param(6, IDialogService)), ( __param(7, IContextKeyService)), ( __param(8, IInstantiationService)), ( __param(9, IChatService)), ( __param(10, IChatAgentService)), ( __param(11, IChatWidgetService)), ( __param(12, IChatAccessibilityService)), ( __param(13, ILogService)), ( __param(14, IThemeService)), ( __param(15, IChatSlashCommandService)), ( __param(16, IChatEditingService)), ( __param(17, ITelemetryService)), ( __param(18, IPromptsService)), ( __param(19, ILanguageModelToolsService)), ( __param(20, IChatModeService)), ( __param(21, IChatLayoutService)), ( __param(22, IChatEntitlementService)), ( __param(23, IChatSessionsService)), ( __param(24, IAgentSessionsService)), ( __param(25, IChatTodoListService)), ( __param(26, ILifecycleService)), ( __param(27, IChatAttachmentResolveService)), ( __param(28, IChatTipService)), ( __param(29, IChatDebugService))], ChatWidget));
2358
+ const MIN_LIST_HEIGHT = 50;
2332
2359
 
2333
2360
  export { ChatWidget, isQuickChat };
@@ -45,7 +45,7 @@ let ChatFollowups = class ChatFollowups extends Disposable {
45
45
  } else if (followup.kind === "command") {
46
46
  button.element.classList.add("interactive-followup-command");
47
47
  }
48
- button.element.ariaLabel = ( localize(6977, "Follow up question: {0}", baseTitle));
48
+ button.element.ariaLabel = ( localize(7031, "Follow up question: {0}", baseTitle));
49
49
  button.label = ( new MarkdownString(baseTitle));
50
50
  this._register(button.onDidClick(() => this.clickHandler(followup)));
51
51
  }
@@ -178,6 +178,7 @@ export declare class ChatInputPart extends Disposable implements IHistoryNavigat
178
178
  private readonly inputEditorMaxHeight;
179
179
  private readonly inputEditorMinHeight;
180
180
  private inputEditorHeight;
181
+ private _maxHeight;
181
182
  private container;
182
183
  private inputSideToolbarContainer?;
183
184
  private secondaryToolbarContainer;
@@ -239,7 +240,7 @@ export declare class ChatInputPart extends Disposable implements IHistoryNavigat
239
240
  private permissionWidget;
240
241
  private sessionTargetWidget;
241
242
  private delegationWidget;
242
- private chatSessionPickerWidgets;
243
+ private readonly chatSessionPickerWidgets;
243
244
  private chatSessionPickerContainer;
244
245
  private _lastSessionPickerAction;
245
246
  private _lastSessionPickerOptions;
@@ -387,6 +388,10 @@ export declare class ChatInputPart extends Disposable implements IHistoryNavigat
387
388
  get element(): HTMLElement;
388
389
  showPreviousValue(): Promise<void>;
389
390
  showNextValue(): Promise<void>;
391
+ /**
392
+ * Restores attachments to the input, re-fetching image binary data as needed.
393
+ */
394
+ restoreAttachments(attachments: readonly IChatRequestVariableEntry[]): Promise<void>;
390
395
  private navigateHistory;
391
396
  setValue(value: string, transient: boolean): void;
392
397
  focus(): void;
@@ -440,7 +445,6 @@ export declare class ChatInputPart extends Disposable implements IHistoryNavigat
440
445
  */
441
446
  private refreshChatSessionPickers;
442
447
  private hideAllSessionPickerWidgets;
443
- private disposeSessionPickerWidgets;
444
448
  /**
445
449
  * Get the current option for a specific option group.
446
450
  * Returns undefined if the session doesn't have this option configured.
@@ -490,11 +494,18 @@ export declare class ChatInputPart extends Disposable implements IHistoryNavigat
490
494
  renderChatEditingSessionState(chatEditingSession: IChatEditingSession | null): void;
491
495
  private renderChatEditingSessionWithEntries;
492
496
  renderFollowups(items: IChatFollowup[] | undefined, response: IChatResponseViewModel | undefined): Promise<void>;
497
+ /**
498
+ * Sets the maximum height budget for the input part. The editor height will be
499
+ * clamped so it does not grow beyond what this budget allows after accounting
500
+ * for non-editor chrome such as attachments, toolbars, and widgets.
501
+ */
502
+ setMaxHeight(maxHeight: number | undefined): void;
493
503
  /**
494
504
  * Layout the input part with the given width. Height is intrinsic - determined by content
495
505
  * and detected via ResizeObserver, which updates `inputPartHeight` for the parent to observe.
496
506
  */
497
507
  layout(width: number): void;
508
+ private get _effectiveInputEditorMaxHeight();
498
509
  private previousInputEditorDimension;
499
510
  private _layout;
500
511
  private getLayoutData;