ci: improve test coverage

This commit is contained in:
Dax Raad
2025-09-27 03:04:42 -04:00
parent d0043a4a78
commit 4b94d98f89
6 changed files with 54 additions and 448 deletions

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() {