@codingame/monaco-vscode-katex-common 28.4.0 → 29.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/vscode/src/vs/platform/actions/browser/buttonbar.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityProvider.js +17 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContinueInAction.d.ts +2 -2
- 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.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.js +158 -47
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTitleActions.js +22 -17
- 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 +16 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.js +121 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.d.ts +8 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.js +15 -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 +29 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.js +349 -109
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/media/agentsessionsviewer.css +47 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgets.d.ts +6 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgets.js +104 -62
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatImplicitContext.js +1 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/implicitContextAttachment.js +13 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingActions.js +34 -40
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +21 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationWidget.js +14 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionPickerActionItem.d.ts +8 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionPickerActionItem.js +13 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.d.ts +29 -50
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.js +261 -282
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/searchableOptionPickerActionItem.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/searchableOptionPickerActionItem.js +7 -5
- 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 +31 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatArtifactsWidget.js +184 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentMarkdownRenderer.js +4 -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/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/chatDisabledClaudeHooksContentPart.js +4 -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 +3 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatInlineAnchorWidget.js +42 -34
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownContentPart.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownContentPart.js +14 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMcpServersInteractionContentPart.js +11 -9
- 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 +6 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuestionCarouselPart.d.ts +25 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuestionCarouselPart.js +332 -114
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuotaExceededPart.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatReferencesContentPart.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatReferencesContentPart.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatResourceGroupWidget.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatResourceGroupWidget.js +10 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentContentPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentContentPart.js +11 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSuggestNextWidget.d.ts +7 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSuggestNextWidget.js +66 -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 +28 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatThinkingContentPart.js +272 -107
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatThinkingExternalResourcesWidget.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatThinkingExternalResourcesWidget.js +70 -0
- 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 +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolInputOutputContentPart.js +6 -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/chatWorkspaceEditContentPart.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/codeBlockPart.js +14 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatConfirmationWidget.css +151 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatInlineAnchorWidget.css +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatQuestionCarousel.css +96 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatTerminalToolProgressPart.css +6 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatThinkingContent.css +86 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/abstractToolConfirmationSubPart.d.ts +7 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/abstractToolConfirmationSubPart.js +5 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatExtensionsInstallToolSubPart.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatInputOutputMarkdownProgressPart.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatInputOutputMarkdownProgressPart.js +8 -6
- 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/chatModifiedFilesConfirmationSubPart.d.ts +28 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatModifiedFilesConfirmationSubPart.js +273 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatSimpleToolProgressPart.js +3 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolConfirmationSubPart.js +28 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.d.ts +22 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.js +81 -32
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolConfirmationSubPart.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolConfirmationSubPart.js +20 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolInvocationPart.js +11 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolOutputPart.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPartUtilities.d.ts +6 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPartUtilities.js +21 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPostExecuteConfirmationPart.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolProgressPart.js +2 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatDragAndDrop.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.d.ts +0 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.js +112 -163
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListWidget.js +11 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidget.d.ts +9 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidget.js +137 -52
- 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 +12 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.js +108 -38
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelPicker.d.ts +9 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelPicker.js +385 -247
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/delegationSessionPickerActionItem.d.ts +5 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/delegationSessionPickerActionItem.js +23 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modePickerActionItem.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem.d.ts +4 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem2.js +4 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/permissionPickerActionItem.js +23 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/sessionTargetPickerActionItem.js +3 -3
- 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 +124 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageDetails.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageDetails.js +24 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageWidget.js +30 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatContextUsageDetails.css +84 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatImageExtraction.d.ts +31 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatImageExtraction.js +170 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/internalCustomizations/internalPromptFileSystem.d.ts +47 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/internalCustomizations/internalPromptFileSystem.js +95 -0
- package/vscode/src/vs/workbench/contrib/chat/common/widget/annotations.js +4 -1
- package/vscode/src/vs/workbench/contrib/chat/common/widget/chatColors.js +15 -15
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAffordance.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAffordance.js +4 -3
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.js +38 -6
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatEditorAffordance.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatEditorAffordance.js +31 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatOverlayWidget.d.ts +12 -3
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatOverlayWidget.js +130 -23
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.d.ts +23 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.js +41 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.js +5 -5
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatZoneWidget.js +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChatOverlayWidget.css +55 -3
- package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.d.ts +4 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.js +50 -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/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/chatQuestionCarouselAutoReply.d.ts +0 -35
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatQuestionCarouselAutoReply.js +0 -440
package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { IContextMenuService } from "@codingame/monaco-vscode-api/vscode/vs/plat
|
|
|
3
3
|
import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
4
4
|
import { IOpenEvent } from "@codingame/monaco-vscode-api/vscode/vs/platform/list/browser/listService";
|
|
5
5
|
import { IAgentSession } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsModel";
|
|
6
|
-
import { AgentSessionListItem, IAgentSessionsFilter
|
|
6
|
+
import { AgentSessionListItem, IAgentSessionsFilter } from "./agentSessionsViewer.js";
|
|
7
7
|
import { IMenuService } from "@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions.service";
|
|
8
8
|
import { IChatSessionsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService.service";
|
|
9
9
|
import { ICommandService } from "@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service";
|
|
@@ -19,12 +19,12 @@ import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
|
19
19
|
import { ISessionOpenOptions } from "./agentSessionsOpener.js";
|
|
20
20
|
import { IEditorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service";
|
|
21
21
|
import { IChatWidget } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat";
|
|
22
|
-
|
|
22
|
+
import { IStorageService } from "@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service";
|
|
23
|
+
export interface IAgentSessionsControlOptions {
|
|
23
24
|
readonly overrideStyles: IStyleOverride<IListStyles>;
|
|
24
25
|
readonly filter: IAgentSessionsFilter;
|
|
25
26
|
readonly source: string;
|
|
26
27
|
readonly disableHover?: boolean;
|
|
27
|
-
readonly showIsolationIcon?: boolean;
|
|
28
28
|
readonly enableApprovalRow?: boolean;
|
|
29
29
|
getHoverPosition(): HoverPosition;
|
|
30
30
|
trackActiveEditorSession(): boolean;
|
|
@@ -45,34 +45,46 @@ export declare class AgentSessionsControl extends Disposable implements IAgentSe
|
|
|
45
45
|
private readonly agentSessionsService;
|
|
46
46
|
private readonly telemetryService;
|
|
47
47
|
private readonly editorService;
|
|
48
|
+
private readonly storageService;
|
|
48
49
|
private sessionsContainer;
|
|
49
50
|
get element(): HTMLElement | undefined;
|
|
50
51
|
private emptyFilterMessage;
|
|
51
52
|
private sessionsList;
|
|
53
|
+
private static readonly RECENT_SESSIONS_FOR_EXPAND;
|
|
52
54
|
private sessionsListFindIsOpen;
|
|
55
|
+
private _isProgrammaticCollapseChange;
|
|
56
|
+
private readonly _recentRepositoryLabels;
|
|
53
57
|
private readonly updateSessionsListThrottler;
|
|
54
58
|
private readonly _onDidUpdate;
|
|
55
59
|
readonly onDidUpdate: Event<void>;
|
|
56
60
|
private visible;
|
|
57
61
|
private focusedAgentSessionArchivedContextKey;
|
|
62
|
+
private focusedAgentSessionPinnedContextKey;
|
|
58
63
|
private focusedAgentSessionReadContextKey;
|
|
59
64
|
private focusedAgentSessionTypeContextKey;
|
|
60
65
|
private hasMultipleAgentSessionsSelectedContextKey;
|
|
61
|
-
constructor(container: HTMLElement, options: IAgentSessionsControlOptions, contextMenuService: IContextMenuService, contextKeyService: IContextKeyService, instantiationService: IInstantiationService, chatSessionsService: IChatSessionsService, commandService: ICommandService, menuService: IMenuService, agentSessionsService: IAgentSessionsService, telemetryService: ITelemetryService, editorService: IEditorService);
|
|
66
|
+
constructor(container: HTMLElement, options: IAgentSessionsControlOptions, contextMenuService: IContextMenuService, contextKeyService: IContextKeyService, instantiationService: IInstantiationService, chatSessionsService: IChatSessionsService, commandService: ICommandService, menuService: IMenuService, agentSessionsService: IAgentSessionsService, telemetryService: ITelemetryService, editorService: IEditorService, storageService: IStorageService);
|
|
62
67
|
private registerListeners;
|
|
63
68
|
private revealAndFocusActiveEditorSession;
|
|
64
69
|
private create;
|
|
65
70
|
private createEmptyFilterMessage;
|
|
71
|
+
private static readonly SECTION_COLLAPSE_STATE_KEY;
|
|
72
|
+
private getSavedCollapseState;
|
|
73
|
+
private saveSectionCollapseState;
|
|
74
|
+
resetSectionCollapseState(): void;
|
|
66
75
|
private createList;
|
|
67
76
|
private updateEmpty;
|
|
68
77
|
private hasTodaySessions;
|
|
78
|
+
private computeRecentRepositoryLabels;
|
|
69
79
|
private openAgentSession;
|
|
70
80
|
private showContextMenu;
|
|
71
81
|
private showAgentSessionSectionContextMenu;
|
|
72
82
|
private showAgentSessionContextMenu;
|
|
73
83
|
openFind(): void;
|
|
74
84
|
private updateSectionCollapseStates;
|
|
85
|
+
private _updateSectionCollapseStatesCore;
|
|
75
86
|
refresh(): Promise<void>;
|
|
87
|
+
collapseAllSections(): void;
|
|
76
88
|
update(): Promise<void>;
|
|
77
89
|
setVisible(visible: boolean): void;
|
|
78
90
|
layout(height: number, width: number): void;
|
|
@@ -10,7 +10,8 @@ import { StandardKeyboardEvent } from '@codingame/monaco-vscode-api/vscode/vs/ba
|
|
|
10
10
|
import { KeyCode } from '@codingame/monaco-vscode-api/vscode/vs/base/common/keyCodes';
|
|
11
11
|
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
12
12
|
import { isAgentSessionSection, AgentSessionSection, isAgentSession } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsModel';
|
|
13
|
-
import { AgentSessionsSorter, AgentSessionRenderer, AgentSessionsDataSource, AgentSessionsListDelegate, AgentSessionsCompressionDelegate, AgentSessionSectionRenderer, AgentSessionsKeyboardNavigationLabelProvider, AgentSessionsIdentityProvider, AgentSessionsDragAndDrop, AgentSessionsAccessibilityProvider } from './agentSessionsViewer.js';
|
|
13
|
+
import { AgentSessionsSorter, AgentSessionRenderer, AgentSessionsDataSource, AgentSessionsListDelegate, AgentSessionsCompressionDelegate, AgentSessionSectionRenderer, AgentSessionsKeyboardNavigationLabelProvider, AgentSessionsIdentityProvider, AgentSessionsDragAndDrop, AgentSessionsAccessibilityProvider, getRepositoryName, AgentSessionSectionLabels } from './agentSessionsViewer.js';
|
|
14
|
+
import { AgentSessionsSorting, AgentSessionsGrouping } from './agentSessionsFilter.js';
|
|
14
15
|
import { AgentSessionApprovalModel } from './agentSessionApprovalModel.js';
|
|
15
16
|
import { MenuId } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
|
|
16
17
|
import { IMenuService } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions.service';
|
|
@@ -20,20 +21,30 @@ import { ACTION_ID_NEW_CHAT } from '@codingame/monaco-vscode-api/vscode/vs/workb
|
|
|
20
21
|
import { Emitter, Event } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
21
22
|
import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
22
23
|
import { Throttler } from '@codingame/monaco-vscode-api/vscode/vs/base/common/async';
|
|
24
|
+
import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
|
|
23
25
|
import { MarshalledId } from '@codingame/monaco-vscode-api/vscode/vs/base/common/marshallingIds';
|
|
24
26
|
import { Separator } from '@codingame/monaco-vscode-api/vscode/vs/base/common/actions';
|
|
25
27
|
import { RenderIndentGuides, TreeFindMode } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/tree/abstractTree';
|
|
26
28
|
import { IAgentSessionsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsService.service';
|
|
27
29
|
import { ITelemetryService } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service';
|
|
28
|
-
import { getAgentSessionTime } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/agentSessions/agentSessions';
|
|
29
30
|
import { openSession } from './agentSessionsOpener.js';
|
|
30
31
|
import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
31
32
|
import { ChatEditorInput } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditorInput';
|
|
33
|
+
import { StorageScope, StorageTarget } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage';
|
|
34
|
+
import { IStorageService } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service';
|
|
35
|
+
import { observableValue } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableValue';
|
|
32
36
|
|
|
37
|
+
var AgentSessionsControl_1;
|
|
33
38
|
let AgentSessionsControl = class AgentSessionsControl extends Disposable {
|
|
39
|
+
static {
|
|
40
|
+
AgentSessionsControl_1 = this;
|
|
41
|
+
}
|
|
34
42
|
get element() {
|
|
35
43
|
return this.sessionsContainer;
|
|
36
44
|
}
|
|
45
|
+
static {
|
|
46
|
+
this.RECENT_SESSIONS_FOR_EXPAND = 5;
|
|
47
|
+
}
|
|
37
48
|
constructor(
|
|
38
49
|
container,
|
|
39
50
|
options,
|
|
@@ -45,7 +56,8 @@ let AgentSessionsControl = class AgentSessionsControl extends Disposable {
|
|
|
45
56
|
menuService,
|
|
46
57
|
agentSessionsService,
|
|
47
58
|
telemetryService,
|
|
48
|
-
editorService
|
|
59
|
+
editorService,
|
|
60
|
+
storageService
|
|
49
61
|
) {
|
|
50
62
|
super();
|
|
51
63
|
this.container = container;
|
|
@@ -59,12 +71,16 @@ let AgentSessionsControl = class AgentSessionsControl extends Disposable {
|
|
|
59
71
|
this.agentSessionsService = agentSessionsService;
|
|
60
72
|
this.telemetryService = telemetryService;
|
|
61
73
|
this.editorService = editorService;
|
|
74
|
+
this.storageService = storageService;
|
|
62
75
|
this.sessionsListFindIsOpen = false;
|
|
76
|
+
this._isProgrammaticCollapseChange = false;
|
|
77
|
+
this._recentRepositoryLabels = ( new Set());
|
|
63
78
|
this.updateSessionsListThrottler = this._register(( new Throttler()));
|
|
64
79
|
this._onDidUpdate = this._register(( new Emitter()));
|
|
65
80
|
this.onDidUpdate = this._onDidUpdate.event;
|
|
66
81
|
this.visible = true;
|
|
67
82
|
this.focusedAgentSessionArchivedContextKey = ChatContextKeys.isArchivedAgentSession.bindTo(this.contextKeyService);
|
|
83
|
+
this.focusedAgentSessionPinnedContextKey = ChatContextKeys.isPinnedAgentSession.bindTo(this.contextKeyService);
|
|
68
84
|
this.focusedAgentSessionReadContextKey = ChatContextKeys.isReadAgentSession.bindTo(this.contextKeyService);
|
|
69
85
|
this.focusedAgentSessionTypeContextKey = ChatContextKeys.agentSessionType.bindTo(this.contextKeyService);
|
|
70
86
|
this.hasMultipleAgentSessionsSelectedContextKey = ChatContextKeys.hasMultipleAgentSessionsSelected.bindTo(this.contextKeyService);
|
|
@@ -103,9 +119,9 @@ let AgentSessionsControl = class AgentSessionsControl extends Disposable {
|
|
|
103
119
|
this.emptyFilterMessage = append(container, $(".agent-sessions-empty-filter-message"));
|
|
104
120
|
hide(this.emptyFilterMessage);
|
|
105
121
|
const span = append(this.emptyFilterMessage, $("span"));
|
|
106
|
-
span.textContent = `${( localize(
|
|
122
|
+
span.textContent = `${( localize(5154, "No matching sessions"))} - `;
|
|
107
123
|
const link = append(this.emptyFilterMessage, $("span.reset-filter-link"));
|
|
108
|
-
link.textContent = ( localize(
|
|
124
|
+
link.textContent = ( localize(5155, "Reset Filter"));
|
|
109
125
|
link.tabIndex = 0;
|
|
110
126
|
link.setAttribute("role", "button");
|
|
111
127
|
this._register(
|
|
@@ -119,9 +135,50 @@ let AgentSessionsControl = class AgentSessionsControl extends Disposable {
|
|
|
119
135
|
}
|
|
120
136
|
}));
|
|
121
137
|
}
|
|
138
|
+
static {
|
|
139
|
+
this.SECTION_COLLAPSE_STATE_KEY = "agentSessions.sectionCollapseState";
|
|
140
|
+
}
|
|
141
|
+
getSavedCollapseState(section) {
|
|
142
|
+
const raw = this.storageService.get(AgentSessionsControl_1.SECTION_COLLAPSE_STATE_KEY, StorageScope.PROFILE);
|
|
143
|
+
if (raw) {
|
|
144
|
+
try {
|
|
145
|
+
const state = JSON.parse(raw);
|
|
146
|
+
if (typeof state[section] === "boolean") {
|
|
147
|
+
return state[section];
|
|
148
|
+
}
|
|
149
|
+
} catch {}
|
|
150
|
+
}
|
|
151
|
+
return undefined;
|
|
152
|
+
}
|
|
153
|
+
saveSectionCollapseState(section, collapsed) {
|
|
154
|
+
let state = {};
|
|
155
|
+
const raw = this.storageService.get(AgentSessionsControl_1.SECTION_COLLAPSE_STATE_KEY, StorageScope.PROFILE);
|
|
156
|
+
if (raw) {
|
|
157
|
+
try {
|
|
158
|
+
const parsed = JSON.parse(raw);
|
|
159
|
+
if (typeof parsed === "object" && parsed !== null && !Array.isArray(parsed)) {
|
|
160
|
+
state = parsed;
|
|
161
|
+
}
|
|
162
|
+
} catch {}
|
|
163
|
+
}
|
|
164
|
+
state[section] = collapsed;
|
|
165
|
+
this.storageService.store(
|
|
166
|
+
AgentSessionsControl_1.SECTION_COLLAPSE_STATE_KEY,
|
|
167
|
+
JSON.stringify(state),
|
|
168
|
+
StorageScope.PROFILE,
|
|
169
|
+
StorageTarget.USER
|
|
170
|
+
);
|
|
171
|
+
}
|
|
172
|
+
resetSectionCollapseState() {
|
|
173
|
+
this.storageService.remove(AgentSessionsControl_1.SECTION_COLLAPSE_STATE_KEY, StorageScope.PROFILE);
|
|
174
|
+
}
|
|
122
175
|
createList(container) {
|
|
123
176
|
const collapseByDefault = element => {
|
|
124
177
|
if (isAgentSessionSection(element)) {
|
|
178
|
+
const saved = this.getSavedCollapseState(element.section);
|
|
179
|
+
if (saved !== undefined) {
|
|
180
|
+
return saved;
|
|
181
|
+
}
|
|
125
182
|
if (element.section === AgentSessionSection.More && !this.options.filter.getExcludes().read) {
|
|
126
183
|
return true;
|
|
127
184
|
}
|
|
@@ -140,15 +197,21 @@ let AgentSessionsControl = class AgentSessionsControl extends Disposable {
|
|
|
140
197
|
if (element.section === AgentSessionSection.Yesterday && this.hasTodaySessions()) {
|
|
141
198
|
return true;
|
|
142
199
|
}
|
|
200
|
+
if (element.section === AgentSessionSection.Repository && !( this._recentRepositoryLabels.has(element.label))) {
|
|
201
|
+
return true;
|
|
202
|
+
}
|
|
143
203
|
}
|
|
144
204
|
}
|
|
145
205
|
return false;
|
|
146
206
|
};
|
|
147
|
-
const sorter = ( new AgentSessionsSorter(this.options));
|
|
207
|
+
const sorter = ( new AgentSessionsSorter(() => this.options.filter.sortResults?.() ?? AgentSessionsSorting.Created));
|
|
148
208
|
const approvalModel = this.options.enableApprovalRow ? this._register(this.instantiationService.createInstance(AgentSessionApprovalModel)) : undefined;
|
|
149
|
-
const
|
|
150
|
-
|
|
151
|
-
|
|
209
|
+
const activeSessionResource = observableValue(this, undefined);
|
|
210
|
+
const sessionRenderer = this._register(this.instantiationService.createInstance(AgentSessionRenderer, {
|
|
211
|
+
...this.options,
|
|
212
|
+
isGroupedByRepository: () => this.options.filter.groupResults?.() === AgentSessionsGrouping.Repository,
|
|
213
|
+
isSortedByUpdated: () => this.options.filter.sortResults?.() === AgentSessionsSorting.Updated
|
|
214
|
+
}, approvalModel, activeSessionResource));
|
|
152
215
|
const sessionFilter = this._register(( new AgentSessionsDataSource(this.options.filter, sorter)));
|
|
153
216
|
const list = this.sessionsList = this._register(this.instantiationService.createInstance(
|
|
154
217
|
WorkbenchCompressibleAsyncDataTree,
|
|
@@ -197,6 +260,7 @@ let AgentSessionsControl = class AgentSessionsControl extends Disposable {
|
|
|
197
260
|
this.update();
|
|
198
261
|
}
|
|
199
262
|
}));
|
|
263
|
+
this.computeRecentRepositoryLabels();
|
|
200
264
|
list.setInput(model);
|
|
201
265
|
this._register(list.onDidOpen(e => this.openAgentSession(e)));
|
|
202
266
|
this._register(list.onContextMenu(e => this.showContextMenu(e)));
|
|
@@ -217,12 +281,16 @@ let AgentSessionsControl = class AgentSessionsControl extends Disposable {
|
|
|
217
281
|
const focused = list.getFocus().at(0);
|
|
218
282
|
if (focused && isAgentSession(focused)) {
|
|
219
283
|
this.focusedAgentSessionArchivedContextKey.set(focused.isArchived());
|
|
284
|
+
this.focusedAgentSessionPinnedContextKey.set(focused.isPinned());
|
|
220
285
|
this.focusedAgentSessionReadContextKey.set(focused.isRead());
|
|
221
286
|
this.focusedAgentSessionTypeContextKey.set(focused.providerType);
|
|
287
|
+
activeSessionResource.set(focused.resource, undefined);
|
|
222
288
|
} else {
|
|
223
289
|
this.focusedAgentSessionArchivedContextKey.reset();
|
|
290
|
+
this.focusedAgentSessionPinnedContextKey.reset();
|
|
224
291
|
this.focusedAgentSessionReadContextKey.reset();
|
|
225
292
|
this.focusedAgentSessionTypeContextKey.reset();
|
|
293
|
+
activeSessionResource.set(undefined, undefined);
|
|
226
294
|
}
|
|
227
295
|
const selection = list.getSelection().filter(isAgentSession);
|
|
228
296
|
this.hasMultipleAgentSessionsSelectedContextKey.set(selection.length > 1);
|
|
@@ -231,6 +299,15 @@ let AgentSessionsControl = class AgentSessionsControl extends Disposable {
|
|
|
231
299
|
this.sessionsListFindIsOpen = open;
|
|
232
300
|
this.updateSectionCollapseStates();
|
|
233
301
|
}));
|
|
302
|
+
this._register(list.onDidChangeCollapseState(e => {
|
|
303
|
+
if (this._isProgrammaticCollapseChange) {
|
|
304
|
+
return;
|
|
305
|
+
}
|
|
306
|
+
const element = e.node.element?.element;
|
|
307
|
+
if (element && isAgentSessionSection(element)) {
|
|
308
|
+
this.saveSectionCollapseState(element.section, e.node.collapsed);
|
|
309
|
+
}
|
|
310
|
+
}));
|
|
234
311
|
}
|
|
235
312
|
updateEmpty(isEmpty) {
|
|
236
313
|
if (!this.emptyFilterMessage || !this.sessionsList) {
|
|
@@ -245,9 +322,15 @@ let AgentSessionsControl = class AgentSessionsControl extends Disposable {
|
|
|
245
322
|
}
|
|
246
323
|
hasTodaySessions() {
|
|
247
324
|
const startOfToday = ( new Date()).setHours(0, 0, 0, 0);
|
|
248
|
-
return ( this.agentSessionsService.model.sessions.some(
|
|
249
|
-
|
|
250
|
-
|
|
325
|
+
return ( this.agentSessionsService.model.sessions.some(session => !session.isArchived() && session.timing.created >= startOfToday));
|
|
326
|
+
}
|
|
327
|
+
computeRecentRepositoryLabels() {
|
|
328
|
+
this._recentRepositoryLabels.clear();
|
|
329
|
+
const sessions = this.agentSessionsService.model.sessions.filter(s => !s.isArchived() && !s.isPinned()).sort((a, b) => b.timing.created - a.timing.created).slice(0, AgentSessionsControl_1.RECENT_SESSIONS_FOR_EXPAND);
|
|
330
|
+
for (const session of sessions) {
|
|
331
|
+
const name = getRepositoryName(session);
|
|
332
|
+
this._recentRepositoryLabels.add(name ?? AgentSessionSectionLabels[AgentSessionSection.Repository]);
|
|
333
|
+
}
|
|
251
334
|
}
|
|
252
335
|
async openAgentSession(e) {
|
|
253
336
|
const element = e.element;
|
|
@@ -298,7 +381,7 @@ let AgentSessionsControl = class AgentSessionsControl extends Disposable {
|
|
|
298
381
|
shouldForwardArgs: true
|
|
299
382
|
}).map(([, actions]) => actions))),
|
|
300
383
|
getAnchor: () => anchor,
|
|
301
|
-
getActionsContext: () =>
|
|
384
|
+
getActionsContext: () => this
|
|
302
385
|
});
|
|
303
386
|
menu.dispose();
|
|
304
387
|
}
|
|
@@ -306,6 +389,7 @@ let AgentSessionsControl = class AgentSessionsControl extends Disposable {
|
|
|
306
389
|
this.chatSessionsService.activateChatSessionItemProvider(session.providerType);
|
|
307
390
|
const contextOverlay = [];
|
|
308
391
|
contextOverlay.push([ChatContextKeys.isArchivedAgentSession.key, session.isArchived()]);
|
|
392
|
+
contextOverlay.push([ChatContextKeys.isPinnedAgentSession.key, session.isPinned()]);
|
|
309
393
|
contextOverlay.push([ChatContextKeys.isReadAgentSession.key, session.isRead()]);
|
|
310
394
|
contextOverlay.push([ChatContextKeys.agentSessionType.key, session.providerType]);
|
|
311
395
|
const menu = this.menuService.createMenu(
|
|
@@ -332,6 +416,17 @@ let AgentSessionsControl = class AgentSessionsControl extends Disposable {
|
|
|
332
416
|
this.sessionsList?.openFind();
|
|
333
417
|
}
|
|
334
418
|
updateSectionCollapseStates() {
|
|
419
|
+
if (!this.sessionsList) {
|
|
420
|
+
return;
|
|
421
|
+
}
|
|
422
|
+
this._isProgrammaticCollapseChange = true;
|
|
423
|
+
try {
|
|
424
|
+
this._updateSectionCollapseStatesCore();
|
|
425
|
+
} finally {
|
|
426
|
+
this._isProgrammaticCollapseChange = false;
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
_updateSectionCollapseStatesCore() {
|
|
335
430
|
if (!this.sessionsList) {
|
|
336
431
|
return;
|
|
337
432
|
}
|
|
@@ -365,8 +460,20 @@ let AgentSessionsControl = class AgentSessionsControl extends Disposable {
|
|
|
365
460
|
refresh() {
|
|
366
461
|
return this.agentSessionsService.model.resolve(undefined);
|
|
367
462
|
}
|
|
463
|
+
collapseAllSections() {
|
|
464
|
+
if (!this.sessionsList) {
|
|
465
|
+
return;
|
|
466
|
+
}
|
|
467
|
+
const model = this.agentSessionsService.model;
|
|
468
|
+
for (const child of this.sessionsList.getNode(model).children) {
|
|
469
|
+
if (isAgentSessionSection(child.element) && !child.collapsed) {
|
|
470
|
+
this.sessionsList.collapse(child.element);
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
}
|
|
368
474
|
async update() {
|
|
369
475
|
return this.updateSessionsListThrottler.queue(async () => {
|
|
476
|
+
this.computeRecentRepositoryLabels();
|
|
370
477
|
await this.sessionsList?.updateChildren();
|
|
371
478
|
this._onDidUpdate.fire();
|
|
372
479
|
});
|
|
@@ -418,6 +525,6 @@ let AgentSessionsControl = class AgentSessionsControl extends Disposable {
|
|
|
418
525
|
return true;
|
|
419
526
|
}
|
|
420
527
|
};
|
|
421
|
-
AgentSessionsControl = ( __decorate([( __param(2, IContextMenuService)), ( __param(3, IContextKeyService)), ( __param(4, IInstantiationService)), ( __param(5, IChatSessionsService)), ( __param(6, ICommandService)), ( __param(7, IMenuService)), ( __param(8, IAgentSessionsService)), ( __param(9, ITelemetryService)), ( __param(10, IEditorService))], AgentSessionsControl));
|
|
528
|
+
AgentSessionsControl = AgentSessionsControl_1 = ( __decorate([( __param(2, IContextMenuService)), ( __param(3, IContextKeyService)), ( __param(4, IInstantiationService)), ( __param(5, IChatSessionsService)), ( __param(6, ICommandService)), ( __param(7, IMenuService)), ( __param(8, IAgentSessionsService)), ( __param(9, ITelemetryService)), ( __param(10, IEditorService)), ( __param(11, IStorageService))], AgentSessionsControl));
|
|
422
529
|
|
|
423
530
|
export { AgentSessionsControl };
|
|
@@ -7,7 +7,12 @@ import { IAgentSession } from "@codingame/monaco-vscode-api/vscode/vs/workbench/
|
|
|
7
7
|
import { IAgentSessionsFilter, IAgentSessionsFilterExcludes } from "./agentSessionsViewer.js";
|
|
8
8
|
export declare enum AgentSessionsGrouping {
|
|
9
9
|
Capped = "capped",
|
|
10
|
-
Date = "date"
|
|
10
|
+
Date = "date",
|
|
11
|
+
Repository = "repository"
|
|
12
|
+
}
|
|
13
|
+
export declare enum AgentSessionsSorting {
|
|
14
|
+
Created = "created",
|
|
15
|
+
Updated = "updated"
|
|
11
16
|
}
|
|
12
17
|
export interface IAgentSessionsFilterOptions extends Partial<IAgentSessionsFilter> {
|
|
13
18
|
readonly filterMenuId?: MenuId;
|
|
@@ -24,6 +29,7 @@ export interface IAgentSessionsFilterOptions extends Partial<IAgentSessionsFilte
|
|
|
24
29
|
readonly limitResults?: () => number | undefined;
|
|
25
30
|
notifyResults?(count: number): void;
|
|
26
31
|
readonly groupResults?: () => AgentSessionsGrouping | undefined;
|
|
32
|
+
readonly sortResults?: () => AgentSessionsSorting | undefined;
|
|
27
33
|
overrideExclude?(session: IAgentSession): boolean | undefined;
|
|
28
34
|
}
|
|
29
35
|
export declare class AgentSessionsFilter extends Disposable implements Required<IAgentSessionsFilter> {
|
|
@@ -35,6 +41,7 @@ export declare class AgentSessionsFilter extends Disposable implements Required<
|
|
|
35
41
|
readonly onDidChange: import("@codingame/monaco-vscode-api/vscode/vs/base/common/event").Event<void>;
|
|
36
42
|
readonly limitResults: () => number | undefined;
|
|
37
43
|
readonly groupResults: () => AgentSessionsGrouping | undefined;
|
|
44
|
+
readonly sortResults: () => AgentSessionsSorting | undefined;
|
|
38
45
|
private excludes;
|
|
39
46
|
private isStoringExcludes;
|
|
40
47
|
private readonly actionDisposables;
|
|
@@ -17,7 +17,13 @@ var AgentSessionsGrouping;
|
|
|
17
17
|
(function(AgentSessionsGrouping) {
|
|
18
18
|
AgentSessionsGrouping["Capped"] = "capped";
|
|
19
19
|
AgentSessionsGrouping["Date"] = "date";
|
|
20
|
+
AgentSessionsGrouping["Repository"] = "repository";
|
|
20
21
|
})(AgentSessionsGrouping || (AgentSessionsGrouping = {}));
|
|
22
|
+
var AgentSessionsSorting;
|
|
23
|
+
(function(AgentSessionsSorting) {
|
|
24
|
+
AgentSessionsSorting["Created"] = "created";
|
|
25
|
+
AgentSessionsSorting["Updated"] = "updated";
|
|
26
|
+
})(AgentSessionsSorting || (AgentSessionsSorting = {}));
|
|
21
27
|
const DEFAULT_EXCLUDES = ( Object.freeze({
|
|
22
28
|
providers: [],
|
|
23
29
|
states: [],
|
|
@@ -35,6 +41,7 @@ let AgentSessionsFilter = class AgentSessionsFilter extends Disposable {
|
|
|
35
41
|
this.onDidChange = this._onDidChange.event;
|
|
36
42
|
this.limitResults = () => this.options.limitResults?.();
|
|
37
43
|
this.groupResults = () => this.options.groupResults?.();
|
|
44
|
+
this.sortResults = () => this.options.sortResults?.();
|
|
38
45
|
this.excludes = DEFAULT_EXCLUDES;
|
|
39
46
|
this.isStoringExcludes = false;
|
|
40
47
|
this.actionDisposables = this._register(( new DisposableStore()));
|
|
@@ -166,16 +173,16 @@ let AgentSessionsFilter = class AgentSessionsFilter extends Disposable {
|
|
|
166
173
|
registerStateActions(disposables, menuId) {
|
|
167
174
|
const states = [{
|
|
168
175
|
id: ChatSessionStatus.Completed,
|
|
169
|
-
label: ( localize(
|
|
176
|
+
label: ( localize(5156, "Completed"))
|
|
170
177
|
}, {
|
|
171
178
|
id: ChatSessionStatus.InProgress,
|
|
172
|
-
label: ( localize(
|
|
179
|
+
label: ( localize(5157, "In Progress"))
|
|
173
180
|
}, {
|
|
174
181
|
id: ChatSessionStatus.NeedsInput,
|
|
175
|
-
label: ( localize(
|
|
182
|
+
label: ( localize(5158, "Input Needed"))
|
|
176
183
|
}, {
|
|
177
184
|
id: ChatSessionStatus.Failed,
|
|
178
|
-
label: ( localize(
|
|
185
|
+
label: ( localize(5159, "Failed"))
|
|
179
186
|
}];
|
|
180
187
|
const that = this;
|
|
181
188
|
let counter = 0;
|
|
@@ -212,7 +219,7 @@ let AgentSessionsFilter = class AgentSessionsFilter extends Disposable {
|
|
|
212
219
|
constructor() {
|
|
213
220
|
super({
|
|
214
221
|
id: `agentSessions.filter.toggleExcludeArchived.${menuId.id.toLowerCase()}`,
|
|
215
|
-
title: ( localize(
|
|
222
|
+
title: ( localize(5160, "Archived")),
|
|
216
223
|
menu: {
|
|
217
224
|
id: menuId,
|
|
218
225
|
group: "3_props",
|
|
@@ -235,7 +242,7 @@ let AgentSessionsFilter = class AgentSessionsFilter extends Disposable {
|
|
|
235
242
|
constructor() {
|
|
236
243
|
super({
|
|
237
244
|
id: `agentSessions.filter.toggleExcludeRead.${menuId.id.toLowerCase()}`,
|
|
238
|
-
title: ( localize(
|
|
245
|
+
title: ( localize(5161, "Read")),
|
|
239
246
|
menu: {
|
|
240
247
|
id: menuId,
|
|
241
248
|
group: "3_props",
|
|
@@ -258,7 +265,7 @@ let AgentSessionsFilter = class AgentSessionsFilter extends Disposable {
|
|
|
258
265
|
constructor() {
|
|
259
266
|
super({
|
|
260
267
|
id: `agentSessions.filter.resetExcludes.${menuId.id.toLowerCase()}`,
|
|
261
|
-
title: ( localize(
|
|
268
|
+
title: ( localize(5162, "Reset")),
|
|
262
269
|
menu: {
|
|
263
270
|
id: menuId,
|
|
264
271
|
group: "4_reset",
|
|
@@ -310,4 +317,4 @@ let AgentSessionsFilter = class AgentSessionsFilter extends Disposable {
|
|
|
310
317
|
};
|
|
311
318
|
AgentSessionsFilter = ( __decorate([( __param(1, IChatSessionsService)), ( __param(2, IStorageService))], AgentSessionsFilter));
|
|
312
319
|
|
|
313
|
-
export { AgentSessionsFilter, AgentSessionsGrouping };
|
|
320
|
+
export { AgentSessionsFilter, AgentSessionsGrouping, AgentSessionsSorting };
|
|
@@ -81,7 +81,7 @@ async function openSessionDefault(accessor, session, openOptions) {
|
|
|
81
81
|
}
|
|
82
82
|
return await chatWidgetService.openSession(session.resource, target, options);
|
|
83
83
|
} catch (error) {
|
|
84
|
-
notificationService.error(( localize(
|
|
84
|
+
notificationService.error(( localize(5164, "Failed to open chat session: {0}", toErrorMessage(error))));
|
|
85
85
|
return undefined;
|
|
86
86
|
}
|
|
87
87
|
}
|
|
@@ -19,7 +19,9 @@ import { IHoverService } from "@codingame/monaco-vscode-api/vscode/vs/platform/h
|
|
|
19
19
|
import { MenuWorkbenchToolBar } from "@codingame/monaco-vscode-api/vscode/vs/platform/actions/browser/toolbar";
|
|
20
20
|
import { IContextKeyService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service";
|
|
21
21
|
import { Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event";
|
|
22
|
-
import { AgentSessionsGrouping } from "./agentSessionsFilter.js";
|
|
22
|
+
import { AgentSessionsGrouping, AgentSessionsSorting } from "./agentSessionsFilter.js";
|
|
23
|
+
import { IObservable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/observable";
|
|
24
|
+
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
23
25
|
import { AgentSessionApprovalModel } from "./agentSessionApprovalModel.js";
|
|
24
26
|
export type AgentSessionListItem = IAgentSession | IAgentSessionSection;
|
|
25
27
|
interface IAgentSessionItemTemplate {
|
|
@@ -27,7 +29,6 @@ interface IAgentSessionItemTemplate {
|
|
|
27
29
|
readonly icon: HTMLElement;
|
|
28
30
|
readonly title: IconLabel;
|
|
29
31
|
readonly statusContainer: HTMLElement;
|
|
30
|
-
readonly statusProviderIcon: HTMLElement;
|
|
31
32
|
readonly statusTime: HTMLElement;
|
|
32
33
|
readonly titleToolbar: MenuWorkbenchToolBar;
|
|
33
34
|
readonly diffContainer: HTMLElement;
|
|
@@ -45,12 +46,14 @@ interface IAgentSessionItemTemplate {
|
|
|
45
46
|
}
|
|
46
47
|
export interface IAgentSessionRendererOptions {
|
|
47
48
|
readonly disableHover?: boolean;
|
|
48
|
-
readonly showIsolationIcon?: boolean;
|
|
49
49
|
getHoverPosition(): HoverPosition;
|
|
50
|
+
isGroupedByRepository?(): boolean;
|
|
51
|
+
isSortedByUpdated?(): boolean;
|
|
50
52
|
}
|
|
51
53
|
export declare class AgentSessionRenderer extends Disposable implements ICompressibleTreeRenderer<IAgentSession, FuzzyScore, IAgentSessionItemTemplate> {
|
|
52
54
|
private readonly options;
|
|
53
55
|
private readonly _approvalModel;
|
|
56
|
+
private readonly _activeSessionResource;
|
|
54
57
|
private readonly markdownRendererService;
|
|
55
58
|
private readonly productService;
|
|
56
59
|
private readonly hoverService;
|
|
@@ -65,10 +68,11 @@ export declare class AgentSessionRenderer extends Disposable implements ICompres
|
|
|
65
68
|
private readonly sessionHover;
|
|
66
69
|
private readonly _onDidChangeItemHeight;
|
|
67
70
|
readonly onDidChangeItemHeight: Event<IAgentSession>;
|
|
68
|
-
constructor(options: IAgentSessionRendererOptions, _approvalModel: AgentSessionApprovalModel | undefined, markdownRendererService: IMarkdownRendererService, productService: IProductService, hoverService: IHoverService, instantiationService: IInstantiationService, contextKeyService: IContextKeyService);
|
|
71
|
+
constructor(options: IAgentSessionRendererOptions, _approvalModel: AgentSessionApprovalModel | undefined, _activeSessionResource: IObservable<URI | undefined>, markdownRendererService: IMarkdownRendererService, productService: IProductService, hoverService: IHoverService, instantiationService: IInstantiationService, contextKeyService: IContextKeyService);
|
|
69
72
|
renderTemplate(container: HTMLElement): IAgentSessionItemTemplate;
|
|
70
73
|
renderElement(session: ITreeNode<IAgentSession, FuzzyScore>, index: number, template: IAgentSessionItemTemplate, details?: ITreeElementRenderDetails): void;
|
|
71
74
|
private renderBadge;
|
|
75
|
+
private stripCodicons;
|
|
72
76
|
private renderMarkdownOrText;
|
|
73
77
|
private renderDiff;
|
|
74
78
|
private getIcon;
|
|
@@ -86,6 +90,7 @@ export declare function toStatusLabel(status: AgentSessionStatus): string;
|
|
|
86
90
|
interface IAgentSessionSectionTemplate {
|
|
87
91
|
readonly container: HTMLElement;
|
|
88
92
|
readonly label: HTMLSpanElement;
|
|
93
|
+
readonly count: HTMLSpanElement;
|
|
89
94
|
readonly toolbar: MenuWorkbenchToolBar;
|
|
90
95
|
readonly contextKeyService: IContextKeyService;
|
|
91
96
|
readonly disposables: IDisposable;
|
|
@@ -138,6 +143,11 @@ export interface IAgentSessionsFilter {
|
|
|
138
143
|
* When undefined, sessions are shown as a flat list.
|
|
139
144
|
*/
|
|
140
145
|
readonly groupResults?: () => AgentSessionsGrouping | undefined;
|
|
146
|
+
/**
|
|
147
|
+
* The field to sort sessions by.
|
|
148
|
+
* Defaults to created date when undefined.
|
|
149
|
+
*/
|
|
150
|
+
readonly sortResults?: () => AgentSessionsSorting | undefined;
|
|
141
151
|
/**
|
|
142
152
|
* A callback to notify the filter about the number of
|
|
143
153
|
* results after filtering.
|
|
@@ -172,17 +182,26 @@ export declare class AgentSessionsDataSource extends Disposable implements IAsyn
|
|
|
172
182
|
private groupSessionsIntoSections;
|
|
173
183
|
private groupSessionsCapped;
|
|
174
184
|
private groupSessionsByDate;
|
|
175
|
-
|
|
185
|
+
private groupSessionsByRepository;
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* Extracts the repository name for an agent session from its metadata or badge.
|
|
189
|
+
* Used for grouping sessions by repository and for determining whether a badge
|
|
190
|
+
* is redundant with the section header.
|
|
191
|
+
*/
|
|
192
|
+
export declare function getRepositoryName(session: IAgentSession): string | undefined;
|
|
176
193
|
export declare const AgentSessionSectionLabels: {
|
|
194
|
+
pinned: string;
|
|
177
195
|
today: string;
|
|
178
196
|
yesterday: string;
|
|
179
197
|
week: string;
|
|
180
198
|
older: string;
|
|
181
199
|
archived: string;
|
|
182
200
|
more: string;
|
|
201
|
+
repository: string;
|
|
183
202
|
};
|
|
184
|
-
export declare function groupAgentSessionsByDate(sessions: IAgentSession[]): Map<AgentSessionSection, IAgentSessionSection>;
|
|
185
|
-
export declare function sessionDateFromNow(sessionTime: number): string;
|
|
203
|
+
export declare function groupAgentSessionsByDate(sessions: IAgentSession[], sortBy?: AgentSessionsSorting): Map<AgentSessionSection, IAgentSessionSection>;
|
|
204
|
+
export declare function sessionDateFromNow(sessionTime: number, appendAgoLabel?: boolean): string;
|
|
186
205
|
export declare class AgentSessionsIdentityProvider implements IIdentityProvider<IAgentSessionsModel | AgentSessionListItem> {
|
|
187
206
|
getId(element: IAgentSessionsModel | AgentSessionListItem): string;
|
|
188
207
|
getGroupId(element: IAgentSessionsModel | AgentSessionListItem): number | NotSelectableGroupIdType;
|
|
@@ -190,13 +209,10 @@ export declare class AgentSessionsIdentityProvider implements IIdentityProvider<
|
|
|
190
209
|
export declare class AgentSessionsCompressionDelegate implements ITreeCompressionDelegate<AgentSessionListItem> {
|
|
191
210
|
isIncompressible(element: AgentSessionListItem): boolean;
|
|
192
211
|
}
|
|
193
|
-
export interface IAgentSessionsSorterOptions {
|
|
194
|
-
overrideCompare?(sessionA: IAgentSession, sessionB: IAgentSession): number | undefined;
|
|
195
|
-
}
|
|
196
212
|
export declare class AgentSessionsSorter implements ITreeSorter<IAgentSession> {
|
|
197
|
-
private readonly
|
|
198
|
-
constructor(
|
|
199
|
-
compare(sessionA: IAgentSession, sessionB: IAgentSession): number;
|
|
213
|
+
private readonly getSortBy;
|
|
214
|
+
constructor(getSortBy?: () => AgentSessionsSorting);
|
|
215
|
+
compare(sessionA: IAgentSession, sessionB: IAgentSession, prioritizeActiveSessions?: boolean): number;
|
|
200
216
|
}
|
|
201
217
|
export declare class AgentSessionsKeyboardNavigationLabelProvider implements ICompressibleKeyboardNavigationLabelProvider<AgentSessionListItem> {
|
|
202
218
|
getKeyboardNavigationLabel(element: AgentSessionListItem): string;
|