@codingame/monaco-vscode-katex-common 34.1.3 → 35.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/base/browser/animationSync.d.ts +36 -0
- package/vscode/src/vs/base/browser/animationSync.js +23 -0
- package/vscode/src/vs/base/browser/ui/pixelSpinner/pixelSpinner.js +23 -2
- package/vscode/src/vs/platform/actions/browser/buttonbar.js +3 -2
- package/vscode/src/vs/platform/agentHost/common/claudeSessionConfigKeys.d.ts +5 -5
- package/vscode/src/vs/platform/agentHost/common/fileEditDiff.d.ts +32 -0
- package/vscode/src/vs/platform/agentHost/common/fileEditDiff.js +33 -0
- package/vscode/src/vs/platform/agentHost/common/meta/agentFeedbackAnnotations.d.ts +90 -0
- package/vscode/src/vs/platform/agentHost/common/meta/agentFeedbackAttachments.d.ts +30 -0
- package/vscode/src/vs/platform/agentHost/common/meta/agentToolCallMeta.d.ts +65 -0
- package/vscode/src/vs/platform/agentHost/common/sessionConfigKeys.d.ts +16 -5
- package/vscode/src/vs/platform/agentHost/common/sessionConfigKeys.js +3 -2
- package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-resource-watch/reducer.d.ts +21 -0
- package/vscode/src/vs/platform/agentHost/common/state/protocol/reducers.d.ts +8 -0
- package/vscode/src/vs/platform/agentHost/common/state/sessionReducers.d.ts +9 -0
- package/vscode/src/vs/platform/mcp/common/modelContextProtocolApps.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityProvider.js +16 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContinueInAction.d.ts +29 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContinueInAction.js +105 -28
- 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 +15 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.js +74 -44
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTitleActions.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.js +98 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostChatInputPicker.contribution.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostChatInputPicker.contribution.js +31 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostChatInputPicker.d.ts +45 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostChatInputPicker.js +163 -37
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostFolderPickerActionItem.d.ts +47 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostFolderPickerActionItem.js +172 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostGenericConfigChips.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostGenericConfigChips.js +7 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionReferenceAttachment.d.ts +12 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSnapshotController.d.ts +116 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSnapshotController.js +348 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/media/agentHostChatInputPicker.css +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/stateToProgressAdapter.d.ts +211 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/stateToProgressAdapter.js +64 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionApprovalModel.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionApprovalModel.js +13 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionHoverWidget.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionHoverWidget.js +30 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.d.ts +4 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.js +29 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.js +9 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsOpener.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.d.ts +24 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.js +119 -41
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/media/agentsessionsviewer.css +27 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/sessionTypeAvailability.d.ts +63 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/sessionTypeAvailability.js +97 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgets.d.ts +5 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgets.js +105 -88
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/implicitContextAttachment.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingActions.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingActions.js +46 -48
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelContentProviders.d.ts +28 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelContentProviders.js +98 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionPickerActionItem.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionPickerActionItem.js +9 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chatTurnPills.css +162 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/chatToolRiskAssessmentService.d.ts +9 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/chatToolRiskAssessmentService.js +95 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolSetsContribution.d.ts +22 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolSetsContribution.js +151 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatAgentHover.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatArtifactsWidget.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentMarkdownRenderer.js +20 -2
- 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.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAttachmentsContentPart.d.ts +5 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAttachmentsContentPart.js +61 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAutoModeResolutionContentPart.d.ts +20 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAutoModeResolutionContentPart.js +55 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatChangesSummaryPart.d.ts +6 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatChangesSummaryPart.js +81 -30
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCodeCitationContentPart.js +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.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationWidget.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatDisabledClaudeHooksContentPart.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatEditPillElement.d.ts +11 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatEditPillElement.js +13 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatElicitationContentPart.js +9 -33
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatExtensionsContentPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatExternalEditContentPart.d.ts +6 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatExternalEditContentPart.js +21 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatHookContentPart.js +1 -1
- 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 +6 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownContentPart.js +40 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMcpAuthenticationContentPart.d.ts +35 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMcpAuthenticationContentPart.js +140 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMcpServersInteractionContentPart.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMcpServersStartingContentPart.d.ts +24 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMcpServersStartingContentPart.js +58 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMultiDiffContentPart.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMultiDiffContentPart.js +29 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatPlanReviewPart.js +30 -30
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatProgressContentPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuestionCarouselPart.js +44 -44
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuotaExceededPart.d.ts +1 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuotaExceededPart.js +12 -66
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatReferencesContentPart.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatResourceGroupWidget.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentContentPart.d.ts +39 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentContentPart.js +167 -43
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSuggestNextWidget.d.ts +1 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSuggestNextWidget.js +9 -86
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSystemNotificationContentPart.d.ts +12 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSystemNotificationContentPart.js +23 -0
- 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 +9 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatThinkingContentPart.js +141 -72
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTipContentPart.js +9 -9
- 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 +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolInputOutputContentPart.js +17 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTreeContentPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTurnPillsPart.d.ts +29 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTurnPillsPart.js +110 -0
- 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/chatAgentFeedbackReviewConfirmation.css +133 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatAutoModeResolution.css +30 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatCodeBlockPill.css +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatConfirmationWidget.css +18 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatPlanReview.css +23 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatQuestionCarousel.css +33 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatSubagentContent.css +23 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatTerminalToolProgressPart.css +44 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatThinkingContent.css +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatToolConfirmationCarousel.css +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/abstractToolConfirmationSubPart.d.ts +9 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/abstractToolConfirmationSubPart.js +21 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatAgentFeedbackReviewConfirmationSubPart.d.ts +48 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatAgentFeedbackReviewConfirmationSubPart.js +279 -0
- 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/chatMcpAppModel.d.ts +43 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppModel.js +53 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppSubPart.d.ts +7 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppSubPart.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatModifiedFilesConfirmationSubPart.d.ts +4 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatModifiedFilesConfirmationSubPart.js +24 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/{chatMissingSandboxDepsConfirmationSubPart.d.ts → chatSandboxPrerequisiteConfirmationSubPart.d.ts} +3 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/{chatMissingSandboxDepsConfirmationSubPart.js → chatSandboxPrerequisiteConfirmationSubPart.js} +14 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolConfirmationSubPart.d.ts +0 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolConfirmationSubPart.js +30 -59
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.js +41 -29
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolConfirmationCarouselPart.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolConfirmationSubPart.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolConfirmationSubPart.js +12 -9
- 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/chatToolInvocationPart.js +43 -35
- 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 +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPostExecuteConfirmationPart.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPostExecuteConfirmationPart.js +11 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/toolRiskBadgeHelper.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/toolRiskBadgeHelper.js +51 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/toolRiskBadgeWidget.js +4 -4
- 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 +18 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.js +266 -98
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListWidget.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListWidget.js +8 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatRestoreCheckpointActionViewItem.d.ts +32 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatRestoreCheckpointActionViewItem.js +135 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatTurnPills.d.ts +85 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatTurnPills.js +275 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidget.d.ts +18 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidget.js +84 -37
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatFollowups.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatGoalBannerWidget.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputNotificationService.d.ts +14 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputNotificationWidget.d.ts +6 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputNotificationWidget.js +52 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.d.ts +187 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.js +435 -139
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputStatePersistence.d.ts +6 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputStatePersistence.js +21 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelConfigurationLogic.d.ts +50 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelConfigurationLogic.js +49 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelConfigurationStore.d.ts +79 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelConfigurationStore.js +127 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelPicker.d.ts +84 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelPicker.js +658 -430
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelSelectionLogic.d.ts +72 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelSelectionLogic.js +82 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatPhoneInputPresenter.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatSelectedTools.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatSelectedTools.js +6 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/delegationSessionPickerActionItem.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/delegationSessionPickerActionItem.js +23 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/media/chatGoalBannerWidget.css +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/media/chatInputNotificationWidget.css +28 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modePickerActionItem.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modePickerActionItem.js +15 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem.d.ts +60 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem.js +18 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/permissionPickerActionItem.d.ts +49 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/permissionPickerActionItem.js +141 -81
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/sessionTargetPickerActionItem.d.ts +7 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/sessionTargetPickerActionItem.js +30 -47
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/workspacePickerActionItem.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/workspacePickerInputActionItem.d.ts +20 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/workspacePickerInputActionItem.js +18 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/media/chat.css +469 -148
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageDetails.d.ts +11 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageDetails.js +79 -28
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageWidget.d.ts +71 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageWidget.js +107 -45
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatContextUsageDetails.css +20 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatErrorMessages.d.ts +110 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatErrorMessages.js +37 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatImageExtraction.d.ts +4 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatImageExtraction.js +13 -11
- package/vscode/src/vs/workbench/contrib/chat/common/chatPermissionWarnings.d.ts +8 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatPermissionWarnings.js +57 -21
- package/vscode/src/vs/workbench/contrib/chat/common/widget/chatColors.js +18 -18
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.js +4 -4
- 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/common/inlineChat.js +30 -30
- package/vscode/src/vs/workbench/contrib/interactive/browser/replInputHintContentWidget.js +3 -3
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpToolCallUI.d.ts +39 -8
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpToolCallUI.js +168 -72
- 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/notebook/browser/controller/cellOperations.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.js +24 -24
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffComponents.js +3 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementOutputs.js +7 -7
- 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/replNotebook/browser/replEditor.js +1 -1
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditorInput.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputStatusActionViewItem.d.ts +0 -30
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputStatusActionViewItem.js +0 -147
|
@@ -27,10 +27,9 @@ import { INotebookService } from "@codingame/monaco-vscode-api/vscode/vs/workben
|
|
|
27
27
|
import { ITerminalService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminal/browser/terminal.service";
|
|
28
28
|
import { IBrowserViewWorkbenchService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/browserView/common/browserView.service";
|
|
29
29
|
import { IChatContentReference } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService";
|
|
30
|
-
import { IChatRequestPasteVariableEntry, IChatRequestVariableEntry, IBrowserViewVariableEntry, IElementVariableEntry, INotebookOutputVariableEntry, IPromptFileVariableEntry, IPromptTextVariableEntry, ISCMHistoryItemVariableEntry, ChatRequestToolReferenceEntry, ISCMHistoryItemChangeVariableEntry, ISCMHistoryItemChangeRangeVariableEntry, ITerminalVariableEntry } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/attachments/chatVariableEntries";
|
|
30
|
+
import { IChatRequestPasteVariableEntry, IChatRequestVariableEntry, IBrowserViewVariableEntry, IElementVariableEntry, INotebookOutputVariableEntry, IPromptFileVariableEntry, IPromptTextVariableEntry, ISCMHistoryItemVariableEntry, OmittedState, ChatRequestToolReferenceEntry, ISCMHistoryItemChangeVariableEntry, ISCMHistoryItemChangeRangeVariableEntry, ITerminalVariableEntry } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/attachments/chatVariableEntries";
|
|
31
31
|
import { ILanguageModelChatMetadataAndIdentifier } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModels";
|
|
32
32
|
import { ILanguageModelsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModels.service";
|
|
33
|
-
import { IChatEntitlementService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/chat/common/chatEntitlementService.service";
|
|
34
33
|
import { ILanguageModelToolsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService.service";
|
|
35
34
|
import { IChatImageCarouselService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatImageCarouselService.service";
|
|
36
35
|
declare abstract class AbstractChatAttachmentWidget extends Disposable {
|
|
@@ -59,6 +58,7 @@ declare abstract class AbstractChatAttachmentWidget extends Disposable {
|
|
|
59
58
|
protected openResource(resource: URI, options: Partial<IOpenEditorOptions>, isDirectory: true): Promise<void>;
|
|
60
59
|
protected openResource(resource: URI, options: Partial<IOpenEditorOptions>, isDirectory: false, range: IRange | undefined): Promise<void>;
|
|
61
60
|
}
|
|
61
|
+
export declare function getEffectiveImageOmittedState(omittedState: OmittedState | undefined, currentLanguageModel: ILanguageModelChatMetadataAndIdentifier | undefined, isCurrentInput: boolean | undefined): OmittedState | undefined;
|
|
62
62
|
export declare class FileAttachmentWidget extends AbstractChatAttachmentWidget {
|
|
63
63
|
private readonly themeService;
|
|
64
64
|
private readonly hoverService;
|
|
@@ -87,7 +87,6 @@ export declare class ImageAttachmentWidget extends AbstractChatAttachmentWidget
|
|
|
87
87
|
private readonly hoverService;
|
|
88
88
|
private readonly languageModelsService;
|
|
89
89
|
private readonly labelService;
|
|
90
|
-
private readonly chatEntitlementService;
|
|
91
90
|
private readonly chatImageCarouselService;
|
|
92
91
|
private readonly fileDialogService;
|
|
93
92
|
private readonly fileService;
|
|
@@ -95,7 +94,8 @@ export declare class ImageAttachmentWidget extends AbstractChatAttachmentWidget
|
|
|
95
94
|
constructor(resource: URI | undefined, attachment: IChatRequestVariableEntry, currentLanguageModel: ILanguageModelChatMetadataAndIdentifier | undefined, options: {
|
|
96
95
|
shouldFocusClearButton: boolean;
|
|
97
96
|
supportsDeletion: boolean;
|
|
98
|
-
|
|
97
|
+
isCurrentInput?: boolean;
|
|
98
|
+
}, container: HTMLElement, contextResourceLabels: ResourceLabels, commandService: ICommandService, openerService: IOpenerService, configurationService: IConfigurationService, hoverService: IHoverService, languageModelsService: ILanguageModelsService, instantiationService: IInstantiationService, labelService: ILabelService, chatImageCarouselService: IChatImageCarouselService, fileDialogService: IFileDialogService, fileService: IFileService, notificationService: INotificationService);
|
|
99
99
|
private openInCarousel;
|
|
100
100
|
private attachSaveButton;
|
|
101
101
|
}
|
|
@@ -147,11 +147,10 @@ export declare class NotebookCellOutputChatAttachmentWidget extends AbstractChat
|
|
|
147
147
|
private readonly languageModelsService;
|
|
148
148
|
private readonly notebookService;
|
|
149
149
|
private readonly instantiationService;
|
|
150
|
-
private readonly chatEntitlementService;
|
|
151
150
|
constructor(resource: URI, attachment: INotebookOutputVariableEntry, currentLanguageModel: ILanguageModelChatMetadataAndIdentifier | undefined, options: {
|
|
152
151
|
shouldFocusClearButton: boolean;
|
|
153
152
|
supportsDeletion: boolean;
|
|
154
|
-
}, container: HTMLElement, contextResourceLabels: ResourceLabels, commandService: ICommandService, openerService: IOpenerService, configurationService: IConfigurationService, hoverService: IHoverService, languageModelsService: ILanguageModelsService, notebookService: INotebookService, instantiationService: IInstantiationService
|
|
153
|
+
}, container: HTMLElement, contextResourceLabels: ResourceLabels, commandService: ICommandService, openerService: IOpenerService, configurationService: IConfigurationService, hoverService: IHoverService, languageModelsService: ILanguageModelsService, notebookService: INotebookService, instantiationService: IInstantiationService);
|
|
155
154
|
getAriaLabel(attachment: INotebookOutputVariableEntry): string;
|
|
156
155
|
private renderErrorOutput;
|
|
157
156
|
private renderGenericOutput;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
-
import { append, $, addDisposableListener, EventType, addStandardDisposableListener, EventHelper,
|
|
3
|
+
import { append, $, addDisposableListener, EventType, addStandardDisposableListener, EventHelper, createTextNode, getWindow } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
|
|
4
4
|
import { StandardKeyboardEvent } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/keyboardEvent';
|
|
5
5
|
import { StandardMouseEvent } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/mouseEvent';
|
|
6
6
|
import { Button } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/button/button';
|
|
@@ -65,8 +65,8 @@ import { IBrowserViewWorkbenchService } from '@codingame/monaco-vscode-api/vscod
|
|
|
65
65
|
import { coerceImageBuffer } from '../../common/chatImageExtraction.js';
|
|
66
66
|
import { ChatConfiguration } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
|
|
67
67
|
import { OmittedState, getImageAttachmentLimit, isStringVariableEntry, PromptFileVariableKind } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/attachments/chatVariableEntries';
|
|
68
|
+
import { isAutoLanguageModel } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModels';
|
|
68
69
|
import { ILanguageModelsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModels.service';
|
|
69
|
-
import { IChatEntitlementService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/chat/common/chatEntitlementService.service';
|
|
70
70
|
import { isToolSet } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService';
|
|
71
71
|
import { ILanguageModelToolsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/languageModelToolsService.service';
|
|
72
72
|
import { getCleanPromptName } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/config/promptFileLocations';
|
|
@@ -147,7 +147,7 @@ let AbstractChatAttachmentWidget = class AbstractChatAttachmentWidget extends Di
|
|
|
147
147
|
if (!this._hasClearButton) {
|
|
148
148
|
return ariaLabel;
|
|
149
149
|
}
|
|
150
|
-
return localize(
|
|
150
|
+
return localize(6176, "{0} (Delete)", ariaLabel);
|
|
151
151
|
}
|
|
152
152
|
attachClearButton() {
|
|
153
153
|
if (this.attachment.range || !this.options.supportsDeletion) {
|
|
@@ -157,7 +157,7 @@ let AbstractChatAttachmentWidget = class AbstractChatAttachmentWidget extends Di
|
|
|
157
157
|
const clearButton = ( new Button(this.element, {
|
|
158
158
|
supportIcons: true,
|
|
159
159
|
hoverDelegate: createInstantHoverDelegate(),
|
|
160
|
-
title: ( localize(
|
|
160
|
+
title: ( localize(6177, "Remove from context"))
|
|
161
161
|
}));
|
|
162
162
|
clearButton.element.tabIndex = -1;
|
|
163
163
|
clearButton.icon = Codicon.close;
|
|
@@ -212,7 +212,10 @@ let AbstractChatAttachmentWidget = class AbstractChatAttachmentWidget extends Di
|
|
|
212
212
|
};
|
|
213
213
|
AbstractChatAttachmentWidget = ( __decorate([( __param(5, ICommandService)), ( __param(6, IOpenerService)), ( __param(7, IConfigurationService)), ( __param(8, ITerminalService))], AbstractChatAttachmentWidget));
|
|
214
214
|
function modelSupportsVision(currentLanguageModel) {
|
|
215
|
-
return currentLanguageModel?.metadata.capabilities?.vision ?? false;
|
|
215
|
+
return isAutoLanguageModel(currentLanguageModel) || (currentLanguageModel?.metadata.capabilities?.vision ?? false);
|
|
216
|
+
}
|
|
217
|
+
function getEffectiveImageOmittedState(omittedState, currentLanguageModel, isCurrentInput) {
|
|
218
|
+
return isAutoLanguageModel(currentLanguageModel) && isCurrentInput && omittedState === OmittedState.Full ? OmittedState.NotOmitted : omittedState;
|
|
216
219
|
}
|
|
217
220
|
let FileAttachmentWidget = class FileAttachmentWidget extends AbstractChatAttachmentWidget {
|
|
218
221
|
constructor(
|
|
@@ -256,14 +259,14 @@ let FileAttachmentWidget = class FileAttachmentWidget extends AbstractChatAttach
|
|
|
256
259
|
const fileDirname = dirname(resource.path);
|
|
257
260
|
const friendlyName = `${fileBasename} ${fileDirname}`;
|
|
258
261
|
let ariaLabel = range ? ( localize(
|
|
259
|
-
|
|
262
|
+
6178,
|
|
260
263
|
"Attached file, {0}, line {1} to line {2}",
|
|
261
264
|
friendlyName,
|
|
262
265
|
range.startLineNumber,
|
|
263
266
|
range.endLineNumber
|
|
264
|
-
)) : ( localize(
|
|
267
|
+
)) : ( localize(6179, "Attached file, {0}", friendlyName));
|
|
265
268
|
if (attachment.omittedState === OmittedState.Full) {
|
|
266
|
-
ariaLabel = ( localize(
|
|
269
|
+
ariaLabel = ( localize(6180, "Omitted this file: {0}", attachment.name));
|
|
267
270
|
this.renderOmittedWarning(friendlyName, ariaLabel);
|
|
268
271
|
} else {
|
|
269
272
|
const fileOptions = {
|
|
@@ -304,7 +307,7 @@ let FileAttachmentWidget = class FileAttachmentWidget extends AbstractChatAttach
|
|
|
304
307
|
const saveButton = ( new Button(this.element, {
|
|
305
308
|
supportIcons: true,
|
|
306
309
|
hoverDelegate: createInstantHoverDelegate(),
|
|
307
|
-
title: ( localize(
|
|
310
|
+
title: ( localize(6181, "Save As..."))
|
|
308
311
|
}));
|
|
309
312
|
saveButton.element.classList.add("chat-attached-context-download-button");
|
|
310
313
|
saveButton.element.tabIndex = -1;
|
|
@@ -324,7 +327,7 @@ let FileAttachmentWidget = class FileAttachmentWidget extends AbstractChatAttach
|
|
|
324
327
|
try {
|
|
325
328
|
await this.fileService.copy(resource, target, true);
|
|
326
329
|
} catch (error) {
|
|
327
|
-
this.notificationService.error(( localize(
|
|
330
|
+
this.notificationService.error(( localize(6182, "Failed to save file: {0}", error)));
|
|
328
331
|
}
|
|
329
332
|
}));
|
|
330
333
|
}
|
|
@@ -341,7 +344,7 @@ let FileAttachmentWidget = class FileAttachmentWidget extends AbstractChatAttach
|
|
|
341
344
|
hoverElement.setAttribute("aria-label", ariaLabel);
|
|
342
345
|
this.element.classList.add("warning");
|
|
343
346
|
hoverElement.textContent = ( localize(
|
|
344
|
-
|
|
347
|
+
6183,
|
|
345
348
|
"{0} does not support this file type.",
|
|
346
349
|
this.currentLanguageModel ? this.languageModelsService.lookupLanguageModel(this.currentLanguageModel.identifier)?.name : this.currentLanguageModel ?? "This model"
|
|
347
350
|
));
|
|
@@ -354,7 +357,7 @@ let FileAttachmentWidget = class FileAttachmentWidget extends AbstractChatAttach
|
|
|
354
357
|
this.element.classList.add("warning");
|
|
355
358
|
const hoverElement = $("div.chat-attached-context-hover");
|
|
356
359
|
hoverElement.textContent = ( localize(
|
|
357
|
-
|
|
360
|
+
6184,
|
|
358
361
|
"This folder contains {0} images, which exceeds the maximum of {1} images per request. Older images will not be sent.",
|
|
359
362
|
imageCount,
|
|
360
363
|
limit
|
|
@@ -392,7 +395,7 @@ let TerminalCommandAttachmentWidget = class TerminalCommandAttachmentWidget exte
|
|
|
392
395
|
);
|
|
393
396
|
this.hoverService = hoverService;
|
|
394
397
|
this.terminalService = terminalService;
|
|
395
|
-
const ariaLabel = ( localize(
|
|
398
|
+
const ariaLabel = ( localize(6185, "Terminal command, {0}", attachment.command));
|
|
396
399
|
const clickHandler = () => this.openResource(attachment.resource, {
|
|
397
400
|
editorOptions: {
|
|
398
401
|
preserveFocus: true
|
|
@@ -446,16 +449,16 @@ function getHoverContent(ariaLabel, attachment) {
|
|
|
446
449
|
const hoverElement = $("div.chat-attached-context-hover");
|
|
447
450
|
hoverElement.setAttribute("aria-label", ariaLabel);
|
|
448
451
|
const commandTitle = $("div", {}, typeof attachment.exitCode === "number" ? ( localize(
|
|
449
|
-
|
|
452
|
+
6186,
|
|
450
453
|
"Command: {0}, exit code: {1}",
|
|
451
454
|
attachment.command,
|
|
452
455
|
attachment.exitCode
|
|
453
|
-
)) : ( localize(
|
|
456
|
+
)) : ( localize(6187, "Command")));
|
|
454
457
|
commandTitle.classList.add("attachment-additional-info");
|
|
455
458
|
const commandBlock = $("pre.chat-terminal-command-block");
|
|
456
459
|
hoverElement.append(commandTitle, commandBlock);
|
|
457
460
|
if (attachment.output && attachment.output.trim().length > 0) {
|
|
458
|
-
const outputTitle = $("div", {}, ( localize(
|
|
461
|
+
const outputTitle = $("div", {}, ( localize(6188, "Output:")));
|
|
459
462
|
outputTitle.classList.add("attachment-additional-info");
|
|
460
463
|
const outputBlock = $("pre.chat-terminal-command-output");
|
|
461
464
|
const fullOutputLines = attachment.output.split("\n");
|
|
@@ -499,7 +502,6 @@ let ImageAttachmentWidget = class ImageAttachmentWidget extends AbstractChatAtta
|
|
|
499
502
|
languageModelsService,
|
|
500
503
|
instantiationService,
|
|
501
504
|
labelService,
|
|
502
|
-
chatEntitlementService,
|
|
503
505
|
chatImageCarouselService,
|
|
504
506
|
fileDialogService,
|
|
505
507
|
fileService,
|
|
@@ -518,28 +520,50 @@ let ImageAttachmentWidget = class ImageAttachmentWidget extends AbstractChatAtta
|
|
|
518
520
|
this.hoverService = hoverService;
|
|
519
521
|
this.languageModelsService = languageModelsService;
|
|
520
522
|
this.labelService = labelService;
|
|
521
|
-
this.chatEntitlementService = chatEntitlementService;
|
|
522
523
|
this.chatImageCarouselService = chatImageCarouselService;
|
|
523
524
|
this.fileDialogService = fileDialogService;
|
|
524
525
|
this.fileService = fileService;
|
|
525
526
|
this.notificationService = notificationService;
|
|
526
527
|
this.element.classList.add("image-attachment");
|
|
528
|
+
const isAutoModel = isAutoLanguageModel(currentLanguageModel);
|
|
529
|
+
const modelName = currentLanguageModel?.metadata.name;
|
|
530
|
+
const omittedState = getEffectiveImageOmittedState(attachment.omittedState, currentLanguageModel, options.isCurrentInput);
|
|
531
|
+
this.element.classList.toggle("auto-image-warning", isAutoModel);
|
|
527
532
|
let ariaLabel;
|
|
528
|
-
if (
|
|
529
|
-
ariaLabel = ( localize(
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
533
|
+
if (omittedState === OmittedState.Full && modelName && !modelSupportsVision(currentLanguageModel)) {
|
|
534
|
+
ariaLabel = ( localize(
|
|
535
|
+
6189,
|
|
536
|
+
"Image not sent because {0} does not support images: {1}",
|
|
537
|
+
modelName,
|
|
538
|
+
attachment.name
|
|
539
|
+
));
|
|
540
|
+
} else if (omittedState === OmittedState.Full) {
|
|
541
|
+
ariaLabel = ( localize(6190, "Omitted this image: {0}", attachment.name));
|
|
542
|
+
} else if (omittedState === OmittedState.Partial) {
|
|
543
|
+
ariaLabel = ( localize(6191, "Partially omitted this image: {0}", attachment.name));
|
|
544
|
+
} else if (omittedState === OmittedState.ImageLimitExceeded) {
|
|
545
|
+
ariaLabel = ( localize(6192, "Image not sent due to limit: {0}", attachment.name));
|
|
546
|
+
} else if (isAutoModel) {
|
|
547
|
+
ariaLabel = ( localize(
|
|
548
|
+
6193,
|
|
549
|
+
"Attached image, {0}. Image support depends on the model selected by Auto.",
|
|
550
|
+
attachment.name
|
|
551
|
+
));
|
|
534
552
|
} else {
|
|
535
|
-
ariaLabel = ( localize(
|
|
553
|
+
ariaLabel = ( localize(6194, "Attached image, {0}", attachment.name));
|
|
536
554
|
}
|
|
537
555
|
const ref = attachment.references?.[0]?.reference;
|
|
538
556
|
resource = ref && URI.isUri(ref) ? ref : undefined;
|
|
539
557
|
const imageData = coerceImageBuffer(attachment.value);
|
|
540
558
|
const clickHandler = async () => {
|
|
541
559
|
if ((resource || imageData) && configurationService.getValue(ChatConfiguration.ImageCarouselEnabled)) {
|
|
542
|
-
await this.openInCarousel(
|
|
560
|
+
await this.openInCarousel(
|
|
561
|
+
attachment.id,
|
|
562
|
+
attachment.name,
|
|
563
|
+
imageData,
|
|
564
|
+
resource,
|
|
565
|
+
options.isCurrentInput
|
|
566
|
+
);
|
|
543
567
|
} else if (resource) {
|
|
544
568
|
await this.openResource(resource, {
|
|
545
569
|
editorOptions: {
|
|
@@ -562,8 +586,7 @@ let ImageAttachmentWidget = class ImageAttachmentWidget extends AbstractChatAtta
|
|
|
562
586
|
currentLanguageModelName,
|
|
563
587
|
clickHandler,
|
|
564
588
|
this.currentLanguageModel,
|
|
565
|
-
|
|
566
|
-
this.chatEntitlementService.previewFeaturesDisabled
|
|
589
|
+
omittedState
|
|
567
590
|
));
|
|
568
591
|
this.attachSaveButton(resource, imageData, attachment.name, options.supportsDeletion);
|
|
569
592
|
this.element.ariaLabel = this.appendDeletionHint(ariaLabel);
|
|
@@ -582,12 +605,14 @@ let ImageAttachmentWidget = class ImageAttachmentWidget extends AbstractChatAtta
|
|
|
582
605
|
});
|
|
583
606
|
}
|
|
584
607
|
}
|
|
585
|
-
async openInCarousel(id, name, data, referenceUri) {
|
|
608
|
+
async openInCarousel(id, name, data, referenceUri, preferCurrentInput) {
|
|
586
609
|
const resource = referenceUri ?? ( URI.from({
|
|
587
610
|
scheme: "data",
|
|
588
611
|
path: `${id}/${encodeURIComponent(name)}`
|
|
589
612
|
}));
|
|
590
|
-
await this.chatImageCarouselService.openCarouselAtResource(resource, data
|
|
613
|
+
await this.chatImageCarouselService.openCarouselAtResource(resource, data, {
|
|
614
|
+
preferCurrentInput
|
|
615
|
+
});
|
|
591
616
|
}
|
|
592
617
|
attachSaveButton(resource, imageData, name, supportsDeletion) {
|
|
593
618
|
if (supportsDeletion || (!resource && !imageData)) {
|
|
@@ -596,7 +621,7 @@ let ImageAttachmentWidget = class ImageAttachmentWidget extends AbstractChatAtta
|
|
|
596
621
|
const saveButton = ( new Button(this.element, {
|
|
597
622
|
supportIcons: true,
|
|
598
623
|
hoverDelegate: createInstantHoverDelegate(),
|
|
599
|
-
title: ( localize(
|
|
624
|
+
title: ( localize(6195, "Save Image As..."))
|
|
600
625
|
}));
|
|
601
626
|
saveButton.element.classList.add("chat-attached-context-download-button");
|
|
602
627
|
saveButton.element.tabIndex = -1;
|
|
@@ -619,12 +644,12 @@ let ImageAttachmentWidget = class ImageAttachmentWidget extends AbstractChatAtta
|
|
|
619
644
|
await this.fileService.writeFile(target, VSBuffer.wrap(imageData));
|
|
620
645
|
}
|
|
621
646
|
} catch (error) {
|
|
622
|
-
this.notificationService.error(( localize(
|
|
647
|
+
this.notificationService.error(( localize(6196, "Failed to save image: {0}", error)));
|
|
623
648
|
}
|
|
624
649
|
}));
|
|
625
650
|
}
|
|
626
651
|
};
|
|
627
|
-
ImageAttachmentWidget = ( __decorate([( __param(6, ICommandService)), ( __param(7, IOpenerService)), ( __param(8, IConfigurationService)), ( __param(9, IHoverService)), ( __param(10, ILanguageModelsService)), ( __param(11, IInstantiationService)), ( __param(12, ILabelService)), ( __param(13,
|
|
652
|
+
ImageAttachmentWidget = ( __decorate([( __param(6, ICommandService)), ( __param(7, IOpenerService)), ( __param(8, IConfigurationService)), ( __param(9, IHoverService)), ( __param(10, ILanguageModelsService)), ( __param(11, IInstantiationService)), ( __param(12, ILabelService)), ( __param(13, IChatImageCarouselService)), ( __param(14, IFileDialogService)), ( __param(15, IFileService)), ( __param(16, INotificationService))], ImageAttachmentWidget));
|
|
628
653
|
const IMAGE_HOVER_THUMBNAIL_MAX_SIZE = 768;
|
|
629
654
|
function createImageElements(
|
|
630
655
|
resource,
|
|
@@ -638,8 +663,7 @@ function createImageElements(
|
|
|
638
663
|
currentLanguageModelName,
|
|
639
664
|
clickHandler,
|
|
640
665
|
currentLanguageModel,
|
|
641
|
-
omittedState
|
|
642
|
-
previewFeaturesDisabled
|
|
666
|
+
omittedState
|
|
643
667
|
) {
|
|
644
668
|
const disposable = ( new DisposableStore());
|
|
645
669
|
if (omittedState === OmittedState.Partial) {
|
|
@@ -652,7 +676,7 @@ function createImageElements(
|
|
|
652
676
|
}
|
|
653
677
|
const supportsVision = modelSupportsVision(currentLanguageModel);
|
|
654
678
|
const pillIcon = $("div.chat-attached-context-pill", {}, $(
|
|
655
|
-
|
|
679
|
+
supportsVision ? "span.codicon.codicon-file-media" : "span.codicon.codicon-warning"
|
|
656
680
|
));
|
|
657
681
|
const textLabel = $("span.chat-attached-context-custom-text", {}, name);
|
|
658
682
|
element.appendChild(pillIcon);
|
|
@@ -664,17 +688,10 @@ function createImageElements(
|
|
|
664
688
|
};
|
|
665
689
|
const hoverElement = $("div.chat-attached-context-hover");
|
|
666
690
|
hoverElement.setAttribute("aria-label", ariaLabel);
|
|
667
|
-
if (
|
|
668
|
-
element.classList.add("warning");
|
|
669
|
-
hoverElement.textContent = ( localize(5831, "Vision is disabled by your organization."));
|
|
670
|
-
disposable.add(hoverService.setupDelayedHover(element, {
|
|
671
|
-
content: hoverElement,
|
|
672
|
-
style: HoverStyle.Pointer
|
|
673
|
-
}));
|
|
674
|
-
} else if ((!supportsVision && currentLanguageModel) || omittedState === OmittedState.Full) {
|
|
691
|
+
if ((!supportsVision && currentLanguageModel) || omittedState === OmittedState.Full) {
|
|
675
692
|
element.classList.add("warning");
|
|
676
693
|
hoverElement.textContent = ( localize(
|
|
677
|
-
|
|
694
|
+
6197,
|
|
678
695
|
"{0} does not support images.",
|
|
679
696
|
currentLanguageModelName ?? "This model"
|
|
680
697
|
));
|
|
@@ -686,11 +703,11 @@ function createImageElements(
|
|
|
686
703
|
element.classList.add("warning");
|
|
687
704
|
const maxImagesPerRequest = getImageAttachmentLimit(currentLanguageModel?.metadata);
|
|
688
705
|
hoverElement.textContent = maxImagesPerRequest !== undefined ? ( localize(
|
|
689
|
-
|
|
706
|
+
6198,
|
|
690
707
|
"This image was not sent because the maximum of {0} images per request was exceeded.",
|
|
691
708
|
maxImagesPerRequest
|
|
692
709
|
)) : ( localize(
|
|
693
|
-
|
|
710
|
+
6199,
|
|
694
711
|
"This image was not sent because this model's image limit was exceeded."
|
|
695
712
|
));
|
|
696
713
|
disposable.add(hoverService.setupDelayedHover(element, {
|
|
@@ -707,11 +724,14 @@ function createImageElements(
|
|
|
707
724
|
});
|
|
708
725
|
const imageContainer = $("div.chat-attached-context-image-container", {}, hoverImage);
|
|
709
726
|
hoverElement.appendChild(imageContainer);
|
|
727
|
+
if (isAutoLanguageModel(currentLanguageModel)) {
|
|
728
|
+
hoverElement.appendChild($("div", undefined, ( localize(6200, "Image support depends on the model selected by Auto."))));
|
|
729
|
+
}
|
|
710
730
|
if (resource) {
|
|
711
731
|
const urlContainer = $(
|
|
712
732
|
"a.chat-attached-context-url",
|
|
713
733
|
{},
|
|
714
|
-
omittedState === OmittedState.Partial ? ( localize(
|
|
734
|
+
omittedState === OmittedState.Partial ? ( localize(6201, "This GIF was partially omitted - current frame will be sent.")) : fullName
|
|
715
735
|
);
|
|
716
736
|
const separator = $("div.chat-attached-context-url-separator");
|
|
717
737
|
disposable.add(addDisposableListener(urlContainer, "click", () => clickHandler()));
|
|
@@ -728,7 +748,7 @@ function createImageElements(
|
|
|
728
748
|
const data = buffer instanceof Uint8Array ? buffer : ( new Uint8Array(buffer));
|
|
729
749
|
const previewImageUrl = disposable.add(( new MutableDisposable()));
|
|
730
750
|
const renderPreviewImage = async () => {
|
|
731
|
-
const thumbnail = await getOrCreateImageThumbnail(cacheKey, data, IMAGE_HOVER_THUMBNAIL_MAX_SIZE
|
|
751
|
+
const thumbnail = await getOrCreateImageThumbnail(cacheKey, data, IMAGE_HOVER_THUMBNAIL_MAX_SIZE);
|
|
732
752
|
if (disposable.isDisposed) {
|
|
733
753
|
return;
|
|
734
754
|
}
|
|
@@ -775,7 +795,7 @@ let PasteAttachmentWidget = class PasteAttachmentWidget extends AbstractChatAtta
|
|
|
775
795
|
);
|
|
776
796
|
this.hoverService = hoverService;
|
|
777
797
|
this.instantiationService = instantiationService;
|
|
778
|
-
const ariaLabel = ( localize(
|
|
798
|
+
const ariaLabel = ( localize(6202, "Attached context, {0}", attachment.name));
|
|
779
799
|
this.element.ariaLabel = this.appendDeletionHint(ariaLabel);
|
|
780
800
|
const classNames = ["file-icon", `${attachment.language}-lang-file-icon`];
|
|
781
801
|
let resource;
|
|
@@ -868,7 +888,7 @@ let DefaultChatAttachmentWidget = class DefaultChatAttachmentWidget extends Abst
|
|
|
868
888
|
const withIcon = attachment.icon?.id ? `$(${attachment.icon.id})\u00A0${attachmentLabel}` : attachmentLabel;
|
|
869
889
|
this.label.setLabel(withIcon, correspondingContentReference?.options?.status?.description);
|
|
870
890
|
}
|
|
871
|
-
this.element.ariaLabel = this.appendDeletionHint(( localize(
|
|
891
|
+
this.element.ariaLabel = this.appendDeletionHint(( localize(6202, "Attached context, {0}", attachment.name)));
|
|
872
892
|
if (attachment.kind === "diagnostic") {
|
|
873
893
|
if (attachment.filterUri) {
|
|
874
894
|
resource = attachment.filterUri ? URI.revive(attachment.filterUri) : undefined;
|
|
@@ -969,8 +989,8 @@ let PromptFileAttachmentWidget = class PromptFileAttachmentWidget extends Abstra
|
|
|
969
989
|
const fileDirname = dirname(resource.path);
|
|
970
990
|
const friendlyName = `${fileBasename} ${fileDirname}`;
|
|
971
991
|
const isPrompt = attachment.id.startsWith(PromptFileVariableKind.PromptFile);
|
|
972
|
-
const ariaLabel = isPrompt ? ( localize(
|
|
973
|
-
const typeLabel = isPrompt ? ( localize(
|
|
992
|
+
const ariaLabel = isPrompt ? ( localize(6203, "Prompt file, {0}", friendlyName)) : ( localize(6204, "Instructions attachment, {0}", friendlyName));
|
|
993
|
+
const typeLabel = isPrompt ? ( localize(6205, "Prompt")) : ( localize(6206, "Instructions"));
|
|
974
994
|
const title = this.labelService.getUriLabel(resource) + (attachment.originLabel ? `\n${attachment.originLabel}` : "");
|
|
975
995
|
this.element.classList.remove("warning", "error");
|
|
976
996
|
const fileWithoutExtension = getCleanPromptName(resource);
|
|
@@ -1030,8 +1050,8 @@ let PromptTextAttachmentWidget = class PromptTextAttachmentWidget extends Abstra
|
|
|
1030
1050
|
})
|
|
1031
1051
|
);
|
|
1032
1052
|
}
|
|
1033
|
-
this.label.setLabel(( localize(
|
|
1034
|
-
this.element.ariaLabel = this.appendDeletionHint(( localize(
|
|
1053
|
+
this.label.setLabel(( localize(6207, "Additional Instructions")), undefined, undefined);
|
|
1054
|
+
this.element.ariaLabel = this.appendDeletionHint(( localize(6202, "Attached context, {0}", attachment.name)));
|
|
1035
1055
|
this._register(hoverService.setupDelayedHover(this.element, {
|
|
1036
1056
|
...commonHoverOptions,
|
|
1037
1057
|
content: attachment.value
|
|
@@ -1078,18 +1098,18 @@ let ToolSetOrToolItemAttachmentWidget = class ToolSetOrToolItemAttachmentWidget
|
|
|
1078
1098
|
}
|
|
1079
1099
|
this.label.setLabel(`$(${icon.id})\u00A0${name}`, undefined);
|
|
1080
1100
|
this.element.style.cursor = "pointer";
|
|
1081
|
-
this.element.ariaLabel = this.appendDeletionHint(( localize(
|
|
1101
|
+
this.element.ariaLabel = this.appendDeletionHint(( localize(6202, "Attached context, {0}", name)));
|
|
1082
1102
|
let hoverContent;
|
|
1083
1103
|
if (isToolSet(toolOrToolSet)) {
|
|
1084
1104
|
hoverContent = ( localize(
|
|
1085
|
-
|
|
1105
|
+
6208,
|
|
1086
1106
|
"{0} - {1}",
|
|
1087
1107
|
toolOrToolSet.description ?? toolOrToolSet.referenceName,
|
|
1088
1108
|
toolOrToolSet.source.label
|
|
1089
1109
|
));
|
|
1090
1110
|
} else if (toolOrToolSet) {
|
|
1091
1111
|
hoverContent = ( localize(
|
|
1092
|
-
|
|
1112
|
+
6209,
|
|
1093
1113
|
"{0} - {1}",
|
|
1094
1114
|
toolOrToolSet.userDescription ?? toolOrToolSet.modelDescription,
|
|
1095
1115
|
toolOrToolSet.source.label
|
|
@@ -1118,8 +1138,7 @@ let NotebookCellOutputChatAttachmentWidget = class NotebookCellOutputChatAttachm
|
|
|
1118
1138
|
hoverService,
|
|
1119
1139
|
languageModelsService,
|
|
1120
1140
|
notebookService,
|
|
1121
|
-
instantiationService
|
|
1122
|
-
chatEntitlementService
|
|
1141
|
+
instantiationService
|
|
1123
1142
|
) {
|
|
1124
1143
|
super(
|
|
1125
1144
|
attachment,
|
|
@@ -1135,7 +1154,6 @@ let NotebookCellOutputChatAttachmentWidget = class NotebookCellOutputChatAttachm
|
|
|
1135
1154
|
this.languageModelsService = languageModelsService;
|
|
1136
1155
|
this.notebookService = notebookService;
|
|
1137
1156
|
this.instantiationService = instantiationService;
|
|
1138
|
-
this.chatEntitlementService = chatEntitlementService;
|
|
1139
1157
|
switch (attachment.mimeType) {
|
|
1140
1158
|
case "application/vnd.code.notebook.error":
|
|
1141
1159
|
{
|
|
@@ -1162,7 +1180,7 @@ let NotebookCellOutputChatAttachmentWidget = class NotebookCellOutputChatAttachm
|
|
|
1162
1180
|
this.addResourceOpenHandlers(resource, undefined);
|
|
1163
1181
|
}
|
|
1164
1182
|
getAriaLabel(attachment) {
|
|
1165
|
-
return localize(
|
|
1183
|
+
return localize(6210, "Attached Notebook output, {0}", attachment.name);
|
|
1166
1184
|
}
|
|
1167
1185
|
renderErrorOutput(resource, attachment) {
|
|
1168
1186
|
const attachmentLabel = attachment.name;
|
|
@@ -1190,9 +1208,9 @@ let NotebookCellOutputChatAttachmentWidget = class NotebookCellOutputChatAttachm
|
|
|
1190
1208
|
renderImageOutput(resource, attachment) {
|
|
1191
1209
|
let ariaLabel;
|
|
1192
1210
|
if (attachment.omittedState === OmittedState.Full) {
|
|
1193
|
-
ariaLabel = ( localize(
|
|
1211
|
+
ariaLabel = ( localize(6211, "Omitted this Notebook ouput: {0}", attachment.name));
|
|
1194
1212
|
} else if (attachment.omittedState === OmittedState.Partial) {
|
|
1195
|
-
ariaLabel = ( localize(
|
|
1213
|
+
ariaLabel = ( localize(6212, "Partially omitted this Notebook output: {0}", attachment.name));
|
|
1196
1214
|
} else {
|
|
1197
1215
|
ariaLabel = this.getAriaLabel(attachment);
|
|
1198
1216
|
}
|
|
@@ -1215,8 +1233,7 @@ let NotebookCellOutputChatAttachmentWidget = class NotebookCellOutputChatAttachm
|
|
|
1215
1233
|
currentLanguageModelName,
|
|
1216
1234
|
clickHandler,
|
|
1217
1235
|
this.currentLanguageModel,
|
|
1218
|
-
attachment.omittedState
|
|
1219
|
-
this.chatEntitlementService.previewFeaturesDisabled
|
|
1236
|
+
attachment.omittedState
|
|
1220
1237
|
));
|
|
1221
1238
|
this.element.ariaLabel = this.appendDeletionHint(ariaLabel);
|
|
1222
1239
|
}
|
|
@@ -1237,7 +1254,7 @@ let NotebookCellOutputChatAttachmentWidget = class NotebookCellOutputChatAttachm
|
|
|
1237
1254
|
return output?.outputs.find(o => o.mime === attachment.mimeType);
|
|
1238
1255
|
}
|
|
1239
1256
|
};
|
|
1240
|
-
NotebookCellOutputChatAttachmentWidget = ( __decorate([( __param(6, ICommandService)), ( __param(7, IOpenerService)), ( __param(8, IConfigurationService)), ( __param(9, IHoverService)), ( __param(10, ILanguageModelsService)), ( __param(11, INotebookService)), ( __param(12, IInstantiationService))
|
|
1257
|
+
NotebookCellOutputChatAttachmentWidget = ( __decorate([( __param(6, ICommandService)), ( __param(7, IOpenerService)), ( __param(8, IConfigurationService)), ( __param(9, IHoverService)), ( __param(10, ILanguageModelsService)), ( __param(11, INotebookService)), ( __param(12, IInstantiationService))], NotebookCellOutputChatAttachmentWidget));
|
|
1241
1258
|
let ElementChatAttachmentWidget = class ElementChatAttachmentWidget extends AbstractChatAttachmentWidget {
|
|
1242
1259
|
constructor(
|
|
1243
1260
|
attachment,
|
|
@@ -1263,14 +1280,14 @@ let ElementChatAttachmentWidget = class ElementChatAttachmentWidget extends Abst
|
|
|
1263
1280
|
);
|
|
1264
1281
|
this.editorService = editorService;
|
|
1265
1282
|
this.hoverService = hoverService;
|
|
1266
|
-
const ariaLabel = ( localize(
|
|
1283
|
+
const ariaLabel = ( localize(6213, "Attached element, {0}", attachment.name));
|
|
1267
1284
|
this.element.ariaLabel = this.appendDeletionHint(ariaLabel);
|
|
1268
1285
|
this.element.style.position = "relative";
|
|
1269
1286
|
this.element.style.cursor = "pointer";
|
|
1270
1287
|
const attachmentLabel = attachment.name;
|
|
1271
1288
|
const withIcon = attachment.icon?.id ? `$(${attachment.icon.id})\u00A0${attachmentLabel}` : attachmentLabel;
|
|
1272
1289
|
this.label.setLabel(withIcon, undefined, {
|
|
1273
|
-
title: ( localize(
|
|
1290
|
+
title: ( localize(6214, "Click to view the contents of: {0}", attachmentLabel))
|
|
1274
1291
|
});
|
|
1275
1292
|
this._register(this.hoverService.setupDelayedHover(
|
|
1276
1293
|
this.element,
|
|
@@ -1290,7 +1307,7 @@ let ElementChatAttachmentWidget = class ElementChatAttachmentWidget extends Abst
|
|
|
1290
1307
|
const innerScrollables = [];
|
|
1291
1308
|
{
|
|
1292
1309
|
const section = $("div.chat-element-hover-section");
|
|
1293
|
-
const header = $("div.chat-element-hover-header", {}, ( localize(
|
|
1310
|
+
const header = $("div.chat-element-hover-header", {}, ( localize(6215, "ELEMENT")));
|
|
1294
1311
|
section.appendChild(header);
|
|
1295
1312
|
const elementPre = $("pre.chat-element-hover-code");
|
|
1296
1313
|
const elementCode = $("code");
|
|
@@ -1308,7 +1325,7 @@ let ElementChatAttachmentWidget = class ElementChatAttachmentWidget extends Abst
|
|
|
1308
1325
|
const computedStyleEntries = this.getComputedStyleEntriesForHover(attachment.computedStyles);
|
|
1309
1326
|
if (computedStyleEntries.length > 0) {
|
|
1310
1327
|
const section = $("div.chat-element-hover-section");
|
|
1311
|
-
const header = $("div.chat-element-hover-header", {}, ( localize(
|
|
1328
|
+
const header = $("div.chat-element-hover-header", {}, ( localize(6216, "KEY COMPUTED STYLES")));
|
|
1312
1329
|
section.appendChild(header);
|
|
1313
1330
|
const table = $("div.chat-element-hover-table");
|
|
1314
1331
|
for (const [name, value] of computedStyleEntries) {
|
|
@@ -1327,7 +1344,7 @@ let ElementChatAttachmentWidget = class ElementChatAttachmentWidget extends Abst
|
|
|
1327
1344
|
section.appendChild(table);
|
|
1328
1345
|
const showMoreButton = $("button.chat-element-hover-show-more", {
|
|
1329
1346
|
type: "button"
|
|
1330
|
-
}, ( localize(
|
|
1347
|
+
}, ( localize(6217, "Show More...")));
|
|
1331
1348
|
this._register(
|
|
1332
1349
|
addDisposableListener(showMoreButton, EventType.CLICK, async e => {
|
|
1333
1350
|
EventHelper.stop(e, true);
|
|
@@ -1339,7 +1356,7 @@ let ElementChatAttachmentWidget = class ElementChatAttachmentWidget extends Abst
|
|
|
1339
1356
|
}
|
|
1340
1357
|
if (attachment.ancestors && attachment.ancestors.length > 1) {
|
|
1341
1358
|
const section = $("div.chat-element-hover-section");
|
|
1342
|
-
const header = $("div.chat-element-hover-header", {}, ( localize(
|
|
1359
|
+
const header = $("div.chat-element-hover-header", {}, ( localize(6218, "HTML PATH")));
|
|
1343
1360
|
section.appendChild(header);
|
|
1344
1361
|
const lines = [];
|
|
1345
1362
|
for (let i = 0; i < attachment.ancestors.length; i++) {
|
|
@@ -1362,7 +1379,7 @@ let ElementChatAttachmentWidget = class ElementChatAttachmentWidget extends Abst
|
|
|
1362
1379
|
}
|
|
1363
1380
|
if (attachment.attributes && ( Object.keys(attachment.attributes)).length > 0) {
|
|
1364
1381
|
const section = $("div.chat-element-hover-section");
|
|
1365
|
-
const header = $("div.chat-element-hover-header", {}, ( localize(
|
|
1382
|
+
const header = $("div.chat-element-hover-header", {}, ( localize(6219, "ATTRIBUTES")));
|
|
1366
1383
|
section.appendChild(header);
|
|
1367
1384
|
const table = $("div.chat-element-hover-table");
|
|
1368
1385
|
for (const [name, value] of Object.entries(attachment.attributes)) {
|
|
@@ -1376,7 +1393,7 @@ let ElementChatAttachmentWidget = class ElementChatAttachmentWidget extends Abst
|
|
|
1376
1393
|
}
|
|
1377
1394
|
if (attachment.dimensions) {
|
|
1378
1395
|
const section = $("div.chat-element-hover-section");
|
|
1379
|
-
const header = $("div.chat-element-hover-header", {}, ( localize(
|
|
1396
|
+
const header = $("div.chat-element-hover-header", {}, ( localize(6220, "POSITION & SIZE")));
|
|
1380
1397
|
section.appendChild(header);
|
|
1381
1398
|
const table = $("div.chat-element-hover-table");
|
|
1382
1399
|
const dims = [
|
|
@@ -1396,7 +1413,7 @@ let ElementChatAttachmentWidget = class ElementChatAttachmentWidget extends Abst
|
|
|
1396
1413
|
}
|
|
1397
1414
|
if (attachment.innerText) {
|
|
1398
1415
|
const section = $("div.chat-element-hover-section");
|
|
1399
|
-
const header = $("div.chat-element-hover-header", {}, ( localize(
|
|
1416
|
+
const header = $("div.chat-element-hover-header", {}, ( localize(6221, "INNER TEXT")));
|
|
1400
1417
|
section.appendChild(header);
|
|
1401
1418
|
section.appendChild($("div.chat-element-hover-text", {}, attachment.innerText));
|
|
1402
1419
|
scrollableContent.appendChild(section);
|
|
@@ -1542,7 +1559,7 @@ let SCMHistoryItemAttachmentWidget = class SCMHistoryItemAttachmentWidget extend
|
|
|
1542
1559
|
);
|
|
1543
1560
|
this.label.setLabel(attachment.name, undefined);
|
|
1544
1561
|
this.element.style.cursor = "pointer";
|
|
1545
|
-
this.element.ariaLabel = this.appendDeletionHint(( localize(
|
|
1562
|
+
this.element.ariaLabel = this.appendDeletionHint(( localize(6202, "Attached context, {0}", attachment.name)));
|
|
1546
1563
|
const {
|
|
1547
1564
|
content,
|
|
1548
1565
|
disposables
|
|
@@ -1604,7 +1621,7 @@ let SCMHistoryItemChangeAttachmentWidget = class SCMHistoryItemChangeAttachmentW
|
|
|
1604
1621
|
hidePath: true,
|
|
1605
1622
|
nameSuffix
|
|
1606
1623
|
});
|
|
1607
|
-
this.element.ariaLabel = this.appendDeletionHint(( localize(
|
|
1624
|
+
this.element.ariaLabel = this.appendDeletionHint(( localize(6202, "Attached context, {0}", attachment.name)));
|
|
1608
1625
|
const {
|
|
1609
1626
|
content,
|
|
1610
1627
|
disposables
|
|
@@ -1660,7 +1677,7 @@ let SCMHistoryItemChangeRangeAttachmentWidget = class SCMHistoryItemChangeRangeA
|
|
|
1660
1677
|
hidePath: true,
|
|
1661
1678
|
nameSuffix
|
|
1662
1679
|
});
|
|
1663
|
-
this.element.ariaLabel = this.appendDeletionHint(( localize(
|
|
1680
|
+
this.element.ariaLabel = this.appendDeletionHint(( localize(6202, "Attached context, {0}", attachment.name)));
|
|
1664
1681
|
this.addResourceOpenHandlers(attachment.value, undefined);
|
|
1665
1682
|
}
|
|
1666
1683
|
async openResource(resource, options, isDirectory, range) {
|
|
@@ -1727,9 +1744,9 @@ let BrowserViewAttachmentWidget = class BrowserViewAttachmentWidget extends Abst
|
|
|
1727
1744
|
...commonHoverOptions,
|
|
1728
1745
|
content: this._input ? {
|
|
1729
1746
|
[BrowserViewSharingState.Shared]: this._input.getTitle() ?? "",
|
|
1730
|
-
[BrowserViewSharingState.NotShared]: ( localize(
|
|
1731
|
-
[BrowserViewSharingState.Unavailable]: ( localize(
|
|
1732
|
-
}[this._input.model?.sharingState ?? BrowserViewSharingState.Shared] : ( localize(
|
|
1747
|
+
[BrowserViewSharingState.NotShared]: ( localize(6222, "This browser page is not shared with the agent.")),
|
|
1748
|
+
[BrowserViewSharingState.Unavailable]: ( localize(6223, "Browser tools are not enabled."))
|
|
1749
|
+
}[this._input.model?.sharingState ?? BrowserViewSharingState.Shared] : ( localize(6224, "This browser page is no longer open."))
|
|
1733
1750
|
}), commonHoverLifecycleOptions));
|
|
1734
1751
|
this._instantiationService.invokeFunction(accessor => {
|
|
1735
1752
|
this._register(
|
|
@@ -1775,10 +1792,10 @@ let BrowserViewAttachmentWidget = class BrowserViewAttachmentWidget extends Abst
|
|
|
1775
1792
|
strikethrough: !isAvailable
|
|
1776
1793
|
});
|
|
1777
1794
|
this.element.ariaLabel = this.appendDeletionHint(this._input ? {
|
|
1778
|
-
[BrowserViewSharingState.Shared]: ( localize(
|
|
1779
|
-
[BrowserViewSharingState.NotShared]: ( localize(
|
|
1780
|
-
[BrowserViewSharingState.Unavailable]: ( localize(
|
|
1781
|
-
}[sharingState] : ( localize(
|
|
1795
|
+
[BrowserViewSharingState.Shared]: ( localize(6225, "Attached browser page, {0}", name)),
|
|
1796
|
+
[BrowserViewSharingState.NotShared]: ( localize(6226, "Browser page not shared with agent, {0}", name)),
|
|
1797
|
+
[BrowserViewSharingState.Unavailable]: ( localize(6227, "Browser tools are not enabled, {0}", name))
|
|
1798
|
+
}[sharingState] : ( localize(6228, "Browser page unavailable, {0}", name)));
|
|
1782
1799
|
}
|
|
1783
1800
|
async openResource(_resource, options, _isDirectory, _range) {
|
|
1784
1801
|
if (this._input) {
|
|
@@ -1929,9 +1946,9 @@ function addBasicContextMenu(accessor, widget, scopedContextKeyService, menuId,
|
|
|
1929
1946
|
const chatAttachmentResourceContextKey = ( new RawContextKey("chatAttachmentResource", undefined, {
|
|
1930
1947
|
type: "URI",
|
|
1931
1948
|
description: ( localize(
|
|
1932
|
-
|
|
1949
|
+
6229,
|
|
1933
1950
|
"The full value of the chat attachment resource, including scheme and path"
|
|
1934
1951
|
))
|
|
1935
1952
|
}));
|
|
1936
1953
|
|
|
1937
|
-
export { BrowserViewAttachmentWidget, DefaultChatAttachmentWidget, ElementChatAttachmentWidget, FileAttachmentWidget, ImageAttachmentWidget, NotebookCellOutputChatAttachmentWidget, PasteAttachmentWidget, PromptFileAttachmentWidget, PromptTextAttachmentWidget, SCMHistoryItemAttachmentWidget, SCMHistoryItemChangeAttachmentWidget, SCMHistoryItemChangeRangeAttachmentWidget, TerminalCommandAttachmentWidget, ToolSetOrToolItemAttachmentWidget, chatAttachmentResourceContextKey, hookUpResourceAttachmentDragAndContextMenu, hookUpSymbolAttachmentDragAndContextMenu };
|
|
1954
|
+
export { BrowserViewAttachmentWidget, DefaultChatAttachmentWidget, ElementChatAttachmentWidget, FileAttachmentWidget, ImageAttachmentWidget, NotebookCellOutputChatAttachmentWidget, PasteAttachmentWidget, PromptFileAttachmentWidget, PromptTextAttachmentWidget, SCMHistoryItemAttachmentWidget, SCMHistoryItemChangeAttachmentWidget, SCMHistoryItemChangeRangeAttachmentWidget, TerminalCommandAttachmentWidget, ToolSetOrToolItemAttachmentWidget, chatAttachmentResourceContextKey, getEffectiveImageOmittedState, hookUpResourceAttachmentDragAndContextMenu, hookUpSymbolAttachmentDragAndContextMenu };
|