context-carwash 0.1.0 → 0.1.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 +3 -3
- package/package.json +1 -1
- package/src/statusline/render.mjs +9 -5
- package/src/wash/brief.mjs +4 -4
package/README.md
CHANGED
|
@@ -31,16 +31,16 @@ Start a new Claude Code session afterwards. The first one explains the meter and
|
|
|
31
31
|
## The meter
|
|
32
32
|
|
|
33
33
|
```text
|
|
34
|
-
context ~136k [██████████░░░░░] /wash to compress & save context, then /clear
|
|
34
|
+
session context ~136k [██████████░░░░░] /wash to compress & save context, then /clear keeps compressed context
|
|
35
35
|
```
|
|
36
36
|
|
|
37
37
|
The number is how many tokens the conversation is using. It comes from Claude Code and is an estimate. The bar shows how close that is to the most the model's context window holds, and changes colour as it fills. From three quarters on, the meter also says so in words:
|
|
38
38
|
|
|
39
39
|
```text
|
|
40
|
-
context ~150k [███████████░░░░] getting full · /wash to compress & save context, then /clear
|
|
40
|
+
session context ~150k [███████████░░░░] getting full · /wash to compress & save context, then /clear keeps compressed context
|
|
41
41
|
```
|
|
42
42
|
|
|
43
|
-
Narrower windows show less
|
|
43
|
+
Narrower windows show less. The sentence shortens first: `/wash to compress & save context, then /clear` fits about half a Mac screen, `/wash to compress, then /clear` fits an 80-column window, and the narrowest windows show `/wash to compress`. Then the bar goes.
|
|
44
44
|
|
|
45
45
|
A full meter is information. It never triggers anything.
|
|
46
46
|
|
package/package.json
CHANGED
|
@@ -12,10 +12,13 @@ const FULL = 'getting full';
|
|
|
12
12
|
|
|
13
13
|
// What /wash does, said plainly. The levels and their caps are left to the
|
|
14
14
|
// command menu and /wash help, which show them when someone is choosing. The
|
|
15
|
-
//
|
|
15
|
+
// full form needs a wide window, the long one fits about half a Mac screen, and
|
|
16
|
+
// the middle one keeps the /clear step in an 80-column window, the Terminal.app
|
|
17
|
+
// default.
|
|
18
|
+
const HINT_FULL = '/wash to compress & save context, then /clear keeps compressed context';
|
|
16
19
|
const HINT_LONG = '/wash to compress & save context, then /clear';
|
|
17
20
|
const HINT_MID = '/wash to compress, then /clear';
|
|
18
|
-
const HINT_SHORT = '/wash
|
|
21
|
+
const HINT_SHORT = '/wash to compress';
|
|
19
22
|
|
|
20
23
|
const finite = (v) => (typeof v === 'number' && Number.isFinite(v) ? v : null);
|
|
21
24
|
|
|
@@ -97,7 +100,7 @@ export function render(payload, options = {}) {
|
|
|
97
100
|
// The reading is the tokens in use, and nothing else: a count is something
|
|
98
101
|
// people can picture, and the bar already shows how much of the window that
|
|
99
102
|
// is, so neither a percentage nor the window size is spelled out.
|
|
100
|
-
const usedSeg = `context ${used ? `~${formatTokens(used)}` : '--'}`;
|
|
103
|
+
const usedSeg = `session context ${used ? `~${formatTokens(used)}` : '--'}`;
|
|
101
104
|
const barSeg = bar(pct, depth, options.barStyle ?? 'ramp');
|
|
102
105
|
const caps = capLabels(used);
|
|
103
106
|
// Only while inviting a wash: once one is under way there is nothing to add.
|
|
@@ -112,8 +115,8 @@ export function render(payload, options = {}) {
|
|
|
112
115
|
candidates = [
|
|
113
116
|
[usedSeg, barSeg, `${ready}. Old session stays in /resume.`],
|
|
114
117
|
[usedSeg, barSeg, ready],
|
|
115
|
-
[usedSeg, barSeg, 'Brief ready ✓ ·
|
|
116
|
-
[usedSeg, 'Brief ready ✓ ·
|
|
118
|
+
[usedSeg, barSeg, 'Brief ready ✓ · /clear to start fresh'],
|
|
119
|
+
[usedSeg, 'Brief ready ✓ · /clear to start fresh'],
|
|
117
120
|
[usedSeg, 'Brief ready ✓'],
|
|
118
121
|
];
|
|
119
122
|
} else if (options.state?.washing) {
|
|
@@ -130,6 +133,7 @@ export function render(payload, options = {}) {
|
|
|
130
133
|
];
|
|
131
134
|
} else {
|
|
132
135
|
candidates = [
|
|
136
|
+
[usedSeg, barSeg, say(HINT_FULL)],
|
|
133
137
|
[usedSeg, barSeg, say(HINT_LONG)],
|
|
134
138
|
[usedSeg, barSeg, say(HINT_MID)],
|
|
135
139
|
[usedSeg, barSeg, say(HINT_SHORT)],
|
package/src/wash/brief.mjs
CHANGED
|
@@ -111,10 +111,10 @@ export function loadedMessage(record, now, stale) {
|
|
|
111
111
|
// Shown once, at the first session after install.
|
|
112
112
|
export function welcomeMessage() {
|
|
113
113
|
return [
|
|
114
|
-
'Context Carwash
|
|
115
|
-
'
|
|
116
|
-
'
|
|
117
|
-
'Nothing
|
|
114
|
+
'Context Carwash installed ✓ (shown once)',
|
|
115
|
+
' • Status line: tokens in use, and how full the context is',
|
|
116
|
+
' • Getting full? /wash, then /clear. You start fresh, right where you left off',
|
|
117
|
+
' • Nothing runs on its own · /wash help for options',
|
|
118
118
|
].join('\n');
|
|
119
119
|
}
|
|
120
120
|
|