fix: update dolphin scripts for session/agent model

- ollie-session-here: pass cwd= when creating agent
- ollie-ask: create default session and agent before generate
This commit is contained in:
Levi Neely 2026-08-12 16:18:54 +02:00
parent b6a7d93d0e
commit 3f73f09688
2 changed files with 5 additions and 1 deletions

View File

@ -6,6 +6,10 @@ TARGET="$1"
PREFIX="${2:-Describe and explain this file:}"
PROMPT="$PREFIX $TARGET"
# Ensure default session and agent exist
printf 'name=default\ncwd=%s\n' "$HOME" | ollie-9p write session/new 2>/dev/null
printf 'cwd=%s\n' "$HOME" | ollie-9p write session/default/agent/new 2>/dev/null
# Use Generate one-shot via 9P
RESULT=$(echo "$PROMPT" | ollie-9p rdwr generate 2>/dev/null)

View File

@ -15,7 +15,7 @@ SESSION_NAME="$(basename "$TARGET")"
# Create session (idempotent) and agent via 9P
printf 'name=%s\ncwd=%s\n' "$SESSION_NAME" "$TARGET" | ollie-9p write session/new
printf '' | ollie-9p write "session/$SESSION_NAME/agent/new"
printf 'cwd=%s\n' "$TARGET" | ollie-9p write "session/$SESSION_NAME/agent/new"
if [ -t 1 ]; then
# Terminal: print session info