From: Xinqi Bao Date: Sat, 26 Sep 2026 14:05:33 +0000 (+0800) Subject: chore: remove legacy Claude Code configuration X-Git-Url: https://git.xinqibao.xyz/dotfiles.git/commitdiff_plain/4b8dbfbce3619cb134b2de3281e603aa5850a0d8?ds=inline;hp=a87067290ac7420ab3e6a2cfa29be21a69c50174 chore: remove legacy Claude Code configuration --- diff --git a/.claude/settings.json b/.claude/settings.json deleted file mode 100644 index ddebaca..0000000 --- a/.claude/settings.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "alwaysThinkingEnabled": true, - "statusLine": { - "type": "command", - "command": "bash ~/.claude/statusline.sh" - } -} diff --git a/.claude/statusline.sh b/.claude/statusline.sh deleted file mode 100644 index 274fec0..0000000 --- a/.claude/statusline.sh +++ /dev/null @@ -1,90 +0,0 @@ -#!/bin/bash -input=$(cat) - -# ============================================================ -# 数据提取 -# ============================================================ -MODEL=$(echo "$input" | jq -r '.model.display_name') -PCT=$(echo "$input" | jq -r '.context_window.used_percentage // 0' | cut -d. -f1) -COST=$(echo "$input" | jq -r '.cost.total_cost_usd // 0' | xargs printf '%.2f') -ADDED=$(echo "$input" | jq -r '.cost.total_lines_added // 0') -REMOVED=$(echo "$input" | jq -r '.cost.total_lines_removed // 0') -API_MS=$(echo "$input" | jq -r '.cost.total_api_duration_ms // 0') -API_TOTAL_S=$((API_MS / 1000)) -CWD=$(echo "$input" | jq -r '.cwd') -BRANCH=$(git -C "$CWD" --no-optional-locks branch --show-current 2>/dev/null) - -# ============================================================ -# 颜色定义 -# ============================================================ -R='\033[0m' -C_MODEL='\033[37m' # 白色 - 模型名 -C_CWD='\033[34m' # 蓝色 - 工作目录 -C_BRANCH='\033[36m' # 青色 - git 分支 -C_COST='\033[33m' # 黄色 - 花费 -C_DUR='\033[35m' # 紫色 - 时长 -C_ADD='\033[32m' # 绿色 - 新增行 -C_DEL='\033[31m' # 红色 - 删除行 -C_DIM='\033[90m' # 灰色 - 进度条空白段 - -# 上下文颜色: < 70% 绿 | 70-89% 黄 | >= 90% 红 -if [ "$PCT" -ge 90 ]; then C_CTX='\033[31m' -elif [ "$PCT" -ge 70 ]; then C_CTX='\033[33m' -else C_CTX='\033[32m'; fi - -# ============================================================ -# 进度条 -# ============================================================ -BAR_WIDTH=15 -FILLED=$((PCT * BAR_WIDTH / 100)) -EMPTY=$((BAR_WIDTH - FILLED)) -BAR="${C_CTX}$(printf "%${FILLED}s" | tr ' ' '=')${C_DIM}$(printf "%${EMPTY}s" | tr ' ' '-')${R}" - -# ============================================================ -# 分段构建 - 注释掉 seg_xxx 行即可关闭对应段 -# ============================================================ -SEP=" | " -OUT="" -add() { [ -n "$OUT" ] && OUT="${OUT}${SEP}"; OUT="${OUT}$1"; } - -# [1] 模型 + 版本 -seg_model="${C_MODEL}${MODEL}${R}" -add "$seg_model" - -# [2] 工作目录 (~ 缩写, 最后两级) -SHORT_CWD=$(echo "$CWD" | sed "s|^$HOME|~|" | awk -F/ '{if(NF<=2)print $0; else printf "%s/%s",$((NF-1)),$NF}') -seg_cwd="${C_CWD}${SHORT_CWD}${R}" -add "$seg_cwd" - -# [3] Git 分支 -if [ -n "$BRANCH" ]; then - seg_git="${C_BRANCH}@ ${BRANCH}${R}" - add "$seg_git" -fi - -# [4] 上下文进度条 + 百分比 -seg_ctx="${BAR} ${C_CTX}${PCT}%${R}" -add "$seg_ctx" - -# [5] 花费 -seg_cost="${C_COST}\$${COST}${R}" -add "$seg_cost" - -# [6] 代码增删 -seg_lines="${C_ADD}+${ADDED}${R} ${C_DEL}-${REMOVED}${R}" -add "$seg_lines" - -# [7] API 耗时 (自动进位: s -> m s -> h m s) -if [ "$API_TOTAL_S" -ge 3600 ]; then - seg_dur=$(printf "${C_DUR}%dh%dm%ds${R}" $((API_TOTAL_S/3600)) $((API_TOTAL_S%3600/60)) $((API_TOTAL_S%60))) -elif [ "$API_TOTAL_S" -ge 60 ]; then - seg_dur=$(printf "${C_DUR}%dm%ds${R}" $((API_TOTAL_S/60)) $((API_TOTAL_S%60))) -else - seg_dur=$(printf "${C_DUR}%d.%ds${R}" "$API_TOTAL_S" $(( (API_MS%1000)/100 ))) -fi -add "$seg_dur" - -# ============================================================ -# 输出 -# ============================================================ -printf '%b\n' "$OUT" diff --git a/claude/CLAUDE.md b/claude/CLAUDE.md deleted file mode 100644 index eca1529..0000000 --- a/claude/CLAUDE.md +++ /dev/null @@ -1,53 +0,0 @@ -# Development Principles - -## Quality -- Quality over speed. Skip uncertain tasks rather than deliver bad code. -- Keep solutions minimal. No extra abstractions or "just in case" code. -- Stay strictly within the scope of the task. Do not refactor or improve - surrounding code unless explicitly asked. - -## Decision Making -- If multiple valid approaches exist, discuss with the user before choosing. - Do NOT pick one silently. -- If a change involves new abstractions, new patterns, or structural changes - not explicitly requested in the task, discuss first. -- When uncertain about any design decision, ask rather than guess. -- Follow existing codebase patterns unless the task specifically requires - changing them. If you believe structural changes are needed beyond the - task scope, raise it as a separate concern. - -## Context Management -- Complete the entire task within a single context window. -- If a task is clearly too large for one context, suggest splitting it - into smaller tasks before starting. -- When making incremental progress, commit working code frequently so - progress is preserved in git. - -# Git Commit Convention - -Follow Conventional Commits strictly: - -## Format -``` -(): -``` - -## Rules -- type: feat/fix/refactor/docs/test/chore/perf/build -- scope: optional, module or component name -- subject: imperative mood, lowercase, no period, max 50 chars -- English only -- Focus on WHAT changed, not WHY or HOW you thought about it -- Be concise and direct -- No emoji, no AI markers, no co-author footer, no "Generated by" text - -## Good examples -- `feat(order): add limit order support` -- `fix(gateway): handle reconnection on market data timeout` -- `refactor(engine): simplify order state machine` -- `perf(matching): reduce memory allocation in hot path` - -## Bad examples -- `feat: Added new feature for better user experience` (vague, past tense) -- `fix: Fix the bug that was causing issues` (redundant) -- `update code` (no type, meaningless)