chatModel.ts ×6

Frontier kind: Code frontier

unlabeled · c_97570c0b88f4

4 tests · 45752 LOC · 194 files · introduces 0 tests · 31 LOC · 2 files

Introduces — evidence that enters the hierarchy at this concept

Code
9 ranges31 lines · 2 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
4416 ranges45752 lines · 194 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.

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

src/vs/base/common/observableInternal/reactions/autorun.ts 18 introduced LOC · 3 ranges

Open complete file

266 */
267 export function registerAutorunSelfDisposable(store: DisposableStore, fn: (reader: IReaderWithDispose) => void, debugLocation = DebugLocation.ofCaller()): void {
268 > let ar: IDisposable | undefined; autorun.ts
269 > let disposeSync = false;
270 >
271 > // eslint-disable-next-line prefer-const
272 > ar = autorun(reader => {
273 > fn({
274 > delayedStore: reader.delayedStore,
275 > store: reader.store,
276 > readObservable: reader.readObservable.bind(reader),
277 > dispose: () => {
278 if (!ar) {
279 // dispose on first run, ar is not initialized yet.
284 }
285 }
286 > }); autorun.ts
287 > }, debugLocation);
288 >
289 > if (disposeSync) {
290 ar.dispose();
291 > } else { autorun.ts
292 > store.add(ar);
293 > }
294 > }
src/vs/workbench/contrib/chat/common/model/chatModel.ts 13 introduced LOC · 6 ranges

Open complete file

950
951 } else if (progress.kind === 'toolInvocation') {
952 > registerAutorunSelfDisposable(this._store, reader => { chatModel.ts
953 > progress.state.read(reader); // update repr when state changes
954 > this._contentChanged(false);
955 >
956 > if (IChatToolInvocation.isComplete(progress, reader)) {
957 reader.dispose();
958 }
959 > }); chatModel.ts
960 > this._responseParts.push(progress);
961 > this._contentChanged(quiet);
962 } else if (progress.kind === 'externalToolInvocationUpdate') {
963 this._handleExternalToolInvocationUpdate(progress);
1370 for (const part of this._response.value) {
1371 if (part.kind === 'toolInvocation') {
1372 > const state = part.state.read(r); chatModel.ts
1373 > if (state.type === IChatToolInvocation.StateKind.WaitingForConfirmation) {
1374 const title = state.confirmationMessages?.title;
1375 return title ? (isMarkdownString(title) ? title.value : title) : undefined;
1376 }
1377 > if (state.type === IChatToolInvocation.StateKind.WaitingForPostApproval) { chatModel.ts
1378 return localize('waitingForPostApproval', "Approve tool result?");
1379 }
1380 > if (state.type === IChatToolInvocation.StateKind.WaitingForAuthentication) { chatModel.ts
1381 return localize('waitingForToolAuthentication', "Authenticate {0} to continue...", state.server.name);
1382 }
1383 > } chatModel.ts
1384 if (part.kind === 'confirmation' && !part.isUsed) {
1385 return part.title;