mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-04-06 17:23:28 +08:00
fix: stabilize opencode declarations across package managers
This commit is contained in:
@@ -5,11 +5,11 @@
|
||||
* Automatically detects the package manager and test framework.
|
||||
*/
|
||||
|
||||
import { tool } from "@opencode-ai/plugin/tool"
|
||||
import { tool, type ToolDefinition } from "@opencode-ai/plugin/tool"
|
||||
import * as path from "path"
|
||||
import * as fs from "fs"
|
||||
|
||||
export default tool({
|
||||
const runTestsTool: ToolDefinition = tool({
|
||||
description:
|
||||
"Run the test suite with optional coverage, watch mode, or specific test patterns. Automatically detects package manager (npm, pnpm, yarn, bun) and test framework.",
|
||||
args: {
|
||||
@@ -97,6 +97,8 @@ export default tool({
|
||||
},
|
||||
})
|
||||
|
||||
export default runTestsTool
|
||||
|
||||
async function detectPackageManager(cwd: string): Promise<string> {
|
||||
const lockFiles: Record<string, string> = {
|
||||
"bun.lockb": "bun",
|
||||
|
||||
Reference in New Issue
Block a user