chatModel.ts ×3

Frontier kind: Code frontier

unlabeled · c_74971e27aa68

8 tests · 72120 LOC · 309 files · introduces 0 tests · 25 LOC · 4 files

Introduces — evidence that enters the hierarchy at this concept

Code
7 ranges25 lines · 4 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
6215 ranges72120 lines · 309 files · Browse complete extent
All tests (intent)
8 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.

4 files ranked by introduced lines: 25 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 14 introduced LOC · 2 ranges

Open complete file

353 if (storageLocation.log) {
354 if (session instanceof ChatModel) {
355 > if (!session.dataSerializer) { chatSessionStore.ts
356 > session.dataSerializer = new ChatSessionOperationLog();
357 > }
358 >
359 > let op: 'append' | 'replace';
360 > let data: VSBuffer;
361 > try {
362 > ({ op, data } = session.dataSerializer.write(session));
363 > } catch (e) {
364 // This is a big of an ugly prompt, but there is _something_ going on with
365 // missing sessions. Unfortunately it's hard to root cause because users would
382 throw e;
383 }
385 > if (data.byteLength > 0) {
386 > await this.fileService.writeFile(storageLocation.log, data, { append: op === 'append' });
387 > }
388 > session.dataSerializer.confirmWrite();
389 } else {
390 const content = new ChatSessionOperationLog().createInitialFromSerialized(session);
src/vs/workbench/contrib/chat/common/model/chatModel.ts 6 introduced LOC · 3 ranges

Open complete file

1217
1218 public get stateT(): ResponseModelStateT {
1219 > return this._modelState.get(); chatModel.ts
1220 > }
1221
1222 public get vote(): ChatAgentVoteDirection | undefined {
2294 private _repoData: IExportableRepoData | undefined;
2295 public get repoData(): IExportableRepoData | undefined {
2296 > return this._repoData; chatModel.ts
2297 > }
2298 public setRepoData(data: IExportableRepoData | undefined): void {
2299 this._repoData = data;
2513
2514 get hasCustomTitle(): boolean {
2515 > return this._customTitle !== undefined; chatModel.ts
2516 > }
2517
2518 private _editingSession: IChatEditingSession | undefined;
src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.ts 3 introduced LOC · 1 range

Open complete file

272 await this._chatSessionStore.deleteSession(localSessionId);
273 } else if (this._saveModelsEnabled) {
274 > logChangesToStateModel(model.inputModel, `disposing session ${model.sessionResource} (${localSessionId}) with title, storing to storage`, undefined, undefined, this.logService); chatServiceImpl.ts
275 > await this._chatSessionStore.storeSessions([model]);
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);
src/vs/workbench/contrib/chat/common/model/objectMutationLog.ts 2 introduced LOC · 1 range

Open complete file

154 extract: (from: T) => {
155 if (isUndefinedOrNull(from)) {
156 > return from as unknown as R; objectMutationLog.ts
157 > }
158
159 const result: Record<string, unknown> = Object.create(null);