Skip to main content

ai_agent/tools/
web_browser.rs

1// Source: /data/home/swei/claudecode/openclaudecode/src/tools/WebBrowserTool/WebBrowserPanel.tsx
2//! WebBrowser tool - returns null (feature not implemented)
3
4use crate::types::*;
5
6/// WebBrowser tool name
7pub const WEB_BROWSER_TOOL_NAME: &str = "WebBrowser";
8
9/// WebBrowser tool - placeholder for web browser functionality
10/// Feature-gated (WEB_BROWSER_TOOL) in TypeScript, returns null
11pub struct WebBrowserTool;
12
13impl WebBrowserTool {
14    pub fn new() -> Self {
15        Self
16    }
17
18    pub fn name(&self) -> &str {
19        WEB_BROWSER_TOOL_NAME
20    }
21
22    pub fn description(&self) -> &str {
23        "Control a web browser (not implemented)"
24    }
25
26    pub fn input_schema(&self) -> ToolInputSchema {
27        ToolInputSchema {
28            schema_type: "object".to_string(),
29            properties: serde_json::json!({}),
30            required: None,
31        }
32    }
33
34    pub async fn execute(
35        &self,
36        _input: serde_json::Value,
37        _context: &ToolContext,
38    ) -> Result<ToolResult, crate::error::AgentError> {
39        Err(crate::error::AgentError::ToolNotImplemented(
40            "WebBrowser tool is not implemented".to_string(),
41        ))
42    }
43}
44
45impl Default for WebBrowserTool {
46    fn default() -> Self {
47        Self::new()
48    }
49}