@staff0rd/assist 0.377.0 → 0.378.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/claude/commands/bug.md +1 -1
- package/claude/commands/draft.md +1 -1
- package/dist/commands/sessions/web/bundle.js +103 -103
- package/dist/index.js +15 -7
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import { Command } from "commander";
|
|
|
6
6
|
// package.json
|
|
7
7
|
var package_default = {
|
|
8
8
|
name: "@staff0rd/assist",
|
|
9
|
-
version: "0.
|
|
9
|
+
version: "0.378.0",
|
|
10
10
|
type: "module",
|
|
11
11
|
main: "dist/index.js",
|
|
12
12
|
bin: {
|
|
@@ -22490,7 +22490,9 @@ function toSessionInfo({
|
|
|
22490
22490
|
error,
|
|
22491
22491
|
activity: activity2,
|
|
22492
22492
|
autoRun,
|
|
22493
|
-
autoAdvance
|
|
22493
|
+
autoAdvance,
|
|
22494
|
+
totalIn,
|
|
22495
|
+
totalOut
|
|
22494
22496
|
}) {
|
|
22495
22497
|
return {
|
|
22496
22498
|
id,
|
|
@@ -22510,7 +22512,9 @@ function toSessionInfo({
|
|
|
22510
22512
|
error,
|
|
22511
22513
|
activity: activity2,
|
|
22512
22514
|
autoRun,
|
|
22513
|
-
autoAdvance
|
|
22515
|
+
autoAdvance,
|
|
22516
|
+
totalIn,
|
|
22517
|
+
totalOut
|
|
22514
22518
|
};
|
|
22515
22519
|
}
|
|
22516
22520
|
|
|
@@ -22951,11 +22955,14 @@ async function persistPhaseTokens(itemId2, phaseIdx, totalIn, totalOut) {
|
|
|
22951
22955
|
function recordSessionUsage(sessions, claudeSessionId, totalIn, totalOut) {
|
|
22952
22956
|
for (const session of sessions) {
|
|
22953
22957
|
if (session.claudeSessionId !== claudeSessionId) continue;
|
|
22958
|
+
session.totalIn = totalIn;
|
|
22959
|
+
session.totalOut = totalOut;
|
|
22954
22960
|
const phase = sessionBacklogPhase(session);
|
|
22955
22961
|
if (phase)
|
|
22956
22962
|
void persistPhaseTokens(phase.itemId, phase.phaseIdx, totalIn, totalOut);
|
|
22957
|
-
return;
|
|
22963
|
+
return true;
|
|
22958
22964
|
}
|
|
22965
|
+
return false;
|
|
22959
22966
|
}
|
|
22960
22967
|
|
|
22961
22968
|
// src/commands/sessions/daemon/watchActivity.ts
|
|
@@ -24231,12 +24238,13 @@ var SessionManager = class {
|
|
|
24231
24238
|
/* why: the status line relays token totals keyed by Claude's session id; join
|
|
24232
24239
|
* it to the running backlog phase so the spend accumulates against that row. */
|
|
24233
24240
|
recordUsage(claudeSessionId, totalIn, totalOut) {
|
|
24234
|
-
recordSessionUsage(
|
|
24241
|
+
if (recordSessionUsage(
|
|
24235
24242
|
this.sessions.values(),
|
|
24236
24243
|
claudeSessionId,
|
|
24237
24244
|
totalIn,
|
|
24238
24245
|
totalOut
|
|
24239
|
-
)
|
|
24246
|
+
))
|
|
24247
|
+
this.notify();
|
|
24240
24248
|
}
|
|
24241
24249
|
listSessions = () => {
|
|
24242
24250
|
const local = [...this.sessions.values()].map(toSessionInfo);
|
|
@@ -25211,7 +25219,7 @@ async function statusLine() {
|
|
|
25211
25219
|
const branch2 = dir ? readGitBranch(windowsCwdToWslPath(dir)) : null;
|
|
25212
25220
|
const branchSegment = branch2 ? `\u{1F33F}\uFE0F ${chalk195.cyan(branch2)} | ` : "";
|
|
25213
25221
|
console.log(
|
|
25214
|
-
`${branchSegment}${model} | Tokens - ${formatNumber(
|
|
25222
|
+
`${branchSegment}${model} | Tokens - ${formatNumber(totalIn)} \u2191 : ${formatNumber(totalOut)} \u2193 | Context - ${colorizePercent(usedPct)}${buildLimitsSegment(data.rate_limits)}`
|
|
25215
25223
|
);
|
|
25216
25224
|
await relayRateLimits(data.rate_limits);
|
|
25217
25225
|
await relayUsage(data.session_id, totalIn, totalOut);
|