chatQuestionCarouselData.ts ×4

Frontier kind: Code frontier

unlabeled · c_34cf29219fdd

278 tests · 6950 LOC · 32 files · introduces 0 tests · 51 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
4 ranges51 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
1000 ranges6950 lines · 32 files · Browse complete extent
All tests (intent)
278 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: 51 introduced LOC across 4 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/workbench/contrib/chat/common/model/chatProgressTypes/chatQuestionCarouselData.ts 51 introduced LOC · 4 ranges

Open complete file

1 > /*--------------------------------------------------------------------------------------------- chatQuestionCarouselData.ts
2 > * Copyright (c) Microsoft Corporation. All rights reserved.
3 > * Licensed under the MIT License. See License.txt in the project root for license information.
4 > *--------------------------------------------------------------------------------------------*/
5 >
6 > import { DeferredPromise } from '../../../../../../base/common/async.js';
7 > import { IMarkdownString } from '../../../../../../base/common/htmlContent.js';
8 > import { IChatQuestion, IChatQuestionAnswers, IChatQuestionCarousel } from '../../chatService/chatService.js';
9 > import { ToolDataSource } from '../../tools/languageModelToolsService.js';
10 >
11 > /**
12 > * Runtime representation of a question carousel with a {@link DeferredPromise}
13 > * that is resolved when the user submits answers. {@link toJSON} strips the
14 > * completion so only serialisable data is persisted.
15 > */
16 > export class ChatQuestionCarouselData implements IChatQuestionCarousel {
17 > public readonly kind = 'questionCarousel' as const;
18 > public readonly completion = new DeferredPromise<{ answers: IChatQuestionAnswers | undefined }>();
19 > public draftAnswers: IChatQuestionAnswers | undefined;
20 > public draftCurrentIndex: number | undefined;
21 > public draftCollapsed: boolean | undefined;
22 > /**
23 > * Set to `true` when the carousel was dismissed because the user typed
24 > * directly in the associated terminal instead of using the carousel UI.
25 > */
26 > public dismissedByTerminalInput?: boolean;
27 >
28 > /**
29 > * True when the input was accepted/answered outside the carousel UI (e.g.
30 > * via voice) without structured answers, so the summary reads "Answered".
31 > */
32 > public answeredExternally?: boolean;
33 >
34 > /**
35 > * Marks the carousel as dismissed with the given answers and clears draft
36 > * state. Safe to call multiple times — subsequent calls are no-ops.
37 > */
38 > dismiss(answers: IChatQuestionAnswers | undefined): void {
39 > if (this.isUsed) {
40 return;
41 }
42 > this.data = answers ?? {}; chatQuestionCarouselData.ts
43 > this.isUsed = true;
44 > this.draftAnswers = undefined;
45 > this.draftCurrentIndex = undefined;
46 > this.draftCollapsed = undefined;
47 > void this.completion.complete({ answers });
48 > }
49 >
50 > constructor(
51 public questions: IChatQuestion[],
52 public allowSkip: boolean,
58 public terminalId?: string,
59 ) { }
61 > toJSON(): IChatQuestionCarousel {
62 return {
63 kind: this.kind,