@codingame/monaco-vscode-katex-common 27.0.0 → 28.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 +2 -2
- package/vscode/src/vs/platform/actionWidget/browser/actionWidgetDropdown.js +2 -0
- package/vscode/src/vs/platform/actions/browser/buttonbar.js +2 -2
- package/vscode/src/vs/platform/mcp/common/modelContextProtocolApps.d.ts +30 -2
- package/vscode/src/vs/platform/mcp/common/modelContextProtocolApps.js +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityProvider.js +15 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContinueInAction.js +17 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatElicitationActions.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.d.ts +5 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.js +90 -43
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTitleActions.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionApprovalModel.d.ts +26 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionApprovalModel.js +106 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionHoverWidget.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.d.ts +6 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.js +63 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.js +13 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsOpener.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.d.ts +28 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.js +133 -28
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/media/agentsessionsviewer.css +69 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgets.js +55 -46
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/implicitContextAttachment.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingActions.js +38 -37
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +14 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationWidget.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/media/chatEditingEditorOverlay.css +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/media/chatEditingExplanationWidget.css +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionPickerActionItem.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.js +72 -57
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/searchableOptionPickerActionItem.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewWelcomeController.d.ts +1 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewWelcomeController.js +4 -110
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatAgentHover.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAgentCommandContentPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAgentCommandContentPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAnonymousRateLimitedPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAnonymousRateLimitedPart.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatChangesSummaryPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatChangesSummaryPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCodeCitationContentPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCodeCitationContentPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollapsibleContentPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollapsibleMarkdownContentPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCommandContentPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCommandContentPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationContentPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationContentPart.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationWidget.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationWidget.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatContentParts.d.ts +59 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatContentParts.js +29 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatDisabledClaudeHooksContentPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatDisabledClaudeHooksContentPart.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatElicitationContentPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatErrorConfirmationPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatErrorContentPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatExtensionsContentPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatExtensionsContentPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatHookContentPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatHookContentPart.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatInlineAnchorWidget.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownContentPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownContentPart.js +8 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownTableScrolling.d.ts +15 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownTableScrolling.js +55 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMcpServersInteractionContentPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMcpServersInteractionContentPart.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMultiDiffContentPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMultiDiffContentPart.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatProgressContentPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatProgressContentPart.js +6 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatPullRequestContentPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuestionCarouselPart.d.ts +26 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuestionCarouselPart.js +290 -126
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuotaExceededPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuotaExceededPart.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatReferencesContentPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatReferencesContentPart.js +9 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatResourceGroupWidget.d.ts +22 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatResourceGroupWidget.js +263 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentContentPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentContentPart.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSuggestNextWidget.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTaskContentPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTextEditContentPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTextEditContentPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatThinkingContentPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatThinkingContentPart.js +22 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTipContentPart.js +12 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTodoListWidget.js +17 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolInputOutputContentPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolInputOutputContentPart.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolOutputContentSubPart.d.ts +3 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolOutputContentSubPart.js +6 -260
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTreeContentPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTreeContentPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatWorkspaceEditContentPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatWorkspaceEditContentPart.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/codeBlockPart.js +14 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatConfirmationWidget.css +17 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatQuestionCarousel.css +129 -117
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatTipContent.css +0 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/abstractToolConfirmationSubPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/abstractToolConfirmationSubPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatExtensionsInstallToolSubPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatExtensionsInstallToolSubPart.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatInputOutputMarkdownProgressPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppModel.d.ts +8 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppModel.js +56 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppSubPart.d.ts +5 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppSubPart.js +20 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatResultListSubPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatSimpleToolProgressPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolConfirmationSubPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolConfirmationSubPart.js +15 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.d.ts +43 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.js +42 -41
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolConfirmationSubPart.d.ts +2 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolConfirmationSubPart.js +14 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolInvocationPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolOutputPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolOutputPart.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPartUtilities.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPostExecuteConfirmationPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPostExecuteConfirmationPart.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolProgressPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolStreamingSubPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatDragAndDrop.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.d.ts +4 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.js +61 -39
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatQuestionCarouselAutoReply.js +7 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidget.d.ts +1 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidget.js +81 -191
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatFollowups.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.d.ts +31 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.js +334 -181
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPickerActionItem.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPickerActionItem.js +7 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelPicker.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelPicker.js +51 -55
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelSelectionLogic.d.ts +104 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelSelectionLogic.js +127 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/delegationSessionPickerActionItem.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modePickerActionItem.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modePickerActionItem.js +16 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem2.js +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/permissionPickerActionItem.d.ts +22 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/permissionPickerActionItem.js +213 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/sessionTargetPickerActionItem.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/sessionTargetPickerActionItem.js +10 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/workspacePickerActionItem.js +6 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/media/chat.css +174 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/media/chatViewWelcome.css +2 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageDetails.js +12 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageWidget.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageWidget.js +5 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatContextUsageDetails.css +36 -50
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatContextUsageWidget.css +19 -4
- package/vscode/src/vs/workbench/contrib/chat/common/widget/annotations.js +22 -6
- package/vscode/src/vs/workbench/contrib/chat/common/widget/chatColors.js +15 -15
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAffordance.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAffordance.js +24 -4
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.js +3 -3
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatOverlayWidget.js +5 -5
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.js +5 -5
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatZoneWidget.js +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChat.css +2 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChatEditorAffordance.css +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChatOverlayWidget.css +3 -3
- package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.js +38 -46
- package/vscode/src/vs/workbench/contrib/interactive/browser/replInputHintContentWidget.js +3 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/executionStatusBarItemController.js +7 -7
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindWidget.js +2 -2
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditor.js +1 -1
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditorInput.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminal/browser/chatTerminalCommandMirror.js +6 -10
|
@@ -5,7 +5,7 @@ import { ITelemetryService } from "@codingame/monaco-vscode-api/vscode/vs/platfo
|
|
|
5
5
|
import { IChatEntitlementService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/chat/common/chatEntitlementService.service";
|
|
6
6
|
import { IChatErrorDetailsPart, IChatRendererContent, IChatResponseViewModel } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatViewModel";
|
|
7
7
|
import { IChatWidgetService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service";
|
|
8
|
-
import { IChatContentPart } from "
|
|
8
|
+
import { IChatContentPart } from "./chatContentParts.js";
|
|
9
9
|
export declare class ChatQuotaExceededPart extends Disposable implements IChatContentPart {
|
|
10
10
|
private readonly content;
|
|
11
11
|
readonly domNode: HTMLElement;
|
|
@@ -53,10 +53,10 @@ let ChatQuotaExceededPart = class ChatQuotaExceededPart extends Disposable {
|
|
|
53
53
|
switch (chatEntitlementService.entitlement) {
|
|
54
54
|
case ChatEntitlement.Pro:
|
|
55
55
|
case ChatEntitlement.ProPlus:
|
|
56
|
-
primaryButtonLabel = ( localize(
|
|
56
|
+
primaryButtonLabel = ( localize(6564, "Manage Paid Premium Requests"));
|
|
57
57
|
break;
|
|
58
58
|
case ChatEntitlement.Free:
|
|
59
|
-
primaryButtonLabel = ( localize(
|
|
59
|
+
primaryButtonLabel = ( localize(6565, "Upgrade to GitHub Copilot Pro"));
|
|
60
60
|
break;
|
|
61
61
|
}
|
|
62
62
|
let hasAddedWaitWarning = false;
|
|
@@ -65,7 +65,7 @@ let ChatQuotaExceededPart = class ChatQuotaExceededPart extends Disposable {
|
|
|
65
65
|
return;
|
|
66
66
|
}
|
|
67
67
|
hasAddedWaitWarning = true;
|
|
68
|
-
append(messageContainer, $(".chat-quota-wait-warning", undefined, ( localize(
|
|
68
|
+
append(messageContainer, $(".chat-quota-wait-warning", undefined, ( localize(6566, "Changes may take a few minutes to take effect."))));
|
|
69
69
|
};
|
|
70
70
|
let hasAddedRetryButton = false;
|
|
71
71
|
const addRetryButtonIfNeeded = () => {
|
|
@@ -78,7 +78,7 @@ let ChatQuotaExceededPart = class ChatQuotaExceededPart extends Disposable {
|
|
|
78
78
|
buttonForeground: asCssVariable(textLinkForeground)
|
|
79
79
|
})));
|
|
80
80
|
retryButton.element.classList.add("chat-quota-error-secondary-button");
|
|
81
|
-
retryButton.label = ( localize(
|
|
81
|
+
retryButton.label = ( localize(6567, "Click to Retry"));
|
|
82
82
|
this._register(retryButton.onDidClick(() => {
|
|
83
83
|
const widget = chatWidgetService.getWidgetBySessionResource(element.sessionResource);
|
|
84
84
|
if (!widget) {
|
|
@@ -16,7 +16,7 @@ import { IChatRendererContent } from "@codingame/monaco-vscode-api/vscode/vs/wor
|
|
|
16
16
|
import { ChatTreeItem } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat";
|
|
17
17
|
import { ChatCollapsibleContentPart } from "./chatCollapsibleContentPart.js";
|
|
18
18
|
import { IDisposableReference } from "./chatCollections.js";
|
|
19
|
-
import { IChatContentPartRenderContext } from "
|
|
19
|
+
import { IChatContentPartRenderContext } from "./chatContentParts.js";
|
|
20
20
|
import { IHoverService } from "@codingame/monaco-vscode-api/vscode/vs/platform/hover/browser/hover.service";
|
|
21
21
|
import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
|
|
22
22
|
export interface IChatReferenceListItem extends IChatContentReference {
|
|
@@ -57,7 +57,7 @@ let ChatCollapsibleListContentPart = class ChatCollapsibleListContentPart extend
|
|
|
57
57
|
hoverService,
|
|
58
58
|
configurationService
|
|
59
59
|
) {
|
|
60
|
-
super(labelOverride ?? (data.length > 1 ? ( localize(
|
|
60
|
+
super(labelOverride ?? (data.length > 1 ? ( localize(6568, "Used {0} references", data.length)) : ( localize(6569, "Used {0} reference", 1))), context, hoverMessage, hoverService, configurationService);
|
|
61
61
|
this.data = data;
|
|
62
62
|
this.contentReferencesListPool = contentReferencesListPool;
|
|
63
63
|
this.openerService = openerService;
|
|
@@ -214,7 +214,7 @@ let CollapsibleListPool = class CollapsibleListPool extends Disposable {
|
|
|
214
214
|
return basename(reference.uri.path);
|
|
215
215
|
}
|
|
216
216
|
},
|
|
217
|
-
getWidgetAriaLabel: () => ( localize(
|
|
217
|
+
getWidgetAriaLabel: () => ( localize(6570, "Collapsible Chat References List"))
|
|
218
218
|
},
|
|
219
219
|
dnd: {
|
|
220
220
|
getDragURI: element => getResourceForElement(element)?.toString() ?? null,
|
|
@@ -375,7 +375,9 @@ let CollapsibleListRenderer = class CollapsibleListRenderer {
|
|
|
375
375
|
title: data.options?.status?.description
|
|
376
376
|
});
|
|
377
377
|
} else {
|
|
378
|
-
templateData.label.setLabel(
|
|
378
|
+
templateData.label.setLabel(reference.variableName, undefined, {
|
|
379
|
+
title: data.options?.status?.description ?? data.title
|
|
380
|
+
});
|
|
379
381
|
}
|
|
380
382
|
} else if (typeof reference === "string") {
|
|
381
383
|
templateData.label.setLabel(reference, undefined, {
|
|
@@ -400,7 +402,7 @@ let CollapsibleListRenderer = class CollapsibleListRenderer {
|
|
|
400
402
|
name: settingId
|
|
401
403
|
}, {
|
|
402
404
|
icon: Codicon.settingsGear,
|
|
403
|
-
title: ( localize(
|
|
405
|
+
title: ( localize(6571, "Open setting '{0}'", settingId)),
|
|
404
406
|
strikethrough: data.excluded,
|
|
405
407
|
extraClasses
|
|
406
408
|
});
|
|
@@ -445,7 +447,7 @@ let CollapsibleListRenderer = class CollapsibleListRenderer {
|
|
|
445
447
|
templateData.addedSpan.textContent = `+${diffMeta.added}`;
|
|
446
448
|
templateData.removedSpan.textContent = `-${diffMeta.removed}`;
|
|
447
449
|
templateData.fileDiffsContainer.setAttribute("aria-label", ( localize(
|
|
448
|
-
|
|
450
|
+
6572,
|
|
449
451
|
"{0} lines added, {1} lines removed",
|
|
450
452
|
diffMeta.added,
|
|
451
453
|
diffMeta.removed
|
|
@@ -526,7 +528,7 @@ registerAction2(class AddToChatAction extends Action2 {
|
|
|
526
528
|
super({
|
|
527
529
|
id: AddToChatAction.id,
|
|
528
530
|
title: {
|
|
529
|
-
...( localize2(
|
|
531
|
+
...( localize2(6573, "Add File to Chat"))
|
|
530
532
|
},
|
|
531
533
|
f1: false,
|
|
532
534
|
menu: [{
|
|
@@ -556,7 +558,7 @@ registerAction2(class OpenChatReferenceLinkAction extends Action2 {
|
|
|
556
558
|
super({
|
|
557
559
|
id: OpenChatReferenceLinkAction.id,
|
|
558
560
|
title: {
|
|
559
|
-
...( localize2(
|
|
561
|
+
...( localize2(6574, "Copy Link"))
|
|
560
562
|
},
|
|
561
563
|
f1: false,
|
|
562
564
|
menu: [{
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
2
|
+
import { IContextMenuService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextview/browser/contextView.service";
|
|
3
|
+
import { IFileService } from "@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service";
|
|
4
|
+
import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
5
|
+
import { IChatCollapsibleIODataPart } from "./chatToolInputOutputContentPart.js";
|
|
6
|
+
export interface IChatToolOutputResourceToolbarContext {
|
|
7
|
+
parts: IChatCollapsibleIODataPart[];
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* A reusable widget for rendering a group of resource data parts (files, images)
|
|
11
|
+
* with attachment pills and a toolbar with save actions.
|
|
12
|
+
*
|
|
13
|
+
* Used by ChatToolOutputContentSubPart and ChatMcpAppSubPart (for download resources).
|
|
14
|
+
*/
|
|
15
|
+
export declare class ChatResourceGroupWidget extends Disposable {
|
|
16
|
+
private readonly _instantiationService;
|
|
17
|
+
private readonly _contextMenuService;
|
|
18
|
+
private readonly _fileService;
|
|
19
|
+
readonly domNode: HTMLElement;
|
|
20
|
+
constructor(parts: IChatCollapsibleIODataPart[], _instantiationService: IInstantiationService, _contextMenuService: IContextMenuService, _fileService: IFileService);
|
|
21
|
+
private _fillInResourceGroup;
|
|
22
|
+
}
|
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
+
import { h } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
|
|
4
|
+
import { disposableTimeout } from '@codingame/monaco-vscode-api/vscode/vs/base/common/async';
|
|
5
|
+
import { decodeBase64 } from '@codingame/monaco-vscode-api/vscode/vs/base/common/buffer';
|
|
6
|
+
import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
|
|
7
|
+
import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
8
|
+
import { basename, joinPath } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
|
|
9
|
+
import { generateUuid } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uuid';
|
|
10
|
+
import { localize2, localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
11
|
+
import { MenuWorkbenchToolBar } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/browser/toolbar';
|
|
12
|
+
import { MenuId, Action2, registerAction2 } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
|
|
13
|
+
import { ICommandService } from '@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service';
|
|
14
|
+
import { IContextMenuService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextview/browser/contextView.service';
|
|
15
|
+
import { IFileDialogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/common/dialogs.service';
|
|
16
|
+
import { IFileService } from '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service';
|
|
17
|
+
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
18
|
+
import { ILabelService } from '@codingame/monaco-vscode-api/vscode/vs/platform/label/common/label.service';
|
|
19
|
+
import { INotificationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/notification/common/notification.service';
|
|
20
|
+
import { ProgressLocation } from '@codingame/monaco-vscode-api/vscode/vs/platform/progress/common/progress';
|
|
21
|
+
import { IProgressService } from '@codingame/monaco-vscode-api/vscode/vs/platform/progress/common/progress.service';
|
|
22
|
+
import { IWorkspaceContextService } from '@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace.service';
|
|
23
|
+
import { REVEAL_IN_EXPLORER_COMMAND_ID } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/files/browser/fileConstants';
|
|
24
|
+
import { getAttachableImageExtension } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatModel';
|
|
25
|
+
import { ChatAttachmentsContentPart } from './chatAttachmentsContentPart.js';
|
|
26
|
+
|
|
27
|
+
const IMAGE_DECODE_DELAY_MS = 100;
|
|
28
|
+
let ChatResourceGroupWidget = class ChatResourceGroupWidget extends Disposable {
|
|
29
|
+
constructor(parts, _instantiationService, _contextMenuService, _fileService) {
|
|
30
|
+
super();
|
|
31
|
+
this._instantiationService = _instantiationService;
|
|
32
|
+
this._contextMenuService = _contextMenuService;
|
|
33
|
+
this._fileService = _fileService;
|
|
34
|
+
const el = h(".chat-collapsible-io-resource-group", [
|
|
35
|
+
h(".chat-collapsible-io-resource-items@items"),
|
|
36
|
+
h(".chat-collapsible-io-resource-actions@actions")
|
|
37
|
+
]);
|
|
38
|
+
this.domNode = el.root;
|
|
39
|
+
this._fillInResourceGroup(parts, el.items, el.actions);
|
|
40
|
+
}
|
|
41
|
+
async _fillInResourceGroup(parts, itemsContainer, actionsContainer) {
|
|
42
|
+
const entries = [];
|
|
43
|
+
const deferredImageParts = [];
|
|
44
|
+
for (let i = 0; i < parts.length; i++) {
|
|
45
|
+
const part = parts[i];
|
|
46
|
+
if (part.mimeType && getAttachableImageExtension(part.mimeType)) {
|
|
47
|
+
if (part.base64Value) {
|
|
48
|
+
entries.push({
|
|
49
|
+
kind: "file",
|
|
50
|
+
id: generateUuid(),
|
|
51
|
+
name: basename(part.uri),
|
|
52
|
+
fullName: part.uri.path,
|
|
53
|
+
value: part.uri
|
|
54
|
+
});
|
|
55
|
+
deferredImageParts.push({
|
|
56
|
+
index: i,
|
|
57
|
+
part
|
|
58
|
+
});
|
|
59
|
+
} else if (part.value) {
|
|
60
|
+
entries.push({
|
|
61
|
+
kind: "image",
|
|
62
|
+
id: generateUuid(),
|
|
63
|
+
name: basename(part.uri),
|
|
64
|
+
value: part.value,
|
|
65
|
+
mimeType: part.mimeType,
|
|
66
|
+
isURL: false,
|
|
67
|
+
references: [{
|
|
68
|
+
kind: "reference",
|
|
69
|
+
reference: part.uri
|
|
70
|
+
}]
|
|
71
|
+
});
|
|
72
|
+
} else {
|
|
73
|
+
const value = await this._fileService.readFile(part.uri).then(f => f.value.buffer, () => undefined);
|
|
74
|
+
if (!value) {
|
|
75
|
+
entries.push({
|
|
76
|
+
kind: "file",
|
|
77
|
+
id: generateUuid(),
|
|
78
|
+
name: basename(part.uri),
|
|
79
|
+
fullName: part.uri.path,
|
|
80
|
+
value: part.uri
|
|
81
|
+
});
|
|
82
|
+
} else {
|
|
83
|
+
entries.push({
|
|
84
|
+
kind: "image",
|
|
85
|
+
id: generateUuid(),
|
|
86
|
+
name: basename(part.uri),
|
|
87
|
+
value,
|
|
88
|
+
mimeType: part.mimeType,
|
|
89
|
+
isURL: false,
|
|
90
|
+
references: [{
|
|
91
|
+
kind: "reference",
|
|
92
|
+
reference: part.uri
|
|
93
|
+
}]
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
} else {
|
|
98
|
+
entries.push({
|
|
99
|
+
kind: "file",
|
|
100
|
+
id: generateUuid(),
|
|
101
|
+
name: basename(part.uri),
|
|
102
|
+
fullName: part.uri.path,
|
|
103
|
+
value: part.uri
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
if (this._store.isDisposed) {
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
const attachments = this._register(this._instantiationService.createInstance(ChatAttachmentsContentPart, {
|
|
111
|
+
variables: entries,
|
|
112
|
+
limit: 5,
|
|
113
|
+
contentReferences: undefined,
|
|
114
|
+
domNode: undefined
|
|
115
|
+
}));
|
|
116
|
+
attachments.contextMenuHandler = (attachment, event) => {
|
|
117
|
+
const index = entries.indexOf(attachment);
|
|
118
|
+
const part = parts[index];
|
|
119
|
+
if (part) {
|
|
120
|
+
event.preventDefault();
|
|
121
|
+
event.stopPropagation();
|
|
122
|
+
this._contextMenuService.showContextMenu({
|
|
123
|
+
menuId: MenuId.ChatToolOutputResourceContext,
|
|
124
|
+
menuActionOptions: {
|
|
125
|
+
shouldForwardArgs: true
|
|
126
|
+
},
|
|
127
|
+
getAnchor: () => ({
|
|
128
|
+
x: event.pageX,
|
|
129
|
+
y: event.pageY
|
|
130
|
+
}),
|
|
131
|
+
getActionsContext: () => ({
|
|
132
|
+
parts: [part]
|
|
133
|
+
})
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
itemsContainer.appendChild(attachments.domNode);
|
|
138
|
+
const toolbar = this._register(this._instantiationService.createInstance(
|
|
139
|
+
MenuWorkbenchToolBar,
|
|
140
|
+
actionsContainer,
|
|
141
|
+
MenuId.ChatToolOutputResourceToolbar,
|
|
142
|
+
{
|
|
143
|
+
menuOptions: {
|
|
144
|
+
shouldForwardArgs: true
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
));
|
|
148
|
+
toolbar.context = {
|
|
149
|
+
parts
|
|
150
|
+
};
|
|
151
|
+
if (deferredImageParts.length > 0) {
|
|
152
|
+
this._register(disposableTimeout(() => {
|
|
153
|
+
for (const {
|
|
154
|
+
index,
|
|
155
|
+
part
|
|
156
|
+
} of deferredImageParts) {
|
|
157
|
+
try {
|
|
158
|
+
const value = decodeBase64(part.base64Value).buffer;
|
|
159
|
+
entries[index] = {
|
|
160
|
+
kind: "image",
|
|
161
|
+
id: generateUuid(),
|
|
162
|
+
name: basename(part.uri),
|
|
163
|
+
value,
|
|
164
|
+
mimeType: part.mimeType,
|
|
165
|
+
isURL: false,
|
|
166
|
+
references: [{
|
|
167
|
+
kind: "reference",
|
|
168
|
+
reference: part.uri
|
|
169
|
+
}]
|
|
170
|
+
};
|
|
171
|
+
} catch {}
|
|
172
|
+
}
|
|
173
|
+
attachments.updateVariables(entries);
|
|
174
|
+
}, IMAGE_DECODE_DELAY_MS));
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
};
|
|
178
|
+
ChatResourceGroupWidget = ( __decorate([( __param(1, IInstantiationService)), ( __param(2, IContextMenuService)), ( __param(3, IFileService))], ChatResourceGroupWidget));
|
|
179
|
+
class SaveResourcesAction extends Action2 {
|
|
180
|
+
static {
|
|
181
|
+
this.ID = "chat.toolOutput.save";
|
|
182
|
+
}
|
|
183
|
+
constructor() {
|
|
184
|
+
super({
|
|
185
|
+
id: SaveResourcesAction.ID,
|
|
186
|
+
title: ( localize2(6575, "Save...")),
|
|
187
|
+
icon: Codicon.cloudDownload,
|
|
188
|
+
menu: [{
|
|
189
|
+
id: MenuId.ChatToolOutputResourceToolbar,
|
|
190
|
+
group: "navigation",
|
|
191
|
+
order: 1
|
|
192
|
+
}, {
|
|
193
|
+
id: MenuId.ChatToolOutputResourceContext
|
|
194
|
+
}]
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
async run(accessor, context) {
|
|
198
|
+
const fileDialog = accessor.get(IFileDialogService);
|
|
199
|
+
const fileService = accessor.get(IFileService);
|
|
200
|
+
const notificationService = accessor.get(INotificationService);
|
|
201
|
+
const progressService = accessor.get(IProgressService);
|
|
202
|
+
const workspaceContextService = accessor.get(IWorkspaceContextService);
|
|
203
|
+
const commandService = accessor.get(ICommandService);
|
|
204
|
+
const labelService = accessor.get(ILabelService);
|
|
205
|
+
const defaultFilepath = await fileDialog.defaultFilePath();
|
|
206
|
+
const savePart = async (part, isFolder, uri) => {
|
|
207
|
+
const target = isFolder ? joinPath(uri, basename(part.uri)) : uri;
|
|
208
|
+
try {
|
|
209
|
+
if (part.kind === "data") {
|
|
210
|
+
await fileService.copy(part.uri, target, true);
|
|
211
|
+
} else {
|
|
212
|
+
const contents = await fileService.readFile(part.uri);
|
|
213
|
+
await fileService.writeFile(target, contents.value);
|
|
214
|
+
}
|
|
215
|
+
} catch (e) {
|
|
216
|
+
notificationService.error(( localize(6576, "Failed to save {0}: {1}", basename(part.uri), e)));
|
|
217
|
+
}
|
|
218
|
+
};
|
|
219
|
+
const withProgress = async (thenReveal, todo) => {
|
|
220
|
+
await progressService.withProgress({
|
|
221
|
+
location: ProgressLocation.Notification,
|
|
222
|
+
delay: 5_000,
|
|
223
|
+
title: ( localize(6577, "Saving resources..."))
|
|
224
|
+
}, async report => {
|
|
225
|
+
for (const task of todo) {
|
|
226
|
+
await task();
|
|
227
|
+
report.report({
|
|
228
|
+
increment: 1,
|
|
229
|
+
total: todo.length
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
});
|
|
233
|
+
if (workspaceContextService.isInsideWorkspace(thenReveal)) {
|
|
234
|
+
commandService.executeCommand(REVEAL_IN_EXPLORER_COMMAND_ID, thenReveal);
|
|
235
|
+
} else {
|
|
236
|
+
notificationService.info(( localize(6578, "Saved resources to {0}", labelService.getUriLabel(thenReveal))));
|
|
237
|
+
}
|
|
238
|
+
};
|
|
239
|
+
if (context.parts.length === 1) {
|
|
240
|
+
const part = context.parts[0];
|
|
241
|
+
const uri = await fileDialog.pickFileToSave(joinPath(defaultFilepath, basename(part.uri)));
|
|
242
|
+
if (!uri) {
|
|
243
|
+
return;
|
|
244
|
+
}
|
|
245
|
+
await withProgress(uri, [() => savePart(part, false, uri)]);
|
|
246
|
+
} else {
|
|
247
|
+
const uris = await fileDialog.showOpenDialog({
|
|
248
|
+
title: ( localize(6579, "Pick folder to save resources")),
|
|
249
|
+
canSelectFiles: false,
|
|
250
|
+
canSelectFolders: true,
|
|
251
|
+
canSelectMany: false,
|
|
252
|
+
defaultUri: workspaceContextService.getWorkspace().folders[0]?.uri
|
|
253
|
+
});
|
|
254
|
+
if (!uris?.length) {
|
|
255
|
+
return;
|
|
256
|
+
}
|
|
257
|
+
await withProgress(uris[0], ( context.parts.map(part => () => savePart(part, true, uris[0]))));
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
registerAction2(SaveResourcesAction);
|
|
262
|
+
|
|
263
|
+
export { ChatResourceGroupWidget };
|
|
@@ -9,7 +9,7 @@ import { CodeBlockModelCollection } from "../../../common/widget/codeBlockModelC
|
|
|
9
9
|
import { ChatTreeItem } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat";
|
|
10
10
|
import { ChatCollapsibleContentPart } from "./chatCollapsibleContentPart.js";
|
|
11
11
|
import { EditorPool } from "./chatContentCodePools.js";
|
|
12
|
-
import { IChatContentPart, IChatContentPartRenderContext } from "
|
|
12
|
+
import { IChatContentPart, IChatContentPartRenderContext } from "./chatContentParts.js";
|
|
13
13
|
import { IChatMarkdownAnchorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownAnchorService.service";
|
|
14
14
|
import { CollapsibleListPool } from "./chatReferencesContentPart.js";
|
|
15
15
|
/**
|
|
@@ -30,7 +30,7 @@ let ChatSubagentContentPart = ChatSubagentContentPart_1 = class ChatSubagentCont
|
|
|
30
30
|
return toolInvocation.toolSpecificData?.kind === "subagent" && !toolInvocation.subAgentInvocationId;
|
|
31
31
|
}
|
|
32
32
|
static extractSubagentInfo(toolInvocation) {
|
|
33
|
-
const defaultDescription = ( localize(
|
|
33
|
+
const defaultDescription = ( localize(6580, "Running subagent..."));
|
|
34
34
|
if (!ChatSubagentContentPart_1.isParentSubagentTool(toolInvocation)) {
|
|
35
35
|
return {
|
|
36
36
|
description: defaultDescription,
|
|
@@ -85,7 +85,7 @@ let ChatSubagentContentPart = ChatSubagentContentPart_1 = class ChatSubagentCont
|
|
|
85
85
|
prompt,
|
|
86
86
|
modelName
|
|
87
87
|
} = ChatSubagentContentPart_1.extractSubagentInfo(toolInvocation);
|
|
88
|
-
const prefix = agentName || ( localize(
|
|
88
|
+
const prefix = agentName || ( localize(6581, "Subagent"));
|
|
89
89
|
const initialTitle = `${prefix}: ${description}`;
|
|
90
90
|
super(initialTitle, context, undefined, hoverService, configurationService);
|
|
91
91
|
this.subAgentInvocationId = subAgentInvocationId;
|
|
@@ -190,7 +190,7 @@ let ChatSubagentContentPart = ChatSubagentContentPart_1 = class ChatSubagentCont
|
|
|
190
190
|
return;
|
|
191
191
|
}
|
|
192
192
|
const lines = this.prompt.split("\n");
|
|
193
|
-
const rawFirstLine = lines[0] || ( localize(
|
|
193
|
+
const rawFirstLine = lines[0] || ( localize(6582, "Prompt"));
|
|
194
194
|
const restOfLines = lines.slice(1).join("\n").trim();
|
|
195
195
|
const titleContent = rcut(rawFirstLine, MAX_TITLE_LENGTH);
|
|
196
196
|
const wasTruncated = rawFirstLine.length > MAX_TITLE_LENGTH;
|
|
@@ -238,7 +238,7 @@ let ChatSubagentContentPart = ChatSubagentContentPart_1 = class ChatSubagentCont
|
|
|
238
238
|
}
|
|
239
239
|
}
|
|
240
240
|
updateTitle() {
|
|
241
|
-
const prefix = this.agentName || ( localize(
|
|
241
|
+
const prefix = this.agentName || ( localize(6581, "Subagent"));
|
|
242
242
|
const shimmerText = `${prefix}: ${this.description}`;
|
|
243
243
|
const toolCallText = this.currentRunningToolMessage && this.isActive ? ` \u2014 ${this.currentRunningToolMessage}` : ``;
|
|
244
244
|
if (!this._collapseButton) {
|
|
@@ -304,7 +304,7 @@ let ChatSubagentContentPart = ChatSubagentContentPart_1 = class ChatSubagentCont
|
|
|
304
304
|
return;
|
|
305
305
|
}
|
|
306
306
|
this._hoverDisposable.value = this.hoverService.setupDelayedHover(this._collapseButton.element, {
|
|
307
|
-
content: ( localize(
|
|
307
|
+
content: ( localize(6583, "Model: {0}", this.modelName))
|
|
308
308
|
});
|
|
309
309
|
}
|
|
310
310
|
trackToolState(toolInvocation) {
|
|
@@ -456,7 +456,7 @@ let ChatSubagentContentPart = ChatSubagentContentPart_1 = class ChatSubagentCont
|
|
|
456
456
|
}
|
|
457
457
|
}
|
|
458
458
|
appendHookItem(factory, hookPart) {
|
|
459
|
-
const hookMessage = hookPart.stopReason ? (hookPart.toolDisplayName ? ( localize(
|
|
459
|
+
const hookMessage = hookPart.stopReason ? (hookPart.toolDisplayName ? ( localize(6584, "Blocked {0}", hookPart.toolDisplayName)) : ( localize(6585, "Blocked by hook"))) : (hookPart.toolDisplayName ? ( localize(6586, "Warning for {0}", hookPart.toolDisplayName)) : ( localize(6587, "Hook warning")));
|
|
460
460
|
this.currentRunningToolMessage = hookMessage;
|
|
461
461
|
this.updateTitle();
|
|
462
462
|
if (this.isExpanded() || this.hasExpandedOnce) {
|
|
@@ -42,8 +42,8 @@ let ChatSuggestNextWidget = class ChatSuggestNextWidget extends Disposable {
|
|
|
42
42
|
return;
|
|
43
43
|
}
|
|
44
44
|
this._currentMode = mode;
|
|
45
|
-
const modeName = mode.name.get() || mode.label.get() || ( localize(
|
|
46
|
-
this.titleElement.textContent = ( localize(
|
|
45
|
+
const modeName = mode.name.get() || mode.label.get() || ( localize(6588, "current mode"));
|
|
46
|
+
this.titleElement.textContent = ( localize(6589, "Proceed from {0}", modeName));
|
|
47
47
|
const childrenToRemove = [];
|
|
48
48
|
for (let i = 1; i < this.promptsContainer.children.length; i++) {
|
|
49
49
|
childrenToRemove.push(this.promptsContainer.children[i]);
|
|
@@ -73,7 +73,7 @@ let ChatSuggestNextWidget = class ChatSuggestNextWidget extends Disposable {
|
|
|
73
73
|
const button = $(".chat-welcome-view-suggested-prompt");
|
|
74
74
|
button.setAttribute("tabindex", "0");
|
|
75
75
|
button.setAttribute("role", "button");
|
|
76
|
-
button.setAttribute("aria-label", ( localize(
|
|
76
|
+
button.setAttribute("aria-label", ( localize(6590, "{0}", handoff.label)));
|
|
77
77
|
const titleElement = append(button, $(".chat-welcome-view-suggested-prompt-title"));
|
|
78
78
|
titleElement.textContent = handoff.label;
|
|
79
79
|
const showContinueOn = handoff.showContinueOn ?? true;
|
|
@@ -90,7 +90,7 @@ let ChatSuggestNextWidget = class ChatSuggestNextWidget extends Disposable {
|
|
|
90
90
|
const dropdownContainer = append(button, $(".chat-suggest-next-dropdown"));
|
|
91
91
|
dropdownContainer.setAttribute("tabindex", "0");
|
|
92
92
|
dropdownContainer.setAttribute("role", "button");
|
|
93
|
-
dropdownContainer.setAttribute("aria-label", ( localize(
|
|
93
|
+
dropdownContainer.setAttribute("aria-label", ( localize(6591, "More options for {0}", handoff.label)));
|
|
94
94
|
dropdownContainer.setAttribute("aria-haspopup", "true");
|
|
95
95
|
const separator = append(dropdownContainer, $(".chat-suggest-next-separator"));
|
|
96
96
|
separator.setAttribute("aria-hidden", "true");
|
|
@@ -105,7 +105,7 @@ let ChatSuggestNextWidget = class ChatSuggestNextWidget extends Disposable {
|
|
|
105
105
|
const name = getAgentSessionProviderName(provider);
|
|
106
106
|
return (new Action(
|
|
107
107
|
contrib.type,
|
|
108
|
-
localize(
|
|
108
|
+
localize(6592, "Continue in {0}", name),
|
|
109
109
|
ThemeIcon.isThemeIcon(icon) ? ThemeIcon.asClassName(icon) : undefined,
|
|
110
110
|
true,
|
|
111
111
|
() => {
|
|
@@ -3,7 +3,7 @@ import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/pl
|
|
|
3
3
|
import { IMarkdownRenderer } from "@codingame/monaco-vscode-api/vscode/vs/platform/markdown/browser/markdownRenderer";
|
|
4
4
|
import { IChatTask, IChatTaskSerialized } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService";
|
|
5
5
|
import { IChatProgressRenderableResponseContent } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatModel";
|
|
6
|
-
import { IChatContentPart, IChatContentPartRenderContext } from "
|
|
6
|
+
import { IChatContentPart, IChatContentPartRenderContext } from "./chatContentParts.js";
|
|
7
7
|
import { CollapsibleListPool } from "./chatReferencesContentPart.js";
|
|
8
8
|
export declare class ChatTaskContentPart extends Disposable implements IChatContentPart {
|
|
9
9
|
private readonly task;
|
|
@@ -7,7 +7,7 @@ import { IChatService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/c
|
|
|
7
7
|
import { IChatResponseViewModel } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatViewModel";
|
|
8
8
|
import { IChatListItemRendererOptions } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat";
|
|
9
9
|
import { DiffEditorPool } from "./chatContentCodePools.js";
|
|
10
|
-
import { IChatContentPart, IChatContentPartRenderContext } from "
|
|
10
|
+
import { IChatContentPart, IChatContentPartRenderContext } from "./chatContentParts.js";
|
|
11
11
|
import { ICodeCompareModelService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTextEditContentPart.service";
|
|
12
12
|
export declare class ChatTextEditContentPart extends Disposable implements IChatContentPart {
|
|
13
13
|
private readonly codeCompareModelService;
|
|
@@ -39,7 +39,7 @@ let ChatTextEditContentPart = class ChatTextEditContentPart extends Disposable {
|
|
|
39
39
|
this.domNode = $(
|
|
40
40
|
".interactive-edits-summary",
|
|
41
41
|
undefined,
|
|
42
|
-
!element.isComplete ? "" : element.isCanceled ? ( localize(
|
|
42
|
+
!element.isComplete ? "" : element.isCanceled ? ( localize(6593, "Making changes was aborted.")) : ( localize(6594, "Made changes."))
|
|
43
43
|
);
|
|
44
44
|
} else {
|
|
45
45
|
this.domNode = $("div");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IChatMarkdownContent, IChatThinkingPart, IChatToolInvocation, IChatToolInvocationSerialized } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService";
|
|
2
|
-
import { IChatContentPartRenderContext, IChatContentPart } from "
|
|
2
|
+
import { IChatContentPartRenderContext, IChatContentPart } from "./chatContentParts.js";
|
|
3
3
|
import { IChatRendererContent } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatViewModel";
|
|
4
4
|
import { ChatTreeItem } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat";
|
|
5
5
|
import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|