Support CodeMode ToolDisclosure Variants (#7926)

Signed-off-by: Elias Posen <elias@posen.ch>
This commit is contained in:
Elias Posen
2026-03-19 04:55:46 -04:00
committed by GitHub
parent 5be96c1ab2
commit 28a52e36ff
14 changed files with 367 additions and 234 deletions
@@ -354,9 +354,9 @@ const formatSubagentToolCall = (data: SubagentToolRequestData): string => {
const extensionName = parts.slice(1).reverse().join('__') || '';
const toolGraph = toolCall.arguments?.tool_graph;
if (toolName === 'execute_code' && toolGraph && toolGraph.length > 0) {
if (toolName === 'execute_typescript' && toolGraph && toolGraph.length > 0) {
const plural = toolGraph.length === 1 ? '' : 's';
const header = `[subagent:${shortId}] ${toolGraph.length} tool call${plural} | execute_code`;
const header = `[subagent:${shortId}] ${toolGraph.length} tool call${plural} | execute_typescript`;
const lines = toolGraph.map((node, idx) => {
const deps =
node.depends_on && node.depends_on.length > 0
@@ -638,7 +638,7 @@ function ToolCallView({
case 'computer_control':
return `poking around...`;
case 'execute': {
case 'execute_typescript': {
const toolGraph = args.tool_graph as unknown as ToolGraphNode[] | undefined;
if (toolGraph && Array.isArray(toolGraph) && toolGraph.length > 0) {
if (toolGraph.length === 1) {
@@ -736,7 +736,7 @@ function ToolCallView({
const toolGraph = toolCall.arguments?.tool_graph as unknown as ToolGraphNode[] | undefined;
if (
toolCall.name === 'code_execution__execute' &&
toolCall.name === 'code_execution__execute_typescript' &&
(typeof code === 'string' || Array.isArray(toolGraph))
) {
return (