chatSessionStore.ts ×8

Frontier kind: Code frontier

unlabeled · c_275e2ca16c9f

3 tests · 71697 LOC · 309 files · introduces 0 tests · 24 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
8 ranges24 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
6096 ranges71697 lines · 309 files · Browse complete extent
All tests (intent)
3 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.

1 file ranked by introduced lines: 24 introduced LOC across 8 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/workbench/contrib/chat/common/model/chatSessionStore.ts 24 introduced LOC · 8 ranges

Open complete file

549 return this.indexCache;
550 }
552 > try {
553 > const index = JSON.parse(data) as unknown;
554 > if (isChatSessionIndex(index)) {
555 > // Success
556 > this.indexCache = index;
557 > } else {
558 this.reportError('invalidIndexFormat', `Invalid index format: ${data}`);
559 this.indexCache = { version: 1, entries: {} };
565 this.indexCache = { version: 1, entries: {} };
566 }
568 > // Convert from pre-1.109 format which lacks timing
569 > for (const entry of Object.values(this.indexCache.entries)) {
570 entry.timing ??= {
571 created: entry.lastMessageDate,
577 entry.lastResponseState ??= entry.lastResponseState === ResponseModelState.Pending || entry.lastResponseState === ResponseModelState.NeedsInput ? ResponseModelState.Complete : entry.lastResponseState || ResponseModelState.Complete;
578 }
580 > return this.indexCache;
581 }
582
817 // TODO if we update the index version:
818 // Don't throw away index when moving backwards in VS Code version. Try to recover it. But this scenario is hard.
819 > function isChatSessionIndex(data: unknown): data is IChatSessionIndexData { chatSessionStore.ts
820 > if (typeof data !== 'object' || data === null) {
821 return false;
822 }
824 > const index = data as IChatSessionIndexData;
825 > if (index.version !== 1) {
826 return false;
827 }
829 > if (typeof index.entries !== 'object' || index.entries === null) {
830 return false;
831 }
833 > for (const key in index.entries) {
834 if (!isChatSessionEntryMetadata(index.entries[key])) {
835 return false;
836 }
837 }
839 > return true;
840 > }
841
842 /**