codexMapAppServerEvents.ts ×7

Frontier kind: Joint frontier

unlabeled · c_c8bc9447a5be

1 test · 21686 LOC · 93 files · introduces 1 test · 76 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
7 ranges76 lines · 1 files
Tests
1 test

Contains — complete concept membership

All code (extent)
1740 ranges21686 lines · 93 files · Browse complete extent
All tests (intent)
1 testBrowse 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.

1 test introduced at this concept.

Introduced code

Every collected source range enters the hierarchy at exactly one concept.

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

src/vs/platform/agentHost/node/codex/codexMapAppServerEvents.ts 76 introduced LOC · 7 ranges

Open complete file

215
216 export function describeFileChange(changes: readonly FileUpdateChange[]): string {
217 > return changes.map(change => { codexMapAppServerEvents.ts
218 > const kind = change.kind.type === 'update' && change.kind.move_path
219 ? `rename from ${change.kind.move_path}`
220 > : change.kind.type; codexMapAppServerEvents.ts
221 > return `${kind}: ${change.path}`;
222 > }).join('\n');
223 > }
224
225 export function fileChangeOutput(changes: readonly FileUpdateChange[]): string {
226 > return changes.map(change => `${describeFileChange([change])}\n${change.diff}`.trim()).join('\n\n'); codexMapAppServerEvents.ts
227 > }
228
229 function jsonValueToText(value: JsonValue): string {
539 }
540 if (params.item.type === 'fileChange') {
541 > const toolCallId = generateUuid(); codexMapAppServerEvents.ts
542 > const output = fileChangeOutput(params.item.changes);
543 > state.itemToToolCall.set(params.item.id, {
544 > toolCallId,
545 > turnId: params.turnId,
546 > toolName: 'file_edit',
547 > output,
548 > });
549 > const summary = describeFileChange(params.item.changes) || 'Apply file changes';
550 > return [
551 > {
552 > type: ActionType.ChatToolCallStart,
553 > turnId: params.turnId,
554 > toolCallId,
555 > toolName: 'file_edit',
556 > displayName: 'Apply file changes',
557 > },
558 > {
559 > type: ActionType.ChatToolCallDelta,
560 > turnId: params.turnId,
561 > toolCallId,
562 > content: summary,
563 > },
564 > {
565 > type: ActionType.ChatToolCallReady,
566 > turnId: params.turnId,
567 > toolCallId,
568 > invocationMessage: summary,
569 > toolInput: summary,
570 > confirmed: ToolCallConfirmationReason.NotNeeded,
571 > },
572 > ...(output ? [{
573 > type: ActionType.ChatToolCallContentChanged,
574 > turnId: params.turnId,
575 > toolCallId,
576 > content: [{ type: ToolResultContentType.Text, text: output }],
577 > } satisfies SessionAction | ChatAction] : []),
578 > ];
579 > }
580 if (params.item.type === 'mcpToolCall') {
581 const toolCallId = generateUuid();
750
751 export function mapFileChangePatchUpdated(
752 > state: ICodexSessionMapState, codexMapAppServerEvents.ts
753 > params: FileChangePatchUpdatedNotification,
754 > ): (SessionAction | ChatAction)[] {
755 > const entry = state.itemToToolCall.get(params.itemId);
756 > if (!entry) {
757 return [];
758 }
759 > entry.output = fileChangeOutput(params.changes); codexMapAppServerEvents.ts
760 > return [{
761 > type: ActionType.ChatToolCallContentChanged,
762 > turnId: entry.turnId,
763 > toolCallId: entry.toolCallId,
764 > content: entry.output ? [{ type: ToolResultContentType.Text, text: entry.output }] : [],
765 > }];
766 > }
767
768 export function mapFileChangeOutputDelta(
908 }
909 if (params.item.type === 'fileChange') {
910 > const output = fileChangeOutput(params.item.changes) || entry.output; codexMapAppServerEvents.ts
911 > const success = params.item.status === 'completed';
912 > const content = output ? [{ type: ToolResultContentType.Text as const, text: output }] : undefined;
913 > const result = {
914 > success,
915 > pastTenseMessage: success ? 'Applied file changes' : 'Failed to apply file changes',
916 > content,
917 > ...(success ? {} : { error: { message: `Patch ${params.item.status}`, ...(declined ? { code: 'denied' } : {}) } }),
918 > };
919 > return [{
920 > type: ActionType.ChatToolCallComplete,
921 > turnId: entry.turnId,
922 > toolCallId: entry.toolCallId,
923 > result,
924 > }];
925 > }
926 if (params.item.type === 'mcpToolCall') {
927 const success = params.item.status === 'completed' && !params.item.error;