core/cli: open config in $EDITOR with optional prompt

shlex-split EDITOR (e.g. codium --wait); prompt when no providers;
add config path/edit commands.
This commit is contained in:
2026-07-14 18:44:32 +08:00
parent a017adda39
commit 5d90e48618
4 changed files with 276 additions and 2 deletions
+2
View File
@@ -72,6 +72,8 @@ Click app + readline REPL. Entry: `plyngent` / `python -m plyngent`.
- **`plyngent chat`**: provider/model selection (flags or interactive), SQLite sessions via config `[database]`, `/help` slash commands.
- **`plyngent providers`**: list config providers.
- **`plyngent config path|edit`**: print or open config in `$EDITOR` (`shlex`-split, e.g. `codium --wait`).
- If no providers and `$EDITOR` is set, chat/providers prompt to edit config then reload.
- Tools default on (`--tools` / `--no-tools`); workspace defaults to cwd.
- Readline: Tab completion for slash commands/args; history file under platformdirs user data (`repl_history`).