ccsidekick 1.3.0 → 1.5.0
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/README.md +5 -4
- package/dist/ccsidekick-render.js +8 -3
- package/dist/ccsidekick.js +18 -12
- package/package.json +5 -3
package/README.md
CHANGED
|
@@ -16,11 +16,11 @@ Remove it with `npx ccsidekick uninstall`.
|
|
|
16
16
|
|
|
17
17
|
## Non-interactive setup (for scripts and AI agents)
|
|
18
18
|
|
|
19
|
-
No TTY required. `ccsidekick setup` configures and wires everything from flags, so an agent can
|
|
19
|
+
No TTY required. `npx ccsidekick setup` configures and wires everything from flags, so an agent can
|
|
20
20
|
install it in one command:
|
|
21
21
|
|
|
22
22
|
```bash
|
|
23
|
-
ccsidekick setup --character
|
|
23
|
+
npx ccsidekick setup --character spiderman --theme houston --mode fixed
|
|
24
24
|
```
|
|
25
25
|
|
|
26
26
|
Only the flags you pass are applied (a partial patch onto the existing config, or the defaults on a
|
|
@@ -44,8 +44,9 @@ fresh install), then it writes `config.toml` and wires `settings.json` exactly l
|
|
|
44
44
|
Discover valid values for scripting, and see every flag:
|
|
45
45
|
|
|
46
46
|
```bash
|
|
47
|
-
ccsidekick list characters
|
|
48
|
-
ccsidekick setup --help
|
|
47
|
+
npx ccsidekick list characters # also: themes, widgets
|
|
48
|
+
npx ccsidekick setup --help
|
|
49
|
+
|
|
49
50
|
```
|
|
50
51
|
|
|
51
52
|
An unknown value (e.g. a misspelled theme) exits non-zero and prints the valid set — it never
|
|
@@ -2441,10 +2441,10 @@ var DEFAULT_WIDGETS = {
|
|
|
2441
2441
|
};
|
|
2442
2442
|
var DEFAULT_CONFIG = {
|
|
2443
2443
|
schema_version: 1,
|
|
2444
|
-
character: { enabled: true, mode: "random", name: "
|
|
2444
|
+
character: { enabled: true, mode: "random", name: "spiderman", roster: [] },
|
|
2445
2445
|
theme: { name: "character", banding: "solid", mood_shift: false, icons: {} },
|
|
2446
2446
|
comments: { character: true, helpful: true, min_severity: "low" },
|
|
2447
|
-
network: { fx_refresh:
|
|
2447
|
+
network: { fx_refresh: false, usage_fetch: false, balance_path: "" },
|
|
2448
2448
|
statusline: { currency: defaultCurrency(), widgets: DEFAULT_WIDGETS }
|
|
2449
2449
|
};
|
|
2450
2450
|
var obj = (v) => v !== null && typeof v === "object" ? v : {};
|
|
@@ -4126,6 +4126,11 @@ function decodeCwd(encoded) {
|
|
|
4126
4126
|
function projectKeyForCwd(cwd) {
|
|
4127
4127
|
return decodeCwd(cwd.replace(/[/.]/g, "-"));
|
|
4128
4128
|
}
|
|
4129
|
+
function projectKeyForTranscript(transcriptPath) {
|
|
4130
|
+
if (transcriptPath === "")
|
|
4131
|
+
return;
|
|
4132
|
+
return decodeCwd(basename(dirname6(transcriptPath)));
|
|
4133
|
+
}
|
|
4129
4134
|
var repoRootCache = new Map;
|
|
4130
4135
|
function* walkTree(dir, encodedDir) {
|
|
4131
4136
|
let entries;
|
|
@@ -7074,7 +7079,7 @@ function build(stdin, env, term, clock, overrides) {
|
|
|
7074
7079
|
const loaded = loadPack(persona);
|
|
7075
7080
|
const pack = loaded.ok ? loaded.pack : null;
|
|
7076
7081
|
const project = deriveProject(git, payload);
|
|
7077
|
-
const projectKey = projectKeyForCwd(payload.workspace.current_dir ?? payload.cwd ?? "");
|
|
7082
|
+
const projectKey = projectKeyForTranscript(payload.transcript_path ?? "") ?? projectKeyForCwd(payload.workspace.current_dir ?? payload.cwd ?? "");
|
|
7078
7083
|
const resolveProject = (sess, decodedCwd) => sess === String(session) ? String(project) : decodedCwd;
|
|
7079
7084
|
const scan = scanTranscript(payload.transcript_path ?? "", clock, price);
|
|
7080
7085
|
const scannedCache = scanCostTree(projectsRoot, costCache, clock, price, resolveProject);
|
package/dist/ccsidekick.js
CHANGED
|
@@ -5483,10 +5483,10 @@ var init_config = __esm(() => {
|
|
|
5483
5483
|
};
|
|
5484
5484
|
DEFAULT_CONFIG = {
|
|
5485
5485
|
schema_version: 1,
|
|
5486
|
-
character: { enabled: true, mode: "random", name: "
|
|
5486
|
+
character: { enabled: true, mode: "random", name: "spiderman", roster: [] },
|
|
5487
5487
|
theme: { name: "character", banding: "solid", mood_shift: false, icons: {} },
|
|
5488
5488
|
comments: { character: true, helpful: true, min_severity: "low" },
|
|
5489
|
-
network: { fx_refresh:
|
|
5489
|
+
network: { fx_refresh: false, usage_fetch: false, balance_path: "" },
|
|
5490
5490
|
statusline: { currency: defaultCurrency(), widgets: DEFAULT_WIDGETS }
|
|
5491
5491
|
};
|
|
5492
5492
|
});
|
|
@@ -7093,6 +7093,11 @@ function decodeCwd(encoded) {
|
|
|
7093
7093
|
function projectKeyForCwd(cwd) {
|
|
7094
7094
|
return decodeCwd(cwd.replace(/[/.]/g, "-"));
|
|
7095
7095
|
}
|
|
7096
|
+
function projectKeyForTranscript(transcriptPath) {
|
|
7097
|
+
if (transcriptPath === "")
|
|
7098
|
+
return;
|
|
7099
|
+
return decodeCwd(basename2(dirname5(transcriptPath)));
|
|
7100
|
+
}
|
|
7096
7101
|
function repoRootForCwd(cwd) {
|
|
7097
7102
|
const cached = repoRootCache.get(cwd);
|
|
7098
7103
|
if (cached !== undefined)
|
|
@@ -7464,7 +7469,7 @@ function build(stdin, env, term, clock, overrides) {
|
|
|
7464
7469
|
const loaded = loadPack(persona);
|
|
7465
7470
|
const pack = loaded.ok ? loaded.pack : null;
|
|
7466
7471
|
const project = deriveProject(git, payload);
|
|
7467
|
-
const projectKey = projectKeyForCwd(payload.workspace.current_dir ?? payload.cwd ?? "");
|
|
7472
|
+
const projectKey = projectKeyForTranscript(payload.transcript_path ?? "") ?? projectKeyForCwd(payload.workspace.current_dir ?? payload.cwd ?? "");
|
|
7468
7473
|
const resolveProject = (sess, decodedCwd) => sess === String(session) ? String(project) : decodedCwd;
|
|
7469
7474
|
const scan = scanTranscript(payload.transcript_path ?? "", clock, price);
|
|
7470
7475
|
const scannedCache = scanCostTree(projectsRoot, costCache, clock, price, resolveProject);
|
|
@@ -10900,10 +10905,11 @@ import { execFileSync } from "node:child_process";
|
|
|
10900
10905
|
import { existsSync as existsSync6, mkdirSync as mkdirSync5, mkdtempSync, realpathSync, writeFileSync as writeFileSync4 } from "node:fs";
|
|
10901
10906
|
import { tmpdir } from "node:os";
|
|
10902
10907
|
import { join as join20 } from "node:path";
|
|
10903
|
-
function seedTranscriptFixture(workdir) {
|
|
10904
|
-
const
|
|
10908
|
+
function seedTranscriptFixture(workdir, root) {
|
|
10909
|
+
const dir = root !== undefined ? join20(root, "projects", workdir.replace(/[/.]/g, "-")) : workdir;
|
|
10910
|
+
const path = join20(dir, "preview-transcript.jsonl");
|
|
10905
10911
|
try {
|
|
10906
|
-
mkdirSync5(
|
|
10912
|
+
mkdirSync5(dir, { recursive: true });
|
|
10907
10913
|
if (!existsSync6(path)) {
|
|
10908
10914
|
const lines = [
|
|
10909
10915
|
JSON.stringify({ type: "system", subtype: "compact_boundary" }),
|
|
@@ -10934,13 +10940,13 @@ function seedTranscriptFixture(workdir) {
|
|
|
10934
10940
|
} catch {}
|
|
10935
10941
|
return path;
|
|
10936
10942
|
}
|
|
10937
|
-
function basePayload(workdir, over = {}) {
|
|
10943
|
+
function basePayload(workdir, over = {}, root) {
|
|
10938
10944
|
const cost = { total_cost_usd: 0.42, total_duration_ms: 3600000, ...over.cost };
|
|
10939
10945
|
const cwd = over.cwd ?? workdir;
|
|
10940
10946
|
const base = {
|
|
10941
10947
|
session_id: "preview",
|
|
10942
10948
|
session_name: "preview",
|
|
10943
|
-
transcript_path: seedTranscriptFixture(workdir),
|
|
10949
|
+
transcript_path: seedTranscriptFixture(workdir, root),
|
|
10944
10950
|
cwd,
|
|
10945
10951
|
workspace: { current_dir: cwd },
|
|
10946
10952
|
model: { id: "claude-opus-4-1", display_name: "Opus 4.1" },
|
|
@@ -11046,8 +11052,8 @@ var sharedScratch;
|
|
|
11046
11052
|
var init_fixture = () => {};
|
|
11047
11053
|
|
|
11048
11054
|
// src/tui/preview/scenarios.ts
|
|
11049
|
-
function scenarioPayloadJson(scenario, workdir) {
|
|
11050
|
-
return JSON.stringify(basePayload(workdir, scenario.payload ?? {}));
|
|
11055
|
+
function scenarioPayloadJson(scenario, workdir, root) {
|
|
11056
|
+
return JSON.stringify(basePayload(workdir, scenario.payload ?? {}, root));
|
|
11051
11057
|
}
|
|
11052
11058
|
var creds = (subscriptionType) => ({
|
|
11053
11059
|
creds: { present: true, subscriptionType }
|
|
@@ -11123,7 +11129,7 @@ function renderScenario(scenario, draft, opts) {
|
|
|
11123
11129
|
setupGitFixture(workdir);
|
|
11124
11130
|
seedCostFixture(root, workdir);
|
|
11125
11131
|
const term = { columns: opts.columns, noColor: opts.noColor, isTTY: true };
|
|
11126
|
-
return runRender(scenarioPayloadJson(scenario, workdir), env2, term, clock, scenario.overrides).line;
|
|
11132
|
+
return runRender(scenarioPayloadJson(scenario, workdir, root), env2, term, clock, scenario.overrides).line;
|
|
11127
11133
|
} catch (e) {
|
|
11128
11134
|
return `preview unavailable: ${e instanceof Error ? e.message : String(e)}`;
|
|
11129
11135
|
}
|
|
@@ -13148,7 +13154,7 @@ function Dashboard(props) {
|
|
|
13148
13154
|
const activeIds = draft.character.mode === "fixed" ? [draft.character.name] : draft.character.roster.length > 0 ? draft.character.roster : packs;
|
|
13149
13155
|
const savePreviewChars = savePreviewSet(draft, installed, packs);
|
|
13150
13156
|
const saveCharIdxClamped = Math.min(saveCharIdx, savePreviewChars.length - 1);
|
|
13151
|
-
const saveCharName = savePreviewChars[saveCharIdxClamped] ?? "
|
|
13157
|
+
const saveCharName = savePreviewChars[saveCharIdxClamped] ?? "spiderman";
|
|
13152
13158
|
const selectCharacter = (id) => {
|
|
13153
13159
|
const ch = draft.character;
|
|
13154
13160
|
if (ch.mode === "fixed")
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ccsidekick",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"exports": {
|
|
@@ -54,6 +54,7 @@
|
|
|
54
54
|
"anthropic",
|
|
55
55
|
"statusline",
|
|
56
56
|
"status-line",
|
|
57
|
+
"claude-code-statusline",
|
|
57
58
|
"cli",
|
|
58
59
|
"ascii-art",
|
|
59
60
|
"tui",
|
|
@@ -62,18 +63,19 @@
|
|
|
62
63
|
"git",
|
|
63
64
|
"cost-tracking",
|
|
64
65
|
"token-usage",
|
|
66
|
+
"usage-tracking",
|
|
65
67
|
"developer-tools",
|
|
66
68
|
"coding-companion",
|
|
67
69
|
"character"
|
|
68
70
|
],
|
|
69
71
|
"license": "MIT",
|
|
70
|
-
"description": "
|
|
72
|
+
"description": "Free Claude Code status line with a reactive character plus cost, git, and usage widgets. Zero token spend, local-first, MIT.",
|
|
71
73
|
"repository": {
|
|
72
74
|
"type": "git",
|
|
73
75
|
"url": "git+https://github.com/krayong/ccsidekick.git",
|
|
74
76
|
"directory": "packages/core"
|
|
75
77
|
},
|
|
76
|
-
"homepage": "https://
|
|
78
|
+
"homepage": "https://ccsidekick.krayong.com",
|
|
77
79
|
"bugs": {
|
|
78
80
|
"url": "https://github.com/krayong/ccsidekick/issues"
|
|
79
81
|
},
|