Refactor Claude/Codex tool-call parsing to provider-local Zod passes (#25)

* refactor claude/codex tool call parsing to provider-local zod passes

* tighten provider tool-call schemas and remove alias probing

* refactor provider tool-call mappers to strict two-pass zod flow

* test: lock opencode mapper against cross-provider speak normalization

* refactor: enforce schema-only two-pass tool-call normalization
This commit is contained in:
Mohamed Boudra
2026-02-12 19:02:11 +08:00
committed by GitHub
parent 44c32fb8fb
commit f79468b793
17 changed files with 1610 additions and 872 deletions
+13 -1
View File
@@ -1,5 +1,14 @@
import type { ComponentType } from "react";
import { Bot, Brain, Eye, Pencil, Search, SquareTerminal, Wrench } from "lucide-react-native";
import {
Bot,
Brain,
Eye,
MicVocal,
Pencil,
Search,
SquareTerminal,
Wrench,
} from "lucide-react-native";
import type { ToolCallDetail } from "@server/server/agent/agent-sdk-types";
export type ToolCallIconComponent = ComponentType<{ size?: number; color?: string }>;
@@ -20,6 +29,9 @@ export function resolveToolCallIcon(toolName: string, detail?: ToolCallDetail):
if (lowerName === "thinking" && (!detail || detail.type === "unknown")) {
return Brain;
}
if (lowerName === "speak") {
return MicVocal;
}
if (detail) {
return TOOL_DETAIL_ICONS[detail.type];