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:
parent
b6a7d93d0e
commit
3f73f09688
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Reference in New Issue