- Sessions no longer need a project folder: any name works and starts in DEVDESK_DEFAULT_DIR unless it matches a project; `devdesk new NAME [PROJECT]`. - Rename (✎) and end/forget (×) sessions from the Sessions panel, plus `devdesk rename`. The browser runs them as `devdesk attach --new|--rename|--end` through ttyd. Renames keep the running Claude and its recorded conversation: the hook, the run-wrapper and the statusline ask tmux for the current name. - Claude Context panel is live: devdesk-statusline snapshots model, context-window use, cost and edits per session, which --list reports; Claude's footer gets a one-line summary. The panel now sits under Sessions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
21 lines
754 B
Bash
Executable File
21 lines
754 B
Bash
Executable File
#!/bin/bash
|
|
# Claude Code SessionStart hook (wired in via claude-settings.json). Records the
|
|
# Claude session ID for the DevDesk session this Claude runs in, so that after a
|
|
# reboot devdesk-claude-run can `claude --resume` exactly this conversation.
|
|
# Fires on startup, resume, /clear and /compact. Must never block Claude.
|
|
|
|
# shellcheck source=libexec/devdesk-lib.sh
|
|
. "${DEVDESK_LIBEXEC:-/usr/lib/devdesk}/devdesk-lib.sh" || exit 0
|
|
|
|
session=$(dd_current_session)
|
|
[ -n "$session" ] || exit 0
|
|
dd_valid_name "$session" || exit 0
|
|
|
|
input=$(cat)
|
|
id=$(jq -r '.session_id // empty' <<<"$input" 2>/dev/null)
|
|
source=$(jq -r '.source // empty' <<<"$input" 2>/dev/null)
|
|
[ -n "$id" ] || exit 0
|
|
|
|
dd_registry_set_claude "$session" "$id" "$source" 2>/dev/null
|
|
exit 0
|