Resume prompted Hermes sessions literally
Hermes TUI startup queries execute slash, shell, interpolation, and multiline syntax before reaching the model. Run the prompt through literal one-shot mode, read its exact session ID from a private usage report, and resume that session in the TUI so arbitrary prompt text stays data while the conversation remains interactive. Co-Authored-By: Codex XHigh <noreply@openai.com>
This commit is contained in:
1 parent
b609ae2355
commit
750dde5ed2
4 files changed
+102
-3
No files matched your search
+1
-2
@@ -88,8 +88,7 @@ codex)
|
||||
;;
|
||||
hermes)
|
||||
if [[ -n ${prompt:-} ]]; then
|
||||
# Keep inherited flags after chat so older Hermes subparsers do not clear them.
|
||||
command=(hermes chat --yolo --tui "--query=$prompt")
|
||||
command=(omarchy-agent-hermes "$prompt")
|
||||
else
|
||||
command=(hermes --yolo)
|
||||
fi
|
||||
|
||||
Executable
+21
@@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
|
||||
# omarchy:summary=Seed Hermes literally and resume the resulting interactive session
|
||||
# omarchy:args=<prompt>
|
||||
# omarchy:hidden=true
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
prompt=${1:?usage: omarchy-agent-hermes <prompt>}
|
||||
usage=$(mktemp)
|
||||
trap 'rm -f "$usage"' EXIT
|
||||
|
||||
# TUI startup queries pass through Hermes' slash, shell, and interpolation
|
||||
# dispatcher. One-shot treats the prompt literally and records its session ID.
|
||||
HERMES_SESSION_SOURCE=tui hermes --yolo --usage-file "$usage" --oneshot "$prompt"
|
||||
session_id=$(jq -er '.session_id | strings | select(length > 0)' "$usage")
|
||||
|
||||
rm -f "$usage"
|
||||
trap - EXIT
|
||||
|
||||
exec hermes chat --yolo --tui --resume "$session_id"
|
||||
Reference in new issue
Block a user