# Oh My Pi — fork of pi, launched as `omp`. Same UI/session files as pi.conf. # # USER OVERRIDE of the builtin agents/oh-my-pi.conf (snirt/tmux-agents-mon). # The builtin uses AGENT_PATH_HINTS="oh-my-pi omp"; the 3-char "omp" is matched # as a raw substring against the first non-flag argv token (procs.rs # agent_for_argv), so Java/Spring launches whose main-class or jar contains # "omp" (component, compose, compte…) get misidentified as oh-my-pi. Drop the # bare "omp" hint; AGENT_BINS="omp" still catches the real binary by exact name. AGENT_BINS="omp" AGENT_PATH_HINTS="oh-my-pi" # omp busy status: "⠏ Checking… ⟦esc⟧" footer (fork style), or upstream's # "Running… (esc to cancel)" — both only render while a task runs WORKING_SCREEN='⟦esc⟧|\(esc to cancel\)' BLOCKED_SCREEN='Enter select.*Esc cancel' CHECK_ORDER="bs ws" TITLE_STRIP='^π: ' # shares pi's session store (~/.pi/agent/sessions). newest-first, first # file yielding a session name / first user message wins. SUBJECT_CMD='for f in $(ls -t "$HOME/.pi/agent/sessions/-${path//\//-}--"/*.jsonl 2>/dev/null); do s=$({ grep "\"type\":\"session_info\"" "$f" | tail -n 1 | sed -nE "s/.*\"name\":\"([^\"]*)\".*/\1/p" grep -m 1 "\"role\":\"user\"" "$f" | sed -nE "s/.*\"(text|content)\":\"([^\"]*)\".*/\2/p" } | grep -m 1 .) [ -n "$s" ] && { printf "%s\n" "$s"; break; } done'