fix: scope hooks to DevDesk's tmux and reload env per Claude launch (0.2.1)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -197,6 +197,20 @@ claude_args() {
|
||||
[ "$(jq -r '.sessions[] | select(.name=="alpha") | .context.model' <<<"$output")" = Opus ]
|
||||
}
|
||||
|
||||
@test "hooks ignore Claude running in some other tmux server" {
|
||||
start_server
|
||||
other="$TMP/other.sock"
|
||||
tmux -S "$other" new-session -d -s stranger 'sleep 60'
|
||||
pane=$(tmux -S "$other" display -p -t =stranger '#{pane_id}')
|
||||
echo '{"session_id":"nope","source":"startup"}' |
|
||||
TMUX="$other,1,0" TMUX_PANE="$pane" "$REPO/libexec/devdesk-session-hook"
|
||||
echo '{"model":{"display_name":"Opus"},"context_window":{}}' |
|
||||
TMUX="$other,1,0" TMUX_PANE="$pane" "$REPO/libexec/devdesk-statusline" >/dev/null
|
||||
tmux -S "$other" kill-server
|
||||
[ ! -e "$DEVDESK_STATE_DIR/registry.json" ] || [ "$(jq -r '.sessions | has("stranger")' "$DEVDESK_STATE_DIR/registry.json")" = false ]
|
||||
[ ! -e "$DEVDESK_STATE_DIR/context/stranger.json" ]
|
||||
}
|
||||
|
||||
@test "web actions run through attach and answer with JSON" {
|
||||
start_server
|
||||
run devdesk attach --new web1 alpha
|
||||
|
||||
Reference in New Issue
Block a user