mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-07 00:51:34 +00:00
.
This commit is contained in:
parent
0d500a735f
commit
cffb8eb1e3
2 changed files with 3 additions and 0 deletions
|
|
@ -10,6 +10,7 @@ import fs from "fs/promises"
|
|||
import { Filesystem } from "../../util"
|
||||
import matter from "gray-matter"
|
||||
import { Instance } from "../../project/instance"
|
||||
import { ShellToolID } from "../../tool/shell/id"
|
||||
import { EOL } from "os"
|
||||
import type { Argv } from "yargs"
|
||||
type AgentMode = "all" | "primary" | "subagent"
|
||||
|
|
@ -128,6 +129,7 @@ const AgentCreateCommand = cmd({
|
|||
cliTools
|
||||
.split(",")
|
||||
.map((t) => t.trim())
|
||||
.map(ShellToolID.normalize)
|
||||
.filter(Boolean),
|
||||
),
|
||||
]
|
||||
|
|
|
|||
|
|
@ -1258,6 +1258,7 @@ export function registerTool(input: { name: string; render?: ToolComponent }) {
|
|||
}
|
||||
|
||||
export function getTool(name: string) {
|
||||
if (name === "bash") return state.shell?.render
|
||||
return state[name]?.render
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue