Skip to content

Commit ab7c2ea

Browse files
LLM-27036 [Codex] Improve mcp block detection
1 parent 238afc0 commit ab7c2ea

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

src/CodexToolCallMapper.ts

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,15 @@ export async function createCommandExecutionUpdate(
8686
export async function createMcpToolCallUpdate(
8787
item: ThreadItem & { type: "mcpToolCall" }
8888
): Promise<UpdateSessionEvent> {
89-
return createExecuteToolCallUpdate(
90-
item,
91-
`mcp.${item.server}.${item.tool}`,
92-
createMcpRawInput(item.server, item.tool, item.arguments),
93-
createMcpRawOutput(item.result, item.error),
94-
);
89+
return {
90+
...await createExecuteToolCallUpdate(
91+
item,
92+
`mcp.${item.server}.${item.tool}`,
93+
createMcpRawInput(item.server, item.tool, item.arguments),
94+
createMcpRawOutput(item.result, item.error),
95+
),
96+
_meta: { is_mcp_tool_call: true },
97+
};
9598
}
9699

97100
export async function createDynamicToolCallUpdate(

0 commit comments

Comments
 (0)