diff --git a/apps/mobile/components/ToolViews/ToolViewRegistry.tsx b/apps/mobile/components/ToolViews/ToolViewRegistry.tsx index decbd88b..84060fd2 100644 --- a/apps/mobile/components/ToolViews/ToolViewRegistry.tsx +++ b/apps/mobile/components/ToolViews/ToolViewRegistry.tsx @@ -64,7 +64,7 @@ const defaultRegistry: Record = { 'terminate-command': TerminateCommandToolView, - 'see-image': SeeImageToolView, + 'load-image': SeeImageToolView, 'expose-port': ExposePortToolView, 'get-data-provider-endpoints': DataProviderEndpointsToolView, diff --git a/backend/core/prompts/prompt.py b/backend/core/prompts/prompt.py index d735e2cf..68907549 100644 --- a/backend/core/prompts/prompt.py +++ b/backend/core/prompts/prompt.py @@ -87,11 +87,11 @@ You have the abilixwty to execute operations using both Python and CLI tools: * **IMPORTANT:** browser-screenshots bucket is ONLY for actual browser screenshots, not generated images or other content ### 2.3.6 VISUAL INPUT -- You MUST use the 'see_image' tool to see image files. There is NO other way to access visual information. +- You MUST use the 'load_image' tool to see image files. There is NO other way to access visual information. * Provide the relative path to the image in the `/workspace` directory. * Example: - + docs/diagram.png diff --git a/backend/core/tools/agent_builder_tools/workflow_tool.py b/backend/core/tools/agent_builder_tools/workflow_tool.py index d4d3fd42..6de9cb32 100644 --- a/backend/core/tools/agent_builder_tools/workflow_tool.py +++ b/backend/core/tools/agent_builder_tools/workflow_tool.py @@ -88,7 +88,7 @@ class WorkflowTool(AgentBuilderBaseTool): 'sb_shell_tool': ['execute_command'], 'sb_files_tool': ['create_file', 'edit_file', 'str_replace', 'full_file_rewrite', 'delete_file'], 'browser_tool': ['browser_navigate_to', 'browser_screenshot'], - 'sb_vision_tool': ['see_image'], + 'sb_vision_tool': ['load_image'], 'sb_deploy_tool': ['deploy'], 'sb_expose_tool': ['expose_port'], 'web_search_tool': ['web_search'], diff --git a/backend/core/triggers/execution_service.py b/backend/core/triggers/execution_service.py index 44bf07f0..1d6b7828 100644 --- a/backend/core/triggers/execution_service.py +++ b/backend/core/triggers/execution_service.py @@ -579,7 +579,7 @@ class WorkflowExecutor: 'sb_shell_tool': ['execute_command'], 'sb_files_tool': ['create_file', 'str_replace', 'full_file_rewrite', 'delete_file'], 'browser_tool': ['browser_navigate_to', 'browser_screenshot'], - 'sb_vision_tool': ['see_image'], + 'sb_vision_tool': ['load_image'], 'sb_deploy_tool': ['deploy'], 'sb_expose_tool': ['expose_port'], 'web_search_tool': ['web_search'], diff --git a/frontend/src/components/thread/tool-views/see-image-tool/_utils.ts b/frontend/src/components/thread/tool-views/see-image-tool/_utils.ts index 8cb8db6d..56e15fb2 100644 --- a/frontend/src/components/thread/tool-views/see-image-tool/_utils.ts +++ b/frontend/src/components/thread/tool-views/see-image-tool/_utils.ts @@ -85,11 +85,11 @@ function extractImageFilePath(content: string | object | undefined | null): stri const parsedContent = JSON.parse(contentStr); if (parsedContent.content && typeof parsedContent.content === 'string') { const nestedContentStr = parsedContent.content; - let filePathMatch = nestedContentStr.match(/]*><\/see-image>/i); + let filePathMatch = nestedContentStr.match(/]*><\/load-image>/i); if (filePathMatch) { return cleanImagePath(filePathMatch[1]); } - filePathMatch = nestedContentStr.match(/]*>([^<]+)<\/see-image>/i); + filePathMatch = nestedContentStr.match(/]*>([^<]+)<\/load-image>/i); if (filePathMatch) { return cleanImagePath(filePathMatch[1]); } @@ -97,11 +97,11 @@ function extractImageFilePath(content: string | object | undefined | null): stri } catch (e) { } - let filePathMatch = contentStr.match(/]*><\/see-image>/i); + let filePathMatch = contentStr.match(/]*><\/load-image>/i); if (filePathMatch) { return cleanImagePath(filePathMatch[1]); } - filePathMatch = contentStr.match(/]*>([^<]+)<\/see-image>/i); + filePathMatch = contentStr.match(/]*>([^<]+)<\/load-image>/i); if (filePathMatch) { return cleanImagePath(filePathMatch[1]); } @@ -125,7 +125,7 @@ function extractImageDescription(content: string | object | undefined | null): s try { const parsedContent = JSON.parse(contentStr); if (parsedContent.content && typeof parsedContent.content === 'string') { - const parts = parsedContent.content.split(/ 1) { return parts[0].trim(); } @@ -133,7 +133,7 @@ function extractImageDescription(content: string | object | undefined | null): s } catch (e) { } - const parts = contentStr.split(/ 1) { return parts[0].trim(); } @@ -156,7 +156,7 @@ function parseToolResult(content: string | object | undefined | null): { success } catch (e) { } - const toolResultPattern = /\s*\s*ToolResult\(([^)]+)\)\s*<\/see-image>\s*<\/tool_result>/; + const toolResultPattern = /\s*\s*ToolResult\(([^)]+)\)\s*<\/load-image>\s*<\/tool_result>/; const toolResultMatch = contentToProcess.match(toolResultPattern); if (toolResultMatch) { @@ -177,7 +177,7 @@ function parseToolResult(content: string | object | undefined | null): { success return { success, message, filePath }; } - const directToolResultMatch = contentToProcess.match(/\s*\s*([^<]+)<\/see-image>\s*<\/tool_result>/); + const directToolResultMatch = contentToProcess.match(/\s*\s*([^<]+)<\/load-image>\s*<\/tool_result>/); if (directToolResultMatch) { const resultContent = directToolResultMatch[1]; const success = resultContent.includes('success=True') || resultContent.includes('Successfully'); diff --git a/frontend/src/components/thread/tool-views/utils.ts b/frontend/src/components/thread/tool-views/utils.ts index 1706e56b..1f1172d0 100644 --- a/frontend/src/components/thread/tool-views/utils.ts +++ b/frontend/src/components/thread/tool-views/utils.ts @@ -47,7 +47,7 @@ export function getToolTitle(toolName: string): string { 'browser-act': 'Browser Action', 'browser-extract-content': 'Browser Extract', 'browser-screenshot': 'Browser Screenshot', - 'see-image': 'View Image', + 'load-image': 'Load Image', 'ask': 'Ask', 'complete': 'Task Complete', 'execute-data-provider-call': 'Data Provider Call', diff --git a/frontend/src/components/thread/utils.ts b/frontend/src/components/thread/utils.ts index 23e9df09..1afa18a1 100644 --- a/frontend/src/components/thread/utils.ts +++ b/frontend/src/components/thread/utils.ts @@ -337,7 +337,7 @@ const TOOL_DISPLAY_NAMES = new Map([ ['expose-port', 'Exposing Port'], ['scrape-webpage', 'Scraping Website'], ['web-search', 'Searching Web'], - ['see-image', 'Viewing Image'], + ['load-image', 'Loading Image'], ['create-presentation-outline', 'Creating Presentation Outline'], ['create-presentation', 'Creating Presentation'], ['present-presentation', 'Presenting'], @@ -391,7 +391,7 @@ const TOOL_DISPLAY_NAMES = new Map([ ['expose_port', 'Exposing Port'], ['scrape_webpage', 'Scraping Website'], ['web_search', 'Searching Web'], - ['see_image', 'Viewing Image'], + ['load_image', 'Loading Image'], ['update_agent', 'Updating Agent'], ['get_current_agent_config', 'Getting Agent Config'], @@ -517,7 +517,7 @@ export const HIDE_STREAMING_XML_TAGS = new Set([ 'complete', 'crawl-webpage', 'web-search', - 'see-image', + 'load-image', 'execute_data_provider_call', 'execute_data_provider_endpoint',