chatServiceImpl.ts ×3

Frontier kind: Code frontier

unlabeled · c_416504a22196

4 tests · 71468 LOC · 309 files · introduces 0 tests · 22 LOC · 3 files

Introduces — evidence that enters the hierarchy at this concept

Code
7 ranges22 lines · 3 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
6037 ranges71468 lines · 309 files · Browse complete extent
All tests (intent)
4 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.

3 files ranked by introduced lines: 22 introduced LOC across 7 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/workbench/contrib/chat/common/model/chatSessionStore.ts 11 introduced LOC · 3 ranges

Open complete file

404
405 private async writeSessionMetadataOnly(session: ChatModel): Promise<void> {
406 > // Only to be used for external sessions chatSessionStore.ts
407 > if (LocalChatSessionUri.parseLocalSessionId(session.sessionResource)) {
408 return;
409 }
411 > try {
412 > const index = this.internalGetIndex();
413 >
414 > // TODO get this class on sessionResource
415 > const externalSessionId = session.sessionResource.toString();
416 > index.entries[externalSessionId] = await getSessionMetadata(session);
417 > } catch (e) {
418 this.reportError('sessionMetadataWrite', 'Error writing chat session metadata', e);
419 }
421
422 private async flushIndex(): Promise<void> {
src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.ts 9 introduced LOC · 3 ranges

Open complete file

75 return false;
76 }
77 > if (state.inputText.trim().length > 0) { chatServiceImpl.ts
78 > return true;
79 > }
80 return state.attachments.length > 0;
81 }
276 }
277 } else if (!localSessionId && (model.getRequests().length > 0 || hasDraftInput(model))) {
278 > logChangesToStateModel(model.inputModel, `disposing external session ${model.sessionResource} with requests or draft input, storing metadata to storage`, undefined, undefined, this.logService); chatServiceImpl.ts
279 > // External sessions: persist metadata when there are requests, OR when the
280 > // user has typed/attached unsent input we need to restore on next open.
281 > await this._chatSessionStore.storeSessionsMetadataOnly([model]);
282 > }
283 }
284 }));
759 // it via its own selection logic.
760 const restoredDraft: ISerializableChatModelInputState | undefined = storedInputState
761 > ? { ...storedInputState, selectedModel: historyDerivedModel } chatServiceImpl.ts
762 : undefined;
763 // At cold restore the agent-host transferred draft can drop the user's per-session picker
src/vs/workbench/contrib/chat/common/chat.ts 2 introduced LOC · 1 range

Open complete file

41 export async function awaitStatsForSession(model: IChatModel): Promise<IChatSessionStats | undefined> {
42 if (!model.editingSession) {
43 > return undefined; chat.ts
44 > }
45
46 await chatEditingSessionIsReady(model.editingSession);