feat: add codex image tool (#650)
This commit is contained in:
@@ -248,14 +248,14 @@ export function formatArgsDisplay(
|
||||
}
|
||||
|
||||
// Read tools: show file path + any other useful args (limit, offset)
|
||||
if (isFileReadTool(toolName) && parsed.file_path) {
|
||||
const filePath = String(parsed.file_path);
|
||||
if (isFileReadTool(toolName) && (parsed.file_path || parsed.path)) {
|
||||
const filePath = String(parsed.file_path || parsed.path);
|
||||
const relativePath = formatDisplayPath(filePath);
|
||||
|
||||
// Collect other non-hidden args
|
||||
const otherArgs: string[] = [];
|
||||
for (const [k, v] of Object.entries(parsed)) {
|
||||
if (k === "file_path") continue;
|
||||
if (k === "file_path" || k === "path") continue;
|
||||
if (v === undefined || v === null) continue;
|
||||
if (typeof v === "boolean" || typeof v === "number") {
|
||||
otherArgs.push(`${k}: ${v}`);
|
||||
|
||||
@@ -15,6 +15,7 @@ export function getDisplayToolName(rawName: string): string {
|
||||
if (rawName === "write") return "Write";
|
||||
if (rawName === "edit" || rawName === "multi_edit") return "Update";
|
||||
if (rawName === "read") return "Read";
|
||||
if (rawName === "view_image" || rawName === "ViewImage") return "View Image";
|
||||
if (rawName === "bash") return "Bash";
|
||||
if (rawName === "grep" || rawName === "Grep") return "Search";
|
||||
if (rawName === "glob" || rawName === "Glob") return "Glob";
|
||||
@@ -180,6 +181,8 @@ export function isFileReadTool(name: string): boolean {
|
||||
return (
|
||||
name === "read" ||
|
||||
name === "Read" ||
|
||||
name === "view_image" ||
|
||||
name === "ViewImage" ||
|
||||
name === "ReadFile" ||
|
||||
name === "read_file" ||
|
||||
name === "read_file_gemini" ||
|
||||
|
||||
Reference in New Issue
Block a user