@codingame/monaco-vscode-katex-common 25.1.1 → 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
@@ -1,28 +0,0 @@
1
- import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
2
- import { ICodeEditor } from "@codingame/monaco-vscode-api/vscode/vs/editor/browser/editorBrowser";
3
- import { Position } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/core/position";
4
- import { Selection } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/core/selection";
5
- import { ServicesAccessor } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
6
- import { IChatEditingSession } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/editing/chatEditingService";
7
- import { IChatModel, IChatModelInputState, IChatRequestModel } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatModel";
8
- import { Session } from "./inlineChatSession.js";
9
- export interface ISessionKeyComputer {
10
- getComparisonKey(editor: ICodeEditor, uri: URI): string;
11
- }
12
- export interface IInlineChatSessionEvent {
13
- readonly editor: ICodeEditor;
14
- readonly session: Session;
15
- }
16
- export interface IInlineChatSessionEndEvent extends IInlineChatSessionEvent {
17
- readonly endedByExternalCause: boolean;
18
- }
19
- export interface IInlineChatSession2 {
20
- readonly initialPosition: Position;
21
- readonly initialSelection: Selection;
22
- readonly uri: URI;
23
- readonly chatModel: IChatModel;
24
- readonly editingSession: IChatEditingSession;
25
- dispose(): void;
26
- }
27
- export declare function moveToPanelChat(accessor: ServicesAccessor, model: IChatModel | undefined, resend: boolean): Promise<void>;
28
- export declare function askInPanelChat(accessor: ServicesAccessor, request: IChatRequestModel, state: IChatModelInputState | undefined): Promise<void>;
@@ -1,37 +0,0 @@
1
-
2
- import { ChatViewPaneTarget } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat';
3
- import { IChatWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
4
- import { IChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService.service';
5
- import { ChatAgentLocation } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
6
-
7
- async function moveToPanelChat(accessor, model, resend) {
8
- const chatService = accessor.get(IChatService);
9
- const widgetService = accessor.get(IChatWidgetService);
10
- const widget = await widgetService.revealWidget();
11
- if (widget && widget.viewModel && model) {
12
- let lastRequest;
13
- for (const request of model.getRequests().slice()) {
14
- await chatService.adoptRequest(widget.viewModel.model.sessionResource, request);
15
- lastRequest = request;
16
- }
17
- if (lastRequest && resend) {
18
- chatService.resendRequest(lastRequest, { location: widget.location });
19
- }
20
- widget.focusResponseItem();
21
- }
22
- }
23
- async function askInPanelChat(accessor, request, state) {
24
- const widgetService = accessor.get(IChatWidgetService);
25
- const chatService = accessor.get(IChatService);
26
- if (!request) {
27
- return;
28
- }
29
- const newModelRef = chatService.startSession(ChatAgentLocation.Chat);
30
- const newModel = newModelRef.object;
31
- newModel.inputModel.setState({ ...state });
32
- const widget = await widgetService.openSession(newModelRef.object.sessionResource, ChatViewPaneTarget);
33
- newModelRef.dispose();
34
- widget?.acceptInput(request.message.text);
35
- }
36
-
37
- export { askInPanelChat, moveToPanelChat };
@@ -1,94 +0,0 @@
1
- import { CancellationToken } from "@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation";
2
- import { Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event";
3
- import { Disposable, IDisposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
4
- import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
5
- import { IActiveCodeEditor, ICodeEditor } from "@codingame/monaco-vscode-api/vscode/vs/editor/browser/editorBrowser";
6
- import { ICodeEditorService } from "@codingame/monaco-vscode-api/vscode/vs/editor/browser/services/codeEditorService.service";
7
- import { Range } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/core/range";
8
- import { ILanguageService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/languages/language.service";
9
- import { IValidEditOperation } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/model";
10
- import { IEditorWorkerService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/editorWorker.service";
11
- import { IModelService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/model.service";
12
- import { ITextModelService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/resolverService.service";
13
- import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
14
- import { IContextKeyService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service";
15
- import { IDialogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/common/dialogs.service";
16
- import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
17
- import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
18
- import { IStorageService } from "@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service";
19
- import { ITelemetryService } from "@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service";
20
- import { IEditorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service";
21
- import { ITextFileService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/textfile/common/textfiles.service";
22
- import { IChatWidgetService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service";
23
- import { IChatAgentService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/participants/chatAgents.service";
24
- import { IChatService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService.service";
25
- import { ILanguageModelToolsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService.service";
26
- import { Session, StashedSession } from "./inlineChatSession.js";
27
- import { IInlineChatSession2, IInlineChatSessionEndEvent, IInlineChatSessionEvent, ISessionKeyComputer } from "./inlineChatSessionService.js";
28
- import { IInlineChatSessionService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.service";
29
- export declare class InlineChatError extends Error {
30
- static readonly code = "InlineChatError";
31
- constructor(message: string);
32
- }
33
- export declare class InlineChatSessionServiceImpl implements IInlineChatSessionService {
34
- private readonly _telemetryService;
35
- private readonly _modelService;
36
- private readonly _textModelService;
37
- private readonly _editorWorkerService;
38
- private readonly _logService;
39
- private readonly _instaService;
40
- private readonly _editorService;
41
- private readonly _textFileService;
42
- private readonly _languageService;
43
- private readonly _chatService;
44
- private readonly _chatAgentService;
45
- private readonly _chatWidgetService;
46
- _serviceBrand: undefined;
47
- private readonly _store;
48
- private readonly _onWillStartSession;
49
- readonly onWillStartSession: Event<IActiveCodeEditor>;
50
- private readonly _onDidMoveSession;
51
- readonly onDidMoveSession: Event<IInlineChatSessionEvent>;
52
- private readonly _onDidEndSession;
53
- readonly onDidEndSession: Event<IInlineChatSessionEndEvent>;
54
- private readonly _onDidStashSession;
55
- readonly onDidStashSession: Event<IInlineChatSessionEvent>;
56
- private readonly _sessions;
57
- private readonly _keyComputers;
58
- constructor(_telemetryService: ITelemetryService, _modelService: IModelService, _textModelService: ITextModelService, _editorWorkerService: IEditorWorkerService, _logService: ILogService, _instaService: IInstantiationService, _editorService: IEditorService, _textFileService: ITextFileService, _languageService: ILanguageService, _chatService: IChatService, _chatAgentService: IChatAgentService, _chatWidgetService: IChatWidgetService);
59
- dispose(): void;
60
- createSession(editor: IActiveCodeEditor, options: {
61
- headless?: boolean;
62
- wholeRange?: Range;
63
- session?: Session;
64
- }, token: CancellationToken): Promise<Session | undefined>;
65
- moveSession(session: Session, target: ICodeEditor): void;
66
- releaseSession(session: Session): void;
67
- private _releaseSession;
68
- stashSession(session: Session, editor: ICodeEditor, undoCancelEdits: IValidEditOperation[]): StashedSession;
69
- getCodeEditor(session: Session): ICodeEditor;
70
- getSession(editor: ICodeEditor, uri: URI): Session | undefined;
71
- private _key;
72
- registerSessionKeyComputer(scheme: string, value: ISessionKeyComputer): IDisposable;
73
- private readonly _sessions2;
74
- private readonly _onDidChangeSessions;
75
- readonly onDidChangeSessions: Event<this>;
76
- createSession2(editor: ICodeEditor, uri: URI, token: CancellationToken): Promise<IInlineChatSession2>;
77
- getSession2(uri: URI): IInlineChatSession2 | undefined;
78
- getSessionBySessionUri(sessionResource: URI): IInlineChatSession2 | undefined;
79
- }
80
- export declare class InlineChatEnabler {
81
- static Id: string;
82
- private readonly _ctxHasProvider2;
83
- private readonly _ctxHasNotebookProvider;
84
- private readonly _ctxPossible;
85
- private readonly _store;
86
- constructor(contextKeyService: IContextKeyService, chatAgentService: IChatAgentService, editorService: IEditorService, configService: IConfigurationService);
87
- dispose(): void;
88
- }
89
- export declare class InlineChatEscapeToolContribution extends Disposable {
90
- static readonly Id = "inlineChat.escapeTool";
91
- static readonly DONT_ASK_AGAIN_KEY = "inlineChat.dontAskMoveToPanelChat";
92
- private static readonly _data;
93
- constructor(lmTools: ILanguageModelToolsService, inlineChatSessionService: IInlineChatSessionService, dialogService: IDialogService, codeEditorService: ICodeEditorService, chatService: IChatService, logService: ILogService, storageService: IStorageService, instaService: IInstantiationService);
94
- }
@@ -1,495 +0,0 @@
1
-
2
- import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
3
- import { Emitter, Event } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
4
- import { DisposableStore, MutableDisposable, toDisposable, Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
5
- import { ResourceMap } from '@codingame/monaco-vscode-api/vscode/vs/base/common/map';
6
- import { Schemas } from '@codingame/monaco-vscode-api/vscode/vs/base/common/network';
7
- import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
8
- import { isEqual } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
9
- import { assertType } from '@codingame/monaco-vscode-api/vscode/vs/base/common/types';
10
- import { generateUuid } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uuid';
11
- import { isCodeEditor, isDiffEditor, isCompositeEditor } from '@codingame/monaco-vscode-api/vscode/vs/editor/browser/editorBrowser';
12
- import { ICodeEditorService } from '@codingame/monaco-vscode-api/vscode/vs/editor/browser/services/codeEditorService.service';
13
- import { Range } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/core/range';
14
- import { ILanguageService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/languages/language.service';
15
- import { createTextBufferFactoryFromSnapshot } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/model/textModel';
16
- import { IEditorWorkerService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/editorWorker.service';
17
- import { IModelService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/model.service';
18
- import { ITextModelService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/resolverService.service';
19
- import { localize, localize2 } from '@codingame/monaco-vscode-api/vscode/vs/nls';
20
- import { registerAction2, Action2 } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
21
- import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
22
- import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service';
23
- import { IDialogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/common/dialogs.service';
24
- import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
25
- import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
26
- import { observableConfigValue } from '@codingame/monaco-vscode-api/vscode/vs/platform/observable/common/platformObservableUtils';
27
- import { StorageScope, StorageTarget } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage';
28
- import { IStorageService } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service';
29
- import { ITelemetryService } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service';
30
- import { DEFAULT_EDITOR_ASSOCIATION } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor';
31
- import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
32
- import { ITextFileService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/textfile/common/textfiles.service';
33
- import { UntitledTextEditorInput } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/untitled/common/untitledTextEditorInput';
34
- import { IChatWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
35
- import { IChatAgentService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/participants/chatAgents.service';
36
- import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/actions/chatContextKeys';
37
- import { ModifiedFileEntryState } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/editing/chatEditingService';
38
- import { IChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService.service';
39
- import { ChatAgentLocation } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
40
- import { ToolDataSource } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService';
41
- import { ILanguageModelToolsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService.service';
42
- import { CTX_INLINE_CHAT_HAS_AGENT2, CTX_INLINE_CHAT_HAS_NOTEBOOK_AGENT, CTX_INLINE_CHAT_POSSIBLE, InlineChatConfigKeys } from '../common/inlineChat.js';
43
- import { Session, SessionWholeRange, HunkData, StashedSession } from './inlineChatSession.js';
44
- import { askInPanelChat } from './inlineChatSessionService.js';
45
- import { IInlineChatSessionService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.service';
46
- import { observableFromEvent } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableFromEvent';
47
- import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
48
-
49
- var InlineChatEscapeToolContribution_1;
50
- class InlineChatError extends Error {
51
- static { this.code = 'InlineChatError'; }
52
- constructor(message) {
53
- super(message);
54
- this.name = InlineChatError.code;
55
- }
56
- }
57
- let InlineChatSessionServiceImpl = class InlineChatSessionServiceImpl {
58
- constructor(_telemetryService, _modelService, _textModelService, _editorWorkerService, _logService, _instaService, _editorService, _textFileService, _languageService, _chatService, _chatAgentService, _chatWidgetService) {
59
- this._telemetryService = _telemetryService;
60
- this._modelService = _modelService;
61
- this._textModelService = _textModelService;
62
- this._editorWorkerService = _editorWorkerService;
63
- this._logService = _logService;
64
- this._instaService = _instaService;
65
- this._editorService = _editorService;
66
- this._textFileService = _textFileService;
67
- this._languageService = _languageService;
68
- this._chatService = _chatService;
69
- this._chatAgentService = _chatAgentService;
70
- this._chatWidgetService = _chatWidgetService;
71
- this._store = ( new DisposableStore());
72
- this._onWillStartSession = this._store.add(( new Emitter()));
73
- this.onWillStartSession = this._onWillStartSession.event;
74
- this._onDidMoveSession = this._store.add(( new Emitter()));
75
- this.onDidMoveSession = this._onDidMoveSession.event;
76
- this._onDidEndSession = this._store.add(( new Emitter()));
77
- this.onDidEndSession = this._onDidEndSession.event;
78
- this._onDidStashSession = this._store.add(( new Emitter()));
79
- this.onDidStashSession = this._onDidStashSession.event;
80
- this._sessions = ( new Map());
81
- this._keyComputers = ( new Map());
82
- this._sessions2 = ( new ResourceMap());
83
- this._onDidChangeSessions = this._store.add(( new Emitter()));
84
- this.onDidChangeSessions = this._onDidChangeSessions.event;
85
- }
86
- dispose() {
87
- this._store.dispose();
88
- this._sessions.forEach(x => x.store.dispose());
89
- this._sessions.clear();
90
- }
91
- async createSession(editor, options, token) {
92
- const agent = this._chatAgentService.getDefaultAgent(ChatAgentLocation.EditorInline);
93
- if (!agent) {
94
- this._logService.trace('[IE] NO agent found');
95
- return undefined;
96
- }
97
- this._onWillStartSession.fire(editor);
98
- const textModel = editor.getModel();
99
- const selection = editor.getSelection();
100
- const store = ( new DisposableStore());
101
- this._logService.trace(`[IE] creating NEW session for ${editor.getId()}, ${agent.extensionId}`);
102
- const chatModelRef = options.session ? undefined : this._chatService.startSession(ChatAgentLocation.EditorInline);
103
- const chatModel = options.session?.chatModel ?? chatModelRef?.object;
104
- if (!chatModel) {
105
- this._logService.trace('[IE] NO chatModel found');
106
- chatModelRef?.dispose();
107
- return undefined;
108
- }
109
- if (chatModelRef) {
110
- store.add(chatModelRef);
111
- }
112
- const lastResponseListener = store.add(( new MutableDisposable()));
113
- store.add(chatModel.onDidChange(e => {
114
- if (e.kind !== 'addRequest' || !e.request.response) {
115
- return;
116
- }
117
- const { response } = e.request;
118
- session.markModelVersion(e.request);
119
- lastResponseListener.value = response.onDidChange(() => {
120
- if (!response.isComplete) {
121
- return;
122
- }
123
- lastResponseListener.clear();
124
- for (const part of response.response.value) {
125
- if (part.kind !== 'textEditGroup' || part.uri.scheme !== Schemas.untitled || isEqual(part.uri, session.textModelN.uri)) {
126
- continue;
127
- }
128
- const langSelection = this._languageService.createByFilepathOrFirstLine(part.uri, undefined);
129
- const untitledTextModel = this._textFileService.untitled.create({
130
- associatedResource: part.uri,
131
- languageId: langSelection.languageId
132
- });
133
- untitledTextModel.resolve();
134
- this._textModelService.createModelReference(part.uri).then(ref => {
135
- store.add(ref);
136
- });
137
- }
138
- });
139
- }));
140
- store.add(this._chatAgentService.onDidChangeAgents(e => {
141
- if (e === undefined && (!this._chatAgentService.getAgent(agent.id) || !( this._chatAgentService.getActivatedAgents().map(agent => agent.id)).includes(agent.id))) {
142
- this._logService.trace(`[IE] provider GONE for ${editor.getId()}, ${agent.extensionId}`);
143
- this._releaseSession(session, true);
144
- }
145
- }));
146
- const id = generateUuid();
147
- const targetUri = textModel.uri;
148
- store.add((await this._textModelService.createModelReference(textModel.uri)));
149
- const textModelN = textModel;
150
- const textModel0 = store.add(this._modelService.createModel(createTextBufferFactoryFromSnapshot(textModel.createSnapshot()), { languageId: textModel.getLanguageId(), onDidChange: Event.None }, targetUri.with({ scheme: Schemas.vscode, authority: 'inline-chat', path: '', query: ( ( new URLSearchParams({ id, 'textModel0': '' })).toString()) }), true));
151
- if (targetUri.scheme === Schemas.untitled) {
152
- store.add(this._editorService.onDidCloseEditor(() => {
153
- if (!this._editorService.isOpened({ resource: targetUri, typeId: UntitledTextEditorInput.ID, editorId: DEFAULT_EDITOR_ASSOCIATION.id })) {
154
- this._releaseSession(session, true);
155
- }
156
- }));
157
- }
158
- let wholeRange = options.wholeRange;
159
- if (!wholeRange) {
160
- wholeRange = ( new Range(
161
- selection.selectionStartLineNumber,
162
- selection.selectionStartColumn,
163
- selection.positionLineNumber,
164
- selection.positionColumn
165
- ));
166
- }
167
- if (token.isCancellationRequested) {
168
- store.dispose();
169
- return undefined;
170
- }
171
- const session = ( new Session(
172
- options.headless ?? false,
173
- targetUri,
174
- textModel0,
175
- textModelN,
176
- agent,
177
- store.add(( new SessionWholeRange(textModelN, wholeRange))),
178
- store.add(( new HunkData(this._editorWorkerService, textModel0, textModelN))),
179
- chatModel,
180
- options.session?.versionsByRequest
181
- ));
182
- const key = this._key(editor, session.targetUri);
183
- if (( this._sessions.has(key))) {
184
- store.dispose();
185
- throw ( new Error(`Session already stored for ${key}`));
186
- }
187
- this._sessions.set(key, { session, editor, store });
188
- return session;
189
- }
190
- moveSession(session, target) {
191
- const newKey = this._key(target, session.targetUri);
192
- const existing = this._sessions.get(newKey);
193
- if (existing) {
194
- if (existing.session !== session) {
195
- throw ( new Error(`Cannot move session because the target editor already/still has one`));
196
- }
197
- else {
198
- return;
199
- }
200
- }
201
- let found = false;
202
- for (const [oldKey, data] of this._sessions) {
203
- if (data.session === session) {
204
- found = true;
205
- this._sessions.delete(oldKey);
206
- this._sessions.set(newKey, { ...data, editor: target });
207
- this._logService.trace(`[IE] did MOVE session for ${data.editor.getId()} to NEW EDITOR ${target.getId()}, ${session.agent.extensionId}`);
208
- this._onDidMoveSession.fire({ session, editor: target });
209
- break;
210
- }
211
- }
212
- if (!found) {
213
- throw ( new Error(`Cannot move session because it is not stored`));
214
- }
215
- }
216
- releaseSession(session) {
217
- this._releaseSession(session, false);
218
- }
219
- _releaseSession(session, byServer) {
220
- let tuple;
221
- for (const candidate of this._sessions) {
222
- if (candidate[1].session === session) {
223
- tuple = candidate;
224
- break;
225
- }
226
- }
227
- if (!tuple) {
228
- return;
229
- }
230
- this._telemetryService.publicLog2('interactiveEditor/session', session.asTelemetryData());
231
- const [key, value] = tuple;
232
- this._sessions.delete(key);
233
- this._logService.trace(`[IE] did RELEASED session for ${value.editor.getId()}, ${session.agent.extensionId}`);
234
- this._onDidEndSession.fire({ editor: value.editor, session, endedByExternalCause: byServer });
235
- value.store.dispose();
236
- }
237
- stashSession(session, editor, undoCancelEdits) {
238
- const result = this._instaService.createInstance(StashedSession, editor, session, undoCancelEdits);
239
- this._onDidStashSession.fire({ editor, session });
240
- this._logService.trace(`[IE] did STASH session for ${editor.getId()}, ${session.agent.extensionId}`);
241
- return result;
242
- }
243
- getCodeEditor(session) {
244
- for (const [, data] of this._sessions) {
245
- if (data.session === session) {
246
- return data.editor;
247
- }
248
- }
249
- throw ( new Error('session not found'));
250
- }
251
- getSession(editor, uri) {
252
- const key = this._key(editor, uri);
253
- return this._sessions.get(key)?.session;
254
- }
255
- _key(editor, uri) {
256
- const item = this._keyComputers.get(uri.scheme);
257
- return item
258
- ? item.getComparisonKey(editor, uri)
259
- : `${editor.getId()}@${( uri.toString())}`;
260
- }
261
- registerSessionKeyComputer(scheme, value) {
262
- this._keyComputers.set(scheme, value);
263
- return toDisposable(() => this._keyComputers.delete(scheme));
264
- }
265
- async createSession2(editor, uri, token) {
266
- assertType(editor.hasModel());
267
- if (( this._sessions2.has(uri))) {
268
- throw ( new Error('Session already exists'));
269
- }
270
- this._onWillStartSession.fire(editor);
271
- const chatModelRef = this._chatService.startSession(ChatAgentLocation.EditorInline, { canUseTools: false });
272
- const chatModel = chatModelRef.object;
273
- chatModel.startEditingSession(false);
274
- const widget = this._chatWidgetService.getWidgetBySessionResource(chatModel.sessionResource);
275
- await widget?.attachmentModel.addFile(uri);
276
- const store = ( new DisposableStore());
277
- store.add(toDisposable(() => {
278
- this._chatService.cancelCurrentRequestForSession(chatModel.sessionResource);
279
- chatModel.editingSession?.reject();
280
- this._sessions2.delete(uri);
281
- this._onDidChangeSessions.fire(this);
282
- }));
283
- store.add(chatModelRef);
284
- store.add(autorun(r => {
285
- const entries = chatModel.editingSession?.entries.read(r);
286
- if (!entries?.length) {
287
- return;
288
- }
289
- const state = entries.find(entry => isEqual(entry.modifiedURI, uri))?.state.read(r);
290
- if (state === ModifiedFileEntryState.Accepted || state === ModifiedFileEntryState.Rejected) {
291
- const response = chatModel.getRequests().at(-1)?.response;
292
- if (response) {
293
- this._chatService.notifyUserAction({
294
- sessionResource: response.session.sessionResource,
295
- requestId: response.requestId,
296
- agentId: response.agent?.id,
297
- command: response.slashCommand?.name,
298
- result: response.result,
299
- action: {
300
- kind: 'inlineChat',
301
- action: state === ModifiedFileEntryState.Accepted ? 'accepted' : 'discarded'
302
- }
303
- });
304
- }
305
- }
306
- const allSettled = entries.every(entry => {
307
- const state = entry.state.read(r);
308
- return (state === ModifiedFileEntryState.Accepted || state === ModifiedFileEntryState.Rejected)
309
- && !entry.isCurrentlyBeingModifiedBy.read(r);
310
- });
311
- if (allSettled && !chatModel.requestInProgress.read(undefined)) {
312
- store.dispose();
313
- }
314
- }));
315
- const result = {
316
- uri,
317
- initialPosition: editor.getSelection().getStartPosition().delta(-1),
318
- initialSelection: editor.getSelection(),
319
- chatModel,
320
- editingSession: chatModel.editingSession,
321
- dispose: store.dispose.bind(store)
322
- };
323
- this._sessions2.set(uri, result);
324
- this._onDidChangeSessions.fire(this);
325
- return result;
326
- }
327
- getSession2(uri) {
328
- let result = this._sessions2.get(uri);
329
- if (!result) {
330
- for (const [_, candidate] of this._sessions2) {
331
- const entry = candidate.editingSession.getEntry(uri);
332
- if (entry) {
333
- result = candidate;
334
- break;
335
- }
336
- }
337
- }
338
- return result;
339
- }
340
- getSessionBySessionUri(sessionResource) {
341
- for (const session of ( this._sessions2.values())) {
342
- if (isEqual(session.chatModel.sessionResource, sessionResource)) {
343
- return session;
344
- }
345
- }
346
- return undefined;
347
- }
348
- };
349
- InlineChatSessionServiceImpl = ( __decorate([
350
- ( __param(0, ITelemetryService)),
351
- ( __param(1, IModelService)),
352
- ( __param(2, ITextModelService)),
353
- ( __param(3, IEditorWorkerService)),
354
- ( __param(4, ILogService)),
355
- ( __param(5, IInstantiationService)),
356
- ( __param(6, IEditorService)),
357
- ( __param(7, ITextFileService)),
358
- ( __param(8, ILanguageService)),
359
- ( __param(9, IChatService)),
360
- ( __param(10, IChatAgentService)),
361
- ( __param(11, IChatWidgetService))
362
- ], InlineChatSessionServiceImpl));
363
- let InlineChatEnabler = class InlineChatEnabler {
364
- static { this.Id = 'inlineChat.enabler'; }
365
- constructor(contextKeyService, chatAgentService, editorService, configService) {
366
- this._store = ( new DisposableStore());
367
- this._ctxHasProvider2 = CTX_INLINE_CHAT_HAS_AGENT2.bindTo(contextKeyService);
368
- this._ctxHasNotebookProvider = CTX_INLINE_CHAT_HAS_NOTEBOOK_AGENT.bindTo(contextKeyService);
369
- this._ctxPossible = CTX_INLINE_CHAT_POSSIBLE.bindTo(contextKeyService);
370
- const agentObs = observableFromEvent(this, chatAgentService.onDidChangeAgents, () => chatAgentService.getDefaultAgent(ChatAgentLocation.EditorInline));
371
- const notebookAgentObs = observableFromEvent(this, chatAgentService.onDidChangeAgents, () => chatAgentService.getDefaultAgent(ChatAgentLocation.Notebook));
372
- const notebookAgentConfigObs = observableConfigValue(InlineChatConfigKeys.notebookAgent, false, configService);
373
- this._store.add(autorun(r => {
374
- const agent = agentObs.read(r);
375
- if (!agent) {
376
- this._ctxHasProvider2.reset();
377
- }
378
- else {
379
- this._ctxHasProvider2.set(true);
380
- }
381
- }));
382
- this._store.add(autorun(r => {
383
- this._ctxHasNotebookProvider.set(notebookAgentConfigObs.read(r) && !!notebookAgentObs.read(r));
384
- }));
385
- const updateEditor = () => {
386
- const ctrl = editorService.activeEditorPane?.getControl();
387
- const isCodeEditorLike = isCodeEditor(ctrl) || isDiffEditor(ctrl) || isCompositeEditor(ctrl);
388
- this._ctxPossible.set(isCodeEditorLike);
389
- };
390
- this._store.add(editorService.onDidActiveEditorChange(updateEditor));
391
- updateEditor();
392
- }
393
- dispose() {
394
- this._ctxPossible.reset();
395
- this._ctxHasProvider2.reset();
396
- this._store.dispose();
397
- }
398
- };
399
- InlineChatEnabler = ( __decorate([
400
- ( __param(0, IContextKeyService)),
401
- ( __param(1, IChatAgentService)),
402
- ( __param(2, IEditorService)),
403
- ( __param(3, IConfigurationService))
404
- ], InlineChatEnabler));
405
- let InlineChatEscapeToolContribution = class InlineChatEscapeToolContribution extends Disposable {
406
- static { InlineChatEscapeToolContribution_1 = this; }
407
- static { this.Id = 'inlineChat.escapeTool'; }
408
- static { this.DONT_ASK_AGAIN_KEY = 'inlineChat.dontAskMoveToPanelChat'; }
409
- static { this._data = {
410
- id: 'inline_chat_exit',
411
- source: ToolDataSource.Internal,
412
- canBeReferencedInPrompt: false,
413
- alwaysDisplayInputOutput: false,
414
- displayName: ( localize(8342, "Inline Chat to Panel Chat")),
415
- modelDescription: 'Moves the inline chat session to the richer panel chat which supports edits across files, creating and deleting files, multi-turn conversations between the user and the assistant, and access to more IDE tools, like retrieve problems, interact with source control, run terminal commands etc.',
416
- }; }
417
- constructor(lmTools, inlineChatSessionService, dialogService, codeEditorService, chatService, logService, storageService, instaService) {
418
- super();
419
- this._store.add(lmTools.registerTool(InlineChatEscapeToolContribution_1._data, {
420
- invoke: async (invocation, _tokenCountFn, _progress, _token) => {
421
- const sessionResource = invocation.context?.sessionResource;
422
- if (!sessionResource) {
423
- logService.warn('InlineChatEscapeToolContribution: no sessionId in tool invocation context');
424
- return { content: [{ kind: 'text', value: 'Cancel' }] };
425
- }
426
- const session = inlineChatSessionService.getSessionBySessionUri(sessionResource);
427
- if (!session) {
428
- logService.warn(`InlineChatEscapeToolContribution: no session found for id ${sessionResource}`);
429
- return { content: [{ kind: 'text', value: 'Cancel' }] };
430
- }
431
- const dontAskAgain = storageService.getBoolean(InlineChatEscapeToolContribution_1.DONT_ASK_AGAIN_KEY, StorageScope.PROFILE);
432
- let result;
433
- if (dontAskAgain !== undefined) {
434
- result = { confirmed: dontAskAgain, checkboxChecked: false };
435
- }
436
- else {
437
- result = await dialogService.confirm({
438
- type: 'question',
439
- title: ( localize(8343, "Do you want to continue in Chat view?")),
440
- message: ( localize(8344, "Do you want to continue in Chat view?")),
441
- detail: ( localize(
442
- 8345,
443
- "Inline chat is designed for making single-file code changes. Continue your request in the Chat view or rephrase it for inline chat."
444
- )),
445
- primaryButton: ( localize(8346, "Continue in Chat view")),
446
- cancelButton: ( localize(8347, "Cancel")),
447
- checkbox: { label: ( localize(8348, "Don't ask again")), checked: false },
448
- });
449
- }
450
- const editor = codeEditorService.getFocusedCodeEditor();
451
- if (!editor || result.confirmed) {
452
- logService.trace('InlineChatEscapeToolContribution: moving session to panel chat');
453
- await instaService.invokeFunction(askInPanelChat, session.chatModel.getRequests().at(-1), session.chatModel.inputModel.state.get());
454
- session.dispose();
455
- }
456
- else {
457
- logService.trace('InlineChatEscapeToolContribution: rephrase prompt');
458
- const lastRequest = session.chatModel.getRequests().at(-1);
459
- chatService.removeRequest(session.chatModel.sessionResource, lastRequest.id);
460
- session.chatModel.inputModel.setState({ inputText: lastRequest.message.text });
461
- }
462
- if (result.checkboxChecked) {
463
- storageService.store(InlineChatEscapeToolContribution_1.DONT_ASK_AGAIN_KEY, result.confirmed, StorageScope.PROFILE, StorageTarget.USER);
464
- logService.trace('InlineChatEscapeToolContribution: stored don\'t ask again preference');
465
- }
466
- return { content: [{ kind: 'text', value: 'Success' }] };
467
- }
468
- }));
469
- }
470
- };
471
- InlineChatEscapeToolContribution = InlineChatEscapeToolContribution_1 = ( __decorate([
472
- ( __param(0, ILanguageModelToolsService)),
473
- ( __param(1, IInlineChatSessionService)),
474
- ( __param(2, IDialogService)),
475
- ( __param(3, ICodeEditorService)),
476
- ( __param(4, IChatService)),
477
- ( __param(5, ILogService)),
478
- ( __param(6, IStorageService)),
479
- ( __param(7, IInstantiationService))
480
- ], InlineChatEscapeToolContribution));
481
- registerAction2(class ResetMoveToPanelChatChoice extends Action2 {
482
- constructor() {
483
- super({
484
- id: 'inlineChat.resetMoveToPanelChatChoice',
485
- precondition: ( ChatContextKeys.Setup.hidden.negate()),
486
- title: ( localize2(8349, "Reset Choice for 'Move Inline Chat to Panel Chat'")),
487
- f1: true
488
- });
489
- }
490
- run(accessor) {
491
- accessor.get(IStorageService).remove(InlineChatEscapeToolContribution.DONT_ASK_AGAIN_KEY, StorageScope.PROFILE);
492
- }
493
- });
494
-
495
- export { InlineChatEnabler, InlineChatError, InlineChatEscapeToolContribution, InlineChatSessionServiceImpl };