Elffuss BraidHub

kikocis/continue public

main · 1.0 KiBRawPermalink
1import { Tool } from "../..";
2import { BUILT_IN_GROUP_NAME, BuiltInToolNames } from "../builtIn";
3
4export const fetchUrlContentTool: Tool = {
5 type: "function",
6 displayTitle: "Read URL",
7 wouldLikeTo: "fetch {{{ url }}}",
8 isCurrently: "fetching {{{ url }}}",
9 hasAlready: "fetched {{{ url }}}",
10 readonly: true,
11 isInstant: true,
12 group: BUILT_IN_GROUP_NAME,
13 function: {
14 name: BuiltInToolNames.FetchUrlContent,
15 description:
16 "Can be used to view the contents of a website using a URL. Do NOT use this for files.",
17 parameters: {
18 type: "object",
19 required: ["url"],
20 properties: {
21 url: {
22 type: "string",
23 description: "The URL to read",
24 },
25 },
26 },
27 },
28 defaultToolPolicy: "allowedWithPermission",
29 systemMessageDescription: {
30 prefix: `To fetch the content of a URL, use the ${BuiltInToolNames.FetchUrlContent} tool. For example, to read the contents of a webpage, you might respond with:`,
31 exampleArgs: [["url", "https://example.com"]],
32 },
33 toolCallIcon: "GlobeAltIcon",
34};