mirror of
https://github.com/anomalyco/opencode.git
synced 2026-07-17 12:56:41 +02:00
.
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user