@codingame/monaco-vscode-katex-common 25.1.2 → 26.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (317) hide show
  1. package/package.json +2 -2
  2. package/vscode/src/vs/platform/actionWidget/browser/actionWidgetDropdown.d.ts +23 -2
  3. package/vscode/src/vs/platform/actionWidget/browser/actionWidgetDropdown.js +64 -27
  4. package/vscode/src/vs/platform/actions/browser/actionWidgetDropdownActionViewItem.d.ts +3 -1
  5. package/vscode/src/vs/platform/actions/browser/actionWidgetDropdownActionViewItem.js +31 -28
  6. package/vscode/src/vs/platform/actions/browser/buttonbar.d.ts +2 -0
  7. package/vscode/src/vs/platform/actions/browser/buttonbar.js +71 -50
  8. package/vscode/src/vs/platform/editor/browser/editor.js +17 -7
  9. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityProvider.js +112 -129
  10. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContinueInAction.d.ts +10 -1
  11. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContinueInAction.js +110 -85
  12. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatElicitationActions.js +5 -5
  13. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.d.ts +21 -6
  14. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.js +308 -216
  15. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTitleActions.js +153 -148
  16. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionHoverWidget.d.ts +27 -0
  17. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionHoverWidget.js +247 -0
  18. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.d.ts +71 -0
  19. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.js +347 -0
  20. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.d.ts +44 -0
  21. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.js +287 -0
  22. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsOpener.d.ts +20 -0
  23. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsOpener.js +89 -0
  24. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.d.ts +188 -0
  25. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.js +677 -0
  26. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/media/agentSessionHoverWidget.css +98 -0
  27. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/media/agentsessionsviewer.css +263 -0
  28. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentModel.js +34 -25
  29. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgets.d.ts +19 -14
  30. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgets.js +762 -359
  31. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatImplicitContext.d.ts +22 -1
  32. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatImplicitContext.js +188 -99
  33. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/implicitContextAttachment.d.ts +9 -3
  34. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/implicitContextAttachment.js +166 -113
  35. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingActions.d.ts +12 -5
  36. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingActions.js +279 -213
  37. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.d.ts +46 -0
  38. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +533 -0
  39. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.d.ts +28 -0
  40. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +382 -0
  41. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationWidget.d.ts +101 -0
  42. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationWidget.js +509 -0
  43. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/media/chatEditingEditorOverlay.css +130 -0
  44. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/media/chatEditingExplanationWidget.css +276 -0
  45. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionPickerActionItem.d.ts +24 -7
  46. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionPickerActionItem.js +128 -52
  47. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.d.ts +153 -0
  48. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.js +1218 -0
  49. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/media/chatSessionPickerActionItem.css +14 -0
  50. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/searchableOptionPickerActionItem.d.ts +39 -0
  51. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/searchableOptionPickerActionItem.js +193 -0
  52. package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewWelcomeController.d.ts +2 -0
  53. package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewWelcomeController.js +93 -89
  54. package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcome.js +5 -2
  55. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatAgentHover.js +42 -47
  56. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentMarkdownRenderer.js +58 -56
  57. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAgentCommandContentPart.js +18 -14
  58. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAnonymousRateLimitedPart.js +17 -15
  59. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAttachmentsContentPart.d.ts +6 -2
  60. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAttachmentsContentPart.js +132 -68
  61. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatChangesSummaryPart.d.ts +0 -2
  62. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatChangesSummaryPart.js +68 -47
  63. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCodeCitationContentPart.js +14 -13
  64. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollapsibleContentPart.d.ts +4 -4
  65. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollapsibleContentPart.js +36 -24
  66. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollapsibleMarkdownContentPart.d.ts +18 -0
  67. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollapsibleMarkdownContentPart.js +32 -0
  68. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollections.d.ts +7 -2
  69. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollections.js +15 -4
  70. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCommandContentPart.d.ts +1 -0
  71. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCommandContentPart.js +22 -14
  72. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationContentPart.d.ts +0 -2
  73. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationContentPart.js +34 -27
  74. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationWidget.d.ts +1 -5
  75. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationWidget.js +198 -135
  76. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatContentCodePools.d.ts +2 -0
  77. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatContentCodePools.js +38 -10
  78. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatDiffBlockPart.js +29 -27
  79. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatElicitationContentPart.d.ts +0 -2
  80. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatElicitationContentPart.js +41 -36
  81. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatErrorConfirmationPart.d.ts +0 -2
  82. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatErrorConfirmationPart.js +23 -18
  83. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatErrorContentPart.js +13 -13
  84. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatExtensionsContentPart.d.ts +0 -3
  85. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatExtensionsContentPart.js +20 -14
  86. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatInlineAnchorWidget.d.ts +11 -1
  87. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatInlineAnchorWidget.js +291 -152
  88. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownContentPart.d.ts +2 -3
  89. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownContentPart.js +227 -162
  90. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownDecorationsRenderer.js +68 -72
  91. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMcpServersInteractionContentPart.d.ts +2 -4
  92. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMcpServersInteractionContentPart.js +76 -75
  93. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMultiDiffContentPart.d.ts +2 -5
  94. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMultiDiffContentPart.js +96 -76
  95. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatProgressContentPart.d.ts +4 -1
  96. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatProgressContentPart.js +74 -38
  97. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatPullRequestContentPart.d.ts +0 -2
  98. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatPullRequestContentPart.js +11 -25
  99. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuestionCarouselPart.d.ts +107 -0
  100. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuestionCarouselPart.js +814 -0
  101. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuotaExceededPart.d.ts +0 -2
  102. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuotaExceededPart.js +34 -29
  103. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatReferencesContentPart.d.ts +8 -10
  104. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatReferencesContentPart.js +236 -197
  105. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentContentPart.d.ts +123 -0
  106. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentContentPart.js +492 -0
  107. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSuggestNextWidget.js +75 -47
  108. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTaskContentPart.d.ts +2 -4
  109. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTaskContentPart.js +31 -20
  110. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTextEditContentPart.d.ts +0 -3
  111. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTextEditContentPart.js +42 -36
  112. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatThinkingContentPart.d.ts +55 -7
  113. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatThinkingContentPart.js +714 -148
  114. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTipContentPart.d.ts +7 -0
  115. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTipContentPart.js +21 -0
  116. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTodoListWidget.d.ts +2 -7
  117. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTodoListWidget.js +143 -153
  118. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolInputOutputContentPart.d.ts +14 -5
  119. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolInputOutputContentPart.js +79 -61
  120. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolOutputContentSubPart.d.ts +10 -4
  121. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolOutputContentSubPart.js +209 -77
  122. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTreeContentPart.d.ts +9 -7
  123. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTreeContentPart.js +71 -54
  124. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatWorkspaceEditContentPart.d.ts +18 -0
  125. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatWorkspaceEditContentPart.js +83 -0
  126. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/codeBlockPart.d.ts +4 -4
  127. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/codeBlockPart.js +248 -190
  128. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatConfirmationWidget.css +1 -14
  129. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatInlineAnchorWidget.css +23 -0
  130. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatPullRequestContent.css +5 -41
  131. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatQuestionCarousel.css +493 -0
  132. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatSubagentContent.css +63 -0
  133. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatTerminalToolProgressPart.css +9 -1
  134. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatThinkingContent.css +121 -5
  135. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatTipContent.css +37 -0
  136. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/abstractToolConfirmationSubPart.js +51 -45
  137. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatExtensionsInstallToolSubPart.js +46 -42
  138. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatInputOutputMarkdownProgressPart.d.ts +4 -2
  139. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatInputOutputMarkdownProgressPart.js +99 -67
  140. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppModel.d.ts +112 -0
  141. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppModel.js +634 -0
  142. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppSubPart.d.ts +49 -0
  143. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppSubPart.js +132 -0
  144. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatResultListSubPart.js +15 -9
  145. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolConfirmationSubPart.js +196 -149
  146. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.d.ts +17 -1
  147. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.js +577 -193
  148. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolConfirmationSubPart.js +119 -86
  149. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolInvocationPart.d.ts +10 -2
  150. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolInvocationPart.js +165 -36
  151. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolInvocationSubPart.d.ts +0 -2
  152. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolInvocationSubPart.js +5 -8
  153. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolOutputPart.d.ts +5 -3
  154. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolOutputPart.js +75 -65
  155. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPartUtilities.js +30 -28
  156. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPostExecuteConfirmationPart.d.ts +1 -5
  157. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPostExecuteConfirmationPart.js +102 -106
  158. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolProgressPart.js +44 -20
  159. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolStreamingSubPart.d.ts +19 -0
  160. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolStreamingSubPart.js +67 -0
  161. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/terminalToolAutoExpand.d.ts +57 -0
  162. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/terminalToolAutoExpand.js +69 -0
  163. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatDragAndDrop.js +122 -82
  164. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.d.ts +39 -12
  165. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.js +1110 -597
  166. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListWidget.d.ts +291 -0
  167. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListWidget.js +485 -0
  168. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatOptions.js +38 -28
  169. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidget.d.ts +9 -20
  170. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidget.js +650 -689
  171. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatFollowups.js +21 -18
  172. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.d.ts +102 -36
  173. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.js +1253 -790
  174. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPartWidgets.d.ts +0 -7
  175. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPartWidgets.js +11 -11
  176. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPickerActionItem.d.ts +34 -0
  177. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPickerActionItem.js +55 -0
  178. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatSelectedTools.d.ts +6 -2
  179. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatSelectedTools.js +51 -35
  180. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/delegationSessionPickerActionItem.d.ts +22 -0
  181. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/delegationSessionPickerActionItem.js +102 -0
  182. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modePickerActionItem.d.ts +16 -4
  183. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modePickerActionItem.js +192 -44
  184. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem.d.ts +11 -12
  185. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem.js +99 -66
  186. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/sessionTargetPickerActionItem.d.ts +47 -0
  187. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/sessionTargetPickerActionItem.js +188 -0
  188. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/workspacePickerActionItem.d.ts +20 -0
  189. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/workspacePickerActionItem.js +115 -0
  190. package/vscode/src/vs/workbench/contrib/chat/browser/widget/media/chat.css +129 -167
  191. package/vscode/src/vs/workbench/contrib/chat/browser/widget/media/chatViewWelcome.css +16 -3
  192. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageDetails.d.ts +37 -0
  193. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageDetails.js +143 -0
  194. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageWidget.d.ts +56 -0
  195. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageWidget.js +206 -0
  196. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatContextUsageDetails.css +152 -0
  197. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatContextUsageWidget.css +67 -0
  198. package/vscode/src/vs/workbench/contrib/chat/common/widget/annotations.d.ts +22 -0
  199. package/vscode/src/vs/workbench/contrib/chat/common/widget/annotations.js +170 -0
  200. package/vscode/src/vs/workbench/contrib/chat/common/widget/chatColors.d.ts +1 -0
  201. package/vscode/src/vs/workbench/contrib/chat/common/widget/chatColors.js +80 -19
  202. package/vscode/src/vs/workbench/contrib/chat/common/widget/chatWidgetHistoryService.js +20 -28
  203. package/vscode/src/vs/workbench/contrib/chat/common/widget/codeBlockModelCollection.d.ts +2 -1
  204. package/vscode/src/vs/workbench/contrib/chat/common/widget/codeBlockModelCollection.js +22 -19
  205. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAffordance.d.ts +15 -0
  206. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAffordance.js +122 -0
  207. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.d.ts +19 -104
  208. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.js +316 -1040
  209. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatEditorAffordance.d.ts +28 -0
  210. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatEditorAffordance.js +162 -0
  211. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatGutterAffordance.d.ts +21 -0
  212. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatGutterAffordance.js +98 -0
  213. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatOverlayWidget.d.ts +68 -0
  214. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatOverlayWidget.js +416 -0
  215. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.d.ts +1 -6
  216. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.js +194 -215
  217. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatZoneWidget.d.ts +0 -1
  218. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatZoneWidget.js +74 -104
  219. package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChat.css +45 -91
  220. package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChatEditorAffordance.css +22 -0
  221. package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChatOverlayWidget.css +98 -0
  222. package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.d.ts +5 -2
  223. package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.js +96 -68
  224. package/vscode/src/vs/workbench/contrib/interactive/browser/interactiveCommon.d.ts +7 -0
  225. package/vscode/src/vs/workbench/contrib/interactive/browser/interactiveCommon.js +11 -0
  226. package/vscode/src/vs/workbench/contrib/interactive/browser/replInputHintContentWidget.d.ts +20 -0
  227. package/vscode/src/vs/workbench/contrib/interactive/browser/replInputHintContentWidget.js +150 -0
  228. package/vscode/src/vs/workbench/contrib/markdown/browser/markedKatexSupport.js +141 -147
  229. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpToolCallUI.d.ts +64 -0
  230. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpToolCallUI.js +200 -0
  231. package/vscode/src/vs/workbench/contrib/mcp/common/modelContextProtocolApps.d.ts +548 -0
  232. package/vscode/src/vs/workbench/contrib/mcp/common/modelContextProtocolApps.js +23 -0
  233. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/executionStatusBarItemController.d.ts +22 -0
  234. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/executionStatusBarItemController.js +338 -0
  235. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/notebookVisibleCellObserver.d.ts +18 -0
  236. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/notebookVisibleCellObserver.js +58 -0
  237. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindWidget.d.ts +75 -0
  238. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindWidget.js +364 -0
  239. package/vscode/src/vs/workbench/contrib/replNotebook/browser/interactiveEditor.css +21 -0
  240. package/vscode/src/vs/workbench/contrib/replNotebook/browser/media/interactive.css +36 -0
  241. package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditor.d.ts +110 -0
  242. package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditor.js +692 -0
  243. package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditorInput.d.ts +40 -0
  244. package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditorInput.js +158 -0
  245. package/vscode/src/vs/workbench/contrib/terminal/browser/chatTerminalCommandMirror.d.ts +80 -21
  246. package/vscode/src/vs/workbench/contrib/terminal/browser/chatTerminalCommandMirror.js +440 -82
  247. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatInputRelatedFilesContrib.d.ts +0 -34
  248. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatInputRelatedFilesContrib.js +0 -139
  249. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.d.ts +0 -10
  250. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.js +0 -1081
  251. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSession.d.ts +0 -199
  252. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSession.js +0 -482
  253. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.d.ts +0 -28
  254. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.js +0 -37
  255. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.d.ts +0 -94
  256. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +0 -495
  257. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatStrategies.d.ts +0 -72
  258. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatStrategies.js +0 -454
  259. package/vscode/src/vs/workbench/contrib/inlineChat/browser/utils.d.ts +0 -13
  260. package/vscode/src/vs/workbench/contrib/inlineChat/browser/utils.js +0 -66
  261. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpPromptArgumentPick.d.ts +0 -41
  262. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpPromptArgumentPick.js +0 -372
  263. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chat/notebookChatUtils.d.ts +0 -4
  264. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chat/notebookChatUtils.js +0 -58
  265. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOperations.d.ts +0 -26
  266. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOperations.js +0 -594
  267. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffCellEditorOptions.d.ts +0 -8
  268. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffCellEditorOptions.js +0 -55
  269. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffComponents.d.ts +0 -273
  270. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffComponents.js +0 -1746
  271. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementOutputs.d.ts +0 -50
  272. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementOutputs.js +0 -269
  273. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementViewModel.d.ts +0 -258
  274. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementViewModel.js +0 -806
  275. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffNestedCellViewModel.d.ts +0 -41
  276. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffNestedCellViewModel.js +0 -116
  277. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/editorHeightCalculator.d.ts +0 -17
  278. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/editorHeightCalculator.js +0 -62
  279. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/eventDispatcher.d.ts +0 -27
  280. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/eventDispatcher.js +0 -40
  281. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookCellDiffDecorator.d.ts +0 -23
  282. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookCellDiffDecorator.js +0 -295
  283. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookDeletedCellDecorator.d.ts +0 -51
  284. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookDeletedCellDecorator.js +0 -241
  285. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInlineDiff.d.ts +0 -24
  286. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInlineDiff.js +0 -146
  287. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInlineDiffWidget.d.ts +0 -28
  288. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInlineDiffWidget.js +0 -90
  289. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInsertedCellDecorator.d.ts +0 -10
  290. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInsertedCellDecorator.js +0 -41
  291. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalCellModelFactory.d.ts +0 -21
  292. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalCellModelFactory.js +0 -42
  293. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalModelRefFactory.d.ts +0 -25
  294. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalModelRefFactory.js +0 -77
  295. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiff.css +0 -469
  296. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor.d.ts +0 -149
  297. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor.js +0 -823
  298. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditorBrowser.d.ts +0 -180
  299. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditorBrowser.js +0 -29
  300. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffList.d.ts +0 -102
  301. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffList.js +0 -567
  302. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffOverviewRuler.d.ts +0 -30
  303. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffOverviewRuler.js +0 -189
  304. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffViewModel.d.ts +0 -75
  305. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffViewModel.js +0 -439
  306. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditor.d.ts +0 -57
  307. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditor.js +0 -263
  308. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditorInput.d.ts +0 -22
  309. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditorInput.js +0 -48
  310. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/unchangedEditorRegions.d.ts +0 -13
  311. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/unchangedEditorRegions.js +0 -39
  312. package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookMetadataTextModel.d.ts +0 -19
  313. package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookMetadataTextModel.js +0 -89
  314. package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiff.d.ts +0 -26
  315. package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiff.js +0 -92
  316. package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiffEditorInput.d.ts +0 -33
  317. package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiffEditorInput.js +0 -108
@@ -12,7 +12,7 @@ import { Emitter, Event } from '@codingame/monaco-vscode-api/vscode/vs/base/comm
12
12
  import { MarkdownString } from '@codingame/monaco-vscode-api/vscode/vs/base/common/htmlContent';
13
13
  import { Iterable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/iterator';
14
14
  import { KeyCode } from '@codingame/monaco-vscode-api/vscode/vs/base/common/keyCodes';
15
- import { Disposable, DisposableStore } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
15
+ import { Disposable, DisposableStore, MutableDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
16
16
  import { Schemas } from '@codingame/monaco-vscode-api/vscode/vs/base/common/network';
17
17
  import { basename, dirname } from '@codingame/monaco-vscode-api/vscode/vs/base/common/path';
18
18
  import { ThemeIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/themables';
@@ -27,6 +27,7 @@ import { getFlatContextMenuActions } from '@codingame/monaco-vscode-api/vscode/v
27
27
  import { MenuId } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
28
28
  import { IMenuService } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions.service';
29
29
  import { ICommandService } from '@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service';
30
+ import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
30
31
  import { RawContextKey } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey';
31
32
  import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service';
32
33
  import { IContextMenuService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextview/browser/contextView.service';
@@ -52,21 +53,22 @@ import { INotebookService } from '@codingame/monaco-vscode-api/vscode/vs/workben
52
53
  import { toHistoryItemHoverContent } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/scm/browser/scmHistory';
53
54
  import { getHistoryItemEditorTitle } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/scm/browser/util';
54
55
  import { ITerminalService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminal/browser/terminal.service';
55
- import { OmittedState, PromptFileVariableKind } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/attachments/chatVariableEntries';
56
+ import { OmittedState, isStringVariableEntry, PromptFileVariableKind } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/attachments/chatVariableEntries';
56
57
  import { ILanguageModelsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModels.service';
57
- import { ToolSet } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService';
58
+ import { isToolSet } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService';
58
59
  import { ILanguageModelToolsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService.service';
59
60
  import { getCleanPromptName } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/config/promptFileLocations';
61
+ import { IChatContextService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/contextContrib/chatContextService.service';
60
62
 
61
63
  const commonHoverOptions = {
62
64
  style: HoverStyle.Pointer,
63
65
  position: {
64
66
  hoverPosition: HoverPosition.BELOW
65
67
  },
66
- trapFocus: true,
68
+ trapFocus: true
67
69
  };
68
70
  const commonHoverLifecycleOptions = {
69
- groupId: 'chat-attachments',
71
+ groupId: "chat-attachments"
70
72
  };
71
73
  let AbstractChatAttachmentWidget = class AbstractChatAttachmentWidget extends Disposable {
72
74
  get onDidDelete() {
@@ -75,23 +77,37 @@ let AbstractChatAttachmentWidget = class AbstractChatAttachmentWidget extends Di
75
77
  get onDidOpen() {
76
78
  return this._onDidOpen.event;
77
79
  }
78
- constructor(attachment, options, container, contextResourceLabels, currentLanguageModel, commandService, openerService, terminalService) {
80
+ constructor(
81
+ attachment,
82
+ options,
83
+ container,
84
+ contextResourceLabels,
85
+ currentLanguageModel,
86
+ commandService,
87
+ openerService,
88
+ configurationService,
89
+ terminalService
90
+ ) {
79
91
  super();
80
92
  this.attachment = attachment;
81
93
  this.options = options;
82
94
  this.currentLanguageModel = currentLanguageModel;
83
95
  this.commandService = commandService;
84
96
  this.openerService = openerService;
97
+ this.configurationService = configurationService;
85
98
  this.terminalService = terminalService;
86
99
  this._onDidDelete = this._register(new Emitter());
87
100
  this._onDidOpen = this._register(new Emitter());
88
- this.element = append(container, $('.chat-attached-context-attachment.show-file-icons'));
101
+ this.element = append(container, $(".chat-attached-context-attachment.show-file-icons"));
89
102
  this.attachClearButton();
90
- this.label = contextResourceLabels.create(this.element, { supportIcons: true, hoverTargetOverride: this.element });
103
+ this.label = contextResourceLabels.create(this.element, {
104
+ supportIcons: true,
105
+ hoverTargetOverride: this.element
106
+ });
91
107
  this._register(this.label);
92
108
  this.element.tabIndex = 0;
93
- this.element.role = 'button';
94
- this._register(addDisposableListener(this.element, EventType.AUXCLICK, (e) => {
109
+ this.element.role = "button";
110
+ this._register(addDisposableListener(this.element, EventType.AUXCLICK, e => {
95
111
  if (e.button === 1 && this.options.supportsDeletion && !this.attachment.range) {
96
112
  e.preventDefault();
97
113
  e.stopPropagation();
@@ -109,27 +125,28 @@ let AbstractChatAttachmentWidget = class AbstractChatAttachmentWidget extends Di
109
125
  const clearButton = ( new Button(this.element, {
110
126
  supportIcons: true,
111
127
  hoverDelegate: createInstantHoverDelegate(),
112
- title: ( localize(4936, "Remove from context"))
128
+ title: ( localize(5066, "Remove from context"))
113
129
  }));
114
130
  clearButton.element.tabIndex = -1;
115
131
  clearButton.icon = Codicon.close;
116
132
  this._register(clearButton);
117
- this._register(Event.once(clearButton.onDidClick)((e) => {
133
+ this._register(Event.once(clearButton.onDidClick)(e => {
118
134
  this._onDidDelete.fire(e);
119
135
  }));
120
- this._register(addStandardDisposableListener(this.element, EventType.KEY_DOWN, e => {
121
- if (e.keyCode === KeyCode.Backspace || e.keyCode === KeyCode.Delete) {
122
- this._onDidDelete.fire(e.browserEvent);
123
- }
124
- }));
136
+ this._register(
137
+ addStandardDisposableListener(this.element, EventType.KEY_DOWN, e => {
138
+ if (e.keyCode === KeyCode.Backspace || e.keyCode === KeyCode.Delete) {
139
+ this._onDidDelete.fire(e.browserEvent);
140
+ }
141
+ })
142
+ );
125
143
  }
126
144
  addResourceOpenHandlers(resource, range) {
127
- this.element.style.cursor = 'pointer';
128
- this._register(registerOpenEditorListeners(this.element, async (options) => {
129
- if (this.attachment.kind === 'directory') {
145
+ this.element.style.cursor = "pointer";
146
+ this._register(registerOpenEditorListeners(this.element, async options => {
147
+ if (this.attachment.kind === "directory") {
130
148
  await this.openResource(resource, options, true);
131
- }
132
- else {
149
+ } else {
133
150
  await this.openResource(resource, options, false, range);
134
151
  }
135
152
  }));
@@ -143,31 +160,54 @@ let AbstractChatAttachmentWidget = class AbstractChatAttachmentWidget extends Di
143
160
  this.terminalService?.openResource(resource);
144
161
  return;
145
162
  }
146
- const openTextEditorOptions = range ? { selection: range } : undefined;
163
+ const openTextEditorOptions = range ? {
164
+ selection: range
165
+ } : undefined;
147
166
  const options = {
148
167
  fromUserGesture: true,
149
168
  openToSide: openOptions.openToSide,
150
169
  editorOptions: {
151
170
  ...openTextEditorOptions,
152
171
  ...openOptions.editorOptions
153
- },
172
+ }
154
173
  };
155
174
  await this.openerService.open(resource, options);
156
175
  this._onDidOpen.fire();
157
176
  this.element.focus();
158
177
  }
159
178
  };
160
- AbstractChatAttachmentWidget = ( __decorate([
161
- ( __param(5, ICommandService)),
162
- ( __param(6, IOpenerService)),
163
- ( __param(7, ITerminalService))
164
- ], AbstractChatAttachmentWidget));
179
+ AbstractChatAttachmentWidget = ( __decorate([( __param(5, ICommandService)), ( __param(6, IOpenerService)), ( __param(7, IConfigurationService)), ( __param(8, ITerminalService))], AbstractChatAttachmentWidget));
165
180
  function modelSupportsVision(currentLanguageModel) {
166
181
  return currentLanguageModel?.metadata.capabilities?.vision ?? false;
167
182
  }
168
183
  let FileAttachmentWidget = class FileAttachmentWidget extends AbstractChatAttachmentWidget {
169
- constructor(resource, range, attachment, correspondingContentReference, currentLanguageModel, options, container, contextResourceLabels, commandService, openerService, themeService, hoverService, languageModelsService, instantiationService) {
170
- super(attachment, options, container, contextResourceLabels, currentLanguageModel, commandService, openerService);
184
+ constructor(
185
+ resource,
186
+ range,
187
+ attachment,
188
+ correspondingContentReference,
189
+ currentLanguageModel,
190
+ options,
191
+ container,
192
+ contextResourceLabels,
193
+ commandService,
194
+ openerService,
195
+ configurationService,
196
+ themeService,
197
+ hoverService,
198
+ languageModelsService,
199
+ instantiationService
200
+ ) {
201
+ super(
202
+ attachment,
203
+ options,
204
+ container,
205
+ contextResourceLabels,
206
+ currentLanguageModel,
207
+ commandService,
208
+ openerService,
209
+ configurationService
210
+ );
171
211
  this.themeService = themeService;
172
212
  this.hoverService = hoverService;
173
213
  this.languageModelsService = languageModelsService;
@@ -176,22 +216,24 @@ let FileAttachmentWidget = class FileAttachmentWidget extends AbstractChatAttach
176
216
  const fileDirname = dirname(resource.path);
177
217
  const friendlyName = `${fileBasename} ${fileDirname}`;
178
218
  let ariaLabel = range ? ( localize(
179
- 4937,
219
+ 5067,
180
220
  "Attached file, {0}, line {1} to line {2}",
181
221
  friendlyName,
182
222
  range.startLineNumber,
183
223
  range.endLineNumber
184
- )) : ( localize(4938, "Attached file, {0}", friendlyName));
224
+ )) : ( localize(5068, "Attached file, {0}", friendlyName));
185
225
  if (attachment.omittedState === OmittedState.Full) {
186
- ariaLabel = ( localize(4939, "Omitted this file: {0}", attachment.name));
226
+ ariaLabel = ( localize(5069, "Omitted this file: {0}", attachment.name));
187
227
  this.renderOmittedWarning(friendlyName, ariaLabel);
188
- }
189
- else {
190
- const fileOptions = { hidePath: true, title: correspondingContentReference?.options?.status?.description };
191
- this.label.setFile(resource, attachment.kind === 'file' ? {
228
+ } else {
229
+ const fileOptions = {
230
+ hidePath: true,
231
+ title: correspondingContentReference?.options?.status?.description
232
+ };
233
+ this.label.setFile(resource, attachment.kind === "file" ? {
192
234
  ...fileOptions,
193
235
  fileKind: FileKind.FILE,
194
- range,
236
+ range
195
237
  } : {
196
238
  ...fileOptions,
197
239
  fileKind: FileKind.FOLDER,
@@ -200,73 +242,96 @@ let FileAttachmentWidget = class FileAttachmentWidget extends AbstractChatAttach
200
242
  }
201
243
  this.element.ariaLabel = ariaLabel;
202
244
  this.instantiationService.invokeFunction(accessor => {
203
- this._register(hookUpResourceAttachmentDragAndContextMenu(accessor, this.element, resource));
245
+ this._register(
246
+ hookUpResourceAttachmentDragAndContextMenu(accessor, this.element, resource)
247
+ );
204
248
  });
205
249
  this.addResourceOpenHandlers(resource, range);
206
250
  }
207
251
  renderOmittedWarning(friendlyName, ariaLabel) {
208
- const pillIcon = $('div.chat-attached-context-pill', {}, $('span.codicon.codicon-warning'));
209
- const textLabel = $('span.chat-attached-context-custom-text', {}, friendlyName);
252
+ const pillIcon = $(
253
+ "div.chat-attached-context-pill",
254
+ {},
255
+ $("span.codicon.codicon-warning")
256
+ );
257
+ const textLabel = $("span.chat-attached-context-custom-text", {}, friendlyName);
210
258
  this.element.appendChild(pillIcon);
211
259
  this.element.appendChild(textLabel);
212
- const hoverElement = $('div.chat-attached-context-hover');
213
- hoverElement.setAttribute('aria-label', ariaLabel);
214
- this.element.classList.add('warning');
260
+ const hoverElement = $("div.chat-attached-context-hover");
261
+ hoverElement.setAttribute("aria-label", ariaLabel);
262
+ this.element.classList.add("warning");
215
263
  hoverElement.textContent = ( localize(
216
- 4940,
264
+ 5070,
217
265
  "{0} does not support this file type.",
218
- this.currentLanguageModel ? this.languageModelsService.lookupLanguageModel(this.currentLanguageModel.identifier)?.name : this.currentLanguageModel ?? 'This model'
266
+ this.currentLanguageModel ? this.languageModelsService.lookupLanguageModel(this.currentLanguageModel.identifier)?.name : this.currentLanguageModel ?? "This model"
219
267
  ));
220
268
  this._register(this.hoverService.setupDelayedHover(this.element, {
221
269
  ...commonHoverOptions,
222
- content: hoverElement,
270
+ content: hoverElement
223
271
  }, commonHoverLifecycleOptions));
224
272
  }
225
273
  };
226
- FileAttachmentWidget = ( __decorate([
227
- ( __param(8, ICommandService)),
228
- ( __param(9, IOpenerService)),
229
- ( __param(10, IThemeService)),
230
- ( __param(11, IHoverService)),
231
- ( __param(12, ILanguageModelsService)),
232
- ( __param(13, IInstantiationService))
233
- ], FileAttachmentWidget));
274
+ FileAttachmentWidget = ( __decorate([( __param(8, ICommandService)), ( __param(9, IOpenerService)), ( __param(10, IConfigurationService)), ( __param(11, IThemeService)), ( __param(12, IHoverService)), ( __param(13, ILanguageModelsService)), ( __param(14, IInstantiationService))], FileAttachmentWidget));
234
275
  let TerminalCommandAttachmentWidget = class TerminalCommandAttachmentWidget extends AbstractChatAttachmentWidget {
235
- constructor(attachment, currentLanguageModel, options, container, contextResourceLabels, commandService, openerService, hoverService, terminalService) {
236
- super(attachment, options, container, contextResourceLabels, currentLanguageModel, commandService, openerService, terminalService);
276
+ constructor(
277
+ attachment,
278
+ currentLanguageModel,
279
+ options,
280
+ container,
281
+ contextResourceLabels,
282
+ commandService,
283
+ openerService,
284
+ configurationService,
285
+ hoverService,
286
+ terminalService
287
+ ) {
288
+ super(
289
+ attachment,
290
+ options,
291
+ container,
292
+ contextResourceLabels,
293
+ currentLanguageModel,
294
+ commandService,
295
+ openerService,
296
+ configurationService,
297
+ terminalService
298
+ );
237
299
  this.hoverService = hoverService;
238
300
  this.terminalService = terminalService;
239
- const ariaLabel = ( localize(4941, "Terminal command, {0}", attachment.command));
240
- const clickHandler = () => this.openResource(attachment.resource, { editorOptions: { preserveFocus: true } }, false, undefined);
241
- this._register(createTerminalCommandElements(this.element, attachment, ariaLabel, this.hoverService, clickHandler));
242
- this._register(addDisposableListener(this.element, EventType.KEY_DOWN, async (e) => {
243
- const event = ( new StandardKeyboardEvent(e));
244
- if (event.equals(KeyCode.Enter) || event.equals(KeyCode.Space)) {
245
- EventHelper.stop(e, true);
246
- await clickHandler();
301
+ const ariaLabel = ( localize(5071, "Terminal command, {0}", attachment.command));
302
+ const clickHandler = () => this.openResource(attachment.resource, {
303
+ editorOptions: {
304
+ preserveFocus: true
247
305
  }
248
- }));
306
+ }, false, undefined);
307
+ this._register(
308
+ createTerminalCommandElements(this.element, attachment, ariaLabel, this.hoverService, clickHandler)
309
+ );
310
+ this._register(
311
+ addDisposableListener(this.element, EventType.KEY_DOWN, async e => {
312
+ const event = ( new StandardKeyboardEvent(e));
313
+ if (event.equals(KeyCode.Enter) || event.equals(KeyCode.Space)) {
314
+ EventHelper.stop(e, true);
315
+ await clickHandler();
316
+ }
317
+ })
318
+ );
249
319
  }
250
320
  };
251
- TerminalCommandAttachmentWidget = ( __decorate([
252
- ( __param(5, ICommandService)),
253
- ( __param(6, IOpenerService)),
254
- ( __param(7, IHoverService)),
255
- ( __param(8, ITerminalService))
256
- ], TerminalCommandAttachmentWidget));
321
+ TerminalCommandAttachmentWidget = ( __decorate([( __param(5, ICommandService)), ( __param(6, IOpenerService)), ( __param(7, IConfigurationService)), ( __param(8, IHoverService)), ( __param(9, ITerminalService))], TerminalCommandAttachmentWidget));
257
322
  var TerminalConstants;
258
- (function (TerminalConstants) {
323
+ (function(TerminalConstants) {
259
324
  TerminalConstants[TerminalConstants["MaxAttachmentOutputLineCount"] = 5] = "MaxAttachmentOutputLineCount";
260
325
  TerminalConstants[TerminalConstants["MaxAttachmentOutputLineLength"] = 80] = "MaxAttachmentOutputLineLength";
261
326
  })(TerminalConstants || (TerminalConstants = {}));
262
327
  function createTerminalCommandElements(element, attachment, ariaLabel, hoverService, clickHandler) {
263
328
  const disposable = ( new DisposableStore());
264
329
  element.ariaLabel = ariaLabel;
265
- element.style.cursor = 'pointer';
266
- const terminalIconSpan = $('span');
330
+ element.style.cursor = "pointer";
331
+ const terminalIconSpan = $("span");
267
332
  terminalIconSpan.classList.add(...ThemeIcon.asClassNameArray(Codicon.terminal));
268
- const pillIcon = $('div.chat-attached-context-pill', {}, terminalIconSpan);
269
- const textLabel = $('span.chat-attached-context-custom-text', {}, attachment.command);
333
+ const pillIcon = $("div.chat-attached-context-pill", {}, terminalIconSpan);
334
+ const textLabel = $("span.chat-attached-context-custom-text", {}, attachment.command);
270
335
  element.appendChild(pillIcon);
271
336
  element.appendChild(textLabel);
272
337
  disposable.add(addDisposableListener(element, EventType.CLICK, e => {
@@ -274,33 +339,35 @@ function createTerminalCommandElements(element, attachment, ariaLabel, hoverServ
274
339
  e.stopPropagation();
275
340
  clickHandler();
276
341
  }));
277
- disposable.add(hoverService.setupDelayedHover(element, () => getHoverContent(ariaLabel, attachment), commonHoverLifecycleOptions));
342
+ disposable.add(hoverService.setupDelayedHover(
343
+ element,
344
+ () => getHoverContent(ariaLabel, attachment),
345
+ commonHoverLifecycleOptions
346
+ ));
278
347
  return disposable;
279
348
  }
280
349
  function getHoverContent(ariaLabel, attachment) {
281
350
  {
282
- const hoverElement = $('div.chat-attached-context-hover');
283
- hoverElement.setAttribute('aria-label', ariaLabel);
284
- const commandTitle = $('div', {}, typeof attachment.exitCode === 'number'
285
- ? ( localize(
286
- 4942,
351
+ const hoverElement = $("div.chat-attached-context-hover");
352
+ hoverElement.setAttribute("aria-label", ariaLabel);
353
+ const commandTitle = $("div", {}, typeof attachment.exitCode === "number" ? ( localize(
354
+ 5072,
287
355
  "Command: {0}, exit code: {1}",
288
356
  attachment.command,
289
357
  attachment.exitCode
290
- ))
291
- : ( localize(4943, "Command")));
292
- commandTitle.classList.add('attachment-additional-info');
293
- const commandBlock = $('pre.chat-terminal-command-block');
358
+ )) : ( localize(5073, "Command")));
359
+ commandTitle.classList.add("attachment-additional-info");
360
+ const commandBlock = $("pre.chat-terminal-command-block");
294
361
  hoverElement.append(commandTitle, commandBlock);
295
362
  if (attachment.output && attachment.output.trim().length > 0) {
296
- const outputTitle = $('div', {}, ( localize(4944, "Output:")));
297
- outputTitle.classList.add('attachment-additional-info');
298
- const outputBlock = $('pre.chat-terminal-command-output');
299
- const fullOutputLines = attachment.output.split('\n');
363
+ const outputTitle = $("div", {}, ( localize(5074, "Output:")));
364
+ outputTitle.classList.add("attachment-additional-info");
365
+ const outputBlock = $("pre.chat-terminal-command-output");
366
+ const fullOutputLines = attachment.output.split("\n");
300
367
  const hoverOutputLines = [];
301
368
  for (const line of fullOutputLines) {
302
369
  if (hoverOutputLines.length >= TerminalConstants.MaxAttachmentOutputLineCount) {
303
- hoverOutputLines.push('...');
370
+ hoverOutputLines.push("...");
304
371
  break;
305
372
  }
306
373
  const trimmed = line.trim();
@@ -309,119 +376,181 @@ function getHoverContent(ariaLabel, attachment) {
309
376
  }
310
377
  if (trimmed.length > TerminalConstants.MaxAttachmentOutputLineLength) {
311
378
  hoverOutputLines.push(`${trimmed.slice(0, TerminalConstants.MaxAttachmentOutputLineLength)}...`);
312
- }
313
- else {
379
+ } else {
314
380
  hoverOutputLines.push(trimmed);
315
381
  }
316
382
  }
317
- outputBlock.textContent = hoverOutputLines.join('\n');
383
+ outputBlock.textContent = hoverOutputLines.join("\n");
318
384
  hoverElement.append(outputTitle, outputBlock);
319
385
  }
320
386
  return {
321
387
  ...commonHoverOptions,
322
- content: hoverElement,
388
+ content: hoverElement
323
389
  };
324
390
  }
325
391
  }
326
392
  let ImageAttachmentWidget = class ImageAttachmentWidget extends AbstractChatAttachmentWidget {
327
- constructor(resource, attachment, currentLanguageModel, options, container, contextResourceLabels, commandService, openerService, hoverService, languageModelsService, instantiationService, labelService) {
328
- super(attachment, options, container, contextResourceLabels, currentLanguageModel, commandService, openerService);
393
+ constructor(
394
+ resource,
395
+ attachment,
396
+ currentLanguageModel,
397
+ options,
398
+ container,
399
+ contextResourceLabels,
400
+ commandService,
401
+ openerService,
402
+ configurationService,
403
+ hoverService,
404
+ languageModelsService,
405
+ instantiationService,
406
+ labelService
407
+ ) {
408
+ super(
409
+ attachment,
410
+ options,
411
+ container,
412
+ contextResourceLabels,
413
+ currentLanguageModel,
414
+ commandService,
415
+ openerService,
416
+ configurationService
417
+ );
329
418
  this.hoverService = hoverService;
330
419
  this.languageModelsService = languageModelsService;
331
420
  this.labelService = labelService;
332
421
  let ariaLabel;
333
422
  if (attachment.omittedState === OmittedState.Full) {
334
- ariaLabel = ( localize(4945, "Omitted this image: {0}", attachment.name));
335
- }
336
- else if (attachment.omittedState === OmittedState.Partial) {
337
- ariaLabel = ( localize(4946, "Partially omitted this image: {0}", attachment.name));
338
- }
339
- else {
340
- ariaLabel = ( localize(4947, "Attached image, {0}", attachment.name));
423
+ ariaLabel = ( localize(5075, "Omitted this image: {0}", attachment.name));
424
+ } else if (attachment.omittedState === OmittedState.Partial) {
425
+ ariaLabel = ( localize(5076, "Partially omitted this image: {0}", attachment.name));
426
+ } else {
427
+ ariaLabel = ( localize(5077, "Attached image, {0}", attachment.name));
341
428
  }
342
429
  const ref = attachment.references?.[0]?.reference;
343
430
  resource = ref && URI.isUri(ref) ? ref : undefined;
344
431
  const clickHandler = async () => {
345
432
  if (resource) {
346
- await this.openResource(resource, { editorOptions: { preserveFocus: true } }, false, undefined);
433
+ await this.openResource(resource, {
434
+ editorOptions: {
435
+ preserveFocus: true
436
+ }
437
+ }, false, undefined);
347
438
  }
348
439
  };
349
- const currentLanguageModelName = this.currentLanguageModel ? this.languageModelsService.lookupLanguageModel(this.currentLanguageModel.identifier)?.name ?? this.currentLanguageModel.identifier : 'Current model';
440
+ const currentLanguageModelName = this.currentLanguageModel ? this.languageModelsService.lookupLanguageModel(this.currentLanguageModel.identifier)?.name ?? this.currentLanguageModel.identifier : "Current model";
350
441
  const fullName = resource ? this.labelService.getUriLabel(resource) : (attachment.fullName || attachment.name);
351
- this._register(createImageElements(resource, attachment.name, fullName, this.element, attachment.value, this.hoverService, ariaLabel, currentLanguageModelName, clickHandler, this.currentLanguageModel, attachment.omittedState));
442
+ this._register(createImageElements(
443
+ resource,
444
+ attachment.name,
445
+ fullName,
446
+ this.element,
447
+ attachment.value,
448
+ this.hoverService,
449
+ ariaLabel,
450
+ currentLanguageModelName,
451
+ clickHandler,
452
+ this.currentLanguageModel,
453
+ attachment.omittedState
454
+ ));
352
455
  if (resource) {
353
456
  this.addResourceOpenHandlers(resource, undefined);
354
457
  instantiationService.invokeFunction(accessor => {
355
- this._register(hookUpResourceAttachmentDragAndContextMenu(accessor, this.element, resource));
458
+ this._register(
459
+ hookUpResourceAttachmentDragAndContextMenu(accessor, this.element, resource)
460
+ );
356
461
  });
357
462
  }
358
463
  }
359
464
  };
360
- ImageAttachmentWidget = ( __decorate([
361
- ( __param(6, ICommandService)),
362
- ( __param(7, IOpenerService)),
363
- ( __param(8, IHoverService)),
364
- ( __param(9, ILanguageModelsService)),
365
- ( __param(10, IInstantiationService)),
366
- ( __param(11, ILabelService))
367
- ], ImageAttachmentWidget));
368
- function createImageElements(resource, name, fullName, element, buffer, hoverService, ariaLabel, currentLanguageModelName, clickHandler, currentLanguageModel, omittedState) {
465
+ ImageAttachmentWidget = ( __decorate([( __param(6, ICommandService)), ( __param(7, IOpenerService)), ( __param(8, IConfigurationService)), ( __param(9, IHoverService)), ( __param(10, ILanguageModelsService)), ( __param(11, IInstantiationService)), ( __param(12, ILabelService))], ImageAttachmentWidget));
466
+ function createImageElements(
467
+ resource,
468
+ name,
469
+ fullName,
470
+ element,
471
+ buffer,
472
+ hoverService,
473
+ ariaLabel,
474
+ currentLanguageModelName,
475
+ clickHandler,
476
+ currentLanguageModel,
477
+ omittedState
478
+ ) {
369
479
  const disposable = ( new DisposableStore());
370
480
  if (omittedState === OmittedState.Partial) {
371
- element.classList.add('partial-warning');
481
+ element.classList.add("partial-warning");
372
482
  }
373
483
  element.ariaLabel = ariaLabel;
374
- element.style.position = 'relative';
484
+ element.style.position = "relative";
375
485
  if (resource) {
376
- element.style.cursor = 'pointer';
377
- disposable.add(addDisposableListener(element, 'click', clickHandler));
486
+ element.style.cursor = "pointer";
487
+ disposable.add(addDisposableListener(element, "click", clickHandler));
378
488
  }
379
489
  const supportsVision = modelSupportsVision(currentLanguageModel);
380
- const pillIcon = $('div.chat-attached-context-pill', {}, $(supportsVision ? 'span.codicon.codicon-file-media' : 'span.codicon.codicon-warning'));
381
- const textLabel = $('span.chat-attached-context-custom-text', {}, name);
490
+ const pillIcon = $("div.chat-attached-context-pill", {}, $(
491
+ supportsVision ? "span.codicon.codicon-file-media" : "span.codicon.codicon-warning"
492
+ ));
493
+ const textLabel = $("span.chat-attached-context-custom-text", {}, name);
382
494
  element.appendChild(pillIcon);
383
495
  element.appendChild(textLabel);
384
- const hoverElement = $('div.chat-attached-context-hover');
385
- hoverElement.setAttribute('aria-label', ariaLabel);
496
+ const hoverElement = $("div.chat-attached-context-hover");
497
+ hoverElement.setAttribute("aria-label", ariaLabel);
386
498
  if ((!supportsVision && currentLanguageModel) || omittedState === OmittedState.Full) {
387
- element.classList.add('warning');
499
+ element.classList.add("warning");
388
500
  hoverElement.textContent = ( localize(
389
- 4948,
501
+ 5078,
390
502
  "{0} does not support images.",
391
- currentLanguageModelName ?? 'This model'
503
+ currentLanguageModelName ?? "This model"
392
504
  ));
393
505
  disposable.add(hoverService.setupDelayedHover(element, {
394
506
  content: hoverElement,
395
- style: HoverStyle.Pointer,
507
+ style: HoverStyle.Pointer
396
508
  }));
397
- }
398
- else {
509
+ } else {
399
510
  disposable.add(hoverService.setupDelayedHover(element, {
400
511
  content: hoverElement,
401
- style: HoverStyle.Pointer,
512
+ style: HoverStyle.Pointer
513
+ }));
514
+ const blob = ( new Blob([buffer], {
515
+ type: "image/png"
402
516
  }));
403
- const blob = ( new Blob([buffer], { type: 'image/png' }));
404
517
  const url = URL.createObjectURL(blob);
405
- const pillImg = $('img.chat-attached-context-pill-image', { src: url, alt: '' });
406
- const pill = $('div.chat-attached-context-pill', {}, pillImg);
407
- const existingPill = element.querySelector('.chat-attached-context-pill');
518
+ const pillImg = $("img.chat-attached-context-pill-image", {
519
+ src: url,
520
+ alt: ""
521
+ });
522
+ const pill = $("div.chat-attached-context-pill", {}, pillImg);
523
+ const existingPill = element.querySelector(".chat-attached-context-pill");
408
524
  if (existingPill) {
409
525
  existingPill.replaceWith(pill);
410
526
  }
411
- const hoverImage = $('img.chat-attached-context-image', { src: url, alt: '' });
412
- const imageContainer = $('div.chat-attached-context-image-container', {}, hoverImage);
527
+ const hoverImage = $("img.chat-attached-context-image", {
528
+ src: url,
529
+ alt: ""
530
+ });
531
+ const imageContainer = $("div.chat-attached-context-image-container", {}, hoverImage);
413
532
  hoverElement.appendChild(imageContainer);
414
533
  if (resource) {
415
- const urlContainer = $('a.chat-attached-context-url', {}, omittedState === OmittedState.Partial ? ( localize(4949, "This GIF was partially omitted - current frame will be sent.")) : fullName);
416
- const separator = $('div.chat-attached-context-url-separator');
417
- disposable.add(addDisposableListener(urlContainer, 'click', () => clickHandler()));
534
+ const urlContainer = $(
535
+ "a.chat-attached-context-url",
536
+ {},
537
+ omittedState === OmittedState.Partial ? ( localize(5079, "This GIF was partially omitted - current frame will be sent.")) : fullName
538
+ );
539
+ const separator = $("div.chat-attached-context-url-separator");
540
+ disposable.add(addDisposableListener(urlContainer, "click", () => clickHandler()));
418
541
  hoverElement.append(separator, urlContainer);
419
542
  }
420
- hoverImage.onload = () => { URL.revokeObjectURL(url); };
543
+ hoverImage.onload = () => {
544
+ URL.revokeObjectURL(url);
545
+ };
421
546
  hoverImage.onerror = () => {
422
- const pillIcon = $('div.chat-attached-context-pill', {}, $('span.codicon.codicon-file-media'));
423
- const pill = $('div.chat-attached-context-pill', {}, pillIcon);
424
- const existingPill = element.querySelector('.chat-attached-context-pill');
547
+ const pillIcon = $(
548
+ "div.chat-attached-context-pill",
549
+ {},
550
+ $("span.codicon.codicon-file-media")
551
+ );
552
+ const pill = $("div.chat-attached-context-pill", {}, pillIcon);
553
+ const existingPill = element.querySelector(".chat-attached-context-pill");
425
554
  if (existingPill) {
426
555
  existingPill.replaceWith(pill);
427
556
  }
@@ -430,92 +559,188 @@ function createImageElements(resource, name, fullName, element, buffer, hoverSer
430
559
  return disposable;
431
560
  }
432
561
  let PasteAttachmentWidget = class PasteAttachmentWidget extends AbstractChatAttachmentWidget {
433
- constructor(attachment, currentLanguageModel, options, container, contextResourceLabels, commandService, openerService, hoverService, instantiationService) {
434
- super(attachment, options, container, contextResourceLabels, currentLanguageModel, commandService, openerService);
562
+ constructor(
563
+ attachment,
564
+ currentLanguageModel,
565
+ options,
566
+ container,
567
+ contextResourceLabels,
568
+ commandService,
569
+ openerService,
570
+ configurationService,
571
+ hoverService,
572
+ instantiationService
573
+ ) {
574
+ super(
575
+ attachment,
576
+ options,
577
+ container,
578
+ contextResourceLabels,
579
+ currentLanguageModel,
580
+ commandService,
581
+ openerService,
582
+ configurationService
583
+ );
435
584
  this.hoverService = hoverService;
436
585
  this.instantiationService = instantiationService;
437
- const ariaLabel = ( localize(4950, "Attached context, {0}", attachment.name));
586
+ const ariaLabel = ( localize(5080, "Attached context, {0}", attachment.name));
438
587
  this.element.ariaLabel = ariaLabel;
439
- const classNames = ['file-icon', `${attachment.language}-lang-file-icon`];
588
+ const classNames = ["file-icon", `${attachment.language}-lang-file-icon`];
440
589
  let resource;
441
590
  let range;
442
591
  if (attachment.copiedFrom) {
443
592
  resource = attachment.copiedFrom.uri;
444
593
  range = attachment.copiedFrom.range;
445
594
  const filename = basename(resource.path);
446
- this.label.setLabel(filename, undefined, { extraClasses: classNames });
447
- }
448
- else {
449
- this.label.setLabel(attachment.fileName, undefined, { extraClasses: classNames });
595
+ this.label.setLabel(filename, undefined, {
596
+ extraClasses: classNames
597
+ });
598
+ } else {
599
+ this.label.setLabel(attachment.fileName, undefined, {
600
+ extraClasses: classNames
601
+ });
450
602
  }
451
- this.element.appendChild($('span.attachment-additional-info', {}, `Pasted ${attachment.pastedLines}`));
452
- this.element.style.position = 'relative';
603
+ this.element.appendChild(
604
+ $("span.attachment-additional-info", {}, `Pasted ${attachment.pastedLines}`)
605
+ );
606
+ this.element.style.position = "relative";
453
607
  const sourceUri = attachment.copiedFrom?.uri;
454
608
  const hoverContent = ( new MarkdownString(
455
- `${sourceUri ? this.instantiationService.invokeFunction(accessor => accessor.get(ILabelService).getUriLabel(sourceUri, { relative: true })) : attachment.fileName}\n\n---\n\n\`\`\`${attachment.language}\n\n${attachment.code}\n\`\`\``
609
+ `${sourceUri ? this.instantiationService.invokeFunction(accessor => accessor.get(ILabelService).getUriLabel(sourceUri, {
610
+ relative: true
611
+ })) : attachment.fileName}\n\n---\n\n\`\`\`${attachment.language}\n\n${attachment.code}\n\`\`\``
456
612
  ));
457
613
  this._register(this.hoverService.setupDelayedHover(this.element, {
458
614
  ...commonHoverOptions,
459
- content: hoverContent,
615
+ content: hoverContent
460
616
  }, commonHoverLifecycleOptions));
461
617
  const copiedFromResource = attachment.copiedFrom?.uri;
462
618
  if (copiedFromResource) {
463
- this._register(this.instantiationService.invokeFunction(hookUpResourceAttachmentDragAndContextMenu, this.element, copiedFromResource));
619
+ this._register(this.instantiationService.invokeFunction(
620
+ hookUpResourceAttachmentDragAndContextMenu,
621
+ this.element,
622
+ copiedFromResource
623
+ ));
464
624
  this.addResourceOpenHandlers(copiedFromResource, range);
465
625
  }
466
626
  }
467
627
  };
468
- PasteAttachmentWidget = ( __decorate([
469
- ( __param(5, ICommandService)),
470
- ( __param(6, IOpenerService)),
471
- ( __param(7, IHoverService)),
472
- ( __param(8, IInstantiationService))
473
- ], PasteAttachmentWidget));
628
+ PasteAttachmentWidget = ( __decorate([( __param(5, ICommandService)), ( __param(6, IOpenerService)), ( __param(7, IConfigurationService)), ( __param(8, IHoverService)), ( __param(9, IInstantiationService))], PasteAttachmentWidget));
474
629
  let DefaultChatAttachmentWidget = class DefaultChatAttachmentWidget extends AbstractChatAttachmentWidget {
475
- constructor(resource, range, attachment, correspondingContentReference, currentLanguageModel, options, container, contextResourceLabels, commandService, openerService, contextKeyService, instantiationService) {
476
- super(attachment, options, container, contextResourceLabels, currentLanguageModel, commandService, openerService);
630
+ constructor(
631
+ resource,
632
+ range,
633
+ attachment,
634
+ correspondingContentReference,
635
+ currentLanguageModel,
636
+ options,
637
+ container,
638
+ contextResourceLabels,
639
+ commandService,
640
+ openerService,
641
+ configurationService,
642
+ contextKeyService,
643
+ instantiationService,
644
+ hoverService
645
+ ) {
646
+ super(
647
+ attachment,
648
+ options,
649
+ container,
650
+ contextResourceLabels,
651
+ currentLanguageModel,
652
+ commandService,
653
+ openerService,
654
+ configurationService
655
+ );
477
656
  this.contextKeyService = contextKeyService;
478
657
  this.instantiationService = instantiationService;
658
+ this.hoverService = hoverService;
659
+ this._tooltipHover = this._register(( new MutableDisposable()));
479
660
  const attachmentLabel = attachment.fullName ?? attachment.name;
480
661
  const withIcon = attachment.icon?.id ? `$(${attachment.icon.id})\u00A0${attachmentLabel}` : attachmentLabel;
481
662
  this.label.setLabel(withIcon, correspondingContentReference?.options?.status?.description);
482
- this.element.ariaLabel = ( localize(4950, "Attached context, {0}", attachment.name));
483
- if (attachment.kind === 'diagnostic') {
663
+ this.element.ariaLabel = ( localize(5080, "Attached context, {0}", attachment.name));
664
+ if (attachment.kind === "diagnostic") {
484
665
  if (attachment.filterUri) {
485
666
  resource = attachment.filterUri ? URI.revive(attachment.filterUri) : undefined;
486
667
  range = attachment.filterRange;
487
- }
488
- else {
489
- this.element.style.cursor = 'pointer';
668
+ } else {
669
+ this.element.style.cursor = "pointer";
490
670
  this._register(addDisposableListener(this.element, EventType.CLICK, () => {
491
- this.commandService.executeCommand('workbench.panel.markers.view.focus');
671
+ this.commandService.executeCommand("workbench.panel.markers.view.focus");
492
672
  }));
493
673
  }
494
674
  }
495
- if (attachment.kind === 'symbol') {
675
+ if (attachment.kind === "symbol") {
496
676
  const scopedContextKeyService = this._register(this.contextKeyService.createScoped(this.element));
497
- this._register(this.instantiationService.invokeFunction(hookUpSymbolAttachmentDragAndContextMenu, this.element, scopedContextKeyService, { ...attachment, kind: attachment.symbolKind }, MenuId.ChatInputSymbolAttachmentContext));
677
+ this._register(this.instantiationService.invokeFunction(
678
+ hookUpSymbolAttachmentDragAndContextMenu,
679
+ this.element,
680
+ scopedContextKeyService,
681
+ {
682
+ ...attachment,
683
+ kind: attachment.symbolKind
684
+ },
685
+ MenuId.ChatInputSymbolAttachmentContext
686
+ ));
687
+ }
688
+ if (isStringVariableEntry(attachment) && attachment.commandId) {
689
+ this.element.style.cursor = "pointer";
690
+ const contextItemHandle = attachment.handle;
691
+ this._register(addDisposableListener(this.element, EventType.CLICK, async () => {
692
+ const chatContextService = this.instantiationService.invokeFunction(accessor => accessor.get(IChatContextService));
693
+ await chatContextService.executeChatContextItemCommand(contextItemHandle);
694
+ }));
695
+ }
696
+ if ((isStringVariableEntry(attachment) || attachment.kind === "generic") && attachment.tooltip) {
697
+ this._setupTooltipHover(attachment.tooltip);
498
698
  }
499
699
  if (resource) {
500
700
  this.addResourceOpenHandlers(resource, range);
501
701
  }
502
702
  }
703
+ _setupTooltipHover(tooltip) {
704
+ this._tooltipHover.value = this.hoverService.setupDelayedHover(this.element, {
705
+ content: tooltip,
706
+ appearance: {
707
+ showPointer: true
708
+ }
709
+ });
710
+ }
503
711
  };
504
- DefaultChatAttachmentWidget = ( __decorate([
505
- ( __param(8, ICommandService)),
506
- ( __param(9, IOpenerService)),
507
- ( __param(10, IContextKeyService)),
508
- ( __param(11, IInstantiationService))
509
- ], DefaultChatAttachmentWidget));
712
+ DefaultChatAttachmentWidget = ( __decorate([( __param(8, ICommandService)), ( __param(9, IOpenerService)), ( __param(10, IConfigurationService)), ( __param(11, IContextKeyService)), ( __param(12, IInstantiationService)), ( __param(13, IHoverService))], DefaultChatAttachmentWidget));
510
713
  let PromptFileAttachmentWidget = class PromptFileAttachmentWidget extends AbstractChatAttachmentWidget {
511
- constructor(attachment, currentLanguageModel, options, container, contextResourceLabels, commandService, openerService, labelService, instantiationService) {
512
- super(attachment, options, container, contextResourceLabels, currentLanguageModel, commandService, openerService);
714
+ constructor(
715
+ attachment,
716
+ currentLanguageModel,
717
+ options,
718
+ container,
719
+ contextResourceLabels,
720
+ commandService,
721
+ openerService,
722
+ configurationService,
723
+ labelService,
724
+ instantiationService
725
+ ) {
726
+ super(
727
+ attachment,
728
+ options,
729
+ container,
730
+ contextResourceLabels,
731
+ currentLanguageModel,
732
+ commandService,
733
+ openerService,
734
+ configurationService
735
+ );
513
736
  this.labelService = labelService;
514
737
  this.instantiationService = instantiationService;
515
- this.hintElement = append(this.element, $('span.prompt-type'));
738
+ this.hintElement = append(this.element, $("span.prompt-type"));
516
739
  this.updateLabel(attachment);
517
740
  this.instantiationService.invokeFunction(accessor => {
518
- this._register(hookUpResourceAttachmentDragAndContextMenu(accessor, this.element, attachment.value));
741
+ this._register(
742
+ hookUpResourceAttachmentDragAndContextMenu(accessor, this.element, attachment.value)
743
+ );
519
744
  });
520
745
  this.addResourceOpenHandlers(attachment.value, undefined);
521
746
  }
@@ -525,14 +750,10 @@ let PromptFileAttachmentWidget = class PromptFileAttachmentWidget extends Abstra
525
750
  const fileDirname = dirname(resource.path);
526
751
  const friendlyName = `${fileBasename} ${fileDirname}`;
527
752
  const isPrompt = attachment.id.startsWith(PromptFileVariableKind.PromptFile);
528
- const ariaLabel = isPrompt
529
- ? ( localize(4951, "Prompt file, {0}", friendlyName))
530
- : ( localize(4952, "Instructions attachment, {0}", friendlyName));
531
- const typeLabel = isPrompt
532
- ? ( localize(4953, "Prompt"))
533
- : ( localize(4954, "Instructions"));
534
- const title = this.labelService.getUriLabel(resource) + (attachment.originLabel ? `\n${attachment.originLabel}` : '');
535
- this.element.classList.remove('warning', 'error');
753
+ const ariaLabel = isPrompt ? ( localize(5081, "Prompt file, {0}", friendlyName)) : ( localize(5082, "Instructions attachment, {0}", friendlyName));
754
+ const typeLabel = isPrompt ? ( localize(5083, "Prompt")) : ( localize(5084, "Instructions"));
755
+ const title = this.labelService.getUriLabel(resource) + (attachment.originLabel ? `\n${attachment.originLabel}` : "");
756
+ this.element.classList.remove("warning", "error");
536
757
  const fileWithoutExtension = getCleanPromptName(resource);
537
758
  this.label.setFile(URI.file(fileWithoutExtension), {
538
759
  fileKind: FileKind.FILE,
@@ -540,76 +761,115 @@ let PromptFileAttachmentWidget = class PromptFileAttachmentWidget extends Abstra
540
761
  range: undefined,
541
762
  title,
542
763
  icon: ThemeIcon.fromId(Codicon.bookmark.id),
543
- extraClasses: [],
764
+ extraClasses: []
544
765
  });
545
766
  this.hintElement.innerText = typeLabel;
546
767
  this.element.ariaLabel = ariaLabel;
547
768
  }
548
769
  };
549
- PromptFileAttachmentWidget = ( __decorate([
550
- ( __param(5, ICommandService)),
551
- ( __param(6, IOpenerService)),
552
- ( __param(7, ILabelService)),
553
- ( __param(8, IInstantiationService))
554
- ], PromptFileAttachmentWidget));
770
+ PromptFileAttachmentWidget = ( __decorate([( __param(5, ICommandService)), ( __param(6, IOpenerService)), ( __param(7, IConfigurationService)), ( __param(8, ILabelService)), ( __param(9, IInstantiationService))], PromptFileAttachmentWidget));
555
771
  let PromptTextAttachmentWidget = class PromptTextAttachmentWidget extends AbstractChatAttachmentWidget {
556
- constructor(attachment, currentLanguageModel, options, container, contextResourceLabels, commandService, openerService, preferencesService, hoverService) {
557
- super(attachment, options, container, contextResourceLabels, currentLanguageModel, commandService, openerService);
772
+ constructor(
773
+ attachment,
774
+ currentLanguageModel,
775
+ options,
776
+ container,
777
+ contextResourceLabels,
778
+ commandService,
779
+ openerService,
780
+ configurationService,
781
+ preferencesService,
782
+ hoverService
783
+ ) {
784
+ super(
785
+ attachment,
786
+ options,
787
+ container,
788
+ contextResourceLabels,
789
+ currentLanguageModel,
790
+ commandService,
791
+ openerService,
792
+ configurationService
793
+ );
558
794
  if (attachment.settingId) {
559
- const openSettings = () => preferencesService.openSettings({ jsonEditor: false, query: `@id:${attachment.settingId}` });
560
- this.element.style.cursor = 'pointer';
561
- this._register(addDisposableListener(this.element, EventType.CLICK, async (e) => {
795
+ const openSettings = () => preferencesService.openSettings({
796
+ jsonEditor: false,
797
+ query: `@id:${attachment.settingId}`
798
+ });
799
+ this.element.style.cursor = "pointer";
800
+ this._register(addDisposableListener(this.element, EventType.CLICK, async e => {
562
801
  EventHelper.stop(e, true);
563
802
  openSettings();
564
803
  }));
565
- this._register(addDisposableListener(this.element, EventType.KEY_DOWN, async (e) => {
566
- const event = ( new StandardKeyboardEvent(e));
567
- if (event.equals(KeyCode.Enter) || event.equals(KeyCode.Space)) {
568
- EventHelper.stop(e, true);
569
- openSettings();
570
- }
571
- }));
804
+ this._register(
805
+ addDisposableListener(this.element, EventType.KEY_DOWN, async e => {
806
+ const event = ( new StandardKeyboardEvent(e));
807
+ if (event.equals(KeyCode.Enter) || event.equals(KeyCode.Space)) {
808
+ EventHelper.stop(e, true);
809
+ openSettings();
810
+ }
811
+ })
812
+ );
572
813
  }
573
- this.label.setLabel(( localize(4955, 'Additional Instructions')), undefined, undefined);
814
+ this.label.setLabel(( localize(5085, "Additional Instructions")), undefined, undefined);
574
815
  this._register(hoverService.setupDelayedHover(this.element, {
575
816
  ...commonHoverOptions,
576
- content: attachment.value,
817
+ content: attachment.value
577
818
  }, commonHoverLifecycleOptions));
578
819
  }
579
820
  };
580
- PromptTextAttachmentWidget = ( __decorate([
581
- ( __param(5, ICommandService)),
582
- ( __param(6, IOpenerService)),
583
- ( __param(7, IPreferencesService)),
584
- ( __param(8, IHoverService))
585
- ], PromptTextAttachmentWidget));
821
+ PromptTextAttachmentWidget = ( __decorate([( __param(5, ICommandService)), ( __param(6, IOpenerService)), ( __param(7, IConfigurationService)), ( __param(8, IPreferencesService)), ( __param(9, IHoverService))], PromptTextAttachmentWidget));
586
822
  let ToolSetOrToolItemAttachmentWidget = class ToolSetOrToolItemAttachmentWidget extends AbstractChatAttachmentWidget {
587
- constructor(attachment, currentLanguageModel, options, container, contextResourceLabels, toolsService, commandService, openerService, hoverService) {
588
- super(attachment, options, container, contextResourceLabels, currentLanguageModel, commandService, openerService);
589
- const toolOrToolSet = Iterable.find(toolsService.getTools(), tool => tool.id === attachment.id) ?? Iterable.find(toolsService.toolSets.get(), toolSet => toolSet.id === attachment.id);
823
+ constructor(
824
+ attachment,
825
+ currentLanguageModel,
826
+ options,
827
+ container,
828
+ contextResourceLabels,
829
+ toolsService,
830
+ commandService,
831
+ openerService,
832
+ configurationService,
833
+ hoverService
834
+ ) {
835
+ super(
836
+ attachment,
837
+ options,
838
+ container,
839
+ contextResourceLabels,
840
+ currentLanguageModel,
841
+ commandService,
842
+ openerService,
843
+ configurationService
844
+ );
845
+ const toolOrToolSet = Iterable.find(
846
+ toolsService.getTools(currentLanguageModel?.metadata),
847
+ tool => tool.id === attachment.id
848
+ ) ?? Iterable.find(
849
+ toolsService.getToolSetsForModel(currentLanguageModel?.metadata),
850
+ toolSet => toolSet.id === attachment.id
851
+ );
590
852
  let name = attachment.name;
591
853
  const icon = attachment.icon ?? Codicon.tools;
592
- if (toolOrToolSet instanceof ToolSet) {
854
+ if (isToolSet(toolOrToolSet)) {
593
855
  name = toolOrToolSet.referenceName;
594
- }
595
- else if (toolOrToolSet) {
856
+ } else if (toolOrToolSet) {
596
857
  name = toolOrToolSet.toolReferenceName ?? name;
597
858
  }
598
859
  this.label.setLabel(`$(${icon.id})\u00A0${name}`, undefined);
599
- this.element.style.cursor = 'pointer';
600
- this.element.ariaLabel = ( localize(4950, "Attached context, {0}", name));
860
+ this.element.style.cursor = "pointer";
861
+ this.element.ariaLabel = ( localize(5080, "Attached context, {0}", name));
601
862
  let hoverContent;
602
- if (toolOrToolSet instanceof ToolSet) {
863
+ if (isToolSet(toolOrToolSet)) {
603
864
  hoverContent = ( localize(
604
- 4956,
865
+ 5086,
605
866
  "{0} - {1}",
606
867
  toolOrToolSet.description ?? toolOrToolSet.referenceName,
607
868
  toolOrToolSet.source.label
608
869
  ));
609
- }
610
- else if (toolOrToolSet) {
870
+ } else if (toolOrToolSet) {
611
871
  hoverContent = ( localize(
612
- 4957,
872
+ 5087,
613
873
  "{0} - {1}",
614
874
  toolOrToolSet.userDescription ?? toolOrToolSet.modelDescription,
615
875
  toolOrToolSet.source.label
@@ -618,46 +878,69 @@ let ToolSetOrToolItemAttachmentWidget = class ToolSetOrToolItemAttachmentWidget
618
878
  if (hoverContent) {
619
879
  this._register(hoverService.setupDelayedHover(this.element, {
620
880
  ...commonHoverOptions,
621
- content: hoverContent,
881
+ content: hoverContent
622
882
  }, commonHoverLifecycleOptions));
623
883
  }
624
884
  }
625
885
  };
626
- ToolSetOrToolItemAttachmentWidget = ( __decorate([
627
- ( __param(5, ILanguageModelToolsService)),
628
- ( __param(6, ICommandService)),
629
- ( __param(7, IOpenerService)),
630
- ( __param(8, IHoverService))
631
- ], ToolSetOrToolItemAttachmentWidget));
886
+ ToolSetOrToolItemAttachmentWidget = ( __decorate([( __param(5, ILanguageModelToolsService)), ( __param(6, ICommandService)), ( __param(7, IOpenerService)), ( __param(8, IConfigurationService)), ( __param(9, IHoverService))], ToolSetOrToolItemAttachmentWidget));
632
887
  let NotebookCellOutputChatAttachmentWidget = class NotebookCellOutputChatAttachmentWidget extends AbstractChatAttachmentWidget {
633
- constructor(resource, attachment, currentLanguageModel, options, container, contextResourceLabels, commandService, openerService, hoverService, languageModelsService, notebookService, instantiationService) {
634
- super(attachment, options, container, contextResourceLabels, currentLanguageModel, commandService, openerService);
888
+ constructor(
889
+ resource,
890
+ attachment,
891
+ currentLanguageModel,
892
+ options,
893
+ container,
894
+ contextResourceLabels,
895
+ commandService,
896
+ openerService,
897
+ configurationService,
898
+ hoverService,
899
+ languageModelsService,
900
+ notebookService,
901
+ instantiationService
902
+ ) {
903
+ super(
904
+ attachment,
905
+ options,
906
+ container,
907
+ contextResourceLabels,
908
+ currentLanguageModel,
909
+ commandService,
910
+ openerService,
911
+ configurationService
912
+ );
635
913
  this.hoverService = hoverService;
636
914
  this.languageModelsService = languageModelsService;
637
915
  this.notebookService = notebookService;
638
916
  this.instantiationService = instantiationService;
639
917
  switch (attachment.mimeType) {
640
- case 'application/vnd.code.notebook.error': {
918
+ case "application/vnd.code.notebook.error":
919
+ {
641
920
  this.renderErrorOutput(resource, attachment);
642
921
  break;
643
922
  }
644
- case 'image/png':
645
- case 'image/jpeg':
646
- case 'image/svg': {
923
+ case "image/png":
924
+ case "image/jpeg":
925
+ case "image/svg":
926
+ {
647
927
  this.renderImageOutput(resource, attachment);
648
928
  break;
649
929
  }
650
- default: {
930
+ default:
931
+ {
651
932
  this.renderGenericOutput(resource, attachment);
652
933
  }
653
934
  }
654
935
  this.instantiationService.invokeFunction(accessor => {
655
- this._register(hookUpResourceAttachmentDragAndContextMenu(accessor, this.element, resource));
936
+ this._register(
937
+ hookUpResourceAttachmentDragAndContextMenu(accessor, this.element, resource)
938
+ );
656
939
  });
657
940
  this.addResourceOpenHandlers(resource, undefined);
658
941
  }
659
942
  getAriaLabel(attachment) {
660
- return localize(4958, "Attached Notebook output, {0}", attachment.name);
943
+ return localize(5088, "Attached Notebook output, {0}", attachment.name);
661
944
  }
662
945
  renderErrorOutput(resource, attachment) {
663
946
  const attachmentLabel = attachment.name;
@@ -669,35 +952,52 @@ let NotebookCellOutputChatAttachmentWidget = class NotebookCellOutputChatAttachm
669
952
  if (error.name && error.message) {
670
953
  title = `${error.name}: ${error.message}`;
671
954
  }
672
- }
673
- catch {
674
- }
675
- this.label.setLabel(withIcon, undefined, { title });
955
+ } catch {}
956
+ this.label.setLabel(withIcon, undefined, {
957
+ title
958
+ });
676
959
  this.element.ariaLabel = this.getAriaLabel(attachment);
677
960
  }
678
961
  renderGenericOutput(resource, attachment) {
679
962
  this.element.ariaLabel = this.getAriaLabel(attachment);
680
- this.label.setFile(resource, { hidePath: true, icon: ThemeIcon.fromId('output') });
963
+ this.label.setFile(resource, {
964
+ hidePath: true,
965
+ icon: ThemeIcon.fromId("output")
966
+ });
681
967
  }
682
968
  renderImageOutput(resource, attachment) {
683
969
  let ariaLabel;
684
970
  if (attachment.omittedState === OmittedState.Full) {
685
- ariaLabel = ( localize(4959, "Omitted this Notebook ouput: {0}", attachment.name));
686
- }
687
- else if (attachment.omittedState === OmittedState.Partial) {
688
- ariaLabel = ( localize(4960, "Partially omitted this Notebook output: {0}", attachment.name));
689
- }
690
- else {
971
+ ariaLabel = ( localize(5089, "Omitted this Notebook ouput: {0}", attachment.name));
972
+ } else if (attachment.omittedState === OmittedState.Partial) {
973
+ ariaLabel = ( localize(5090, "Partially omitted this Notebook output: {0}", attachment.name));
974
+ } else {
691
975
  ariaLabel = this.getAriaLabel(attachment);
692
976
  }
693
- const clickHandler = async () => await this.openResource(resource, { editorOptions: { preserveFocus: true } }, false, undefined);
977
+ const clickHandler = async () => await this.openResource(resource, {
978
+ editorOptions: {
979
+ preserveFocus: true
980
+ }
981
+ }, false, undefined);
694
982
  const currentLanguageModelName = this.currentLanguageModel ? this.languageModelsService.lookupLanguageModel(this.currentLanguageModel.identifier)?.name ?? this.currentLanguageModel.identifier : undefined;
695
983
  const buffer = this.getOutputItem(resource, attachment)?.data.buffer ?? ( new Uint8Array());
696
- this._register(createImageElements(resource, attachment.name, attachment.name, this.element, buffer, this.hoverService, ariaLabel, currentLanguageModelName, clickHandler, this.currentLanguageModel, attachment.omittedState));
984
+ this._register(createImageElements(
985
+ resource,
986
+ attachment.name,
987
+ attachment.name,
988
+ this.element,
989
+ buffer,
990
+ this.hoverService,
991
+ ariaLabel,
992
+ currentLanguageModelName,
993
+ clickHandler,
994
+ this.currentLanguageModel,
995
+ attachment.omittedState
996
+ ));
697
997
  }
698
998
  getOutputItem(resource, attachment) {
699
999
  const parsedInfo = CellUri.parseCellOutputUri(resource);
700
- if (!parsedInfo || typeof parsedInfo.cellHandle !== 'number' || typeof parsedInfo.outputIndex !== 'number') {
1000
+ if (!parsedInfo || typeof parsedInfo.cellHandle !== "number" || typeof parsedInfo.outputIndex !== "number") {
701
1001
  return undefined;
702
1002
  }
703
1003
  const notebook = this.notebookService.getNotebookTextModel(parsedInfo.notebook);
@@ -712,26 +1012,40 @@ let NotebookCellOutputChatAttachmentWidget = class NotebookCellOutputChatAttachm
712
1012
  return output?.outputs.find(o => o.mime === attachment.mimeType);
713
1013
  }
714
1014
  };
715
- NotebookCellOutputChatAttachmentWidget = ( __decorate([
716
- ( __param(6, ICommandService)),
717
- ( __param(7, IOpenerService)),
718
- ( __param(8, IHoverService)),
719
- ( __param(9, ILanguageModelsService)),
720
- ( __param(10, INotebookService)),
721
- ( __param(11, IInstantiationService))
722
- ], NotebookCellOutputChatAttachmentWidget));
1015
+ NotebookCellOutputChatAttachmentWidget = ( __decorate([( __param(6, ICommandService)), ( __param(7, IOpenerService)), ( __param(8, IConfigurationService)), ( __param(9, IHoverService)), ( __param(10, ILanguageModelsService)), ( __param(11, INotebookService)), ( __param(12, IInstantiationService))], NotebookCellOutputChatAttachmentWidget));
723
1016
  let ElementChatAttachmentWidget = class ElementChatAttachmentWidget extends AbstractChatAttachmentWidget {
724
- constructor(attachment, currentLanguageModel, options, container, contextResourceLabels, commandService, openerService, editorService) {
725
- super(attachment, options, container, contextResourceLabels, currentLanguageModel, commandService, openerService);
726
- const ariaLabel = ( localize(4961, "Attached element, {0}", attachment.name));
1017
+ constructor(
1018
+ attachment,
1019
+ currentLanguageModel,
1020
+ options,
1021
+ container,
1022
+ contextResourceLabels,
1023
+ commandService,
1024
+ openerService,
1025
+ configurationService,
1026
+ editorService
1027
+ ) {
1028
+ super(
1029
+ attachment,
1030
+ options,
1031
+ container,
1032
+ contextResourceLabels,
1033
+ currentLanguageModel,
1034
+ commandService,
1035
+ openerService,
1036
+ configurationService
1037
+ );
1038
+ const ariaLabel = ( localize(5091, "Attached element, {0}", attachment.name));
727
1039
  this.element.ariaLabel = ariaLabel;
728
- this.element.style.position = 'relative';
729
- this.element.style.cursor = 'pointer';
1040
+ this.element.style.position = "relative";
1041
+ this.element.style.cursor = "pointer";
730
1042
  const attachmentLabel = attachment.name;
731
1043
  const withIcon = attachment.icon?.id ? `$(${attachment.icon.id})\u00A0${attachmentLabel}` : attachmentLabel;
732
- this.label.setLabel(withIcon, undefined, { title: ( localize(4962, "Click to view the contents of: {0}", attachmentLabel)) });
1044
+ this.label.setLabel(withIcon, undefined, {
1045
+ title: ( localize(5092, "Click to view the contents of: {0}", attachmentLabel))
1046
+ });
733
1047
  this._register(addDisposableListener(this.element, EventType.CLICK, async () => {
734
- const content = attachment.value?.toString() || '';
1048
+ const content = attachment.value?.toString() || "";
735
1049
  await editorService.openEditor({
736
1050
  resource: undefined,
737
1051
  contents: content,
@@ -742,28 +1056,48 @@ let ElementChatAttachmentWidget = class ElementChatAttachmentWidget extends Abst
742
1056
  }));
743
1057
  }
744
1058
  };
745
- ElementChatAttachmentWidget = ( __decorate([
746
- ( __param(5, ICommandService)),
747
- ( __param(6, IOpenerService)),
748
- ( __param(7, IEditorService))
749
- ], ElementChatAttachmentWidget));
1059
+ ElementChatAttachmentWidget = ( __decorate([( __param(5, ICommandService)), ( __param(6, IOpenerService)), ( __param(7, IConfigurationService)), ( __param(8, IEditorService))], ElementChatAttachmentWidget));
750
1060
  let SCMHistoryItemAttachmentWidget = class SCMHistoryItemAttachmentWidget extends AbstractChatAttachmentWidget {
751
- constructor(attachment, currentLanguageModel, options, container, contextResourceLabels, commandService, markdownRendererService, hoverService, openerService, themeService) {
752
- super(attachment, options, container, contextResourceLabels, currentLanguageModel, commandService, openerService);
1061
+ constructor(
1062
+ attachment,
1063
+ currentLanguageModel,
1064
+ options,
1065
+ container,
1066
+ contextResourceLabels,
1067
+ commandService,
1068
+ markdownRendererService,
1069
+ hoverService,
1070
+ openerService,
1071
+ configurationService,
1072
+ themeService
1073
+ ) {
1074
+ super(
1075
+ attachment,
1076
+ options,
1077
+ container,
1078
+ contextResourceLabels,
1079
+ currentLanguageModel,
1080
+ commandService,
1081
+ openerService,
1082
+ configurationService
1083
+ );
753
1084
  this.label.setLabel(attachment.name, undefined);
754
- this.element.style.cursor = 'pointer';
755
- this.element.ariaLabel = ( localize(4950, "Attached context, {0}", attachment.name));
756
- const { content, disposables } = toHistoryItemHoverContent(markdownRendererService, attachment.historyItem, false);
1085
+ this.element.style.cursor = "pointer";
1086
+ this.element.ariaLabel = ( localize(5080, "Attached context, {0}", attachment.name));
1087
+ const {
1088
+ content,
1089
+ disposables
1090
+ } = toHistoryItemHoverContent(markdownRendererService, attachment.historyItem, false);
757
1091
  this._store.add(hoverService.setupDelayedHover(this.element, {
758
1092
  ...commonHoverOptions,
759
- content,
1093
+ content
760
1094
  }, commonHoverLifecycleOptions));
761
1095
  this._store.add(disposables);
762
- this._store.add(addDisposableListener(this.element, EventType.CLICK, (e) => {
1096
+ this._store.add(addDisposableListener(this.element, EventType.CLICK, e => {
763
1097
  EventHelper.stop(e, true);
764
1098
  this._openAttachment(attachment);
765
1099
  }));
766
- this._store.add(addDisposableListener(this.element, EventType.KEY_DOWN, (e) => {
1100
+ this._store.add(addDisposableListener(this.element, EventType.KEY_DOWN, e => {
767
1101
  const event = ( new StandardKeyboardEvent(e));
768
1102
  if (event.equals(KeyCode.Enter) || event.equals(KeyCode.Space)) {
769
1103
  EventHelper.stop(e, true);
@@ -772,28 +1106,53 @@ let SCMHistoryItemAttachmentWidget = class SCMHistoryItemAttachmentWidget extend
772
1106
  }));
773
1107
  }
774
1108
  async _openAttachment(attachment) {
775
- await this.commandService.executeCommand('_workbench.openMultiDiffEditor', {
776
- title: getHistoryItemEditorTitle(attachment.historyItem), multiDiffSourceUri: attachment.value
1109
+ await this.commandService.executeCommand("_workbench.openMultiDiffEditor", {
1110
+ title: getHistoryItemEditorTitle(attachment.historyItem),
1111
+ multiDiffSourceUri: attachment.value
777
1112
  });
778
1113
  }
779
1114
  };
780
- SCMHistoryItemAttachmentWidget = ( __decorate([
781
- ( __param(5, ICommandService)),
782
- ( __param(6, IMarkdownRendererService)),
783
- ( __param(7, IHoverService)),
784
- ( __param(8, IOpenerService)),
785
- ( __param(9, IThemeService))
786
- ], SCMHistoryItemAttachmentWidget));
1115
+ SCMHistoryItemAttachmentWidget = ( __decorate([( __param(5, ICommandService)), ( __param(6, IMarkdownRendererService)), ( __param(7, IHoverService)), ( __param(8, IOpenerService)), ( __param(9, IConfigurationService)), ( __param(10, IThemeService))], SCMHistoryItemAttachmentWidget));
787
1116
  let SCMHistoryItemChangeAttachmentWidget = class SCMHistoryItemChangeAttachmentWidget extends AbstractChatAttachmentWidget {
788
- constructor(attachment, currentLanguageModel, options, container, contextResourceLabels, commandService, hoverService, markdownRendererService, openerService, themeService, editorService) {
789
- super(attachment, options, container, contextResourceLabels, currentLanguageModel, commandService, openerService);
1117
+ constructor(
1118
+ attachment,
1119
+ currentLanguageModel,
1120
+ options,
1121
+ container,
1122
+ contextResourceLabels,
1123
+ commandService,
1124
+ hoverService,
1125
+ markdownRendererService,
1126
+ openerService,
1127
+ configurationService,
1128
+ themeService,
1129
+ editorService
1130
+ ) {
1131
+ super(
1132
+ attachment,
1133
+ options,
1134
+ container,
1135
+ contextResourceLabels,
1136
+ currentLanguageModel,
1137
+ commandService,
1138
+ openerService,
1139
+ configurationService
1140
+ );
790
1141
  this.editorService = editorService;
791
1142
  const nameSuffix = `\u00A0$(${Codicon.gitCommit.id})${attachment.historyItem.displayId ?? attachment.historyItem.id}`;
792
- this.label.setFile(attachment.value, { fileKind: FileKind.FILE, hidePath: true, nameSuffix });
793
- this.element.ariaLabel = ( localize(4950, "Attached context, {0}", attachment.name));
794
- const { content, disposables } = toHistoryItemHoverContent(markdownRendererService, attachment.historyItem, false);
1143
+ this.label.setFile(attachment.value, {
1144
+ fileKind: FileKind.FILE,
1145
+ hidePath: true,
1146
+ nameSuffix
1147
+ });
1148
+ this.element.ariaLabel = ( localize(5080, "Attached context, {0}", attachment.name));
1149
+ const {
1150
+ content,
1151
+ disposables
1152
+ } = toHistoryItemHoverContent(markdownRendererService, attachment.historyItem, false);
795
1153
  this._store.add(hoverService.setupDelayedHover(this.element, {
796
- ...commonHoverOptions, content,
1154
+ ...commonHoverOptions,
1155
+ content
797
1156
  }, commonHoverLifecycleOptions));
798
1157
  this._store.add(disposables);
799
1158
  this.addResourceOpenHandlers(attachment.value, undefined);
@@ -804,27 +1163,45 @@ let SCMHistoryItemChangeAttachmentWidget = class SCMHistoryItemChangeAttachmentW
804
1163
  await this.editorService.openEditor({
805
1164
  resource,
806
1165
  label: `${basename(resource.path)} (${historyItem.displayId ?? historyItem.id})`,
807
- options: { ...options.editorOptions }
1166
+ options: {
1167
+ ...options.editorOptions
1168
+ }
808
1169
  }, options.openToSide ? SIDE_GROUP : undefined);
809
1170
  }
810
1171
  };
811
- SCMHistoryItemChangeAttachmentWidget = ( __decorate([
812
- ( __param(5, ICommandService)),
813
- ( __param(6, IHoverService)),
814
- ( __param(7, IMarkdownRendererService)),
815
- ( __param(8, IOpenerService)),
816
- ( __param(9, IThemeService)),
817
- ( __param(10, IEditorService))
818
- ], SCMHistoryItemChangeAttachmentWidget));
1172
+ SCMHistoryItemChangeAttachmentWidget = ( __decorate([( __param(5, ICommandService)), ( __param(6, IHoverService)), ( __param(7, IMarkdownRendererService)), ( __param(8, IOpenerService)), ( __param(9, IConfigurationService)), ( __param(10, IThemeService)), ( __param(11, IEditorService))], SCMHistoryItemChangeAttachmentWidget));
819
1173
  let SCMHistoryItemChangeRangeAttachmentWidget = class SCMHistoryItemChangeRangeAttachmentWidget extends AbstractChatAttachmentWidget {
820
- constructor(attachment, currentLanguageModel, options, container, contextResourceLabels, commandService, openerService, editorService) {
821
- super(attachment, options, container, contextResourceLabels, currentLanguageModel, commandService, openerService);
1174
+ constructor(
1175
+ attachment,
1176
+ currentLanguageModel,
1177
+ options,
1178
+ container,
1179
+ contextResourceLabels,
1180
+ commandService,
1181
+ openerService,
1182
+ configurationService,
1183
+ editorService
1184
+ ) {
1185
+ super(
1186
+ attachment,
1187
+ options,
1188
+ container,
1189
+ contextResourceLabels,
1190
+ currentLanguageModel,
1191
+ commandService,
1192
+ openerService,
1193
+ configurationService
1194
+ );
822
1195
  this.editorService = editorService;
823
1196
  const historyItemStartId = attachment.historyItemChangeStart.historyItem.displayId ?? attachment.historyItemChangeStart.historyItem.id;
824
1197
  const historyItemEndId = attachment.historyItemChangeEnd.historyItem.displayId ?? attachment.historyItemChangeEnd.historyItem.id;
825
1198
  const nameSuffix = `\u00A0$(${Codicon.gitCommit.id})${historyItemStartId}..${historyItemEndId}`;
826
- this.label.setFile(attachment.value, { fileKind: FileKind.FILE, hidePath: true, nameSuffix });
827
- this.element.ariaLabel = ( localize(4950, "Attached context, {0}", attachment.name));
1199
+ this.label.setFile(attachment.value, {
1200
+ fileKind: FileKind.FILE,
1201
+ hidePath: true,
1202
+ nameSuffix
1203
+ });
1204
+ this.element.ariaLabel = ( localize(5080, "Attached context, {0}", attachment.name));
828
1205
  this.addResourceOpenHandlers(attachment.value, undefined);
829
1206
  }
830
1207
  async openResource(resource, options, isDirectory, range) {
@@ -834,18 +1211,20 @@ let SCMHistoryItemChangeRangeAttachmentWidget = class SCMHistoryItemChangeRangeA
834
1211
  const originalUriTitle = `${basename(historyItemChangeStart.uri.fsPath)} (${historyItemChangeStart.historyItem.displayId ?? historyItemChangeStart.historyItem.id})`;
835
1212
  const modifiedUriTitle = `${basename(historyItemChangeEnd.uri.fsPath)} (${historyItemChangeEnd.historyItem.displayId ?? historyItemChangeEnd.historyItem.id})`;
836
1213
  await this.editorService.openEditor({
837
- original: { resource: historyItemChangeStart.uri },
838
- modified: { resource: historyItemChangeEnd.uri },
1214
+ original: {
1215
+ resource: historyItemChangeStart.uri
1216
+ },
1217
+ modified: {
1218
+ resource: historyItemChangeEnd.uri
1219
+ },
839
1220
  label: `${originalUriTitle} ↔ ${modifiedUriTitle}`,
840
- options: { ...options.editorOptions }
1221
+ options: {
1222
+ ...options.editorOptions
1223
+ }
841
1224
  }, options.openToSide ? SIDE_GROUP : undefined);
842
1225
  }
843
1226
  };
844
- SCMHistoryItemChangeRangeAttachmentWidget = ( __decorate([
845
- ( __param(5, ICommandService)),
846
- ( __param(6, IOpenerService)),
847
- ( __param(7, IEditorService))
848
- ], SCMHistoryItemChangeRangeAttachmentWidget));
1227
+ SCMHistoryItemChangeRangeAttachmentWidget = ( __decorate([( __param(5, ICommandService)), ( __param(6, IOpenerService)), ( __param(7, IConfigurationService)), ( __param(8, IEditorService))], SCMHistoryItemChangeRangeAttachmentWidget));
849
1228
  function hookUpResourceAttachmentDragAndContextMenu(accessor, widget, resource) {
850
1229
  const contextKeyService = accessor.get(IContextKeyService);
851
1230
  const instantiationService = accessor.get(IInstantiationService);
@@ -853,11 +1232,17 @@ function hookUpResourceAttachmentDragAndContextMenu(accessor, widget, resource)
853
1232
  const scopedContextKeyService = store.add(contextKeyService.createScoped(widget));
854
1233
  store.add(setResourceContext(accessor, scopedContextKeyService, resource));
855
1234
  widget.draggable = true;
856
- store.add(addDisposableListener(widget, 'dragstart', e => {
1235
+ store.add(addDisposableListener(widget, "dragstart", e => {
857
1236
  instantiationService.invokeFunction(accessor => fillEditorsDragData(accessor, [resource], e));
858
1237
  e.dataTransfer?.setDragImage(widget, 0, 0);
859
1238
  }));
860
- store.add(addBasicContextMenu(accessor, widget, scopedContextKeyService, MenuId.ChatInputResourceAttachmentContext, resource));
1239
+ store.add(addBasicContextMenu(
1240
+ accessor,
1241
+ widget,
1242
+ scopedContextKeyService,
1243
+ MenuId.ChatInputResourceAttachmentContext,
1244
+ resource
1245
+ ));
861
1246
  return store;
862
1247
  }
863
1248
  function hookUpSymbolAttachmentDragAndContextMenu(accessor, widget, scopedContextKeyService, attachment, contextMenuId) {
@@ -865,26 +1250,38 @@ function hookUpSymbolAttachmentDragAndContextMenu(accessor, widget, scopedContex
865
1250
  const languageFeaturesService = accessor.get(ILanguageFeaturesService);
866
1251
  const textModelService = accessor.get(ITextModelService);
867
1252
  const store = ( new DisposableStore());
868
- store.add(setResourceContext(accessor, scopedContextKeyService, attachment.value.uri));
1253
+ store.add(
1254
+ setResourceContext(accessor, scopedContextKeyService, attachment.value.uri)
1255
+ );
869
1256
  const chatResourceContext = chatAttachmentResourceContextKey.bindTo(scopedContextKeyService);
870
1257
  chatResourceContext.set(( attachment.value.uri.toString()));
871
1258
  widget.draggable = true;
872
- store.add(addDisposableListener(widget, 'dragstart', e => {
873
- instantiationService.invokeFunction(accessor => fillEditorsDragData(accessor, [{ resource: attachment.value.uri, selection: attachment.value.range }], e));
1259
+ store.add(addDisposableListener(widget, "dragstart", e => {
1260
+ instantiationService.invokeFunction(accessor => fillEditorsDragData(accessor, [{
1261
+ resource: attachment.value.uri,
1262
+ selection: attachment.value.range
1263
+ }], e));
874
1264
  fillInSymbolsDragData([{
875
- fsPath: attachment.value.uri.fsPath,
876
- range: attachment.value.range,
877
- name: attachment.name,
878
- kind: attachment.kind,
879
- }], e);
1265
+ fsPath: attachment.value.uri.fsPath,
1266
+ range: attachment.value.range,
1267
+ name: attachment.name,
1268
+ kind: attachment.kind
1269
+ }], e);
880
1270
  e.dataTransfer?.setDragImage(widget, 0, 0);
881
1271
  }));
882
- const providerContexts = [
883
- [EditorContextKeys.hasDefinitionProvider.bindTo(scopedContextKeyService), languageFeaturesService.definitionProvider],
884
- [EditorContextKeys.hasReferenceProvider.bindTo(scopedContextKeyService), languageFeaturesService.referenceProvider],
885
- [EditorContextKeys.hasImplementationProvider.bindTo(scopedContextKeyService), languageFeaturesService.implementationProvider],
886
- [EditorContextKeys.hasTypeDefinitionProvider.bindTo(scopedContextKeyService), languageFeaturesService.typeDefinitionProvider],
887
- ];
1272
+ const providerContexts = [[
1273
+ EditorContextKeys.hasDefinitionProvider.bindTo(scopedContextKeyService),
1274
+ languageFeaturesService.definitionProvider
1275
+ ], [
1276
+ EditorContextKeys.hasReferenceProvider.bindTo(scopedContextKeyService),
1277
+ languageFeaturesService.referenceProvider
1278
+ ], [
1279
+ EditorContextKeys.hasImplementationProvider.bindTo(scopedContextKeyService),
1280
+ languageFeaturesService.implementationProvider
1281
+ ], [
1282
+ EditorContextKeys.hasTypeDefinitionProvider.bindTo(scopedContextKeyService),
1283
+ languageFeaturesService.typeDefinitionProvider
1284
+ ]];
888
1285
  const updateContextKeys = async () => {
889
1286
  const modelRef = await textModelService.createModelReference(attachment.value.uri);
890
1287
  try {
@@ -892,12 +1289,18 @@ function hookUpSymbolAttachmentDragAndContextMenu(accessor, widget, scopedContex
892
1289
  for (const [contextKey, registry] of providerContexts) {
893
1290
  contextKey.set(( registry.has(model)));
894
1291
  }
895
- }
896
- finally {
1292
+ } finally {
897
1293
  modelRef.dispose();
898
1294
  }
899
1295
  };
900
- store.add(addBasicContextMenu(accessor, widget, scopedContextKeyService, contextMenuId, attachment.value, updateContextKeys));
1296
+ store.add(addBasicContextMenu(
1297
+ accessor,
1298
+ widget,
1299
+ scopedContextKeyService,
1300
+ contextMenuId,
1301
+ attachment.value,
1302
+ updateContextKeys
1303
+ ));
901
1304
  return store;
902
1305
  }
903
1306
  function setResourceContext(accessor, scopedContextKeyService, resource) {
@@ -911,32 +1314,32 @@ function setResourceContext(accessor, scopedContextKeyService, resource) {
911
1314
  function addBasicContextMenu(accessor, widget, scopedContextKeyService, menuId, arg, updateContextKeys) {
912
1315
  const contextMenuService = accessor.get(IContextMenuService);
913
1316
  const menuService = accessor.get(IMenuService);
914
- return addDisposableListener(widget, EventType.CONTEXT_MENU, async (domEvent) => {
1317
+ return addDisposableListener(widget, EventType.CONTEXT_MENU, async domEvent => {
915
1318
  const event = ( new StandardMouseEvent(getWindow(domEvent), domEvent));
916
1319
  EventHelper.stop(domEvent, true);
917
1320
  try {
918
1321
  await updateContextKeys?.();
919
- }
920
- catch (e) {
1322
+ } catch (e) {
921
1323
  console.error(e);
922
1324
  }
923
1325
  contextMenuService.showContextMenu({
924
1326
  contextKeyService: scopedContextKeyService,
925
1327
  getAnchor: () => event,
926
1328
  getActions: () => {
927
- const menu = menuService.getMenuActions(menuId, scopedContextKeyService, { arg });
1329
+ const menu = menuService.getMenuActions(menuId, scopedContextKeyService, {
1330
+ arg
1331
+ });
928
1332
  return getFlatContextMenuActions(menu);
929
- },
1333
+ }
930
1334
  });
931
1335
  });
932
1336
  }
933
- const chatAttachmentResourceContextKey = ( new RawContextKey(
934
- 'chatAttachmentResource',
935
- undefined,
936
- { type: 'URI', description: ( localize(
937
- 4963,
1337
+ const chatAttachmentResourceContextKey = ( new RawContextKey("chatAttachmentResource", undefined, {
1338
+ type: "URI",
1339
+ description: ( localize(
1340
+ 5093,
938
1341
  "The full value of the chat attachment resource, including scheme and path"
939
- )) }
940
- ));
1342
+ ))
1343
+ }));
941
1344
 
942
1345
  export { DefaultChatAttachmentWidget, ElementChatAttachmentWidget, FileAttachmentWidget, ImageAttachmentWidget, NotebookCellOutputChatAttachmentWidget, PasteAttachmentWidget, PromptFileAttachmentWidget, PromptTextAttachmentWidget, SCMHistoryItemAttachmentWidget, SCMHistoryItemChangeAttachmentWidget, SCMHistoryItemChangeRangeAttachmentWidget, TerminalCommandAttachmentWidget, ToolSetOrToolItemAttachmentWidget, chatAttachmentResourceContextKey, hookUpResourceAttachmentDragAndContextMenu, hookUpSymbolAttachmentDragAndContextMenu };