ccakashic 0.2.0 → 0.2.1
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 +11 -4
- package/lib/html-generator.js +9 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
An Akashic Record of your Claude Code sessions — browse Claude Code session logs (`~/.claude/projects/`) as beautiful HTML in your browser.
|
|
4
4
|
|
|
5
|
+

|
|
6
|
+
|
|
7
|
+

|
|
8
|
+
|
|
5
9
|
## Usage
|
|
6
10
|
|
|
7
11
|
### npx
|
|
@@ -23,13 +27,16 @@ A local HTTP server starts and your browser opens automatically.
|
|
|
23
27
|
## Features
|
|
24
28
|
|
|
25
29
|
- **Fully browser-based** — Project list → Session list → Conversation detail
|
|
26
|
-
- **Chat-style layout** — User / assistant messages in bubbles
|
|
27
|
-
- **Collapsible tool calls** — Bash, Read, Edit, and other tool invocations
|
|
30
|
+
- **Chat-style layout** — User / assistant messages in chat bubbles
|
|
31
|
+
- **Collapsible tool calls** — Bash, Read, Edit, and other tool invocations collapsed by default
|
|
28
32
|
- **Diff view** — File edits shown with red/green line highlights
|
|
29
33
|
- **Date navigation** — Side nav and sticky headers to jump between dates
|
|
30
|
-
- **
|
|
34
|
+
- **Cost estimation** — Per-turn and per-message USD cost based on Claude Opus 4 pricing (input / output / cache read / cache write breakdown)
|
|
35
|
+
- **Elapsed time** — Per-turn duration and per-tool execution time derived from timestamps
|
|
36
|
+
- **Local command display** — `!` shell commands rendered with prompt and output
|
|
31
37
|
- **Inline subagent conversations** — Subagent dialogues nested inside the Agent tool_use that spawned them
|
|
32
|
-
- **Permalinks** — Click any message timestamp to get a shareable URL
|
|
38
|
+
- **Permalinks** — Click any message timestamp to get a shareable URL (`#t20260416103045`)
|
|
39
|
+
- **Session-level stats** — Estimated cost, turns, token breakdown, cache hit rate, and duration in the header
|
|
33
40
|
- **Dark mode** — Follows `prefers-color-scheme` automatically
|
|
34
41
|
- **Filter search** — Incremental filtering on list pages
|
|
35
42
|
- **Keyboard navigation** — `j` / `k` to move between messages
|
package/lib/html-generator.js
CHANGED
|
@@ -142,8 +142,10 @@ function renderMessage(msg) {
|
|
|
142
142
|
|
|
143
143
|
function makeItemBadge(m) {
|
|
144
144
|
const parts = [];
|
|
145
|
-
|
|
146
|
-
|
|
145
|
+
const c = m.usage
|
|
146
|
+
? calcCost(m.usage.input_tokens || 0, m.usage.output_tokens || 0, m.usage.cache_read_input_tokens || 0, m.usage.cache_creation_input_tokens || 0)
|
|
147
|
+
: null;
|
|
148
|
+
if (c) {
|
|
147
149
|
parts.push(`${c.totalStr}`);
|
|
148
150
|
}
|
|
149
151
|
if (m.execMs) {
|
|
@@ -152,7 +154,7 @@ function renderMessage(msg) {
|
|
|
152
154
|
parts.push(`${formatDuration(m.elapsedMs)}`);
|
|
153
155
|
}
|
|
154
156
|
if (!parts.length) return '';
|
|
155
|
-
const detail =
|
|
157
|
+
const detail = c ? ` <span class="usage-detail">(in:${c.inStr} out:${c.outStr} cache-r:${c.crStr} cache-w:${c.cwStr})</span>` : '';
|
|
156
158
|
return `<span class="item-usage">${parts.join(' | ')}${detail}</span>`;
|
|
157
159
|
}
|
|
158
160
|
|
|
@@ -274,10 +276,10 @@ function calcCost(input, output, cacheRead, cacheWrite) {
|
|
|
274
276
|
const total = inCost + outCost + crCost + cwCost;
|
|
275
277
|
return {
|
|
276
278
|
totalStr: formatCost(total),
|
|
277
|
-
inStr:
|
|
278
|
-
outStr:
|
|
279
|
-
crStr:
|
|
280
|
-
cwStr:
|
|
279
|
+
inStr: formatTokens(input),
|
|
280
|
+
outStr: formatTokens(output),
|
|
281
|
+
crStr: formatTokens(cacheRead),
|
|
282
|
+
cwStr: formatTokens(cacheWrite),
|
|
281
283
|
};
|
|
282
284
|
}
|
|
283
285
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ccakashic",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Browse Claude Code session logs (~/.claude/projects/) as beautiful HTML in your browser — an Akashic Record of your Claude Code sessions",
|
|
5
5
|
"bin": {
|
|
6
6
|
"ccakashic": "bin/ccakashic.js"
|