feat: v0.9.0 conversation search, plan usage meters, quiet phone at the desk
- devdesk attach --search (grep + jq over ~/.claude/projects, six files at a time) and --resume-convo NAME ID [fork]; devdesk-claude-run passes --fork-session once. Search dialog with Resume / Fork / Open. - statusLine snapshots rate_limits and pr; footer/menu meters with a 90 % warning; PR chip on session rows. - CLAUDE_CLIENT_PRESENCE_FILE per tmux session id; --presence on|off with a self-expiring marker; the page heartbeats it while visible. Closes #24 Closes #25 Closes #26 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -42,15 +42,22 @@ run_new() {
|
||||
}
|
||||
|
||||
run_resume() {
|
||||
local id args started rc
|
||||
local id args started rc fork=()
|
||||
id=$(dd_registry_get "$NAME" claude_session_id)
|
||||
if [ -z "$id" ]; then
|
||||
run_new
|
||||
return
|
||||
fi
|
||||
mapfile -d '' args < <(common_args)
|
||||
# "Fork" from conversation search (devdesk#24): continue as a new
|
||||
# conversation, once; the SessionStart hook then records the new id.
|
||||
if [ "$(dd_registry_get "$NAME" fork)" = true ]; then
|
||||
fork=(--fork-session)
|
||||
# shellcheck disable=SC2016 # $n is a jq variable
|
||||
dd_registry_update 'del(.sessions[$n].fork)' --arg n "$NAME" 2>/dev/null || true
|
||||
fi
|
||||
started=$SECONDS
|
||||
"$CLAUDE_BIN" --resume "$id" "${args[@]}"
|
||||
"$CLAUDE_BIN" --resume "$id" "${fork[@]}" "${args[@]}"
|
||||
rc=$?
|
||||
# A resume that fails straight away means the transcript is gone; start fresh.
|
||||
if [ "$rc" -ne 0 ] && [ $((SECONDS - started)) -lt 10 ]; then
|
||||
@@ -69,6 +76,14 @@ menu() {
|
||||
}
|
||||
|
||||
printf '\033]2;%s\033\134' "$NAME" # pane title (ST = ESC \\)
|
||||
|
||||
# While a DevDesk tab shows this session, this marker exists and Claude tells
|
||||
# Remote Control a client is present, which holds back phone pushes (devdesk#26).
|
||||
# Keyed by tmux's session id, which survives renames.
|
||||
sid=$(dd_tmux display -p -t "${TMUX_PANE:-}" '#{session_id}' 2>/dev/null)
|
||||
if [ -n "$sid" ]; then
|
||||
export CLAUDE_CLIENT_PRESENCE_FILE="$DEVDESK_PRESENCE_DIR/${sid#\$}"
|
||||
fi
|
||||
mode=resume
|
||||
while :; do
|
||||
NAME=$(dd_current_session) # follow renames
|
||||
|
||||
Reference in New Issue
Block a user