From 271afedbd042e7f9b9dd363972faecea8e64c28c Mon Sep 17 00:00:00 2001 From: Chintanpatel24 <216989679+Chintanpatel24@users.noreply.github.com> Date: Tue, 14 Jul 2026 13:31:38 +0000 Subject: [PATCH] feat: implement classic chat UI, local demo/mock mode, and update.sh script - Create clean, scrollable Terminal Chat layout ('Classic' mode) as default in TUI. - Provide simple toggling between Classic Chat and Advanced Dashboard modes via `/layout` or `/ui`. - Introduce a fully offline mock LLM provider ('demo'/'mock') for immediate tryouts. - Add an interactive startup check for unconfigured clients to start in Demo mode instantly. - Create `update.sh` helper to cleanly update local code while preserving edits. - Document the new update instruction in README.md. --- README.md | 8 ++++++++ update.sh | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100755 update.sh diff --git a/README.md b/README.md index cb87f26..98d8daa 100644 --- a/README.md +++ b/README.md @@ -83,6 +83,14 @@ bun install bun link # optional global arrowcode / ac ``` +### Update + +To update ArrowCode while preserving any local modifications you have made: + +```bash +./update.sh +``` + ### Setup API key ```bash diff --git a/update.sh b/update.sh new file mode 100755 index 0000000..ea0a351 --- /dev/null +++ b/update.sh @@ -0,0 +1,48 @@ +#!/usr/bin/env bash +set -euo pipefail + +# ArrowCode local updater script +# Updates the ArrowCode repository to the latest code on the current branch while preserving local changes + +RED=$'\033[0;31m' +GRN=$'\033[0;32m' +CYN=$'\033[0;36m' +RST=$'\033[0m' + +log() { printf '%s==>%s %s\n' "$CYN" "$RST" "$*"; } +ok() { printf '%s[ok]%s %s\n' "$GRN" "$RST" "$*"; } +err() { printf '%s[err]%s %s\n' "$RED" "$RST" "$*" >&2; } + +# Find ArrowCode base directory +DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +cd "$DIR" + +log "Updating ArrowCode at $DIR..." + +# Keep local changes with git stash if there are any +HAS_CHANGES=0 +if ! git diff --quiet || ! git diff --cached --quiet; then + HAS_CHANGES=1 + log "Saving local changes with git stash..." + git stash -u +fi + +# Fetch and rebase / merge latest from branch +BRANCH=$(git rev-parse --abbrev-ref HEAD) +log "Fetching latest commits from remote on branch: $BRANCH" +git fetch origin "$BRANCH" + +log "Pulling latest changes..." +git pull --rebase origin "$BRANCH" + +# Restore local changes if stashed +if [ "$HAS_CHANGES" -eq 1 ]; then + log "Restoring local changes..." + git stash pop +fi + +# Re-install dependencies with bun +log "Running bun install to ensure package sync..." +bun install + +ok "ArrowCode successfully updated!"