chatModel.ts ×12

Frontier kind: Code frontier

unlabeled · c_22e841d2da05

20 tests · 44165 LOC · 194 files · introduces 0 tests · 40 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
12 ranges40 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
3983 ranges44165 lines · 194 files · Browse complete extent
All tests (intent)
20 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: 40 introduced LOC across 12 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/workbench/contrib/chat/common/model/chatModel.ts 40 introduced LOC · 12 ranges

Open complete file

610
611 for (const part of parts) {
612 > let segment: { text: string; isBlock?: boolean } | undefined; chatModel.ts
613 > switch (part.kind) {
614 > case 'clearToPreviousToolInvocation':
615 currentBlockSegments = [];
616 blocks.length = 0;
617 hasEditGroupsAfterLastClear = false; // Reset edit groups flag when clearing
618 continue;
619 > case 'treeData': chatModel.ts
620 > case 'progressMessage':
621 > case 'codeblockUri':
622 > case 'extensions':
623 > case 'pullRequest':
624 > case 'undoStop':
625 > case 'workspaceEdit':
626 > case 'externalEdit':
627 > case 'elicitation2':
628 > case 'elicitationSerialized':
629 > case 'thinking':
630 > case 'hook':
631 > case 'multiDiffData':
632 > case 'mcpServersStarting':
633 > case 'mcpAuthenticationRequired':
634 > case 'mcpServersStartingSlow':
635 > case 'questionCarousel':
636 > case 'planReview':
637 > case 'disabledClaudeHooks':
638 > case 'autoModeResolution':
639 // Ignore
640 continue;
641 > case 'systemNotification': chatModel.ts
642 segment = { text: part.content.value, isBlock: true };
643 break;
644 > case 'toolInvocation': chatModel.ts
645 > case 'toolInvocationSerialized':
646 // Include tool invocations in the copy text
647 segment = this.getToolInvocationText(part);
648 break;
649 > case 'inlineReference': chatModel.ts
650 segment = { text: this.inlineRefToRepr(part) };
651 break;
652 > case 'command': chatModel.ts
653 segment = { text: part.command.title, isBlock: true };
654 break;
655 > case 'textEditGroup': chatModel.ts
656 > case 'notebookEditGroup':
657 // Mark that we have edit groups after the last clear
658 hasEditGroupsAfterLastClear = true;
659 // Skip individual edit groups to avoid duplication
660 continue;
661 > case 'confirmation': chatModel.ts
662 if (part.message instanceof MarkdownString) {
663 segment = { text: `${part.title}\n${part.message.value}`, isBlock: true };
666 segment = { text: `${part.title}\n${part.message}`, isBlock: true };
667 break;
668 > case 'markdownContent': chatModel.ts
669 > case 'markdownVuln':
670 > case 'progressTask':
671 > case 'progressTaskSerialized':
672 > case 'warning':
673 > case 'info':
674 segment = { text: part.content.value };
675 break;
676 > default: chatModel.ts
677 // Ignore any unknown/obsolete parts, but assert that all are handled:
678 softAssertNever(part);
679 continue;
680 > } chatModel.ts
681
682 if (segment.isBlock) {
689 currentBlockSegments.push(segment.text);
690 }
691 > } chatModel.ts
692
693 if (currentBlockSegments.length) {