feat: v0.6.0 light mode, command palette, dialogs, toasts
- Light mode with the house ☀/◐ toggle and lt_theme preference; light terminal palette; Claude runs with dark-ansi so its colours follow the palette; tmux and the statusLine use ANSI colours. - Command palette (⌕, Ctrl+Shift+P) with session, terminal, view, link and help commands. - .lt-modal dialogs for new/rename/end and a keyboard shortcuts sheet. - .lt-toast results for actions, uploads, copy and CI. - ttyd dropped the reply of fast one-shot commands; replies now wait for the browser to hang up, and the client hangs up as soon as it has one. - Sessions panel re-fetches after an action instead of reusing a stale poll. Closes #31 Closes #32 Closes #33 Closes #34 Closes #35 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -43,8 +43,19 @@ DEVDESK_CONTEXT_DIR="$DEVDESK_STATE_DIR/context"
|
||||
DEVDESK_STATUS_DIR="$DEVDESK_STATE_DIR/state"
|
||||
DEVDESK_NAME_RE='^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$'
|
||||
|
||||
# Under ttyd, a command that exits right after printing sometimes loses its last
|
||||
# output: ttyd sees the exit and closes the WebSocket before reading the pty
|
||||
# (devdesk#35). One-shot replies and errors therefore wait, at most
|
||||
# DEVDESK_LINGER seconds, for the browser to hang up once it has the answer
|
||||
# (ttyd then sends SIGHUP). devdesk-serve sets DEVDESK_VIA_TTYD=1.
|
||||
dd_linger() {
|
||||
[ "${DEVDESK_VIA_TTYD:-}" = 1 ] && [ -t 0 ] || return 0
|
||||
read -r -t "${DEVDESK_LINGER:-1}" _ 2>/dev/null || true
|
||||
}
|
||||
|
||||
dd_die() {
|
||||
printf 'devdesk: %s\n' "$*" >&2
|
||||
dd_linger
|
||||
exit 1
|
||||
}
|
||||
|
||||
|
||||
@@ -22,4 +22,7 @@ if [ -n "${DEVDESK_BIND:-}" ]; then
|
||||
args+=(--interface "$DEVDESK_BIND")
|
||||
fi
|
||||
|
||||
# Tells `devdesk attach` it talks to a browser through ttyd (see dd_linger).
|
||||
export DEVDESK_VIA_TTYD=1
|
||||
|
||||
exec "${DEVDESK_TTYD:-/usr/lib/devdesk/bin/ttyd}" "${args[@]}" "${DEVDESK_BIN:-/usr/bin/devdesk}" attach
|
||||
|
||||
@@ -38,12 +38,13 @@ if [[ $session =~ ^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$ ]]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
# Footer line, in TDS colours: session · model · context % · cost
|
||||
# Footer line: session · model · context % · cost. ANSI colour numbers, not RGB,
|
||||
# so the browser's dark or light palette applies (devdesk#31).
|
||||
jq -rM --arg s "$session" '
|
||||
def c($rgb; $t): "\u001b[38;2;\($rgb)m\($t)\u001b[0m";
|
||||
def c($sgr; $t): "\u001b[\($sgr)m\($t)\u001b[0m";
|
||||
def pct: if . == null then "—" else "\(. | floor)%" end;
|
||||
[ (if $s != "" then c("255;107;0"; "◈ \($s)") else empty end),
|
||||
c("0;212;255"; .model.display_name // "Claude"),
|
||||
c("127;163;191"; "ctx \(.context_window.used_percentage | pct)"),
|
||||
c("62;96;122"; "$\((.cost.total_cost_usd // 0) * 100 | round / 100)")
|
||||
] | join(c("62;96;122"; " · "))' <<<"$input" 2>/dev/null || true
|
||||
[ (if $s != "" then c("33"; "◈ \($s)") else empty end),
|
||||
c("36"; .model.display_name // "Claude"),
|
||||
c("37"; "ctx \(.context_window.used_percentage | pct)"),
|
||||
c("37"; "$\((.cost.total_cost_usd // 0) * 100 | round / 100)")
|
||||
] | join(c("90"; " · "))' <<<"$input" 2>/dev/null || true
|
||||
|
||||
Reference in New Issue
Block a user