Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,43 @@
}
}
},
{
"type": "function",
"function": {
"name": "web_fetch",
"description": "Fetch content from a URL.\n\nUse this when you need the contents of a specific web page or endpoint.\n\nParameters:\n- url: Must start with http:// or https://\n- format: \"text\", \"markdown\", or \"html\" (defaults to \"markdown\")\n- timeout: Optional timeout in seconds (max 120)\n\nNotes:\n- Responses larger than 5MB are rejected.\n- Binary responses (including images) are not returned as text content.",
"parameters": {
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"url": {
"type": "string",
"description": "The URL to fetch content from"
},
"format": {
"type": "string",
"enum": [
"text",
"markdown",
"html"
],
"default": "markdown",
"description": "Output format. Defaults to markdown."
},
"timeout": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 120,
"description": "Optional timeout in seconds (max 120)."
}
},
"required": [
"url"
],
"additionalProperties": false
}
}
},
{
"type": "function",
"function": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,41 @@
"additionalProperties": false
}
},
{
"type": "function",
"name": "web_fetch",
"description": "Fetch content from a URL.\n\nUse this when you need the contents of a specific web page or endpoint.\n\nParameters:\n- url: Must start with http:// or https://\n- format: \"text\", \"markdown\", or \"html\" (defaults to \"markdown\")\n- timeout: Optional timeout in seconds (max 120)\n\nNotes:\n- Responses larger than 5MB are rejected.\n- Binary responses (including images) are not returned as text content.",
"parameters": {
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"url": {
"type": "string",
"description": "The URL to fetch content from"
},
"format": {
"type": "string",
"enum": [
"text",
"markdown",
"html"
],
"default": "markdown",
"description": "Output format. Defaults to markdown."
},
"timeout": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 120,
"description": "Optional timeout in seconds (max 120)."
}
},
"required": [
"url"
],
"additionalProperties": false
}
},
{
"type": "function",
"name": "update_todos",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,43 @@
}
}
},
{
"type": "function",
"function": {
"name": "web_fetch",
"description": "Fetch content from a URL.\n\nUse this when you need the contents of a specific web page or endpoint.\n\nParameters:\n- url: Must start with http:// or https://\n- format: \"text\", \"markdown\", or \"html\" (defaults to \"markdown\")\n- timeout: Optional timeout in seconds (max 120)\n\nNotes:\n- Responses larger than 5MB are rejected.\n- Binary responses (including images) are not returned as text content.",
"parameters": {
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"url": {
"type": "string",
"description": "The URL to fetch content from"
},
"format": {
"type": "string",
"enum": [
"text",
"markdown",
"html"
],
"default": "markdown",
"description": "Output format. Defaults to markdown."
},
"timeout": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 120,
"description": "Optional timeout in seconds (max 120)."
}
},
"required": [
"url"
],
"additionalProperties": false
}
}
},
{
"type": "function",
"function": {
Expand Down
4 changes: 2 additions & 2 deletions src/pro/main/ipc/handlers/local_agent/local_agent_handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ import {
type InjectedMessage,
} from "./prepare_step_utils";
import { loadTodos } from "./todo_persistence";
import { ensureDyadGitignored } from "@/ipc/handlers/planUtils";
import { ensureDyadGitignored } from "@/ipc/handlers/gitignoreUtils";
import { TOOL_DEFINITIONS } from "./tool_definitions";
import {
parseAiMessagesJson,
Expand Down Expand Up @@ -429,7 +429,7 @@ export async function handleLocalAgentStream(
// Ensure .dyad/ is gitignored (idempotent; also done by compaction/plans)
// Skip in read-only/plan-only mode to avoid modifying the workspace
if (!readOnly && !planModeOnly) {
await ensureDyadGitignored(appPath).catch((err) =>
await ensureDyadGitignored(appPath).catch((err: unknown) =>
logger.warn("Failed to ensure .dyad gitignored:", err),
);
}
Expand Down
2 changes: 2 additions & 0 deletions src/pro/main/ipc/handlers/local_agent/tool_definitions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import { editFileTool } from "./tools/edit_file";
import { searchReplaceTool } from "./tools/search_replace";
import { webSearchTool } from "./tools/web_search";
import { webCrawlTool } from "./tools/web_crawl";
import { webFetchTool } from "./tools/web_fetch";
import { updateTodosTool } from "./tools/update_todos";
import { runTypeChecksTool } from "./tools/run_type_checks";
import { grepTool } from "./tools/grep";
Expand Down Expand Up @@ -64,6 +65,7 @@ export const TOOL_DEFINITIONS: readonly ToolDefinition[] = [
readLogsTool,
webSearchTool,
webCrawlTool,
webFetchTool,
updateTodosTool,
runTypeChecksTool,
// Plan mode tools
Expand Down
Loading
Loading