chore(agent): drop bash tool alias

This commit is contained in:
Jiayuan 2026-01-30 01:51:29 +08:00
parent 307e7fa8ee
commit 3e7fa97296
2 changed files with 12 additions and 3 deletions

View file

@ -1,6 +1,9 @@
import type { AgentOptions } from "./types.js";
import { getModel } from "@mariozechner/pi-ai";
import { createCodingTools } from "@mariozechner/pi-coding-agent";
import type { AgentTool } from "@mariozechner/pi-agent-core";
import { createExecTool } from "./tools/exec.js";
import { createProcessTool } from "./tools/process.js";
export function resolveModel(options: AgentOptions) {
if (options.provider && options.model) {
@ -11,5 +14,8 @@ export function resolveModel(options: AgentOptions) {
export function resolveTools(options: AgentOptions) {
const cwd = options.cwd ?? process.cwd();
return createCodingTools(cwd);
const baseTools = createCodingTools(cwd).filter((tool) => tool.name !== "bash");
const execTool = createExecTool(cwd);
const processTool = createProcessTool(cwd);
return [...baseTools, execTool as AgentTool<any>, processTool as AgentTool<any>];
}