fix(omo): read the event from omo's UserPromptSubmit payload

omo names the event in "event" for UserPromptSubmit, without the
"hook_event_name" field its Stop and Notification payloads carry. The
script only read hook_event_name, so it ignored every prompt and the
blue working marker never showed. Read either field.
This commit is contained in:
David Ibia
2026-10-07 21:28:32 +01:00
parent 6fb7007ea9
commit 4290874f43
+2 -1
View File
@@ -13,7 +13,8 @@ export PATH="/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:$PATH"
payload=$(cat) payload=$(cat)
field() { jq -r "$1 // empty" <<<"$payload" 2>/dev/null; } field() { jq -r "$1 // empty" <<<"$payload" 2>/dev/null; }
event=$(field '.hook_event_name') # omo's UserPromptSubmit payload names the event only in "event".
event=$(field '.hook_event_name // .event')
project=$(basename "$(field '.cwd')") project=$(basename "$(field '.cwd')")
# Only top-level sessions live under .omo/agent/sessions/. Subagents, team members # Only top-level sessions live under .omo/agent/sessions/. Subagents, team members