sessionServerTools.ts ×10

Frontier kind: Code frontier

unlabeled · c_38da233fd41a

7 tests · 22002 LOC · 87 files · introduces 0 tests · 12 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
10 ranges12 lines · 1 files
Tests
0 tests

Contains — complete concept membership

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

src/vs/platform/agentHost/node/shared/sessionServerTools.ts 12 introduced LOC · 10 ranges

Open complete file

1057 },
1058 async execute(_stateManager: AgentHostStateManager, sessionUri: ProtocolURI, toolName: string, rawArgs: unknown): Promise<string> {
1059 > if (!accessor) { sessionServerTools.ts
1060 throw new Error(`Session server tool "${toolName}" cannot run: the group was built without a session accessor.`);
1061 }
1062 > switch (toolName) { sessionServerTools.ts
1063 > case listSessionsToolName:
1064 return serializeSessions(filterSessions(await accessor.listSessions(), getListSessionsArgs(rawArgs)));
1065 > case getCurrentSessionToolName: sessionServerTools.ts
1066 return serializeCurrentSession(currentSessionUri(sessionUri), await accessor.listSessions());
1067 > case createSessionToolName: { sessionServerTools.ts
1068 if (createdSessionCount >= maxCreatedSessions) {
1069 throw new Error(`Refusing to create more than ${maxCreatedSessions} sessions from server tools in this process.`);
1073 return formatCreateSessionResult(result);
1074 }
1075 > case createChatToolName: { sessionServerTools.ts
1076 if (createdChatCount >= maxCreatedChats) {
1077 throw new Error(`Refusing to create more than ${maxCreatedChats} chats from server tools in this process.`);
1081 return formatCreateChatResult(result);
1082 }
1083 > case sendMessageToolName: { sessionServerTools.ts
1084 if (sentMessageCount >= maxSentMessages) {
1085 throw new Error(`Refusing to send more than ${maxSentMessages} messages from server tools in this process.`);
1089 return result;
1090 }
1091 > case getSessionContextToolName: sessionServerTools.ts
1092 return applyGetSessionContextTool(accessor, rawArgs);
1093 > case deleteSessionToolName: sessionServerTools.ts
1094 return applyDeleteSessionTool(accessor, rawArgs, currentSessionUri(sessionUri));
1095 > default: sessionServerTools.ts
1096 throw new Error(`Unknown session server tool: ${toolName}`);
1098 > },
1099 };
1100 return group;