o prompt: add /i and /info to inspect agent state

This commit is contained in:
Ollie Agent 2026-08-04 19:29:57 +02:00
parent b939bd4c6b
commit 3a8e3f3c63
1 changed files with 12 additions and 0 deletions

View File

@ -284,6 +284,17 @@ cmd_prompt() {
backend*) echo "$cmd" | ollie-9p write "$path/ctl"; echo "[${cmd}]" ;;
cwd*) echo "$cmd" | ollie-9p write "$path/ctl"; echo "[${cmd}]" ;;
quit|q) tmux kill-session -t "o-${s}" 2>/dev/null; exit 0 ;;
i|info)
local state model backend cost
state=$(ollie-9p read "$path/state" 2>/dev/null || echo "?")
model=$(ollie-9p read "$path/model" 2>/dev/null || echo "?")
backend=$(ollie-9p read "$path/backend" 2>/dev/null || echo "?")
cost=$(ollie-9p read "$path/cost" 2>/dev/null || echo "?")
echo " state: $state"
echo " model: $model"
echo " backend: $backend"
echo " cost: $cost"
;;
help)
echo " /stop — interrupt running agent"
echo " /compact — compact context"
@ -293,6 +304,7 @@ cmd_prompt() {
echo " /backend X — switch backend"
echo " /cwd X — change working directory"
echo " /quit /q — kill the tmux TUI"
echo " /i /info — inspect agent state, model, backend, cost"
;;
*) echo "unknown command: /$cmd (try /help)" ;;
esac