mirror of
https://github.com/bendtherules/ask262.git
synced 2026-08-18 21:31:46 +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 {
|
import {
|
||||||
createEvaluateInEngine262Tool,
|
createEvaluateInEngine262Tool,
|
||||||
toolMetadata,
|
toolMetadata,
|
||||||
} from "../../src/agent-tools/evaluateInEngine262";
|
} from "../../src/agent-tools/evaluateInEngine262.js";
|
||||||
|
|
||||||
export default tool({
|
export default tool({
|
||||||
description: toolMetadata.description,
|
description: toolMetadata.description,
|
||||||
@@ -19,8 +19,8 @@ export default tool({
|
|||||||
|
|
||||||
// Create and execute tool (no external dependencies needed)
|
// Create and execute tool (no external dependencies needed)
|
||||||
const evaluateTool = createEvaluateInEngine262Tool();
|
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 {
|
import {
|
||||||
createGetSectionContentTool,
|
createGetSectionContentTool,
|
||||||
toolMetadata,
|
toolMetadata,
|
||||||
} from "../../src/agent-tools/getSectionContent";
|
} from "../../src/agent-tools/getSectionContent.js";
|
||||||
|
|
||||||
export default tool({
|
export default tool({
|
||||||
description: toolMetadata.description,
|
description: toolMetadata.description,
|
||||||
@@ -30,8 +30,8 @@ export default tool({
|
|||||||
|
|
||||||
// Create and execute tool
|
// Create and execute tool
|
||||||
const contentTool = createGetSectionContentTool(table);
|
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 {
|
import {
|
||||||
createSearchSpecSectionsTool,
|
createSearchSpecSectionsTool,
|
||||||
toolMetadata,
|
toolMetadata,
|
||||||
} from "../../src/agent-tools/searchSpecSections";
|
} from "../../src/agent-tools/searchSpecSections.js";
|
||||||
|
|
||||||
export default tool({
|
export default tool({
|
||||||
description: toolMetadata.description,
|
description: toolMetadata.description,
|
||||||
@@ -32,8 +32,8 @@ export default tool({
|
|||||||
|
|
||||||
// Create and execute tool
|
// Create and execute tool
|
||||||
const searchTool = createSearchSpecSectionsTool(table, embeddings);
|
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