diff --git a/dolphin/ollie-ask b/dolphin/ollie-ask index da02a4c..4f7e0f2 100755 --- a/dolphin/ollie-ask +++ b/dolphin/ollie-ask @@ -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) diff --git a/dolphin/ollie-session-here b/dolphin/ollie-session-here index f722bf8..5862ad6 100755 --- a/dolphin/ollie-session-here +++ b/dolphin/ollie-session-here @@ -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