@delt/claude-jev-advisor 0.4.0 β†’ 0.4.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 CHANGED
@@ -72,12 +72,12 @@ With the mod display (the default):
72
72
  |---|---|---|
73
73
  | Under 250k, or no judgment (no key, Jev unreachable) | `52k +12k` | |
74
74
  | Work in progress | `🟒 312k +38k` | |
75
- | A whole stage closed (from 250k) | `312k +38k` | `🟑 μƒˆλ‘­κ²Œ μ‹œμž‘ν•˜λŠ” 건 μ–΄λ– μ„Έμš”?` and a `/clear` button |
76
- | Work finished, stage goes on (from 250k) | `312k +38k` | `🟑 μ§€κΈˆκΉŒμ§€ μ •λ¦¬ν•˜κ³  μ΄μ–΄κ°€λŠ” 건 μ–΄λ– μ„Έμš”?` and a `/compact` button |
77
- | Within 20% of auto-compact, with one of the two above | `790k +38k` | `πŸ”΄ 18%`, the advice and its button |
75
+ | A whole stage closed (from 250k) | `312k +38k` | `🟑 312k +38k μƒˆλ‘­κ²Œ μ‹œμž‘ν•˜λŠ” 건 μ–΄λ– μ„Έμš”?` and a `/clear` button |
76
+ | Work finished, stage goes on (from 250k) | `312k +38k` | `🟑 312k +38k μ§€κΈˆκΉŒμ§€ μ •λ¦¬ν•˜κ³  μ΄μ–΄κ°€λŠ” 건 μ–΄λ– μ„Έμš”?` and a `/compact` button |
77
+ | Within 20% of auto-compact, with one of the two above | `790k +38k` | `πŸ”΄ 790k +38k 18%`, the advice and its button |
78
78
  | Within 20% of auto-compact otherwise | `πŸ”΄ 790k +38k 18%`, then ` Β· μž‘μ—…μ΄ λλ‚˜λ©΄ μ •λ¦¬ν•˜κ³  μ΄μ–΄κ°€λŠ” 건 μ–΄λ– μ„Έμš”? /compact` while the work is still going | |
79
79
 
80
- `+38k` is how much the conversation grew in the last request, counted from when it was sent. It is left out when the conversation did not grow, for example after a `/compact`. The `statusline` and `message` displays show the whole advice on one line instead, without the increase: `🟑 312k μƒˆλ‘­κ²Œ μ‹œμž‘ν•˜λŠ” 건 μ–΄λ– μ„Έμš”? /clear` and so on.
80
+ `+38k` is how much the conversation grew in the last request, counted from when it was sent. It is left out when the conversation did not grow, for example after a `/compact`. The band repeats the size so you need not look down for it while it is up; the bottom row keeps it too, so it never moves. The `statusline` and `message` displays show the whole advice on one line instead, without the increase: `🟑 312k μƒˆλ‘­κ²Œ μ‹œμž‘ν•˜λŠ” 건 μ–΄λ– μ„Έμš”? /clear` and so on.
81
81
 
82
82
  The button runs `/compact` or `/clear` at once; a `/clear` can be undone with `/resume`. Click it, press `ctrl+x ctrl+f`, or press `ctrl+x tab` and then Enter. It is not drawn while a request runs or while Claude Code waits for your answer to a question, and once pressed it stays away until Jev judges a newer reply. A refused `/compact` (too few messages, for example) shows the reason in a toast.
83
83
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jev-advisor",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "Bottom-row compact/clear advice and an advice button from @delt/claude-jev-advisor (unofficial)",
5
5
  "author": { "name": "delt96" },
6
6
  "userConfig": {
@@ -125,9 +125,10 @@ var SHORTCUT_ACTION = "diff:back";
125
125
 
126
126
  // src/mod/band.ts
127
127
  var ICONS = { compact: "\u{1F4E6}", clear: "\u{1F9F9}" };
128
- function drawBand(ui, { advice, config, onPress }) {
128
+ function drawBand(ui, { advice, config, onPress, size, increase }) {
129
129
  const { Box, Text, Button } = ui;
130
- const head = advice.remainingPct === null ? "\u{1F7E1}" : `\u{1F534} ${advice.remainingPct}%`;
130
+ const k = `${formatSize(size)}${increaseSuffix(increase)}`;
131
+ const head = advice.remainingPct === null ? `\u{1F7E1} ${k}` : `\u{1F534} ${k} ${advice.remainingPct}%`;
131
132
  const controls = [
132
133
  h(Button, {
133
134
  key: `jev-${advice.kind}`,
@@ -225,6 +226,7 @@ function register(on, options) {
225
226
  let baseline = null;
226
227
  let seen = "";
227
228
  let handledAt = -Infinity;
229
+ const increaseTo = (size) => baseline !== null && size !== null ? size - baseline : null;
228
230
  const judgmentFor = (size) => state && state.at <= handledAt ? null : usableJudgment(state, size, turnStartedAt);
229
231
  on("session.start", async ($, e, next) => {
230
232
  const result = await next(e);
@@ -278,8 +280,7 @@ function register(on, options) {
278
280
  const current = config;
279
281
  if (current && current.context.enabled && current.display === "mod") {
280
282
  const size = await liveSize($);
281
- const increase = baseline !== null && size !== null ? size - baseline : null;
282
- tail = modTail({ size, threshold, judgment: judgmentFor(size), config: current, increase });
283
+ tail = modTail({ size, threshold, judgment: judgmentFor(size), config: current, increase: increaseTo(size) });
283
284
  }
284
285
  } catch {
285
286
  tail = "";
@@ -295,7 +296,7 @@ function register(on, options) {
295
296
  const size = await liveSize($);
296
297
  const advice = bandAdvice({ size, threshold, judgment: judgmentFor(size), config: current });
297
298
  const at = state?.at;
298
- if (advice && at !== void 0) band = drawBand($.ui.resolve(e), { advice, config: current, onPress: () => {
299
+ if (advice && at !== void 0 && size !== null) band = drawBand($.ui.resolve(e), { advice, config: current, size, increase: increaseTo(size), onPress: () => {
299
300
  if (at <= handledAt) return;
300
301
  handledAt = at;
301
302
  void press($, advice.kind);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@delt/claude-jev-advisor",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "Unofficial Claude Code helpers using TypeSafe Jev: compact/clear advice and an rm guard",
5
5
  "type": "module",
6
6
  "bin": {