@codingame/monaco-vscode-katex-common 29.1.1 → 30.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/platform/actions/browser/buttonbar.js +14 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityProvider.js +16 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContinueInAction.js +9 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatElicitationActions.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.js +34 -34
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTitleActions.js +12 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.d.ts +14 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.js +208 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.d.ts +22 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.js +637 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionApprovalModel.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionApprovalModel.js +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionHoverWidget.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.d.ts +9 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.js +202 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.js +17 -8
- 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 +53 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.js +296 -63
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/media/agentsessionsviewer.css +59 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgets.js +55 -42
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/implicitContextAttachment.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingActions.js +110 -59
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +14 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationWidget.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionPickerActionItem.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/searchableOptionPickerActionItem.js +5 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolSetsContribution.d.ts +24 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolSetsContribution.js +384 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatAgentHover.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatArtifactsWidget.d.ts +12 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatArtifactsWidget.js +220 -61
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentMarkdownRenderer.js +1 -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 +6 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAttachmentsContentPart.js +14 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatChangesSummaryPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCodeCitationContentPart.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 +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatContentCodePools.js +5 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatDisabledClaudeHooksContentPart.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatExtensionsContentPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatHookContentPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatInlineAnchorWidget.d.ts +5 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatInlineAnchorWidget.js +14 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownContentPart.d.ts +11 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownContentPart.js +40 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMcpServersInteractionContentPart.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMultiDiffContentPart.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatProgressContentPart.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuestionCarouselPart.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuestionCarouselPart.js +97 -54
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuotaExceededPart.js +5 -4
- 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.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSuggestNextWidget.js +8 -7
- 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 +15 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatThinkingContentPart.js +155 -22
- 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.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTodoListWidget.js +36 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolInputOutputContentPart.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTreeContentPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatWorkspaceEditContentPart.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/chatThinkingContent.css +13 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/abstractToolConfirmationSubPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatExtensionsInstallToolSubPart.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppModel.js +1 -1
- 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/chatMissingSandboxDepsConfirmationSubPart.d.ts +17 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMissingSandboxDepsConfirmationSubPart.js +68 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatModifiedFilesConfirmationSubPart.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolConfirmationSubPart.js +16 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.js +33 -25
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolConfirmationSubPart.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolInvocationPart.js +12 -3
- 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.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatDragAndDrop.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.d.ts +4 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.js +37 -113
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListWidget.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidget.d.ts +10 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidget.js +66 -39
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatFollowups.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.d.ts +13 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.js +103 -61
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelPicker.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelPicker.js +35 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/delegationSessionPickerActionItem.d.ts +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/delegationSessionPickerActionItem.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modePickerActionItem.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem2.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem2.js +4 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/permissionPickerActionItem.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/permissionPickerActionItem.js +39 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/sessionTargetPickerActionItem.d.ts +6 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/sessionTargetPickerActionItem.js +44 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/workspacePickerActionItem.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/media/chat.css +60 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageDetails.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageWidget.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatImageExtraction.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/common/widget/chatColors.js +15 -15
- package/vscode/src/vs/workbench/contrib/chat/common/widget/codeBlockModelCollection.js +4 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.js +4 -4
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatOverlayWidget.js +5 -5
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.d.ts +4 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.js +5 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.js +6 -11
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatZoneWidget.js +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.js +39 -39
- package/vscode/src/vs/workbench/contrib/interactive/browser/replInputHintContentWidget.js +3 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/executionStatusBarItemController.js +7 -7
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindWidget.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOperations.d.ts +26 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOperations.js +746 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.js +300 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffCellEditorOptions.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffCellEditorOptions.js +55 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffComponents.d.ts +273 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffComponents.js +1963 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementOutputs.d.ts +50 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementOutputs.js +314 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementViewModel.d.ts +258 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementViewModel.js +886 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffNestedCellViewModel.d.ts +41 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffNestedCellViewModel.js +118 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/editorHeightCalculator.d.ts +17 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/editorHeightCalculator.js +71 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/eventDispatcher.d.ts +27 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/eventDispatcher.js +40 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookCellDiffDecorator.d.ts +23 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookCellDiffDecorator.js +313 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookDeletedCellDecorator.d.ts +51 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookDeletedCellDecorator.js +265 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInlineDiff.d.ts +24 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInlineDiff.js +185 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInlineDiffWidget.d.ts +28 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInlineDiffWidget.js +104 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInsertedCellDecorator.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInsertedCellDecorator.js +43 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalCellModelFactory.d.ts +21 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalCellModelFactory.js +41 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalModelRefFactory.d.ts +25 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalModelRefFactory.js +69 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiff.css +469 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor.d.ts +149 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor.js +933 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditorBrowser.d.ts +180 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditorBrowser.js +32 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffList.d.ts +102 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffList.js +643 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffOverviewRuler.d.ts +30 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffOverviewRuler.js +197 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffViewModel.d.ts +75 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffViewModel.js +539 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/unchangedEditorRegions.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/unchangedEditorRegions.js +39 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookMetadataTextModel.d.ts +19 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookMetadataTextModel.js +90 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiff.d.ts +26 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiff.js +92 -0
- 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/chatSessions/chatSessions.contribution.d.ts +0 -152
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.js +0 -1317
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/internalCustomizations/internalPromptFileSystem.d.ts +0 -47
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/internalCustomizations/internalPromptFileSystem.js +0 -95
|
@@ -4,19 +4,20 @@ import { $, clearNode, append } from '@codingame/monaco-vscode-api/vscode/vs/bas
|
|
|
4
4
|
import { Button } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/button/button';
|
|
5
5
|
import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
|
|
6
6
|
import { Disposable, MutableDisposable, DisposableStore } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
7
|
-
import { getMediaMime } from '@codingame/monaco-vscode-api/vscode/vs/base/common/mime';
|
|
8
7
|
import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
|
|
9
8
|
import { ThemeIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/themables';
|
|
10
9
|
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
11
10
|
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
12
|
-
import { ICommandService } from '@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service';
|
|
13
11
|
import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
12
|
+
import { IFileDialogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/common/dialogs.service';
|
|
14
13
|
import { IFileService } from '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service';
|
|
15
14
|
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
16
|
-
import {
|
|
15
|
+
import { WorkbenchObjectTree } from '@codingame/monaco-vscode-api/vscode/vs/platform/list/browser/listService';
|
|
17
16
|
import { IOpenerService } from '@codingame/monaco-vscode-api/vscode/vs/platform/opener/common/opener.service';
|
|
18
17
|
import { ChatConfiguration } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
|
|
19
18
|
import { IChatArtifactsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/chatArtifactsService.service';
|
|
19
|
+
import { IChatImageCarouselService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatImageCarouselService.service';
|
|
20
|
+
import { getEditorOverrideForChatResource } from './chatContentParts/chatInlineAnchorWidget.js';
|
|
20
21
|
import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
|
|
21
22
|
|
|
22
23
|
var ChatArtifactsWidget_1;
|
|
@@ -25,6 +26,9 @@ const ARTIFACT_TYPE_ICONS = {
|
|
|
25
26
|
screenshot: Codicon.file,
|
|
26
27
|
plan: Codicon.book
|
|
27
28
|
};
|
|
29
|
+
function isGroupNode(element) {
|
|
30
|
+
return "kind" in element && element.kind === "group";
|
|
31
|
+
}
|
|
28
32
|
let ChatArtifactsWidget = class ChatArtifactsWidget extends Disposable {
|
|
29
33
|
static {
|
|
30
34
|
ChatArtifactsWidget_1 = this;
|
|
@@ -40,29 +44,30 @@ let ChatArtifactsWidget = class ChatArtifactsWidget extends Disposable {
|
|
|
40
44
|
_instantiationService,
|
|
41
45
|
_openerService,
|
|
42
46
|
_configurationService,
|
|
43
|
-
|
|
44
|
-
|
|
47
|
+
_fileService,
|
|
48
|
+
_fileDialogService,
|
|
49
|
+
_chatImageCarouselService
|
|
45
50
|
) {
|
|
46
51
|
super();
|
|
47
52
|
this._chatArtifactsService = _chatArtifactsService;
|
|
48
53
|
this._instantiationService = _instantiationService;
|
|
49
54
|
this._openerService = _openerService;
|
|
50
55
|
this._configurationService = _configurationService;
|
|
51
|
-
this._commandService = _commandService;
|
|
52
56
|
this._fileService = _fileService;
|
|
57
|
+
this._fileDialogService = _fileDialogService;
|
|
58
|
+
this._chatImageCarouselService = _chatImageCarouselService;
|
|
53
59
|
this._autorunDisposable = this._register(( new MutableDisposable()));
|
|
54
|
-
this._isCollapsed =
|
|
55
|
-
this.
|
|
60
|
+
this._isCollapsed = false;
|
|
61
|
+
this._treeStore = this._register(( new DisposableStore()));
|
|
56
62
|
this.domNode = $(".chat-artifacts-widget");
|
|
57
63
|
this.domNode.style.display = "none";
|
|
58
64
|
}
|
|
59
65
|
render(sessionResource) {
|
|
60
|
-
this.
|
|
61
|
-
this._currentObs = this._chatArtifactsService.artifacts(sessionResource);
|
|
66
|
+
this._currentArtifacts = this._chatArtifactsService.getArtifacts(sessionResource);
|
|
62
67
|
clearNode(this.domNode);
|
|
63
|
-
this.
|
|
68
|
+
this._treeStore.clear();
|
|
64
69
|
const expandoContainer = $(".chat-artifacts-expand");
|
|
65
|
-
const headerButton = this.
|
|
70
|
+
const headerButton = this._treeStore.add(( new Button(expandoContainer, {
|
|
66
71
|
supportIcons: true
|
|
67
72
|
})));
|
|
68
73
|
headerButton.element.setAttribute("aria-expanded", String(!this._isCollapsed));
|
|
@@ -74,25 +79,52 @@ let ChatArtifactsWidget = class ChatArtifactsWidget extends Disposable {
|
|
|
74
79
|
titleSection.appendChild(this._expandIcon);
|
|
75
80
|
titleSection.appendChild(this._titleElement);
|
|
76
81
|
headerButton.element.appendChild(titleSection);
|
|
82
|
+
const clearButtonContainer = $(".artifacts-clear-button-container");
|
|
83
|
+
this._clearButton = this._treeStore.add(( new Button(clearButtonContainer, {
|
|
84
|
+
supportIcons: true,
|
|
85
|
+
ariaLabel: ( localize(6710, "Clear all artifacts"))
|
|
86
|
+
})));
|
|
87
|
+
this._clearButton.element.tabIndex = 0;
|
|
88
|
+
this._clearButton.icon = Codicon.clearAll;
|
|
89
|
+
this._treeStore.add(this._clearButton.onDidClick(() => {
|
|
90
|
+
this._clearAllArtifacts();
|
|
91
|
+
}));
|
|
92
|
+
headerButton.element.appendChild(clearButtonContainer);
|
|
77
93
|
this.domNode.appendChild(expandoContainer);
|
|
78
94
|
const listContainer = $(".chat-artifacts-list");
|
|
79
95
|
listContainer.style.display = this._isCollapsed ? "none" : "block";
|
|
80
96
|
this.domNode.appendChild(listContainer);
|
|
81
|
-
this.
|
|
82
|
-
this._instantiationService.createInstance(
|
|
83
|
-
alwaysConsumeMouseWheel: false
|
|
97
|
+
this._tree = this._treeStore.add(
|
|
98
|
+
this._instantiationService.createInstance(WorkbenchObjectTree, "ChatArtifactsTree", listContainer, ( new ChatArtifactsTreeDelegate()), [( new ChatArtifactGroupRenderer()), ( new ChatArtifactLeafRenderer(artifact => this._saveArtifact(artifact)))], {
|
|
99
|
+
alwaysConsumeMouseWheel: false,
|
|
100
|
+
accessibilityProvider: ( new ChatArtifactsAccessibilityProvider())
|
|
84
101
|
})
|
|
85
102
|
);
|
|
86
|
-
this.
|
|
87
|
-
if (e.element) {
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
103
|
+
this._treeStore.add(this._tree.onDidOpen(e => {
|
|
104
|
+
if (!e.element) {
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
if (isGroupNode(e.element)) {
|
|
108
|
+
if (e.element.onlyShowGroup) {
|
|
109
|
+
this._openGroupInCarousel(e.element);
|
|
110
|
+
}
|
|
111
|
+
} else {
|
|
112
|
+
const artifact = e.element;
|
|
113
|
+
if (artifact.type === "screenshot" && this._configurationService.getValue(ChatConfiguration.ImageCarouselEnabled)) {
|
|
114
|
+
this._openScreenshotInCarousel(artifact);
|
|
115
|
+
} else if (artifact.uri) {
|
|
116
|
+
const uri = ( URI.parse(artifact.uri));
|
|
117
|
+
const editorOverride = getEditorOverrideForChatResource(uri, this._configurationService);
|
|
118
|
+
this._openerService.open(uri, {
|
|
119
|
+
fromUserGesture: true,
|
|
120
|
+
editorOptions: {
|
|
121
|
+
override: editorOverride
|
|
122
|
+
}
|
|
123
|
+
});
|
|
92
124
|
}
|
|
93
125
|
}
|
|
94
126
|
}));
|
|
95
|
-
this.
|
|
127
|
+
this._treeStore.add(headerButton.onDidClick(() => {
|
|
96
128
|
this._isCollapsed = !this._isCollapsed;
|
|
97
129
|
this._expandIcon.classList.toggle("codicon-chevron-down", !this._isCollapsed);
|
|
98
130
|
this._expandIcon.classList.toggle("codicon-chevron-right", this._isCollapsed);
|
|
@@ -100,67 +132,149 @@ let ChatArtifactsWidget = class ChatArtifactsWidget extends Disposable {
|
|
|
100
132
|
listContainer.style.display = this._isCollapsed ? "none" : "block";
|
|
101
133
|
}));
|
|
102
134
|
this._autorunDisposable.value = autorun(reader => {
|
|
103
|
-
const artifacts = this.
|
|
135
|
+
const artifacts = this._currentArtifacts.artifacts.read(reader);
|
|
136
|
+
const mutable = this._currentArtifacts.mutable.read(reader);
|
|
104
137
|
if (artifacts.length === 0) {
|
|
105
138
|
this.domNode.style.display = "none";
|
|
106
139
|
return;
|
|
107
140
|
}
|
|
108
141
|
this.domNode.style.display = "";
|
|
109
|
-
this.
|
|
110
|
-
|
|
111
|
-
const
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
142
|
+
this._clearButton.element.style.display = mutable ? "" : "none";
|
|
143
|
+
this._titleElement.textContent = artifacts.length === 1 ? ( localize(6711, "1 Artifact")) : ( localize(6712, "{0} Artifacts", artifacts.length));
|
|
144
|
+
const treeElements = buildTreeElements(artifacts);
|
|
145
|
+
const visibleCount = countVisibleRows(treeElements);
|
|
146
|
+
const itemsShown = Math.min(visibleCount, ChatArtifactsWidget_1.MAX_ITEMS_SHOWN);
|
|
147
|
+
const treeHeight = itemsShown * ChatArtifactsWidget_1.ELEMENT_HEIGHT;
|
|
148
|
+
this._tree.layout(treeHeight);
|
|
149
|
+
this._tree.getHTMLElement().style.height = `${treeHeight}px`;
|
|
150
|
+
this._tree.setChildren(null, treeElements);
|
|
115
151
|
});
|
|
116
152
|
}
|
|
153
|
+
async _openGroupInCarousel(group) {
|
|
154
|
+
const first = group.artifacts[0];
|
|
155
|
+
if (first?.uri) {
|
|
156
|
+
await this._chatImageCarouselService.openCarouselAtResource(( URI.parse(first.uri)));
|
|
157
|
+
}
|
|
158
|
+
}
|
|
117
159
|
async _openScreenshotInCarousel(clicked) {
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
sections: [{
|
|
137
|
-
title: "",
|
|
138
|
-
images
|
|
139
|
-
}]
|
|
140
|
-
},
|
|
141
|
-
startIndex: Math.max(0, startIndex)
|
|
160
|
+
if (clicked.uri) {
|
|
161
|
+
await this._chatImageCarouselService.openCarouselAtResource(( URI.parse(clicked.uri)));
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
_clearAllArtifacts() {
|
|
165
|
+
if (!this._currentArtifacts?.mutable.get()) {
|
|
166
|
+
return;
|
|
167
|
+
}
|
|
168
|
+
this._currentArtifacts.clear();
|
|
169
|
+
}
|
|
170
|
+
async _saveArtifact(artifact) {
|
|
171
|
+
const sourceUri = ( URI.parse(artifact.uri));
|
|
172
|
+
const defaultFileName = sourceUri.path.split("/").pop() ?? artifact.label;
|
|
173
|
+
const defaultPath = await this._fileDialogService.defaultFilePath();
|
|
174
|
+
const defaultUri = URI.joinPath(defaultPath, defaultFileName);
|
|
175
|
+
const targetUri = await this._fileDialogService.showSaveDialog({
|
|
176
|
+
defaultUri,
|
|
177
|
+
title: ( localize(6713, "Save Artifact"))
|
|
142
178
|
});
|
|
179
|
+
if (targetUri) {
|
|
180
|
+
const content = await this._fileService.readFile(sourceUri);
|
|
181
|
+
await this._fileService.writeFile(targetUri, content.value);
|
|
182
|
+
}
|
|
143
183
|
}
|
|
144
184
|
hide() {
|
|
145
185
|
this._autorunDisposable.clear();
|
|
146
186
|
this.domNode.style.display = "none";
|
|
147
187
|
}
|
|
148
188
|
};
|
|
149
|
-
ChatArtifactsWidget = ChatArtifactsWidget_1 = ( __decorate([( __param(0, IChatArtifactsService)), ( __param(1, IInstantiationService)), ( __param(2, IOpenerService)), ( __param(3, IConfigurationService)), ( __param(4,
|
|
150
|
-
|
|
189
|
+
ChatArtifactsWidget = ChatArtifactsWidget_1 = ( __decorate([( __param(0, IChatArtifactsService)), ( __param(1, IInstantiationService)), ( __param(2, IOpenerService)), ( __param(3, IConfigurationService)), ( __param(4, IFileService)), ( __param(5, IFileDialogService)), ( __param(6, IChatImageCarouselService))], ChatArtifactsWidget));
|
|
190
|
+
function buildTreeElements(artifacts) {
|
|
191
|
+
const groups = ( new Map());
|
|
192
|
+
const ungrouped = [];
|
|
193
|
+
for (const artifact of artifacts) {
|
|
194
|
+
if (artifact.groupName) {
|
|
195
|
+
let group = groups.get(artifact.groupName);
|
|
196
|
+
if (!group) {
|
|
197
|
+
group = {
|
|
198
|
+
config: {
|
|
199
|
+
groupName: artifact.groupName,
|
|
200
|
+
onlyShowGroup: artifact.onlyShowGroup ?? false
|
|
201
|
+
},
|
|
202
|
+
artifacts: []
|
|
203
|
+
};
|
|
204
|
+
groups.set(artifact.groupName, group);
|
|
205
|
+
}
|
|
206
|
+
group.artifacts.push(artifact);
|
|
207
|
+
} else {
|
|
208
|
+
ungrouped.push(artifact);
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
const elements = [];
|
|
212
|
+
for (const [, group] of groups) {
|
|
213
|
+
const groupNode = {
|
|
214
|
+
kind: "group",
|
|
215
|
+
groupName: group.config.groupName,
|
|
216
|
+
artifacts: group.artifacts,
|
|
217
|
+
onlyShowGroup: group.config.onlyShowGroup
|
|
218
|
+
};
|
|
219
|
+
if (group.config.onlyShowGroup) {
|
|
220
|
+
elements.push({
|
|
221
|
+
element: groupNode,
|
|
222
|
+
collapsible: false,
|
|
223
|
+
collapsed: false
|
|
224
|
+
});
|
|
225
|
+
} else {
|
|
226
|
+
elements.push({
|
|
227
|
+
element: groupNode,
|
|
228
|
+
collapsible: true,
|
|
229
|
+
collapsed: false,
|
|
230
|
+
children: ( group.artifacts.map(a => ({
|
|
231
|
+
element: a
|
|
232
|
+
})))
|
|
233
|
+
});
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
for (const artifact of ungrouped) {
|
|
237
|
+
elements.push({
|
|
238
|
+
element: artifact
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
return elements;
|
|
242
|
+
}
|
|
243
|
+
function countVisibleRows(elements) {
|
|
244
|
+
let count = 0;
|
|
245
|
+
for (const el of elements) {
|
|
246
|
+
count++;
|
|
247
|
+
if (el.children && !el.collapsed) {
|
|
248
|
+
count += countVisibleRows([...el.children]);
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
return count;
|
|
252
|
+
}
|
|
253
|
+
class ChatArtifactsTreeDelegate {
|
|
151
254
|
getHeight() {
|
|
152
255
|
return ChatArtifactsWidget.ELEMENT_HEIGHT;
|
|
153
256
|
}
|
|
154
|
-
getTemplateId() {
|
|
155
|
-
return
|
|
257
|
+
getTemplateId(element) {
|
|
258
|
+
return isGroupNode(element) ? ChatArtifactGroupRenderer.TEMPLATE_ID : ChatArtifactLeafRenderer.TEMPLATE_ID;
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
class ChatArtifactsAccessibilityProvider {
|
|
262
|
+
getAriaLabel(element) {
|
|
263
|
+
if (isGroupNode(element)) {
|
|
264
|
+
return localize(6714, "{0} ({1} items)", element.groupName, element.artifacts.length);
|
|
265
|
+
}
|
|
266
|
+
return element.label;
|
|
267
|
+
}
|
|
268
|
+
getWidgetAriaLabel() {
|
|
269
|
+
return localize(6715, "Chat Artifacts");
|
|
156
270
|
}
|
|
157
271
|
}
|
|
158
|
-
class
|
|
272
|
+
class ChatArtifactGroupRenderer {
|
|
159
273
|
constructor() {
|
|
160
|
-
this.templateId =
|
|
274
|
+
this.templateId = ChatArtifactGroupRenderer.TEMPLATE_ID;
|
|
161
275
|
}
|
|
162
276
|
static {
|
|
163
|
-
this.TEMPLATE_ID = "
|
|
277
|
+
this.TEMPLATE_ID = "chatArtifactGroupRenderer";
|
|
164
278
|
}
|
|
165
279
|
renderTemplate(container) {
|
|
166
280
|
const row = append(container, $(".chat-artifacts-list-row"));
|
|
@@ -172,11 +286,56 @@ class ChatArtifactsListRenderer {
|
|
|
172
286
|
labelElement
|
|
173
287
|
};
|
|
174
288
|
}
|
|
175
|
-
renderElement(
|
|
289
|
+
renderElement(node, _index, templateData) {
|
|
290
|
+
const group = node.element;
|
|
291
|
+
if (!isGroupNode(group)) {
|
|
292
|
+
return;
|
|
293
|
+
}
|
|
294
|
+
const firstType = group.artifacts[0]?.type;
|
|
295
|
+
const icon = (firstType && ARTIFACT_TYPE_ICONS[firstType]) || Codicon.archive;
|
|
296
|
+
templateData.iconElement.className = "chat-artifacts-list-icon " + ThemeIcon.asClassName(icon);
|
|
297
|
+
templateData.labelElement.textContent = `${group.groupName} (${group.artifacts.length})`;
|
|
298
|
+
templateData.container.title = group.groupName;
|
|
299
|
+
}
|
|
300
|
+
disposeTemplate() {}
|
|
301
|
+
}
|
|
302
|
+
class ChatArtifactLeafRenderer {
|
|
303
|
+
static {
|
|
304
|
+
this.TEMPLATE_ID = "chatArtifactLeafRenderer";
|
|
305
|
+
}
|
|
306
|
+
constructor(_onSave) {
|
|
307
|
+
this._onSave = _onSave;
|
|
308
|
+
this.templateId = ChatArtifactLeafRenderer.TEMPLATE_ID;
|
|
309
|
+
}
|
|
310
|
+
renderTemplate(container) {
|
|
311
|
+
const row = append(container, $(".chat-artifacts-list-row"));
|
|
312
|
+
const iconElement = append(row, $(".chat-artifacts-list-icon"));
|
|
313
|
+
const labelElement = append(row, $(".chat-artifacts-list-label"));
|
|
314
|
+
const saveButton = append(
|
|
315
|
+
row,
|
|
316
|
+
$(".chat-artifacts-list-save" + ThemeIcon.asCSSSelector(Codicon.save))
|
|
317
|
+
);
|
|
318
|
+
saveButton.title = ( localize(6716, "Save artifact"));
|
|
319
|
+
return {
|
|
320
|
+
container: row,
|
|
321
|
+
iconElement,
|
|
322
|
+
labelElement,
|
|
323
|
+
saveButton
|
|
324
|
+
};
|
|
325
|
+
}
|
|
326
|
+
renderElement(node, _index, templateData) {
|
|
327
|
+
const artifact = node.element;
|
|
328
|
+
if (isGroupNode(artifact)) {
|
|
329
|
+
return;
|
|
330
|
+
}
|
|
176
331
|
const icon = (artifact.type && ARTIFACT_TYPE_ICONS[artifact.type]) || Codicon.archive;
|
|
177
332
|
templateData.iconElement.className = "chat-artifacts-list-icon " + ThemeIcon.asClassName(icon);
|
|
178
333
|
templateData.labelElement.textContent = artifact.label;
|
|
179
334
|
templateData.container.title = artifact.uri;
|
|
335
|
+
templateData.saveButton.onclick = e => {
|
|
336
|
+
e.stopPropagation();
|
|
337
|
+
this._onSave(artifact);
|
|
338
|
+
};
|
|
180
339
|
}
|
|
181
340
|
disposeTemplate() {}
|
|
182
341
|
}
|
|
@@ -9,7 +9,6 @@ import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/pl
|
|
|
9
9
|
import { IHoverService } from '@codingame/monaco-vscode-api/vscode/vs/platform/hover/browser/hover.service';
|
|
10
10
|
import { IOpenerService } from '@codingame/monaco-vscode-api/vscode/vs/platform/opener/common/opener.service';
|
|
11
11
|
import product from '@codingame/monaco-vscode-api/vscode/vs/platform/product/common/product';
|
|
12
|
-
import { CHAT_INTERNAL_SCHEME } from '../../common/promptSyntax/internalCustomizations/internalPromptFileSystem.js';
|
|
13
12
|
|
|
14
13
|
const _remoteImageDisallowed = () => false;
|
|
15
14
|
const allowedChatMarkdownHtmlTags = ( Object.freeze([
|
|
@@ -70,7 +69,7 @@ let ChatContentMarkdownRenderer = class ChatContentMarkdownRenderer {
|
|
|
70
69
|
},
|
|
71
70
|
...options?.sanitizerConfig,
|
|
72
71
|
allowedLinkSchemes: {
|
|
73
|
-
augment: [product.urlProtocol,
|
|
72
|
+
augment: [product.urlProtocol, "copilot-skill"]
|
|
74
73
|
},
|
|
75
74
|
remoteImageIsAllowed: _remoteImageDisallowed
|
|
76
75
|
}
|
|
@@ -28,7 +28,7 @@ let ChatAgentCommandContentPart = class ChatAgentCommandContentPart extends Disp
|
|
|
28
28
|
}, {
|
|
29
29
|
groupId
|
|
30
30
|
}));
|
|
31
|
-
const rerun = ( localize(
|
|
31
|
+
const rerun = ( localize(6717, "Rerun without {0}{1}", chatSubcommandLeader, cmd.name));
|
|
32
32
|
const btn = ( new Button(this.domNode, {
|
|
33
33
|
ariaLabel: rerun
|
|
34
34
|
}));
|
|
@@ -21,14 +21,14 @@ let ChatAnonymousRateLimitedPart = class ChatAnonymousRateLimitedPart extends Di
|
|
|
21
21
|
const messageContainer = append(this.domNode, $(".chat-rate-limited-message"));
|
|
22
22
|
const message = append(messageContainer, $("div"));
|
|
23
23
|
message.textContent = ( localize(
|
|
24
|
-
|
|
24
|
+
6718,
|
|
25
25
|
"Continue the conversation by signing in. Your free account gets 50 premium requests a month plus access to more models and AI features."
|
|
26
26
|
));
|
|
27
27
|
const signInButton = this._register(( new Button(messageContainer, {
|
|
28
28
|
...defaultButtonStyles,
|
|
29
29
|
supportIcons: true
|
|
30
30
|
})));
|
|
31
|
-
signInButton.label = ( localize(
|
|
31
|
+
signInButton.label = ( localize(6719, "Enable more AI features"));
|
|
32
32
|
signInButton.element.classList.add("chat-rate-limited-button");
|
|
33
33
|
this._register(signInButton.onDidClick(async () => {
|
|
34
34
|
const commandId = "workbench.action.chat.triggerSetup";
|
|
@@ -28,6 +28,12 @@ export declare class ChatAttachmentsContentPart extends Disposable {
|
|
|
28
28
|
updateVariables(variables: readonly IChatRequestVariableEntry[]): void;
|
|
29
29
|
private initAttachedContext;
|
|
30
30
|
private getVisibleAttachments;
|
|
31
|
+
/**
|
|
32
|
+
* When the total number of image attachments exceeds the per-request limit,
|
|
33
|
+
* mark the oldest images (those that will be dropped by the backend) with
|
|
34
|
+
* {@link OmittedState.ImageLimitExceeded}.
|
|
35
|
+
*/
|
|
36
|
+
private markImageLimitExceeded;
|
|
31
37
|
private renderShowMoreButton;
|
|
32
38
|
private renderAttachment;
|
|
33
39
|
}
|
|
@@ -8,7 +8,7 @@ import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
|
8
8
|
import { Range } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/core/range';
|
|
9
9
|
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
10
10
|
import { ResourceLabels } from '@codingame/monaco-vscode-api/vscode/vs/workbench/browser/labels';
|
|
11
|
-
import {
|
|
11
|
+
import { isImageVariableEntry, MAX_IMAGES_PER_REQUEST, OmittedState, isElementVariableEntry, isPromptFileVariableEntry, isPromptTextVariableEntry, isTerminalVariableEntry, isPasteVariableEntry, isNotebookOutputVariableEntry, isSCMHistoryItemVariableEntry, isSCMHistoryItemChangeVariableEntry, isSCMHistoryItemChangeRangeVariableEntry, isWorkspaceVariableEntry } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/attachments/chatVariableEntries';
|
|
12
12
|
import { ChatResponseReferencePartStatusKind } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService';
|
|
13
13
|
import { ToolSetOrToolItemAttachmentWidget, ElementChatAttachmentWidget, ImageAttachmentWidget, PromptFileAttachmentWidget, PromptTextAttachmentWidget, FileAttachmentWidget, TerminalCommandAttachmentWidget, PasteAttachmentWidget, NotebookCellOutputChatAttachmentWidget, SCMHistoryItemAttachmentWidget, SCMHistoryItemChangeAttachmentWidget, SCMHistoryItemChangeRangeAttachmentWidget, DefaultChatAttachmentWidget } from '../../attachments/chatAttachmentWidgets.js';
|
|
14
14
|
import { IChatAttachmentWidgetRegistry } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgetRegistry.service';
|
|
@@ -44,6 +44,7 @@ let ChatAttachmentsContentPart = class ChatAttachmentsContentPart extends Dispos
|
|
|
44
44
|
this.attachedContextDisposables.clear();
|
|
45
45
|
const visibleAttachments = this.getVisibleAttachments();
|
|
46
46
|
const hasMoreAttachments = this.limit && this._variables.length > this.limit && !this._showingAll;
|
|
47
|
+
this.markImageLimitExceeded(this._variables);
|
|
47
48
|
for (const attachment of visibleAttachments) {
|
|
48
49
|
this.renderAttachment(attachment, container);
|
|
49
50
|
}
|
|
@@ -57,6 +58,18 @@ let ChatAttachmentsContentPart = class ChatAttachmentsContentPart extends Dispos
|
|
|
57
58
|
}
|
|
58
59
|
return this._variables.slice(0, this.limit);
|
|
59
60
|
}
|
|
61
|
+
markImageLimitExceeded(attachments) {
|
|
62
|
+
const imageAttachments = attachments.filter(isImageVariableEntry);
|
|
63
|
+
if (imageAttachments.length <= MAX_IMAGES_PER_REQUEST) {
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
const excessCount = imageAttachments.length - MAX_IMAGES_PER_REQUEST;
|
|
67
|
+
for (let i = 0; i < excessCount; i++) {
|
|
68
|
+
if (imageAttachments[i].omittedState === OmittedState.NotOmitted || imageAttachments[i].omittedState === OmittedState.ImageLimitExceeded) {
|
|
69
|
+
imageAttachments[i].omittedState = OmittedState.ImageLimitExceeded;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
60
73
|
renderShowMoreButton(container) {
|
|
61
74
|
const remainingCount = this._variables.length - (this.limit ?? 0);
|
|
62
75
|
const showMoreButton = $("div.chat-attached-context-attachment.chat-attachments-show-more-button");
|
|
@@ -93,7 +93,7 @@ let ChatCheckpointFileChangesSummaryContentPart = class ChatCheckpointFileChange
|
|
|
93
93
|
renderViewAllFileChangesButton(container) {
|
|
94
94
|
const button = container.appendChild($(".chat-view-changes-icon"));
|
|
95
95
|
const hoverDisposable = this.hoverService.setupDelayedHover(button, () => ({
|
|
96
|
-
content: ( localize2(
|
|
96
|
+
content: ( localize2(6720, "View All File Changes"))
|
|
97
97
|
}));
|
|
98
98
|
button.classList.add(...ThemeIcon.asClassNameArray(Codicon.diffMultiple));
|
|
99
99
|
button.setAttribute("role", "button");
|
|
@@ -29,7 +29,7 @@ let ChatCodeCitationContentPart = class ChatCodeCitationContentPart extends Disp
|
|
|
29
29
|
buttonSecondaryHoverBackground: undefined,
|
|
30
30
|
buttonSeparator: undefined
|
|
31
31
|
})));
|
|
32
|
-
button.label = ( localize(
|
|
32
|
+
button.label = ( localize(6721, "View matches"));
|
|
33
33
|
this._register(button.onDidClick(() => {
|
|
34
34
|
const citationText = `# Code Citations\n\n` + ( citations.citations.map(c => `## License: ${c.license}\n${( c.value.toString())}\n\n\`\`\`\n${c.snippet}\n\`\`\`\n\n`)).join("\n");
|
|
35
35
|
this.editorService.openEditor({
|
|
@@ -23,7 +23,7 @@ let ChatCommandButtonContentPart = class ChatCommandButtonContentPart extends Di
|
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
renderButton(container, command, enabled, secondary) {
|
|
26
|
-
const tooltip = enabled ? command.tooltip : ( localize(
|
|
26
|
+
const tooltip = enabled ? command.tooltip : ( localize(6722, "Button not available in restored chat"));
|
|
27
27
|
const button = this._register(( new Button(container, {
|
|
28
28
|
...defaultButtonStyles,
|
|
29
29
|
supportIcons: true,
|
|
@@ -26,10 +26,10 @@ let ChatConfirmationContentPart = class ChatConfirmationContentPart extends Disp
|
|
|
26
26
|
data: confirmation.data,
|
|
27
27
|
isSecondary: button !== confirmation.buttons?.[0]
|
|
28
28
|
}))) : [{
|
|
29
|
-
label: ( localize(
|
|
29
|
+
label: ( localize(6723, "Accept")),
|
|
30
30
|
data: confirmation.data
|
|
31
31
|
}, {
|
|
32
|
-
label: ( localize(
|
|
32
|
+
label: ( localize(6724, "Dismiss")),
|
|
33
33
|
data: confirmation.data,
|
|
34
34
|
isSecondary: true
|
|
35
35
|
}];
|
|
@@ -405,7 +405,7 @@ function configureAccessibilityContainer(container, title, message) {
|
|
|
405
405
|
container.tabIndex = 0;
|
|
406
406
|
const titleAsString = typeof title === "string" ? title : title.value;
|
|
407
407
|
const messageAsString = typeof message === "string" ? message : message && "value" in message ? message.value : message && "textContent" in message ? message.textContent : "";
|
|
408
|
-
container.setAttribute("aria-label", ( localize(
|
|
408
|
+
container.setAttribute("aria-label", ( localize(6725, "Chat Confirmation Dialog {0} {1}", titleAsString, messageAsString)));
|
|
409
409
|
container.classList.add("chat-confirmation-widget-container");
|
|
410
410
|
}
|
|
411
411
|
|
package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatContentCodePools.js
CHANGED
|
@@ -5,6 +5,7 @@ import { MenuId } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/
|
|
|
5
5
|
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
6
6
|
import { CodeBlockPart, CodeCompareBlockPart } from './codeBlockPart.js';
|
|
7
7
|
import { ResourcePool } from './chatCollections.js';
|
|
8
|
+
import { createSingleCallFunction } from '@codingame/monaco-vscode-api/vscode/vs/base/common/functional';
|
|
8
9
|
|
|
9
10
|
let EditorPool = class EditorPool extends Disposable {
|
|
10
11
|
inUse() {
|
|
@@ -36,11 +37,11 @@ let EditorPool = class EditorPool extends Disposable {
|
|
|
36
37
|
return {
|
|
37
38
|
object: codeBlock,
|
|
38
39
|
isStale: () => stale,
|
|
39
|
-
dispose: () => {
|
|
40
|
+
dispose: createSingleCallFunction(() => {
|
|
40
41
|
codeBlock.reset();
|
|
41
42
|
stale = true;
|
|
42
43
|
this._pool.release(codeBlock);
|
|
43
|
-
}
|
|
44
|
+
})
|
|
44
45
|
};
|
|
45
46
|
}
|
|
46
47
|
clear() {
|
|
@@ -78,11 +79,11 @@ let DiffEditorPool = class DiffEditorPool extends Disposable {
|
|
|
78
79
|
return {
|
|
79
80
|
object: codeBlock,
|
|
80
81
|
isStale: () => stale,
|
|
81
|
-
dispose: () => {
|
|
82
|
+
dispose: createSingleCallFunction(() => {
|
|
82
83
|
codeBlock.reset();
|
|
83
84
|
stale = true;
|
|
84
85
|
this._pool.release(codeBlock);
|
|
85
|
-
}
|
|
86
|
+
})
|
|
86
87
|
};
|
|
87
88
|
}
|
|
88
89
|
clear() {
|
|
@@ -24,13 +24,13 @@ let ChatDisabledClaudeHooksContentPart = class ChatDisabledClaudeHooksContentPar
|
|
|
24
24
|
const icon = $(".chat-disabled-claude-hooks-icon");
|
|
25
25
|
icon.classList.add(...ThemeIcon.asClassNameArray(Codicon.info));
|
|
26
26
|
const enableLink = createMarkdownCommandLink({
|
|
27
|
-
text: ( localize(
|
|
27
|
+
text: ( localize(6726, "Enable")),
|
|
28
28
|
id: "workbench.action.openSettings",
|
|
29
29
|
arguments: [PromptsConfig.USE_CLAUDE_HOOKS],
|
|
30
|
-
tooltip: ( localize(
|
|
30
|
+
tooltip: ( localize(6727, "Open settings to enable Claude Code hooks"))
|
|
31
31
|
});
|
|
32
32
|
const message = ( localize(
|
|
33
|
-
|
|
33
|
+
6728,
|
|
34
34
|
"Claude Code hooks are available for this workspace. {0}",
|
|
35
35
|
enableLink
|
|
36
36
|
));
|
|
@@ -30,7 +30,7 @@ let ChatExtensionsContentPart = class ChatExtensionsContentPart extends Disposab
|
|
|
30
30
|
append(
|
|
31
31
|
loadingElement,
|
|
32
32
|
$(ThemeIcon.asCSSSelector(ThemeIcon.modify(Codicon.loading, "spin"))),
|
|
33
|
-
$("span.loading-message", undefined, ( localize(
|
|
33
|
+
$("span.loading-message", undefined, ( localize(6729, "Loading extensions...")))
|
|
34
34
|
);
|
|
35
35
|
const extensionsList = append(this.domNode, $(".extensions-list"));
|
|
36
36
|
const list = this._register(
|
package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatHookContentPart.js
CHANGED
|
@@ -20,7 +20,7 @@ let ChatHookContentPart = class ChatHookContentPart extends ChatCollapsibleConte
|
|
|
20
20
|
const isStopped = !!hookPart.stopReason;
|
|
21
21
|
const isWarning = !!hookPart.systemMessage;
|
|
22
22
|
const toolName = hookPart.toolDisplayName;
|
|
23
|
-
const title = isStopped ? (toolName ? ( localize(
|
|
23
|
+
const title = isStopped ? (toolName ? ( localize(6730, "Blocked {0} - {1} hook", toolName, hookTypeLabel)) : ( localize(6731, "Blocked by {0} hook", hookTypeLabel))) : (toolName ? ( localize(6732, "Warning for {0} - {1} hook", toolName, hookTypeLabel)) : ( localize(6733, "Warning from {0} hook", hookTypeLabel)));
|
|
24
24
|
super(title, context, undefined, hoverService, configurationService);
|
|
25
25
|
this.hookPart = hookPart;
|
|
26
26
|
this.icon = isStopped ? Codicon.error : isWarning ? Codicon.warning : Codicon.check;
|
|
@@ -19,6 +19,11 @@ import { IChatContentInlineReference } from "@codingame/monaco-vscode-api/vscode
|
|
|
19
19
|
import { IChatImageCarouselService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatImageCarouselService.service";
|
|
20
20
|
import { IChatMarkdownAnchorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownAnchorService.service";
|
|
21
21
|
import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
|
|
22
|
+
/**
|
|
23
|
+
* Returns the editor ID to use when opening a resource from chat pills (inline anchors), based on the
|
|
24
|
+
* `chat.editorAssociations` setting. Returns undefined if no association matches.
|
|
25
|
+
*/
|
|
26
|
+
export declare function getEditorOverrideForChatResource(resource: URI, configurationService: IConfigurationService): string | undefined;
|
|
22
27
|
type ContentRefData = {
|
|
23
28
|
readonly kind: "symbol";
|
|
24
29
|
readonly symbol: IWorkspaceSymbol;
|