ci: improve test coverage

This commit is contained in:
Dax Raad
2025-09-27 03:04:42 -04:00
parent 56d0e8acbf
commit fc1cf01a26
6 changed files with 54 additions and 448 deletions
+16 -20
View File
@@ -20,25 +20,6 @@ import z from "zod/v4"
import { Plugin } from "../plugin"
export namespace ToolRegistry {
// Built-in tools that ship with opencode
function builtin() {
return [
InvalidTool,
BashTool,
EditTool,
WebFetchTool,
GlobTool,
GrepTool,
ListTool,
PatchTool,
ReadTool,
WriteTool,
TodoWriteTool,
TodoReadTool,
TaskTool,
]
}
export const state = Instance.state(async () => {
const custom = [] as Tool.Info[]
const glob = new Bun.Glob("tool/*.{js,ts}")
@@ -93,7 +74,22 @@ export namespace ToolRegistry {
async function all(): Promise<Tool.Info[]> {
const custom = await state().then((x) => x.custom)
return [...builtin(), ...custom]
return [
InvalidTool,
BashTool,
EditTool,
WebFetchTool,
GlobTool,
GrepTool,
ListTool,
PatchTool,
ReadTool,
WriteTool,
TodoWriteTool,
TodoReadTool,
TaskTool,
...custom,
]
}
export async function ids() {