@codingame/monaco-vscode-katex-common 34.1.3 → 35.0.1
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
package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputStatePersistence.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { IChatRequestVariableEntry } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/attachments/chatVariableEntries";
|
|
2
|
+
import { IChatModelInputState } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatModel";
|
|
3
|
+
export declare function serializeUntitledInputState(value: IChatModelInputState | undefined): string;
|
|
4
|
+
export declare function deserializeUntitledInputState(value: string): IChatModelInputState;
|
|
5
|
+
export declare function serializeUntitledInputAttachments(attachments: readonly IChatRequestVariableEntry[]): string;
|
|
6
|
+
export declare function deserializeUntitledInputAttachments(value: string): IChatRequestVariableEntry[];
|
package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputStatePersistence.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
|
|
2
|
+
import { stringify, parse } from '@codingame/monaco-vscode-api/vscode/vs/base/common/marshalling';
|
|
3
|
+
import { IChatRequestVariableEntry } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/attachments/chatVariableEntries';
|
|
4
|
+
|
|
5
|
+
function serializeUntitledInputState(value) {
|
|
6
|
+
return stringify(value && {
|
|
7
|
+
...value,
|
|
8
|
+
attachments: []
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
function deserializeUntitledInputState(value) {
|
|
12
|
+
return parse(value);
|
|
13
|
+
}
|
|
14
|
+
function serializeUntitledInputAttachments(attachments) {
|
|
15
|
+
return stringify(( attachments.map(IChatRequestVariableEntry.toExport)));
|
|
16
|
+
}
|
|
17
|
+
function deserializeUntitledInputAttachments(value) {
|
|
18
|
+
return ( parse(value).map(IChatRequestVariableEntry.fromExport));
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export { deserializeUntitledInputAttachments, deserializeUntitledInputState, serializeUntitledInputAttachments, serializeUntitledInputState };
|
package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelConfigurationLogic.d.ts
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { IStringDictionary } from "@codingame/monaco-vscode-api/vscode/vs/base/common/collections";
|
|
2
|
+
import { ILanguageModelConfigurationSchema } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModels";
|
|
3
|
+
/**
|
|
4
|
+
* Extracts the schema-default values from a model configuration schema, keyed by
|
|
5
|
+
* property name. Properties without a `default` are omitted.
|
|
6
|
+
*/
|
|
7
|
+
export declare function extractSchemaDefaults(schema: ILanguageModelConfigurationSchema | undefined): IStringDictionary<unknown>;
|
|
8
|
+
/**
|
|
9
|
+
* Filters a (e.g. restored) configuration down to what the *current* schema
|
|
10
|
+
* accepts, so a value captured against an older schema cannot be re-pinned as a
|
|
11
|
+
* stale override. Two rules are applied:
|
|
12
|
+
* 1. Keys absent from the current schema are dropped (removed properties).
|
|
13
|
+
* 2. Values that violate the property's `enum` constraint are dropped, so the
|
|
14
|
+
* property falls back to its live default instead of an invalid value.
|
|
15
|
+
* Properties without an `enum` keep their value (no constraint to validate
|
|
16
|
+
* against). When the schema is missing entirely, nothing can be validated and an
|
|
17
|
+
* empty configuration is returned.
|
|
18
|
+
*/
|
|
19
|
+
export declare function filterConfigurationToSchema(values: IStringDictionary<unknown>, schema: ILanguageModelConfigurationSchema | undefined): IStringDictionary<unknown>;
|
|
20
|
+
/**
|
|
21
|
+
* Resolves the effective configuration for a model within a single
|
|
22
|
+
* `(location, sessionType)` scope.
|
|
23
|
+
*
|
|
24
|
+
* A *present* stored entry — even an empty one, which marks an explicit
|
|
25
|
+
* reset-to-default — wins and is merged over the schema defaults. Only a
|
|
26
|
+
* *missing* entry (`undefined`) falls back to the profile-global value, which is
|
|
27
|
+
* the one-time migration for setups that pre-date per-editor scoping.
|
|
28
|
+
*
|
|
29
|
+
* Schema defaults are merged in every branch so a value the user never
|
|
30
|
+
* explicitly set (e.g. a model's default `contextSize`) is always present in the
|
|
31
|
+
* resolved configuration. Otherwise the model picker — which paints the schema
|
|
32
|
+
* default when a key is absent — would show one value while the request and the
|
|
33
|
+
* context-usage widget, which read the resolved configuration, fall back to the
|
|
34
|
+
* model's full native window. See issue #320393.
|
|
35
|
+
*
|
|
36
|
+
* Distinguishing "present but empty" from "absent" is what prevents a newly
|
|
37
|
+
* opened editor from reverting an explicit default selection back to a stale
|
|
38
|
+
* profile-global value. See issue #320393.
|
|
39
|
+
*/
|
|
40
|
+
export declare function resolveModelConfiguration(storedEntry: IStringDictionary<unknown> | undefined, schemaDefaults: IStringDictionary<unknown>, globalConfig: IStringDictionary<unknown> | undefined): IStringDictionary<unknown>;
|
|
41
|
+
/**
|
|
42
|
+
* Computes the entry to persist for a model after applying `values` on top of the
|
|
43
|
+
* `current` effective configuration. Values equal to their schema default are
|
|
44
|
+
* stripped so storage holds only genuine user overrides.
|
|
45
|
+
*
|
|
46
|
+
* The result may be an empty object: callers are expected to still persist it so
|
|
47
|
+
* that an explicit reset-to-default is remembered and does not fall back to the
|
|
48
|
+
* profile-global value on the next read. See issue #320393.
|
|
49
|
+
*/
|
|
50
|
+
export declare function computeStoredConfiguration(current: IStringDictionary<unknown>, values: IStringDictionary<unknown>, schemaDefaults: IStringDictionary<unknown>): IStringDictionary<unknown>;
|
package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelConfigurationLogic.js
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
function extractSchemaDefaults(schema) {
|
|
4
|
+
const defaults = {};
|
|
5
|
+
if (schema?.properties) {
|
|
6
|
+
for (const [key, propSchema] of Object.entries(schema.properties)) {
|
|
7
|
+
if (propSchema.default !== undefined) {
|
|
8
|
+
defaults[key] = propSchema.default;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
return defaults;
|
|
13
|
+
}
|
|
14
|
+
function filterConfigurationToSchema(values, schema) {
|
|
15
|
+
const properties = schema?.properties;
|
|
16
|
+
if (!properties) {
|
|
17
|
+
return {};
|
|
18
|
+
}
|
|
19
|
+
const result = {};
|
|
20
|
+
for (const [key, value] of Object.entries(values)) {
|
|
21
|
+
const propSchema = properties[key];
|
|
22
|
+
if (!propSchema) {
|
|
23
|
+
continue;
|
|
24
|
+
}
|
|
25
|
+
if (Array.isArray(propSchema.enum) && !propSchema.enum.includes(value)) {
|
|
26
|
+
continue;
|
|
27
|
+
}
|
|
28
|
+
result[key] = value;
|
|
29
|
+
}
|
|
30
|
+
return result;
|
|
31
|
+
}
|
|
32
|
+
function resolveModelConfiguration(storedEntry, schemaDefaults, globalConfig) {
|
|
33
|
+
if (storedEntry) {
|
|
34
|
+
return { ...schemaDefaults, ...storedEntry };
|
|
35
|
+
}
|
|
36
|
+
return globalConfig ? { ...schemaDefaults, ...globalConfig } : { ...schemaDefaults };
|
|
37
|
+
}
|
|
38
|
+
function computeStoredConfiguration(current, values, schemaDefaults) {
|
|
39
|
+
const merged = { ...current, ...values };
|
|
40
|
+
const stripped = {};
|
|
41
|
+
for (const [key, value] of Object.entries(merged)) {
|
|
42
|
+
if (schemaDefaults[key] !== value) {
|
|
43
|
+
stripped[key] = value;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return stripped;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export { computeStoredConfiguration, extractSchemaDefaults, filterConfigurationToSchema, resolveModelConfiguration };
|
package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelConfigurationStore.d.ts
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { IAction } from "@codingame/monaco-vscode-api/vscode/vs/base/common/actions";
|
|
2
|
+
import { IStringDictionary } from "@codingame/monaco-vscode-api/vscode/vs/base/common/collections";
|
|
3
|
+
import { Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event";
|
|
4
|
+
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
5
|
+
import { IStorageService } from "@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service";
|
|
6
|
+
import { ILanguageModelsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModels.service";
|
|
7
|
+
import { IModelConfigurationAccess } from "./modelPickerActionItem.js";
|
|
8
|
+
/**
|
|
9
|
+
* Per-editor store for model configuration (e.g. context size, thinking effort).
|
|
10
|
+
*
|
|
11
|
+
* It keeps an in-memory snapshot per model so an editor's value stays stable
|
|
12
|
+
* even when another editor writes to the same persisted bucket, and persists
|
|
13
|
+
* changes to a `(location, sessionType)`-scoped storage bucket — the key is
|
|
14
|
+
* supplied by the owner via `getStorageKey` — so newly opened editors in the
|
|
15
|
+
* same scope inherit the latest value.
|
|
16
|
+
*
|
|
17
|
+
* Implements {@link IModelConfigurationAccess} so the model picker can route
|
|
18
|
+
* reads/writes through this editor-scoped layer instead of the global
|
|
19
|
+
* {@link ILanguageModelsService}. See issue #320393.
|
|
20
|
+
*/
|
|
21
|
+
export declare class ChatModelConfigurationStore extends Disposable implements IModelConfigurationAccess {
|
|
22
|
+
private readonly getStorageKey;
|
|
23
|
+
private readonly languageModelsService;
|
|
24
|
+
private readonly storageService;
|
|
25
|
+
private readonly _overrides;
|
|
26
|
+
private readonly _onDidChange;
|
|
27
|
+
readonly onDidChange: Event<string>;
|
|
28
|
+
constructor(getStorageKey: () => string, languageModelsService: ILanguageModelsService, storageService: IStorageService);
|
|
29
|
+
/**
|
|
30
|
+
* Returns this editor's snapshot of the given model's configuration. The
|
|
31
|
+
* resolution order is:
|
|
32
|
+
* 1. In-memory snapshot (this editor's live value).
|
|
33
|
+
* 2. Scoped storage bucket. A present entry wins even when empty, since an
|
|
34
|
+
* empty entry records an explicit reset-to-default.
|
|
35
|
+
* 3. The profile-global value (migration fallback, only when no scoped
|
|
36
|
+
* entry exists).
|
|
37
|
+
* The merged result is cached so subsequent reads are O(1).
|
|
38
|
+
*/
|
|
39
|
+
getModelConfiguration(modelId: string): IStringDictionary<unknown> | undefined;
|
|
40
|
+
setModelConfiguration(modelId: string, values: IStringDictionary<unknown>): Promise<void>;
|
|
41
|
+
/**
|
|
42
|
+
* Applies the change to this editor's scoped state only (in-memory snapshot
|
|
43
|
+
* and persisted bucket). Returns `true` when something actually changed, so
|
|
44
|
+
* callers can skip propagating no-op updates to the profile-global value.
|
|
45
|
+
*/
|
|
46
|
+
private _applyLocalModelConfiguration;
|
|
47
|
+
getModelConfigurationActions(modelId: string): IAction[];
|
|
48
|
+
/**
|
|
49
|
+
* Restores a previously captured configuration for a model (e.g. when
|
|
50
|
+
* reopening a chat session). Seeds this editor's in-memory snapshot and
|
|
51
|
+
* persists it as the scoped default so the restored value participates in
|
|
52
|
+
* the same resolution hierarchy as a user-made change — mirroring how the
|
|
53
|
+
* restored model selection is persisted to its scoped storage key.
|
|
54
|
+
*
|
|
55
|
+
* When the model is registered, the captured values are filtered against its
|
|
56
|
+
* *current* configuration schema so that a config saved against an older
|
|
57
|
+
* schema does not re-pin removed properties or invalid values: unknown keys
|
|
58
|
+
* and values that violate the schema's `enum` constraint are dropped and fall
|
|
59
|
+
* back to the live default.
|
|
60
|
+
*
|
|
61
|
+
* When the model is NOT yet registered (asynchronous provider registration),
|
|
62
|
+
* its schema is unavailable. Filtering would then discard the *entire*
|
|
63
|
+
* captured config, causing the restore to merge an empty value over whatever
|
|
64
|
+
* the shared per-scope snapshot currently holds — re-pinning another
|
|
65
|
+
* conversation's value (e.g. its context size). To preserve the reopened
|
|
66
|
+
* session's own configuration in that race, the captured values are restored
|
|
67
|
+
* as-is; a later sync re-validates them once the schema loads. See #320393.
|
|
68
|
+
*/
|
|
69
|
+
restoreModelConfiguration(modelId: string, values: IStringDictionary<unknown>): void;
|
|
70
|
+
/**
|
|
71
|
+
* Drops all in-memory snapshots so the next read re-seeds from the (now
|
|
72
|
+
* different) scoped storage bucket. Call when the owning editor's scope
|
|
73
|
+
* (e.g. session type) changes.
|
|
74
|
+
*/
|
|
75
|
+
clear(): void;
|
|
76
|
+
private _schemaDefaults;
|
|
77
|
+
private _readBucket;
|
|
78
|
+
private _writeBucket;
|
|
79
|
+
}
|
package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelConfigurationStore.js
ADDED
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
|
|
2
|
+
import { Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
3
|
+
import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
4
|
+
import { equals } from '@codingame/monaco-vscode-api/vscode/vs/base/common/objects';
|
|
5
|
+
import { StorageScope, StorageTarget } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage';
|
|
6
|
+
import { createModelConfigurationActions } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModels';
|
|
7
|
+
import { resolveModelConfiguration, computeStoredConfiguration, filterConfigurationToSchema, extractSchemaDefaults } from './chatModelConfigurationLogic.js';
|
|
8
|
+
|
|
9
|
+
class ChatModelConfigurationStore extends Disposable {
|
|
10
|
+
constructor(getStorageKey, languageModelsService, storageService) {
|
|
11
|
+
super();
|
|
12
|
+
this.getStorageKey = getStorageKey;
|
|
13
|
+
this.languageModelsService = languageModelsService;
|
|
14
|
+
this.storageService = storageService;
|
|
15
|
+
this._overrides = ( new Map());
|
|
16
|
+
this._onDidChange = this._register(( new Emitter()));
|
|
17
|
+
this.onDidChange = this._onDidChange.event;
|
|
18
|
+
this._register(this.languageModelsService.onDidChangeLanguageModels(() => {
|
|
19
|
+
if (this._overrides.size === 0) {
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
const bucket = this._readBucket();
|
|
23
|
+
for (const [modelId, override] of [...this._overrides]) {
|
|
24
|
+
const schemaDefaults = this._schemaDefaults(modelId);
|
|
25
|
+
const nextOverride = ( Object.keys(override)).length === 0 ? resolveModelConfiguration(
|
|
26
|
+
bucket[modelId],
|
|
27
|
+
schemaDefaults,
|
|
28
|
+
this.languageModelsService.getModelConfiguration(modelId)
|
|
29
|
+
) : {
|
|
30
|
+
...schemaDefaults,
|
|
31
|
+
...override
|
|
32
|
+
};
|
|
33
|
+
if (!equals(override, nextOverride)) {
|
|
34
|
+
this._overrides.set(modelId, nextOverride);
|
|
35
|
+
this._onDidChange.fire(modelId);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}));
|
|
39
|
+
}
|
|
40
|
+
getModelConfiguration(modelId) {
|
|
41
|
+
let override = this._overrides.get(modelId);
|
|
42
|
+
if (!override) {
|
|
43
|
+
const bucketEntry = this._readBucket()[modelId];
|
|
44
|
+
const schemaDefaults = this._schemaDefaults(modelId);
|
|
45
|
+
const globalConfig = this.languageModelsService.getModelConfiguration(modelId);
|
|
46
|
+
override = resolveModelConfiguration(bucketEntry, schemaDefaults, globalConfig);
|
|
47
|
+
this._overrides.set(modelId, override);
|
|
48
|
+
}
|
|
49
|
+
return ( Object.keys(override)).length > 0 ? override : undefined;
|
|
50
|
+
}
|
|
51
|
+
async setModelConfiguration(modelId, values) {
|
|
52
|
+
const changed = this._applyLocalModelConfiguration(modelId, values);
|
|
53
|
+
if (!changed) {
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
await this.languageModelsService.setModelConfiguration(modelId, values);
|
|
57
|
+
}
|
|
58
|
+
_applyLocalModelConfiguration(modelId, values) {
|
|
59
|
+
const schemaDefaults = this._schemaDefaults(modelId);
|
|
60
|
+
const stored = computeStoredConfiguration(this.getModelConfiguration(modelId) ?? {}, values, schemaDefaults);
|
|
61
|
+
const nextOverride = {
|
|
62
|
+
...schemaDefaults,
|
|
63
|
+
...stored
|
|
64
|
+
};
|
|
65
|
+
const bucket = this._readBucket();
|
|
66
|
+
if (equals(this._overrides.get(modelId), nextOverride) && equals(bucket[modelId], stored)) {
|
|
67
|
+
return false;
|
|
68
|
+
}
|
|
69
|
+
this._overrides.set(modelId, nextOverride);
|
|
70
|
+
bucket[modelId] = stored;
|
|
71
|
+
this._writeBucket(bucket);
|
|
72
|
+
this._onDidChange.fire(modelId);
|
|
73
|
+
return true;
|
|
74
|
+
}
|
|
75
|
+
getModelConfigurationActions(modelId) {
|
|
76
|
+
return createModelConfigurationActions(
|
|
77
|
+
this.languageModelsService.lookupLanguageModel(modelId)?.configurationSchema,
|
|
78
|
+
this.getModelConfiguration(modelId) ?? {},
|
|
79
|
+
(key, value) => this.setModelConfiguration(modelId, {
|
|
80
|
+
[key]: value
|
|
81
|
+
})
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
restoreModelConfiguration(modelId, values) {
|
|
85
|
+
const metadata = this.languageModelsService.lookupLanguageModel(modelId);
|
|
86
|
+
const filtered = metadata ? filterConfigurationToSchema(values, metadata.configurationSchema) : {
|
|
87
|
+
...values
|
|
88
|
+
};
|
|
89
|
+
this._applyLocalModelConfiguration(modelId, filtered);
|
|
90
|
+
}
|
|
91
|
+
clear() {
|
|
92
|
+
this._overrides.clear();
|
|
93
|
+
}
|
|
94
|
+
_schemaDefaults(modelId) {
|
|
95
|
+
return extractSchemaDefaults(
|
|
96
|
+
this.languageModelsService.lookupLanguageModel(modelId)?.configurationSchema
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
_readBucket() {
|
|
100
|
+
const result = Object.create(null);
|
|
101
|
+
const raw = this.storageService.get(this.getStorageKey(), StorageScope.APPLICATION);
|
|
102
|
+
if (!raw) {
|
|
103
|
+
return result;
|
|
104
|
+
}
|
|
105
|
+
try {
|
|
106
|
+
const parsed = JSON.parse(raw);
|
|
107
|
+
if (parsed && typeof parsed === "object") {
|
|
108
|
+
for (const [modelId, entry] of Object.entries(parsed)) {
|
|
109
|
+
if (entry && typeof entry === "object" && !Array.isArray(entry)) {
|
|
110
|
+
result[modelId] = entry;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
} catch {}
|
|
115
|
+
return result;
|
|
116
|
+
}
|
|
117
|
+
_writeBucket(bucket) {
|
|
118
|
+
const key = this.getStorageKey();
|
|
119
|
+
if (( Object.keys(bucket)).length === 0) {
|
|
120
|
+
this.storageService.remove(key, StorageScope.APPLICATION);
|
|
121
|
+
} else {
|
|
122
|
+
this.storageService.store(key, JSON.stringify(bucket), StorageScope.APPLICATION, StorageTarget.USER);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export { ChatModelConfigurationStore };
|
|
@@ -9,6 +9,7 @@ import { ICommandService } from "@codingame/monaco-vscode-api/vscode/vs/platform
|
|
|
9
9
|
import { IOpenerService } from "@codingame/monaco-vscode-api/vscode/vs/platform/opener/common/opener.service";
|
|
10
10
|
import { IProductService } from "@codingame/monaco-vscode-api/vscode/vs/platform/product/common/productService.service";
|
|
11
11
|
import { ITelemetryService } from "@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service";
|
|
12
|
+
import { IStorageService } from "@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service";
|
|
12
13
|
import { IModelControlEntry, ILanguageModelChatMetadataAndIdentifier, IModelsControlManifest } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModels";
|
|
13
14
|
import { ILanguageModelsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModels.service";
|
|
14
15
|
import { ChatEntitlement } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/chat/common/chatEntitlementService";
|
|
@@ -18,6 +19,8 @@ import { IUriIdentityService } from "@codingame/monaco-vscode-api/vscode/vs/plat
|
|
|
18
19
|
import { IDefaultAccountService } from "@codingame/monaco-vscode-api/vscode/vs/platform/defaultAccount/common/defaultAccount.service";
|
|
19
20
|
import { StateType } from "@codingame/monaco-vscode-api/vscode/vs/platform/update/common/update";
|
|
20
21
|
import { IUpdateService } from "@codingame/monaco-vscode-api/vscode/vs/platform/update/common/update.service";
|
|
22
|
+
import { IWorkspaceTrustRequestService } from "@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspaceTrust.service";
|
|
23
|
+
import { IWorkspaceTrustManagementService } from "@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspaceTrust.service";
|
|
21
24
|
export declare function getControlModelsForEntitlement(manifest: IModelsControlManifest, entitlement: ChatEntitlement): IStringDictionary<IModelControlEntry>;
|
|
22
25
|
/**
|
|
23
26
|
* Builds the grouped items for the model picker dropdown.
|
|
@@ -37,8 +40,16 @@ export declare function getControlModelsForEntitlement(manifest: IModelsControlM
|
|
|
37
40
|
* Compatible" group and an "AWS Bedrock" group both registered to
|
|
38
41
|
* the `customoai` vendor) renders as distinct sections.
|
|
39
42
|
* 4. Optional "Manage Models..." action shown in Other Models after a separator
|
|
43
|
+
*
|
|
44
|
+
* When `restrictedMode` is set (untrusted workspace), an explanatory "Models
|
|
45
|
+
* unavailable while in Restricted mode" header and a "Trust Workspace to enable
|
|
46
|
+
* models..." action (invoking `onRequestTrust`) replace all of the above.
|
|
47
|
+
* Likewise, when
|
|
48
|
+
* `setupRequired` is set (trusted, but Chat still needs sign-in / setup), a
|
|
49
|
+
* "Sign in to use Copilot" header and a Sign In action (invoking
|
|
50
|
+
* `onRequestSetup`) replace all of the above. `restrictedMode` takes precedence.
|
|
40
51
|
*/
|
|
41
|
-
export declare function buildModelPickerItems(models: ILanguageModelChatMetadataAndIdentifier[], selectedModelId: string | undefined, recentModelIds: string[], pinnedModelIds: string[], controlModels: IStringDictionary<IModelControlEntry>, currentVSCodeVersion: string, updateStateType: StateType, onSelect: (model: ILanguageModelChatMetadataAndIdentifier) => void, onTogglePin: ((modelIdentifier: string, pinned: boolean) => void) | undefined, manageSettingsUrl: string | undefined, useGroupedModelPicker: boolean, manageModelsAction: IActionWidgetDropdownAction | undefined, chatEntitlementService: IChatEntitlementService, showUnavailableFeatured: boolean, showFeatured: boolean, languageModelsService?: ILanguageModelsService, openerService?: IOpenerService, isUBB?: boolean): IActionListItem<IActionWidgetDropdownAction>[];
|
|
52
|
+
export declare function buildModelPickerItems(models: ILanguageModelChatMetadataAndIdentifier[], selectedModelId: string | undefined, recentModelIds: string[], pinnedModelIds: string[], controlModels: IStringDictionary<IModelControlEntry>, currentVSCodeVersion: string, updateStateType: StateType, onSelect: (model: ILanguageModelChatMetadataAndIdentifier) => void, onTogglePin: ((modelIdentifier: string, pinned: boolean) => void) | undefined, manageSettingsUrl: string | undefined, useGroupedModelPicker: boolean, manageModelsAction: IActionWidgetDropdownAction | undefined, chatEntitlementService: IChatEntitlementService, showUnavailableFeatured: boolean, showFeatured: boolean, languageModelsService?: ILanguageModelsService, openerService?: IOpenerService, showAutoModel?: boolean, onConfigure?: (model: ILanguageModelChatMetadataAndIdentifier, group: string) => void, restrictedMode?: boolean, onRequestTrust?: () => void, setupRequired?: boolean, onRequestSetup?: () => void, isUBB?: boolean): IActionListItem<IActionWidgetDropdownAction>[];
|
|
42
53
|
export declare function getModelPickerAccessibilityProvider(): {
|
|
43
54
|
readonly getAriaLabel: (element: IActionListItem<IActionWidgetDropdownAction>) => string | null;
|
|
44
55
|
readonly isChecked: (element: IActionListItem<IActionWidgetDropdownAction>) => boolean | undefined;
|
|
@@ -68,39 +79,104 @@ export declare class ModelPickerWidget extends Disposable {
|
|
|
68
79
|
private readonly _updateService;
|
|
69
80
|
private readonly _uriIdentityService;
|
|
70
81
|
private readonly _defaultAccountService;
|
|
82
|
+
private readonly _workspaceTrustManagementService;
|
|
83
|
+
private readonly _workspaceTrustRequestService;
|
|
84
|
+
private readonly _storageService;
|
|
71
85
|
private readonly _onDidChangeSelection;
|
|
72
86
|
readonly onDidChangeSelection: Event<ILanguageModelChatMetadataAndIdentifier>;
|
|
73
87
|
private _selectedModel;
|
|
74
88
|
private _badge;
|
|
75
89
|
private _compact;
|
|
90
|
+
private _workspaceTrustInitialized;
|
|
91
|
+
private _activatingAfterTrust;
|
|
92
|
+
private readonly _activatingTimer;
|
|
76
93
|
private _domNode;
|
|
77
94
|
private _badgeIcon;
|
|
78
95
|
private _nameButton;
|
|
79
|
-
private
|
|
80
|
-
private _tokensButton;
|
|
96
|
+
private _configButton;
|
|
81
97
|
get selectedModel(): ILanguageModelChatMetadataAndIdentifier | undefined;
|
|
82
98
|
get domNode(): HTMLElement | undefined;
|
|
83
99
|
get nameButton(): HTMLElement | undefined;
|
|
84
|
-
constructor(_delegate: IModelPickerDelegate, _actionWidgetService: IActionWidgetService, _commandService: ICommandService, _openerService: IOpenerService, _telemetryService: ITelemetryService, _languageModelsService: ILanguageModelsService, _productService: IProductService, _entitlementService: IChatEntitlementService, _updateService: IUpdateService, _uriIdentityService: IUriIdentityService, _defaultAccountService: IDefaultAccountService);
|
|
100
|
+
constructor(_delegate: IModelPickerDelegate, _actionWidgetService: IActionWidgetService, _commandService: ICommandService, _openerService: IOpenerService, _telemetryService: ITelemetryService, _languageModelsService: ILanguageModelsService, _productService: IProductService, _entitlementService: IChatEntitlementService, _updateService: IUpdateService, _uriIdentityService: IUriIdentityService, _defaultAccountService: IDefaultAccountService, _workspaceTrustManagementService: IWorkspaceTrustManagementService, _workspaceTrustRequestService: IWorkspaceTrustRequestService, _storageService: IStorageService);
|
|
85
101
|
setCompact(compact: IObservable<boolean>): void;
|
|
86
102
|
setSelectedModel(model: ILanguageModelChatMetadataAndIdentifier | undefined): void;
|
|
87
103
|
setEnabled(enabled: boolean): void;
|
|
88
104
|
setBadge(badge: ModelPickerBadge | undefined): void;
|
|
105
|
+
/**
|
|
106
|
+
* Why the picker currently has no model to offer (untrusted vs. needs
|
|
107
|
+
* sign-in/setup), or `undefined` when a model is available. See
|
|
108
|
+
* {@link getModelPickerUnavailableReason}.
|
|
109
|
+
*/
|
|
110
|
+
private _unavailableReason;
|
|
111
|
+
private _requiresSetup;
|
|
112
|
+
/**
|
|
113
|
+
* Whether the picker has no usable model specifically because the workspace
|
|
114
|
+
* is untrusted (Restricted Mode disables the chat model providers).
|
|
115
|
+
*/
|
|
116
|
+
isRestrictedMode(): boolean;
|
|
117
|
+
/**
|
|
118
|
+
* Whether the picker has no usable model because Chat still needs sign-in /
|
|
119
|
+
* setup (and the workspace is trusted, so it is not Restricted Mode). BYOK
|
|
120
|
+
* and anonymous access never report this state.
|
|
121
|
+
*/
|
|
122
|
+
isSetupRequired(): boolean;
|
|
123
|
+
private _clearActivating;
|
|
124
|
+
/**
|
|
125
|
+
* Prompts the user to trust the workspace. On grant, providers register their
|
|
126
|
+
* models and `onDidChangeLanguageModels` refreshes the picker.
|
|
127
|
+
*/
|
|
128
|
+
private _requestWorkspaceTrust;
|
|
129
|
+
/**
|
|
130
|
+
* Starts the Chat setup / sign-in flow (same command as the title-bar Sign In
|
|
131
|
+
* affordance). On completion the entitlement and model registry change, which
|
|
132
|
+
* refreshes the picker.
|
|
133
|
+
*/
|
|
134
|
+
private _requestSetup;
|
|
89
135
|
render(container: HTMLElement): void;
|
|
90
136
|
/**
|
|
91
137
|
* Registers mouse-down and Enter/Space key handlers on a button element.
|
|
92
138
|
*/
|
|
93
139
|
private _registerButtonAction;
|
|
140
|
+
/** The "Learn more" header link for cache-break hints; `undefined` when the product has no URL. */
|
|
141
|
+
private getCacheBreakLearnMoreLink;
|
|
142
|
+
private isCacheBreakHintDismissed;
|
|
143
|
+
private dismissCacheBreakHint;
|
|
144
|
+
/**
|
|
145
|
+
* Whether a picker should show the cache-break hint: the hint has not been
|
|
146
|
+
* dismissed and the session's cache is warm. When `excludeAutoModel` is
|
|
147
|
+
* set (the model picker), the hint is suppressed for the Auto model, since
|
|
148
|
+
* Auto routes each request dynamically so "switching models" does not apply.
|
|
149
|
+
* The options picker passes `false`: changing reasoning effort / context size
|
|
150
|
+
* resets the cache even under Auto, which only routes the model.
|
|
151
|
+
*/
|
|
152
|
+
private shouldShowCacheBreakHint;
|
|
94
153
|
show(anchor?: HTMLElement): void;
|
|
95
154
|
private _updateBadge;
|
|
96
155
|
private _renderLabel;
|
|
156
|
+
/**
|
|
157
|
+
* Per-editor model configuration access when the delegate provides it,
|
|
158
|
+
* otherwise the global service. Routing through this keeps configuration
|
|
159
|
+
* (e.g. context size) scoped to this editor so changes do not sync to other
|
|
160
|
+
* already-open editors. See issue #320393.
|
|
161
|
+
*/
|
|
162
|
+
private get _modelConfiguration();
|
|
97
163
|
private _getConfigProperty;
|
|
98
|
-
|
|
99
|
-
|
|
164
|
+
/**
|
|
165
|
+
* Builds the combined configuration items containing the model's Thinking
|
|
166
|
+
* Effort and Context Size options (when available).
|
|
167
|
+
*/
|
|
168
|
+
private _buildConfigItems;
|
|
169
|
+
/**
|
|
170
|
+
* Opens the combined configuration dropdown containing the model's Thinking
|
|
171
|
+
* Effort and Context Size options (when available), in a single popup anchored
|
|
172
|
+
* to the config button. When `focusGroup` is provided, focus is moved to the
|
|
173
|
+
* first option of that section (e.g. 'navigation' for Thinking Effort or
|
|
174
|
+
* 'tokens' for Context Size).
|
|
175
|
+
*/
|
|
176
|
+
private _showConfigPicker;
|
|
100
177
|
}
|
|
101
|
-
export declare function getModelHoverContent(model: ILanguageModelChatMetadataAndIdentifier,
|
|
178
|
+
export declare function getModelHoverContent(model: ILanguageModelChatMetadataAndIdentifier, isUBB: boolean | undefined, onConfigure: ((group: string) => void) | undefined, openerService: IOpenerService): {
|
|
102
179
|
element: HTMLElement;
|
|
103
180
|
disposable: DisposableStore;
|
|
104
181
|
} | undefined;
|
|
105
|
-
export declare function formatTokenCount(count: number): string;
|
|
106
182
|
export {};
|