@codingame/monaco-vscode-katex-common 24.3.0 → 25.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.
- package/package.json +3 -3
- package/vscode/src/vs/platform/actions/browser/buttonbar.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatAccessibilityProvider.d.ts → accessibility/chatAccessibilityProvider.d.ts} +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatAccessibilityProvider.js → accessibility/chatAccessibilityProvider.js} +25 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContinueInAction.js +19 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatElicitationActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.js +31 -31
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTitleActions.js +15 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatAttachmentModel.d.ts → attachments/chatAttachmentModel.d.ts} +4 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatAttachmentModel.js → attachments/chatAttachmentModel.js} +24 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatAttachmentWidgets.d.ts → attachments/chatAttachmentWidgets.d.ts} +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatAttachmentWidgets.js → attachments/chatAttachmentWidgets.js} +80 -89
- package/vscode/src/vs/workbench/contrib/chat/browser/{contrib → attachments}/chatImplicitContext.d.ts +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/{contrib → attachments}/chatImplicitContext.js +23 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/{contrib → attachments}/chatInputRelatedFilesContrib.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/{contrib → attachments}/chatInputRelatedFilesContrib.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/implicitContextAttachment.d.ts +4 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/implicitContextAttachment.js +47 -21
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingActions.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingActions.js +39 -39
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionPickerActionItem.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewWelcomeController.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatAgentHover.d.ts → widget/chatAgentHover.d.ts} +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatAgentHover.js → widget/chatAgentHover.js} +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatAgentCommandContentPart.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatAgentCommandContentPart.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatAnonymousRateLimitedPart.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatAnonymousRateLimitedPart.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatAttachmentsContentPart.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatAttachmentsContentPart.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatChangesSummaryPart.d.ts +10 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatChangesSummaryPart.js +59 -119
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatCodeCitationContentPart.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatCodeCitationContentPart.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatCollapsibleContentPart.d.ts +11 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatCollapsibleContentPart.js +31 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatCommandContentPart.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatCommandContentPart.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatConfirmationContentPart.d.ts +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatConfirmationContentPart.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatConfirmationWidget.d.ts +9 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatConfirmationWidget.js +31 -99
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatContentCodePools.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatContentCodePools.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatDiffBlockPart.d.ts → widget/chatContentParts/chatDiffBlockPart.d.ts} +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatElicitationContentPart.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatElicitationContentPart.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatErrorConfirmationPart.d.ts +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatErrorConfirmationPart.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatErrorContentPart.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatErrorContentPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatExtensionsContentPart.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatExtensionsContentPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatInlineAnchorWidget.d.ts → widget/chatContentParts/chatInlineAnchorWidget.d.ts} +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatInlineAnchorWidget.js → widget/chatContentParts/chatInlineAnchorWidget.js} +18 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatMarkdownContentPart.d.ts +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatMarkdownContentPart.js +15 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatMarkdownDecorationsRenderer.d.ts → widget/chatContentParts/chatMarkdownDecorationsRenderer.d.ts} +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatMarkdownDecorationsRenderer.js → widget/chatContentParts/chatMarkdownDecorationsRenderer.js} +9 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatMcpServersInteractionContentPart.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatMcpServersInteractionContentPart.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatMultiDiffContentPart.d.ts +4 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatMultiDiffContentPart.js +31 -35
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatProgressContentPart.d.ts +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatProgressContentPart.js +9 -42
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatPullRequestContentPart.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatPullRequestContentPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatQuotaExceededPart.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatQuotaExceededPart.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatReferencesContentPart.d.ts +7 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatReferencesContentPart.js +20 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatSuggestNextWidget.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatTaskContentPart.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatTaskContentPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatTextEditContentPart.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatTextEditContentPart.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatTextEditContentPart.service.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatThinkingContentPart.d.ts +9 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatThinkingContentPart.js +71 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatTodoListWidget.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatTodoListWidget.js +23 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatToolInputOutputContentPart.d.ts +4 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatToolInputOutputContentPart.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatToolOutputContentSubPart.d.ts +6 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatToolOutputContentSubPart.js +27 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatTreeContentPart.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatTreeContentPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/{codeBlockPart.d.ts → widget/chatContentParts/codeBlockPart.d.ts} +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/{codeBlockPart.js → widget/chatContentParts/codeBlockPart.js} +19 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/media/chatThinkingContent.css +17 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/toolInvocationParts/abstractToolConfirmationSubPart.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/toolInvocationParts/abstractToolConfirmationSubPart.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/toolInvocationParts/chatExtensionsInstallToolSubPart.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/toolInvocationParts/chatExtensionsInstallToolSubPart.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/toolInvocationParts/chatInputOutputMarkdownProgressPart.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/toolInvocationParts/chatInputOutputMarkdownProgressPart.js +4 -32
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/toolInvocationParts/chatResultListSubPart.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/toolInvocationParts/chatResultListSubPart.js +4 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/toolInvocationParts/chatTerminalToolConfirmationSubPart.d.ts +4 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/toolInvocationParts/chatTerminalToolConfirmationSubPart.js +103 -37
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/toolInvocationParts/chatTerminalToolProgressPart.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/toolInvocationParts/chatTerminalToolProgressPart.js +18 -131
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/toolInvocationParts/chatToolConfirmationSubPart.d.ts +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/toolInvocationParts/chatToolConfirmationSubPart.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/toolInvocationParts/chatToolInvocationPart.d.ts +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/toolInvocationParts/chatToolInvocationPart.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/toolInvocationParts/chatToolInvocationSubPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/toolInvocationParts/chatToolInvocationSubPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/toolInvocationParts/chatToolOutputPart.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/toolInvocationParts/chatToolOutputPart.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPartUtilities.d.ts +14 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPartUtilities.js +46 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/toolInvocationParts/chatToolPostExecuteConfirmationPart.d.ts +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/toolInvocationParts/chatToolPostExecuteConfirmationPart.js +11 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/toolInvocationParts/chatToolProgressPart.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/toolInvocationParts/chatToolProgressPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatDragAndDrop.d.ts → widget/chatDragAndDrop.d.ts} +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatDragAndDrop.js → widget/chatDragAndDrop.js} +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatListRenderer.d.ts → widget/chatListRenderer.d.ts} +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatListRenderer.js → widget/chatListRenderer.js} +41 -53
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatWidget.d.ts → widget/chatWidget.d.ts} +18 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatWidget.js → widget/chatWidget.js} +77 -57
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatFollowups.d.ts → widget/input/chatFollowups.d.ts} +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatFollowups.js → widget/input/chatFollowups.js} +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatInputPart.d.ts → widget/input/chatInputPart.d.ts} +14 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatInputPart.js → widget/input/chatInputPart.js} +75 -59
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatSelectedTools.d.ts → widget/input/chatSelectedTools.d.ts} +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatSelectedTools.js → widget/input/chatSelectedTools.js} +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/{contrib → widget/input/editor}/chatInputCompletions.js +36 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/{modelPicker → widget/input}/modePickerActionItem.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/{modelPicker → widget/input}/modePickerActionItem.js +9 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/{modelPicker → widget/input}/modelPickerActionItem.d.ts +4 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/{modelPicker → widget/input}/modelPickerActionItem.js +21 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/{media → widget/media}/chat.css +17 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/{media → widget/media}/chatViewWelcome.css +3 -1
- package/vscode/src/vs/workbench/contrib/chat/common/{chatColors.js → widget/chatColors.js} +13 -13
- package/vscode/src/vs/workbench/contrib/chat/common/{chatWidgetHistoryService.d.ts → widget/chatWidgetHistoryService.d.ts} +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/{chatWidgetHistoryService.js → widget/chatWidgetHistoryService.js} +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/{codeBlockModelCollection.d.ts → widget/codeBlockModelCollection.d.ts} +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/{codeBlockModelCollection.js → widget/codeBlockModelCollection.js} +4 -3
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.d.ts +7 -8
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.js +63 -63
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSession.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.js +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.d.ts +3 -4
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +16 -18
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatStrategies.d.ts +1 -5
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatStrategies.js +8 -18
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.js +12 -12
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatZoneWidget.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatZoneWidget.js +2 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/utils.js +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.d.ts +0 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.js +35 -54
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpPromptArgumentPick.js +14 -14
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chat/notebookChatUtils.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chat/notebookChatUtils.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOperations.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffComponents.js +4 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementOutputs.js +7 -7
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalModelRefFactory.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditorBrowser.js +5 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffList.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditor.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminal/browser/chatTerminalCommandMirror.d.ts +35 -4
- package/vscode/src/vs/workbench/contrib/terminal/browser/chatTerminalCommandMirror.js +129 -31
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/common.d.ts +0 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/common.js +0 -76
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/computeAutomaticInstructions.d.ts +0 -48
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/computeAutomaticInstructions.js +0 -373
- /package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/media/{chatSessionAction.css → chatSessionPickerActionItem.css} +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentMarkdownRenderer.d.ts → widget/chatContentMarkdownRenderer.d.ts} +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentMarkdownRenderer.js → widget/chatContentMarkdownRenderer.js} +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatCollections.d.ts +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatCollections.js +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/browser/{chatDiffBlockPart.js → widget/chatContentParts/chatDiffBlockPart.js} +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatSuggestNextWidget.d.ts +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/chatTextEditContentPart.service.js +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/browser/{media → widget/chatContentParts/media}/chatCodeBlockPill.css +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/media/chatConfirmationWidget.css +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/media/chatExtensionsContent.css +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/browser/{media → widget/chatContentParts/media}/chatInlineAnchorWidget.css +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/media/chatMarkdownPart.css +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/media/chatMcpServersInteractionContent.css +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/media/chatPullRequestContent.css +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/browser/{chatContentParts → widget/chatContentParts}/media/chatTerminalToolProgressPart.css +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/browser/{codeBlockPart.css → widget/chatContentParts/media/codeBlockPart.css} +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/browser/{chatOptions.d.ts → widget/chatOptions.d.ts} +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/browser/{chatOptions.js → widget/chatOptions.js} +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/browser/{chatInputPartWidgets.d.ts → widget/input/chatInputPartWidgets.d.ts} +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/browser/{chatInputPartWidgets.js → widget/input/chatInputPartWidgets.js} +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/browser/{contrib → widget/input/editor}/chatInputCompletions.d.ts +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/browser/{media → widget/media}/chatAgentHover.css +0 -0
- /package/vscode/src/vs/workbench/contrib/chat/common/{chatColors.d.ts → widget/chatColors.d.ts} +0 -0
package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/computeAutomaticInstructions.js
DELETED
|
@@ -1,373 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
-
import { splitGlobAware, match } from '@codingame/monaco-vscode-api/vscode/vs/base/common/glob';
|
|
4
|
-
import { ResourceMap, ResourceSet } from '@codingame/monaco-vscode-api/vscode/vs/base/common/map';
|
|
5
|
-
import { Schemas } from '@codingame/monaco-vscode-api/vscode/vs/base/common/network';
|
|
6
|
-
import { dirname, basename } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
|
|
7
|
-
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
8
|
-
import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
9
|
-
import { IFileService } from '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service';
|
|
10
|
-
import { ILabelService } from '@codingame/monaco-vscode-api/vscode/vs/platform/label/common/label.service';
|
|
11
|
-
import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
|
|
12
|
-
import { ITelemetryService } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service';
|
|
13
|
-
import { IWorkspaceContextService } from '@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace.service';
|
|
14
|
-
import { toPromptFileVariableEntry, PromptFileVariableKind, isPromptFileVariableEntry, IChatRequestVariableEntry, ChatRequestVariableSet, toToolVariableEntry, toPromptTextVariableEntry } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatVariableEntries';
|
|
15
|
-
import { VSCodeToolReference } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModelToolsService';
|
|
16
|
-
import { ILanguageModelToolsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModelToolsService.service';
|
|
17
|
-
import { PromptsConfig } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/config/config';
|
|
18
|
-
import { isPromptOrInstructionsFile } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/config/promptFileLocations';
|
|
19
|
-
import { PromptsType } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/promptTypes';
|
|
20
|
-
import { IPromptsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService.service';
|
|
21
|
-
import { OffsetRange } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/core/ranges/offsetRange';
|
|
22
|
-
import { ChatConfiguration } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
|
|
23
|
-
|
|
24
|
-
function newInstructionsCollectionEvent() {
|
|
25
|
-
return { applyingInstructionsCount: 0, referencedInstructionsCount: 0, agentInstructionsCount: 0, listedInstructionsCount: 0, totalInstructionsCount: 0 };
|
|
26
|
-
}
|
|
27
|
-
let ComputeAutomaticInstructions = class ComputeAutomaticInstructions {
|
|
28
|
-
constructor(_enabledTools, _promptsService, _logService, _labelService, _configurationService, _workspaceService, _fileService, _telemetryService, _languageModelToolsService) {
|
|
29
|
-
this._enabledTools = _enabledTools;
|
|
30
|
-
this._promptsService = _promptsService;
|
|
31
|
-
this._logService = _logService;
|
|
32
|
-
this._labelService = _labelService;
|
|
33
|
-
this._configurationService = _configurationService;
|
|
34
|
-
this._workspaceService = _workspaceService;
|
|
35
|
-
this._fileService = _fileService;
|
|
36
|
-
this._telemetryService = _telemetryService;
|
|
37
|
-
this._languageModelToolsService = _languageModelToolsService;
|
|
38
|
-
this._parseResults = ( new ResourceMap());
|
|
39
|
-
}
|
|
40
|
-
async _parseInstructionsFile(uri, token) {
|
|
41
|
-
if (( this._parseResults.has(uri))) {
|
|
42
|
-
return this._parseResults.get(uri);
|
|
43
|
-
}
|
|
44
|
-
try {
|
|
45
|
-
const result = await this._promptsService.parseNew(uri, token);
|
|
46
|
-
this._parseResults.set(uri, result);
|
|
47
|
-
return result;
|
|
48
|
-
}
|
|
49
|
-
catch (error) {
|
|
50
|
-
this._logService.error(`[InstructionsContextComputer] Failed to parse instruction file: ${uri}`, error);
|
|
51
|
-
return undefined;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
async collect(variables, token) {
|
|
55
|
-
const instructionFiles = await this._promptsService.listPromptFiles(PromptsType.instructions, token);
|
|
56
|
-
this._logService.trace(`[InstructionsContextComputer] ${instructionFiles.length} instruction files available.`);
|
|
57
|
-
const telemetryEvent = newInstructionsCollectionEvent();
|
|
58
|
-
const context = this._getContext(variables);
|
|
59
|
-
await this.addApplyingInstructions(instructionFiles, context, variables, telemetryEvent, token);
|
|
60
|
-
await this._addReferencedInstructions(variables, telemetryEvent, token);
|
|
61
|
-
await this._addAgentInstructions(variables, telemetryEvent, token);
|
|
62
|
-
const instructionsListVariable = await this._getInstructionsWithPatternsList(instructionFiles, variables, token);
|
|
63
|
-
if (instructionsListVariable) {
|
|
64
|
-
variables.add(instructionsListVariable);
|
|
65
|
-
telemetryEvent.listedInstructionsCount++;
|
|
66
|
-
}
|
|
67
|
-
this.sendTelemetry(telemetryEvent);
|
|
68
|
-
}
|
|
69
|
-
sendTelemetry(telemetryEvent) {
|
|
70
|
-
telemetryEvent.totalInstructionsCount = telemetryEvent.agentInstructionsCount + telemetryEvent.referencedInstructionsCount + telemetryEvent.applyingInstructionsCount + telemetryEvent.listedInstructionsCount;
|
|
71
|
-
this._telemetryService.publicLog2('instructionsCollected', telemetryEvent);
|
|
72
|
-
}
|
|
73
|
-
async addApplyingInstructions(instructionFiles, context, variables, telemetryEvent, token) {
|
|
74
|
-
for (const { uri } of instructionFiles) {
|
|
75
|
-
const parsedFile = await this._parseInstructionsFile(uri, token);
|
|
76
|
-
if (!parsedFile) {
|
|
77
|
-
this._logService.trace(`[InstructionsContextComputer] Unable to read: ${uri}`);
|
|
78
|
-
continue;
|
|
79
|
-
}
|
|
80
|
-
const applyTo = parsedFile.header?.applyTo;
|
|
81
|
-
if (!applyTo) {
|
|
82
|
-
this._logService.trace(`[InstructionsContextComputer] No 'applyTo' found: ${uri}`);
|
|
83
|
-
continue;
|
|
84
|
-
}
|
|
85
|
-
if (( context.instructions.has(uri))) {
|
|
86
|
-
this._logService.trace(`[InstructionsContextComputer] Skipping already processed instruction file: ${uri}`);
|
|
87
|
-
continue;
|
|
88
|
-
}
|
|
89
|
-
const match = this._matches(context.files, applyTo);
|
|
90
|
-
if (match) {
|
|
91
|
-
this._logService.trace(`[InstructionsContextComputer] Match for ${uri} with ${match.pattern}${match.file ? ` for file ${match.file}` : ''}`);
|
|
92
|
-
const reason = !match.file ?
|
|
93
|
-
( localize(5975, 'Automatically attached as pattern is **')) :
|
|
94
|
-
( localize(
|
|
95
|
-
5976,
|
|
96
|
-
'Automatically attached as pattern {0} matches {1}',
|
|
97
|
-
applyTo,
|
|
98
|
-
this._labelService.getUriLabel(match.file, { relative: true })
|
|
99
|
-
));
|
|
100
|
-
variables.add(toPromptFileVariableEntry(uri, PromptFileVariableKind.Instruction, reason, true));
|
|
101
|
-
telemetryEvent.applyingInstructionsCount++;
|
|
102
|
-
}
|
|
103
|
-
else {
|
|
104
|
-
this._logService.trace(`[InstructionsContextComputer] No match for ${uri} with ${applyTo}`);
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
_getContext(attachedContext) {
|
|
109
|
-
const files = ( new ResourceSet());
|
|
110
|
-
const instructions = ( new ResourceSet());
|
|
111
|
-
for (const variable of attachedContext.asArray()) {
|
|
112
|
-
if (isPromptFileVariableEntry(variable)) {
|
|
113
|
-
instructions.add(variable.value);
|
|
114
|
-
}
|
|
115
|
-
else {
|
|
116
|
-
const uri = IChatRequestVariableEntry.toUri(variable);
|
|
117
|
-
if (uri) {
|
|
118
|
-
files.add(uri);
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
return { files, instructions };
|
|
123
|
-
}
|
|
124
|
-
async _addAgentInstructions(variables, telemetryEvent, token) {
|
|
125
|
-
const useCopilotInstructionsFiles = this._configurationService.getValue(PromptsConfig.USE_COPILOT_INSTRUCTION_FILES);
|
|
126
|
-
const useAgentMd = this._configurationService.getValue(PromptsConfig.USE_AGENT_MD);
|
|
127
|
-
if (!useCopilotInstructionsFiles && !useAgentMd) {
|
|
128
|
-
this._logService.trace(`[InstructionsContextComputer] No agent instructions files added (settings disabled).`);
|
|
129
|
-
return;
|
|
130
|
-
}
|
|
131
|
-
const entries = ( new ChatRequestVariableSet());
|
|
132
|
-
if (useCopilotInstructionsFiles) {
|
|
133
|
-
const files = await this._promptsService.listCopilotInstructionsMDs(token);
|
|
134
|
-
for (const file of files) {
|
|
135
|
-
entries.add(toPromptFileVariableEntry(file, PromptFileVariableKind.Instruction, ( localize(
|
|
136
|
-
5977,
|
|
137
|
-
'Automatically attached as setting {0} is enabled',
|
|
138
|
-
PromptsConfig.USE_COPILOT_INSTRUCTION_FILES
|
|
139
|
-
)), true));
|
|
140
|
-
telemetryEvent.agentInstructionsCount++;
|
|
141
|
-
this._logService.trace(`[InstructionsContextComputer] copilot-instruction.md files added: ${( file.toString())}`);
|
|
142
|
-
}
|
|
143
|
-
await this._addReferencedInstructions(entries, telemetryEvent, token);
|
|
144
|
-
}
|
|
145
|
-
if (useAgentMd) {
|
|
146
|
-
const files = await this._promptsService.listAgentMDs(token, false);
|
|
147
|
-
for (const file of files) {
|
|
148
|
-
entries.add(toPromptFileVariableEntry(file, PromptFileVariableKind.Instruction, ( localize(
|
|
149
|
-
5978,
|
|
150
|
-
'Automatically attached as setting {0} is enabled',
|
|
151
|
-
PromptsConfig.USE_AGENT_MD
|
|
152
|
-
)), true));
|
|
153
|
-
telemetryEvent.agentInstructionsCount++;
|
|
154
|
-
this._logService.trace(`[InstructionsContextComputer] AGENTS.md files added: ${( file.toString())}`);
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
for (const entry of entries.asArray()) {
|
|
158
|
-
variables.add(entry);
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
_matches(files, applyToPattern) {
|
|
162
|
-
const patterns = splitGlobAware(applyToPattern, ',');
|
|
163
|
-
const patterMatches = (pattern) => {
|
|
164
|
-
pattern = pattern.trim();
|
|
165
|
-
if (pattern.length === 0) {
|
|
166
|
-
return undefined;
|
|
167
|
-
}
|
|
168
|
-
if (pattern === '**' || pattern === '**/*' || pattern === '*') {
|
|
169
|
-
return { pattern };
|
|
170
|
-
}
|
|
171
|
-
if (!pattern.startsWith('/') && !pattern.startsWith('**/')) {
|
|
172
|
-
pattern = '**/' + pattern;
|
|
173
|
-
}
|
|
174
|
-
for (const file of files) {
|
|
175
|
-
if (match(pattern, file.path, { ignoreCase: true })) {
|
|
176
|
-
return { pattern, file };
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
return undefined;
|
|
180
|
-
};
|
|
181
|
-
for (const pattern of patterns) {
|
|
182
|
-
const matchResult = patterMatches(pattern);
|
|
183
|
-
if (matchResult) {
|
|
184
|
-
return matchResult;
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
return undefined;
|
|
188
|
-
}
|
|
189
|
-
_getTool(referenceName) {
|
|
190
|
-
if (!this._enabledTools) {
|
|
191
|
-
return undefined;
|
|
192
|
-
}
|
|
193
|
-
const tool = this._languageModelToolsService.getToolByName(referenceName);
|
|
194
|
-
if (tool && this._enabledTools.get(tool)) {
|
|
195
|
-
return { tool, variable: `#tool:${this._languageModelToolsService.getFullReferenceName(tool)}` };
|
|
196
|
-
}
|
|
197
|
-
return undefined;
|
|
198
|
-
}
|
|
199
|
-
async _getInstructionsWithPatternsList(instructionFiles, _existingVariables, token) {
|
|
200
|
-
const readTool = this._getTool('readFile');
|
|
201
|
-
const runSubagentTool = this._getTool(VSCodeToolReference.runSubagent);
|
|
202
|
-
const entries = [];
|
|
203
|
-
if (readTool) {
|
|
204
|
-
const searchNestedAgentMd = this._configurationService.getValue(PromptsConfig.USE_NESTED_AGENT_MD);
|
|
205
|
-
const agentsMdPromise = searchNestedAgentMd ? this._promptsService.findAgentMDsInWorkspace(token) : Promise.resolve([]);
|
|
206
|
-
entries.push('<instructions>');
|
|
207
|
-
entries.push('Here is a list of instruction files that contain rules for modifying or creating new code.');
|
|
208
|
-
entries.push('These files are important for ensuring that the code is modified or created correctly.');
|
|
209
|
-
entries.push('Please make sure to follow the rules specified in these files when working with the codebase.');
|
|
210
|
-
entries.push(`If the file is not already available as attachment, use the ${readTool.variable} tool to acquire it.`);
|
|
211
|
-
entries.push('Make sure to acquire the instructions before making any changes to the code.');
|
|
212
|
-
let hasContent = false;
|
|
213
|
-
for (const { uri } of instructionFiles) {
|
|
214
|
-
const parsedFile = await this._parseInstructionsFile(uri, token);
|
|
215
|
-
if (parsedFile) {
|
|
216
|
-
entries.push('<instruction>');
|
|
217
|
-
if (parsedFile.header) {
|
|
218
|
-
const { description, applyTo } = parsedFile.header;
|
|
219
|
-
if (description) {
|
|
220
|
-
entries.push(`<description>${description}</description>`);
|
|
221
|
-
}
|
|
222
|
-
entries.push(`<file>${getFilePath(uri)}</file>`);
|
|
223
|
-
if (applyTo) {
|
|
224
|
-
entries.push(`<applyTo>${applyTo}</applyTo>`);
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
entries.push('</instruction>');
|
|
228
|
-
hasContent = true;
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
const agentsMdFiles = await agentsMdPromise;
|
|
232
|
-
for (const uri of agentsMdFiles) {
|
|
233
|
-
if (uri) {
|
|
234
|
-
const folderName = this._labelService.getUriLabel(dirname(uri), { relative: true });
|
|
235
|
-
const description = folderName.trim().length === 0 ? ( localize(5979, 'Instructions for the workspace')) : ( localize(5980, 'Instructions for folder \'{0}\'', folderName));
|
|
236
|
-
entries.push('<instruction>');
|
|
237
|
-
entries.push(`<description>${description}</description>`);
|
|
238
|
-
entries.push(`<file>${getFilePath(uri)}</file>`);
|
|
239
|
-
entries.push('</instruction>');
|
|
240
|
-
hasContent = true;
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
if (!hasContent) {
|
|
244
|
-
entries.length = 0;
|
|
245
|
-
}
|
|
246
|
-
else {
|
|
247
|
-
entries.push('</instructions>', '', '');
|
|
248
|
-
}
|
|
249
|
-
const claudeSkills = await this._promptsService.findClaudeSkills(token);
|
|
250
|
-
if (claudeSkills && claudeSkills.length > 0) {
|
|
251
|
-
entries.push('<skills>');
|
|
252
|
-
entries.push('Here is a list of skills that contain domain specific knowledge on a variety of topics.');
|
|
253
|
-
entries.push('Each skill comes with a description of the topic and a file path that contains the detailed instructions.');
|
|
254
|
-
entries.push(`When a user asks you to perform a task that falls within the domain of a skill, use the ${readTool.variable} tool to acquire the full instructions from the file URI.`);
|
|
255
|
-
for (const skill of claudeSkills) {
|
|
256
|
-
entries.push('<skill>');
|
|
257
|
-
entries.push(`<name>${skill.name}</name>`);
|
|
258
|
-
if (skill.description) {
|
|
259
|
-
entries.push(`<description>${skill.description}</description>`);
|
|
260
|
-
}
|
|
261
|
-
entries.push(`<file>${getFilePath(skill.uri)}</file>`);
|
|
262
|
-
entries.push('</skill>');
|
|
263
|
-
}
|
|
264
|
-
entries.push('</skills>', '', '');
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
if (runSubagentTool) {
|
|
268
|
-
const subagentToolCustomAgents = this._configurationService.getValue(ChatConfiguration.SubagentToolCustomAgents);
|
|
269
|
-
if (subagentToolCustomAgents) {
|
|
270
|
-
const agents = await this._promptsService.getCustomAgents(token);
|
|
271
|
-
if (agents.length > 0) {
|
|
272
|
-
entries.push('<agents>');
|
|
273
|
-
entries.push('Here is a list of agents that can be used when running a subagent.');
|
|
274
|
-
entries.push('Each agent has optionally a description with the agent\'s purpose and expertise. When asked to run a subagent, choose the most appropriate agent from this list.');
|
|
275
|
-
entries.push(`Use the ${runSubagentTool.variable} tool with the agent name to run the subagent.`);
|
|
276
|
-
for (const agent of agents) {
|
|
277
|
-
if (agent.infer === false) {
|
|
278
|
-
continue;
|
|
279
|
-
}
|
|
280
|
-
entries.push('<agent>');
|
|
281
|
-
entries.push(`<name>${agent.name}</name>`);
|
|
282
|
-
if (agent.description) {
|
|
283
|
-
entries.push(`<description>${agent.description}</description>`);
|
|
284
|
-
}
|
|
285
|
-
if (agent.argumentHint) {
|
|
286
|
-
entries.push(`<argumentHint>${agent.argumentHint}</argumentHint>`);
|
|
287
|
-
}
|
|
288
|
-
entries.push('</agent>');
|
|
289
|
-
}
|
|
290
|
-
entries.push('</agents>', '', '');
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
}
|
|
294
|
-
if (entries.length === 0) {
|
|
295
|
-
return undefined;
|
|
296
|
-
}
|
|
297
|
-
const content = entries.join('\n');
|
|
298
|
-
const toolReferences = [];
|
|
299
|
-
const collectToolReference = (tool) => {
|
|
300
|
-
if (tool) {
|
|
301
|
-
let offset = content.indexOf(tool.variable);
|
|
302
|
-
while (offset >= 0) {
|
|
303
|
-
toolReferences.push(toToolVariableEntry(tool.tool, ( new OffsetRange(offset, offset + tool.variable.length))));
|
|
304
|
-
offset = content.indexOf(tool.variable, offset + 1);
|
|
305
|
-
}
|
|
306
|
-
}
|
|
307
|
-
};
|
|
308
|
-
collectToolReference(readTool);
|
|
309
|
-
collectToolReference(runSubagentTool);
|
|
310
|
-
return toPromptTextVariableEntry(content, true, toolReferences);
|
|
311
|
-
}
|
|
312
|
-
async _addReferencedInstructions(attachedContext, telemetryEvent, token) {
|
|
313
|
-
const seen = ( new ResourceSet());
|
|
314
|
-
const todo = [];
|
|
315
|
-
for (const variable of attachedContext.asArray()) {
|
|
316
|
-
if (isPromptFileVariableEntry(variable)) {
|
|
317
|
-
if (!( seen.has(variable.value))) {
|
|
318
|
-
todo.push(variable.value);
|
|
319
|
-
seen.add(variable.value);
|
|
320
|
-
}
|
|
321
|
-
}
|
|
322
|
-
}
|
|
323
|
-
let next = todo.pop();
|
|
324
|
-
while (next) {
|
|
325
|
-
const result = await this._parseInstructionsFile(next, token);
|
|
326
|
-
if (result && result.body) {
|
|
327
|
-
const refsToCheck = [];
|
|
328
|
-
for (const ref of result.body.fileReferences) {
|
|
329
|
-
const url = result.body.resolveFilePath(ref.content);
|
|
330
|
-
if (url && !( seen.has(url)) && (isPromptOrInstructionsFile(url) || this._workspaceService.getWorkspaceFolder(url) !== undefined)) {
|
|
331
|
-
refsToCheck.push({ resource: url });
|
|
332
|
-
seen.add(url);
|
|
333
|
-
}
|
|
334
|
-
}
|
|
335
|
-
if (refsToCheck.length > 0) {
|
|
336
|
-
const stats = await this._fileService.resolveAll(refsToCheck);
|
|
337
|
-
for (let i = 0; i < stats.length; i++) {
|
|
338
|
-
const stat = stats[i];
|
|
339
|
-
const uri = refsToCheck[i].resource;
|
|
340
|
-
if (stat.success && stat.stat?.isFile) {
|
|
341
|
-
if (isPromptOrInstructionsFile(uri)) {
|
|
342
|
-
todo.push(uri);
|
|
343
|
-
}
|
|
344
|
-
const reason = ( localize(5981, 'Referenced by {0}', basename(next)));
|
|
345
|
-
attachedContext.add(toPromptFileVariableEntry(uri, PromptFileVariableKind.InstructionReference, reason, true));
|
|
346
|
-
telemetryEvent.referencedInstructionsCount++;
|
|
347
|
-
this._logService.trace(`[InstructionsContextComputer] ${( uri.toString())} added, referenced by ${( next.toString())}`);
|
|
348
|
-
}
|
|
349
|
-
}
|
|
350
|
-
}
|
|
351
|
-
}
|
|
352
|
-
next = todo.pop();
|
|
353
|
-
}
|
|
354
|
-
}
|
|
355
|
-
};
|
|
356
|
-
ComputeAutomaticInstructions = ( __decorate([
|
|
357
|
-
( __param(1, IPromptsService)),
|
|
358
|
-
( __param(2, ILogService)),
|
|
359
|
-
( __param(3, ILabelService)),
|
|
360
|
-
( __param(4, IConfigurationService)),
|
|
361
|
-
( __param(5, IWorkspaceContextService)),
|
|
362
|
-
( __param(6, IFileService)),
|
|
363
|
-
( __param(7, ITelemetryService)),
|
|
364
|
-
( __param(8, ILanguageModelToolsService))
|
|
365
|
-
], ComputeAutomaticInstructions));
|
|
366
|
-
function getFilePath(uri) {
|
|
367
|
-
if (uri.scheme === Schemas.file || uri.scheme === Schemas.vscodeRemote) {
|
|
368
|
-
return uri.fsPath;
|
|
369
|
-
}
|
|
370
|
-
return ( uri.toString());
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
export { ComputeAutomaticInstructions, newInstructionsCollectionEvent };
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/vscode/src/vs/workbench/contrib/chat/browser/{chatOptions.d.ts → widget/chatOptions.d.ts}
RENAMED
|
File without changes
|
/package/vscode/src/vs/workbench/contrib/chat/browser/{chatOptions.js → widget/chatOptions.js}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/vscode/src/vs/workbench/contrib/chat/browser/{media → widget/media}/chatAgentHover.css
RENAMED
|
File without changes
|
/package/vscode/src/vs/workbench/contrib/chat/common/{chatColors.d.ts → widget/chatColors.d.ts}
RENAMED
|
File without changes
|