feat: codespace tab names and session widget improvements
Show friendly codespace name (without trailing random ID) in tmux tabs, prefixed with cs:. Add ctrl-n to session widget to start a new copilot session, and improve header labels and field display. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -12,6 +12,16 @@ case "$cmd" in
|
||||
*) name="$cmd" ;;
|
||||
esac
|
||||
|
||||
# In Codespaces, show friendly name without trailing random ID
|
||||
# Codespace names: "adjective-noun-id" where id is alphanumeric gibberish
|
||||
if [[ -n "$CODESPACE_NAME" ]]; then
|
||||
friendly="${CODESPACE_NAME%-*}"
|
||||
# If no hyphen was found, use full name
|
||||
[[ "$friendly" == "$CODESPACE_NAME" ]] && friendly="$CODESPACE_NAME"
|
||||
echo "cs:${friendly}"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if (( ${#name} > max )); then
|
||||
echo "${name:0:$max}…"
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user