cc-sidebar 0.1.1 → 0.1.2
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 -14
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,15 @@ SCRIPT
|
|
|
956
957
|
// Header padding
|
|
957
958
|
lines.push(bgLine);
|
|
958
959
|
|
|
959
|
-
// Repo and branch at top (
|
|
960
|
-
|
|
961
|
-
let
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
if (!repo) {
|
|
969
|
-
const cwd = process.cwd();
|
|
970
|
-
const parts = cwd.split('/').filter(Boolean);
|
|
971
|
-
repo = parts[parts.length - 1] || cwd;
|
|
972
|
-
}
|
|
960
|
+
// Repo and branch at top (always computed locally per-instance)
|
|
961
|
+
let branch = '';
|
|
962
|
+
let repo = '';
|
|
963
|
+
try {
|
|
964
|
+
branch = execSync('git rev-parse --abbrev-ref HEAD 2>/dev/null', { encoding: 'utf8' }).trim();
|
|
965
|
+
} catch {}
|
|
966
|
+
const cwd = getEffectiveCwd();
|
|
967
|
+
const parts = cwd.split('/').filter(Boolean);
|
|
968
|
+
repo = parts[parts.length - 1] || cwd;
|
|
973
969
|
const branchDisplay = branch ? `${branch}` : '';
|
|
974
970
|
const repoDisplay = repo ? `${repo}` : '';
|
|
975
971
|
const headerContent = branchDisplay && repoDisplay
|