feat: add default permission mode + rename accept→edit

- Add "default" permission mode: no flags passed to CC, uses its own
  built-in default (asks about everything). Now the system default.
- Rename "accept" alias to "edit" (acceptEdits) for clarity
- Remove "skip" alias (duplicate of "bypass")
- Update all help text, error messages, tests, and LLM prompts

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Yuyao Huang (Sam)
2026-03-30 01:54:32 +08:00
co-authored by Claude Sonnet 4.6
parent 9c04d47c8e
commit b707fa84f9
5 changed files with 37 additions and 33 deletions
+2 -2
View File
@@ -53,10 +53,10 @@ Bot command prefix: {prefix}
- Any other command the user would type manually
Available bot commands (pass verbatim to run_command):
{prefix}new <dir> [msg] [--perm bypass|accept|plan] — create session
{prefix}new <dir> [msg] [--perm default|edit|plan|bypass] — create session
{prefix}close [n|conv_id] — close session
{prefix}switch <n> — switch active session
{prefix}perm <mode> [conv_id] — permission mode: bypass (default), accept, plan
{prefix}perm <mode> [conv_id] — permission mode: default, edit, plan, bypass
{prefix}direct — direct mode (bypass LLM for CC messages)
{prefix}smart — smart mode (LLM routing, default)
{prefix}status — list sessions
+2 -2
View File
@@ -720,7 +720,7 @@ class RunCommandInput(BaseModel):
command: str = Field(
...,
description=(
"A bot slash command to execute (e.g. '/perm accept', '/close 1', '/switch 2'). "
"A bot slash command to execute (e.g. '//perm edit', '//close 1', '//switch 2'). "
"This runs bot control commands — NOT shell commands on the host machine. "
"Use run_shell for host shell commands (git, ls, etc.)."
),
@@ -732,7 +732,7 @@ class RunCommandTool(BaseTool):
description: str = (
"Execute a PhoneWork bot slash command on behalf of the user. "
"Use this to control sessions, switch modes, change permissions, etc. "
"Examples: '/perm accept', '/close 1', '/switch 2', '/direct', '/smart', '/status'. "
"Examples: '/perm edit', '/close 1', '/switch 2', '/direct', '/smart', '/status'. "
"Do NOT use this for shell commands — use run_shell for those."
)
args_schema: Type[BaseModel] = RunCommandInput