agentHostTerminalManager.ts ×8

Frontier kind: Code frontier

unlabeled · c_76c9c8f8b3e9

10 tests · 24978 LOC · 110 files · introduces 0 tests · 16 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
8 ranges16 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
2085 ranges24978 lines · 110 files · Browse complete extent
All tests (intent)
10 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: 16 introduced LOC across 8 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/platform/agentHost/node/agentHostTerminalManager.ts 16 introduced LOC · 8 ranges

Open complete file

216 return;
217 }
218 > const channel = envelope.channel; agentHostTerminalManager.ts
219 > switch (action.type) {
220 > case ActionType.TerminalInput:
221 this._writeInput(channel, action.data);
222 break;
778 /** Append cleaned data to the terminal's structured content array. */
779 private _appendToContent(managed: { content: TerminalContentPart[]; contentSize: number }, data: string): void {
780 > const tail = managed.content.length > 0 ? managed.content[managed.content.length - 1] : undefined; agentHostTerminalManager.ts
781 >
782 > if (tail?.type === 'command' && !tail.isComplete) {
783 // Active command — append to its output
784 tail.output += data;
785 managed.contentSize += data.length;
786 > } else if (tail?.type === 'unclassified') { agentHostTerminalManager.ts
787 // Extend the existing unclassified part
788 tail.value += data;
793 managed.contentSize += data.length;
794 }
796
797 private _getContentPartSize(part: TerminalContentPart): number {
801 /** Trim content parts to stay within the rolling buffer limit. */
802 private _trimContent(managed: { content: TerminalContentPart[]; contentSize: number }): void {
803 > const maxSize = 100_000; agentHostTerminalManager.ts
804 > const targetSize = 80_000;
805 > if (managed.contentSize <= maxSize) {
806 > return;
807 > }
808 // Drop whole parts from the front while possible
809 > while (managed.contentSize > targetSize && managed.content.length > 1) { agentHostTerminalManager.ts
810 const removed = managed.content.shift()!;
811 managed.contentSize -= this._getContentPartSize(removed);
812 }
813 // If the single remaining (or first) part is still over budget, trim its text
814 > if (managed.contentSize > targetSize && managed.content.length > 0) { agentHostTerminalManager.ts
815 const head = managed.content[0];
816 const excess = managed.contentSize - targetSize;