@leo000001/opencode-quota-sidebar 2.0.5 → 2.0.6

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/dist/title.js CHANGED
@@ -11,6 +11,9 @@ function isCoreDecoratedDetail(line) {
11
11
  }
12
12
  if (/^Cache\s+(Read|Write)\s+\$?\d[\d.,]*[kKmM]?$/.test(line))
13
13
  return true;
14
+ if (/^Cache(?:\s+Read)?\s+Coverage\s+\d[\d.,]*(?:%|~)?$/.test(line)) {
15
+ return true;
16
+ }
14
17
  if (/^\$\S+\s+as API cost$/.test(line))
15
18
  return true;
16
19
  // Single-line compact mode compatibility.
@@ -20,6 +23,9 @@ function isCoreDecoratedDetail(line) {
20
23
  return true;
21
24
  if (/^C(?:ache\s*)?W(?:rite)?\s+\$?\d[\d.,]*[kKmM]?$/.test(line))
22
25
  return true;
26
+ if (/^C(?:ache(?:\s*R(?:ead)?)?)?\s*Coverage\s+\d[\d.,]*(?:%|~)?$/.test(line)) {
27
+ return true;
28
+ }
23
29
  return false;
24
30
  }
25
31
  function isSingleLineDecoratedPrefix(line) {
@@ -1,4 +1,4 @@
1
- import { canonicalizeTitle, canonicalizeTitleForCompare, looksDecorated, } from './title.js';
1
+ import { canonicalizeTitle, canonicalizeTitleForCompare, looksDecorated, normalizeBaseTitle, } from './title.js';
2
2
  import { swallow, debug, mapConcurrent } from './helpers.js';
3
3
  export function createTitleApplicator(deps) {
4
4
  const pendingAppliedTitle = new Map();
@@ -53,7 +53,7 @@ export function createTitleApplicator(deps) {
53
53
  }
54
54
  }
55
55
  else {
56
- const nextBase = canonicalizeTitle(currentTitle) || 'Session';
56
+ const nextBase = normalizeBaseTitle(currentTitle);
57
57
  if (sessionState.baseTitle !== nextBase) {
58
58
  sessionState.baseTitle = nextBase;
59
59
  stateMutated = true;
@@ -165,7 +165,7 @@ export function createTitleApplicator(deps) {
165
165
  return;
166
166
  }
167
167
  }
168
- args.sessionState.baseTitle = canonicalizeTitle(args.incomingTitle) || 'Session';
168
+ args.sessionState.baseTitle = normalizeBaseTitle(args.incomingTitle);
169
169
  args.sessionState.lastAppliedTitle = undefined;
170
170
  deps.markDirty(deps.state.sessionDateMap[args.sessionID]);
171
171
  deps.scheduleSave();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leo000001/opencode-quota-sidebar",
3
- "version": "2.0.5",
3
+ "version": "2.0.6",
4
4
  "description": "OpenCode plugin that shows quota and token usage in session titles",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",