mirror of
https://github.com/bendtherules/ask262.git
synced 2026-08-18 13:21:55 +00:00
fix(.opencode/tools): fix tool call in .opencode/tools
This commit is contained in:
@@ -7,7 +7,7 @@ import { tool } from "@opencode-ai/plugin";
|
||||
import {
|
||||
createEvaluateInEngine262Tool,
|
||||
toolMetadata,
|
||||
} from "../../src/agent-tools/evaluateInEngine262";
|
||||
} from "../../src/agent-tools/evaluateInEngine262.js";
|
||||
|
||||
export default tool({
|
||||
description: toolMetadata.description,
|
||||
@@ -19,8 +19,8 @@ export default tool({
|
||||
|
||||
// Create and execute tool (no external dependencies needed)
|
||||
const evaluateTool = createEvaluateInEngine262Tool();
|
||||
const result = await evaluateTool.func({ code });
|
||||
const result = await evaluateTool({ code });
|
||||
|
||||
return result;
|
||||
return JSON.stringify(result, null, 2);
|
||||
},
|
||||
});
|
||||
|
||||
@@ -8,7 +8,7 @@ import { tool } from "@opencode-ai/plugin";
|
||||
import {
|
||||
createGetSectionContentTool,
|
||||
toolMetadata,
|
||||
} from "../../src/agent-tools/getSectionContent";
|
||||
} from "../../src/agent-tools/getSectionContent.js";
|
||||
|
||||
export default tool({
|
||||
description: toolMetadata.description,
|
||||
@@ -30,8 +30,8 @@ export default tool({
|
||||
|
||||
// Create and execute tool
|
||||
const contentTool = createGetSectionContentTool(table);
|
||||
const result = await contentTool.func({ sectionId, recursive });
|
||||
const result = await contentTool({ sectionId, recursive });
|
||||
|
||||
return result;
|
||||
return JSON.stringify(result, null, 2);
|
||||
},
|
||||
});
|
||||
|
||||
@@ -9,7 +9,7 @@ import { tool } from "@opencode-ai/plugin";
|
||||
import {
|
||||
createSearchSpecSectionsTool,
|
||||
toolMetadata,
|
||||
} from "../../src/agent-tools/searchSpecSections";
|
||||
} from "../../src/agent-tools/searchSpecSections.js";
|
||||
|
||||
export default tool({
|
||||
description: toolMetadata.description,
|
||||
@@ -32,8 +32,8 @@ export default tool({
|
||||
|
||||
// Create and execute tool
|
||||
const searchTool = createSearchSpecSectionsTool(table, embeddings);
|
||||
const result = await searchTool.func({ query });
|
||||
const result = await searchTool({ query });
|
||||
|
||||
return result;
|
||||
return JSON.stringify(result, null, 2);
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user