diff options
| author | Paul Buetow <paul@buetow.org> | 2026-04-11 20:38:14 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-04-11 20:38:14 +0300 |
| commit | 5f63e9139ec0b4a4ae30651f5a7a2f77c66a689c (patch) | |
| tree | 34af4f63fb526186f58884077a2e08e6ccb1715a /pi/agent/extensions/ask-mode | |
| parent | a133bc0355a03b088d63334c64b8a31253602d81 (diff) | |
Pi extensions: document and invoke task CLI as ~/go/bin/do
Use DO_CLI_REF and resolveDoExecutable in agent-plan-mode; accept both
do and ~/go/bin/do in bash guards. Ask-mode shares matchDoInvocation.
Nemotron/Qwen tool discipline points to ~/go/bin/do done.
Made-with: Cursor
Diffstat (limited to 'pi/agent/extensions/ask-mode')
| -rw-r--r-- | pi/agent/extensions/ask-mode/utils.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pi/agent/extensions/ask-mode/utils.ts b/pi/agent/extensions/ask-mode/utils.ts index 353c70a..b3c9ce1 100644 --- a/pi/agent/extensions/ask-mode/utils.ts +++ b/pi/agent/extensions/ask-mode/utils.ts @@ -1,3 +1,5 @@ +import { matchDoInvocation } from "../agent-plan-mode/utils.js"; + const DESTRUCTIVE_PATTERNS = [ /\brm\b/i, /\brmdir\b/i, @@ -106,7 +108,7 @@ const MUTATING_DO_PATTERNS = [ function isReadOnlyDoCommand(command: string): boolean { const trimmed = command.trim(); - if (!trimmed.startsWith("do ") && trimmed !== "do") return false; + if (!matchDoInvocation(trimmed)) return false; if (/[;&]/.test(trimmed) || /(^|[^|])\|([^|]|$)/.test(trimmed)) return false; return !MUTATING_DO_PATTERNS.some((pattern) => pattern.test(trimmed)); } |
