Fix agent model fallback and title/branch tool parsing
This commit is contained in:
@@ -11,12 +11,12 @@ describe("extractAgentModel", () => {
|
||||
expect(extractAgentModel(agent)).toBe("gpt-5.2-codex");
|
||||
});
|
||||
|
||||
it("returns null when runtime model missing even if config model is set", () => {
|
||||
it("returns configured model when runtime model is missing", () => {
|
||||
const agent = {
|
||||
model: "gpt-5.1-codex",
|
||||
runtimeInfo: {},
|
||||
} as Partial<Agent> as Agent;
|
||||
|
||||
expect(extractAgentModel(agent)).toBeNull();
|
||||
expect(extractAgentModel(agent)).toBe("gpt-5.1-codex");
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1161,6 +1161,12 @@ const TOOL_NAME_MAP: Record<string, string> = {
|
||||
Bash: "Shell",
|
||||
read_file: "Read",
|
||||
apply_patch: "Edit",
|
||||
"agent-control.set_title": "Set title",
|
||||
"agent-control.set_branch": "Set branch",
|
||||
set_title: "Set title",
|
||||
set_branch: "Set branch",
|
||||
"mcp__agent-control__set_title": "Set title",
|
||||
"mcp__agent-control__set_branch": "Set branch",
|
||||
};
|
||||
|
||||
const ToolCallDisplaySchema = z
|
||||
|
||||
Reference in New Issue
Block a user