cc-sidebar 0.1.1 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/cli.ts +1 -1
- package/src/components/RawSidebar.tsx +10 -13
package/package.json
CHANGED
package/src/cli.ts
CHANGED
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
getTasks,
|
|
9
9
|
getStatusline,
|
|
10
10
|
getClaudeTodos,
|
|
11
|
+
getEffectiveCwd,
|
|
11
12
|
addTask,
|
|
12
13
|
updateTask,
|
|
13
14
|
removeTask,
|
|
@@ -956,20 +957,16 @@ SCRIPT
|
|
|
956
957
|
// Header padding
|
|
957
958
|
lines.push(bgLine);
|
|
958
959
|
|
|
959
|
-
// Repo and branch at top (
|
|
960
|
+
// Repo and branch at top (always computed locally per-instance)
|
|
960
961
|
const { statusline } = this.state;
|
|
961
|
-
let branch =
|
|
962
|
-
let repo =
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
const cwd = process.cwd();
|
|
970
|
-
const parts = cwd.split('/').filter(Boolean);
|
|
971
|
-
repo = parts[parts.length - 1] || cwd;
|
|
972
|
-
}
|
|
962
|
+
let branch = '';
|
|
963
|
+
let repo = '';
|
|
964
|
+
try {
|
|
965
|
+
branch = execSync('git rev-parse --abbrev-ref HEAD 2>/dev/null', { encoding: 'utf8' }).trim();
|
|
966
|
+
} catch {}
|
|
967
|
+
const cwd = getEffectiveCwd();
|
|
968
|
+
const parts = cwd.split('/').filter(Boolean);
|
|
969
|
+
repo = parts[parts.length - 1] || cwd;
|
|
973
970
|
const branchDisplay = branch ? `${branch}` : '';
|
|
974
971
|
const repoDisplay = repo ? `${repo}` : '';
|
|
975
972
|
const headerContent = branchDisplay && repoDisplay
|