chatSessionStore.ts ×5

Frontier kind: Code frontier

unlabeled · c_8ef4f6b7c2f1

92 tests · 43838 LOC · 188 files · introduces 0 tests · 33 LOC · 2 files

Introduces — evidence that enters the hierarchy at this concept

Code
6 ranges33 lines · 2 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
4071 ranges43838 lines · 188 files · Browse complete extent
All tests (intent)
92 testsBrowse complete intent

Neighbourhood graph

The orange circle is the focus. Violet and green circles are every ancestor and descendant, broader and narrower, at any distance; blue squares and pink diamonds are the introduced files and exact introduced tests of every visible concept, not only the focus's. Arrows point from broader to narrower concepts and bridge only concepts omitted from this view. Undirected links show source or test introduction. Concept and file size follows LOC; exact test nodes use test-count units.

Introduced files, introduced tests, and structurally relevant concept specialization

In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the native relationship evidence on this page.

Graph controls are ready.

Interactive rendering requires JavaScript and WebGL. Use the native relationship evidence on this page while the interactive map is unavailable.

Native relationship evidence

Every exact file and test below is linked only from the concept that introduces it.

Introduced tests

Every collected test enters the hierarchy at exactly one concept.

No tests are introduced at this concept. Its intent tests are introduced by other concepts.

Introduced code

Every collected source range enters the hierarchy at exactly one concept.

2 files ranked by introduced lines: 33 introduced LOC across 6 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/workbench/contrib/chat/common/model/chatSessionStore.ts 31 introduced LOC · 5 ranges

Open complete file

51
52 constructor(
53 > @IFileService private readonly fileService: IFileService, chatSessionStore.ts
54 > @IEnvironmentService private readonly environmentService: IEnvironmentService,
55 > @ILogService private readonly logService: ILogService,
56 > @IWorkspaceContextService private readonly workspaceContextService: IWorkspaceContextService,
57 > @ITelemetryService private readonly telemetryService: ITelemetryService,
58 > @IStorageService private readonly storageService: IStorageService,
59 > @ILifecycleService private readonly lifecycleService: ILifecycleService,
60 > @IUserDataProfilesService private readonly userDataProfilesService: IUserDataProfilesService,
61 > @IConfigurationService private readonly configurationService: IConfigurationService,
62 > @IWorkspaceEditingService private readonly workspaceEditingService: IWorkspaceEditingService,
63 > @IDialogService private readonly dialogService: IDialogService,
64 > @IOpenerService private readonly openerService: IOpenerService,
65 > ) {
66 > super();
67 >
68 > const workspace = this.workspaceContextService.getWorkspace();
69 > const isEmptyWindow = !workspace.configuration && workspace.folders.length === 0;
70 > const workspaceId = this.workspaceContextService.getWorkspace().id;
71 > this.storageRoot = isEmptyWindow ?
72 joinPath(this.userDataProfilesService.defaultProfile.globalStorageHome, 'emptyWindowChatSessions') :
73 joinPath(this.environmentService.workspaceStorageHome, workspaceId, 'chatSessions');
75 > this.previousEmptyWindowStorageRoot = isEmptyWindow ?
76 joinPath(this.environmentService.workspaceStorageHome, 'no-workspace', 'chatSessions') :
77 undefined;
79 > this.transferredSessionStorageRoot = joinPath(this.userDataProfilesService.defaultProfile.globalStorageHome, 'transferredChatSessions');
80 >
81 > // Listen to workspace transitions to migrate chat sessions
82 > this._register(this.workspaceEditingService.onDidEnterWorkspace(event => {
83 const transitionPromise = this.storeQueue.queue(() => this.handleWorkspaceTransition(event.oldWorkspace, event.newWorkspace));
84 event.join(transitionPromise);
86 >
87 > this._register(this.lifecycleService.onWillShutdown(e => {
88 this.shuttingDown = true;
89 if (!this.storeTask) {
95 label: localize('join.chatSessionStore', "Saving chat history")
96 });
98 > }
99
100 private async handleWorkspaceTransition(oldWorkspace: IAnyWorkspaceIdentifier, newWorkspace: IAnyWorkspaceIdentifier): Promise<void> {
src/vs/platform/workspace/common/workspace.ts 2 introduced LOC · 1 range

Open complete file

372
373 get id(): string {
374 > return this._id; workspace.ts
375 > }
376
377 get transient(): boolean {