mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-20 01:00:24 +00:00
feat(coding-agent): add --no-tools flag to disable built-in tools
Add --no-tools flag that allows starting pi without any built-in tools, enabling extension-only tool setups (e.g., pi-ssh-remote). - Add --no-tools flag to CLI args parsing - Handle --tools '' (empty string) as equivalent to no tools - Fix system prompt to not show READ-ONLY mode when no tools (extensions may provide write capabilities) - Add tests for new flag and system prompt behavior fixes #555
This commit is contained in:
parent
cfa63c255d
commit
8f5523ed56
6 changed files with 123 additions and 15 deletions
|
|
@ -177,7 +177,15 @@ function buildSessionOptions(
|
|||
}
|
||||
|
||||
// Tools
|
||||
if (parsed.tools) {
|
||||
if (parsed.noTools) {
|
||||
// --no-tools: start with no built-in tools
|
||||
// --tools can still add specific ones back
|
||||
if (parsed.tools && parsed.tools.length > 0) {
|
||||
options.tools = parsed.tools.map((name) => allTools[name]);
|
||||
} else {
|
||||
options.tools = [];
|
||||
}
|
||||
} else if (parsed.tools) {
|
||||
options.tools = parsed.tools.map((name) => allTools[name]);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue