koneck 2.128.48 → 2.128.49
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/config-store.d.ts +2 -2
- package/dist/config-store.d.ts.map +1 -1
- package/dist/config-store.js +12 -12
- package/dist/config-store.js.map +1 -1
- package/dist/engine.d.ts.map +1 -1
- package/dist/engine.js +6 -1
- package/dist/engine.js.map +1 -1
- package/dist/glyphs.d.ts +3 -0
- package/dist/glyphs.d.ts.map +1 -1
- package/dist/glyphs.js +5 -0
- package/dist/glyphs.js.map +1 -1
- package/dist/ink-chat.d.ts.map +1 -1
- package/dist/ink-chat.js +220 -31
- package/dist/ink-chat.js.map +1 -1
- package/dist/markdown-ink.d.ts +26 -3
- package/dist/markdown-ink.d.ts.map +1 -1
- package/dist/markdown-ink.js +36 -2
- package/dist/markdown-ink.js.map +1 -1
- package/dist/status-line.d.ts +87 -0
- package/dist/status-line.d.ts.map +1 -0
- package/dist/status-line.js +99 -0
- package/dist/status-line.js.map +1 -0
- package/dist/types.d.ts +7 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/web/api.d.ts.map +1 -1
- package/dist/web/api.js +9 -0
- package/dist/web/api.js.map +1 -1
- package/dist/web/events.d.ts +12 -0
- package/dist/web/events.d.ts.map +1 -1
- package/dist/web/events.js.map +1 -1
- package/dist/web/sessions.d.ts +35 -0
- package/dist/web/sessions.d.ts.map +1 -1
- package/dist/web/sessions.js +96 -2
- package/dist/web/sessions.js.map +1 -1
- package/dist/web/ui-client.d.ts.map +1 -1
- package/dist/web/ui-client.js +59 -1
- package/dist/web/ui-client.js.map +1 -1
- package/dist/web/ui-css.d.ts.map +1 -1
- package/dist/web/ui-css.js +33 -4
- package/dist/web/ui-css.js.map +1 -1
- package/dist/web/ui.d.ts.map +1 -1
- package/dist/web/ui.js +13 -1
- package/dist/web/ui.js.map +1 -1
- package/package.json +1 -1
package/dist/glyphs.js
CHANGED
|
@@ -26,6 +26,8 @@ const UNICODE = {
|
|
|
26
26
|
search: '⌕',
|
|
27
27
|
left: '←',
|
|
28
28
|
right: '→',
|
|
29
|
+
up: '↑',
|
|
30
|
+
down: '↓',
|
|
29
31
|
spinner: ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏'],
|
|
30
32
|
ascii: false,
|
|
31
33
|
};
|
|
@@ -39,6 +41,9 @@ const ASCII = {
|
|
|
39
41
|
search: '/',
|
|
40
42
|
left: '<',
|
|
41
43
|
right: '>',
|
|
44
|
+
// Letters rather than ^ and v alone, which read as punctuation beside "choose".
|
|
45
|
+
up: 'up',
|
|
46
|
+
down: 'down',
|
|
42
47
|
spinner: ['|', '/', '-', '\\'],
|
|
43
48
|
ascii: true,
|
|
44
49
|
};
|
package/dist/glyphs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"glyphs.js","sourceRoot":"","sources":["../src/glyphs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;
|
|
1
|
+
{"version":3,"file":"glyphs.js","sourceRoot":"","sources":["../src/glyphs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAgCH,MAAM,OAAO,GAAa;IACxB,2FAA2F;IAC3F,0FAA0F;IAC1F,6FAA6F;IAC7F,wFAAwF;IACxF,aAAa;IACb,KAAK,EAAE,IAAI;IACX,KAAK,EAAE,GAAG;IACV,EAAE,EAAE,GAAG;IACP,IAAI,EAAE,GAAG;IACT,QAAQ,EAAE,GAAG;IACb,MAAM,EAAE,GAAG;IACX,IAAI,EAAE,GAAG;IACT,KAAK,EAAE,GAAG;IACV,EAAE,EAAE,GAAG;IACP,IAAI,EAAE,GAAG;IACT,OAAO,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;IAC3D,KAAK,EAAE,KAAK;CACb,CAAC;AAEF,MAAM,KAAK,GAAa;IACtB,iGAAiG;IACjG,KAAK,EAAE,IAAI;IACX,KAAK,EAAE,GAAG;IACV,EAAE,EAAE,GAAG;IACP,IAAI,EAAE,GAAG;IACT,QAAQ,EAAE,KAAK;IACf,MAAM,EAAE,GAAG;IACX,IAAI,EAAE,GAAG;IACT,KAAK,EAAE,GAAG;IACV,gFAAgF;IAChF,EAAE,EAAE,IAAI;IACR,IAAI,EAAE,MAAM;IACZ,OAAO,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC;IAC9B,KAAK,EAAE,IAAI;CACZ,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,UAAU,UAAU,CACxB,WAAmB,OAAO,CAAC,QAAQ,EACnC,WAA+B,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,EAC3D,OAA2B,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC;IAE9C,IAAI,QAAQ,KAAK,OAAO;QAAE,OAAO,KAAK,CAAC;IACvC,IAAI,QAAQ,KAAK,SAAS;QAAE,OAAO,OAAO,CAAC;IAC3C,IAAI,IAAI,KAAK,MAAM;QAAE,OAAO,KAAK,CAAC;IAClC,OAAO,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC;AAChD,CAAC;AAED,MAAM,CAAC,MAAM,CAAC,GAAa,UAAU,EAAE,CAAC"}
|
package/dist/ink-chat.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ink-chat.d.ts","sourceRoot":"","sources":["../src/ink-chat.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ink-chat.d.ts","sourceRoot":"","sources":["../src/ink-chat.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AA8B3D,OAAO,EAAyB,KAAK,QAAQ,EAAE,MAAM,g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;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAC1E;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAMjC;AAED,wBAAgB,GAAG,CAAC,EAAE,MAAM,EAAE,aAAa,EAAE,UAAU,EAAE,kBAA0B,EAAE,EACxE;IAAE,MAAM,EAAE,WAAW,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IAC7C,oEAAoE;IACpE,kBAAkB,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAw0MhE;AAED,wBAAsB,cAAc,CAAC,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAmFvE"}
|
package/dist/ink-chat.js
CHANGED
|
@@ -9,7 +9,7 @@ import { pacedInterval, startingInterval, floorFor, shouldDrawFrame } from './fr
|
|
|
9
9
|
import { estimateCost, formatCost, rateText } from './pricing.js';
|
|
10
10
|
import { generateSessionId, saveSession, listSessions, loadSession, relativeAge, renameSession, forkSession, archiveSession, findSession, } from './session.js';
|
|
11
11
|
import { loadMemory } from './memory.js';
|
|
12
|
-
import { loadKoneckConfig, saveKoneckConfig, setConfigKey, configKeyDescriptions, CONFIG_FILE, CONFIG_SCHEMA, stepValue, displayValue, settingsWindow } from './config-store.js';
|
|
12
|
+
import { loadKoneckConfig as loadConfigAt, saveKoneckConfig as saveConfigAt, setConfigKey as setConfigKeyAt, configKeyDescriptions, CONFIG_FILE, CONFIG_SCHEMA, stepValue, displayValue, settingsWindow } from './config-store.js';
|
|
13
13
|
import { PROVIDERS, resolveProvider, getApiKey, addUserProvider, removeUserProvider, userProvidersPath, keyEnvFor, BUILT_INS as BUILT_IN_PROVIDERS, servesLocally, servesOwnWeights, endpointForProvider } from './providers.js';
|
|
14
14
|
import { normaliseEndpoint, withEndpoint, savedEndpoints, shortSource, resolveModelChoice, withModel } from './endpoints.js';
|
|
15
15
|
import { loadProjectConfig, loadGlobalConfig, saveGlobalConfig, withoutStoredApiKey } from './config.js';
|
|
@@ -50,6 +50,8 @@ import { MODES as MODE_SPECS, modeSpec, decide, loadRules, saveRules, addRule, c
|
|
|
50
50
|
import { AskQueue } from './ask-queue.js';
|
|
51
51
|
import { contextLimitWithSource } from './context-limit.js';
|
|
52
52
|
import { planSummary } from './plan.js';
|
|
53
|
+
import os from 'node:os';
|
|
54
|
+
import { modeLine, nextMode, statusFacts, barCells, PLACEHOLDER } from './status-line.js';
|
|
53
55
|
import { savePlan, plansDir, PLAN_CHOICES, PROCEED_PROMPT } from './plan-file.js';
|
|
54
56
|
import { logoFor } from './logo.js';
|
|
55
57
|
import { describeActivity } from './activity.js';
|
|
@@ -74,6 +76,21 @@ const AMBER = '#F6C453';
|
|
|
74
76
|
const MUTED = '#9AAAB2';
|
|
75
77
|
const INK = '#F4F1EA';
|
|
76
78
|
const DIM = '#5C717A';
|
|
79
|
+
/**
|
|
80
|
+
* Text drawn on a CYAN background: how KONECK marks the thing that is selected.
|
|
81
|
+
*
|
|
82
|
+
* One value for the command palette's highlighted row and the usage pane's selected tab and row, so
|
|
83
|
+
* a selection looks the same wherever it appears.
|
|
84
|
+
*/
|
|
85
|
+
const ON_ACCENT = '#10222A';
|
|
86
|
+
/** Plan mode's colour: read-only, so neither the warning of amber nor the go of green. */
|
|
87
|
+
const VIOLET = '#B8A2F0';
|
|
88
|
+
/** The context bar's two cells, normal and past the point compaction fires. */
|
|
89
|
+
const BAR_ON = '#8A9BA3', BAR_OFF = '#2B373D', BAR_HOT_ON = '#E8878D', BAR_HOT_OFF = '#4A2B30';
|
|
90
|
+
/** The shared tones, in this terminal's shades. The browser maps the same names onto its theme. */
|
|
91
|
+
const TONE = {
|
|
92
|
+
amber: '#F6C453', cyan: '#54D7E7', green: '#9BCB8F', violet: VIOLET, red: '#E8878D', muted: '#9AAAB2',
|
|
93
|
+
};
|
|
77
94
|
// Diff colours. Deliberately not terminal green/red: those clash with the warm palette and read
|
|
78
95
|
// as errors. These are the existing accents lifted a little, over bands dark enough to sit on a
|
|
79
96
|
// black terminal without glowing.
|
|
@@ -1720,6 +1737,21 @@ export function App({ config: initialConfig, clearFrame, synchronizedFrames = fa
|
|
|
1720
1737
|
// Tool approval callbacks belong to a session created on an earlier render. Keep the control
|
|
1721
1738
|
// posture live so turning approval on during a turn governs its next consequential tool call.
|
|
1722
1739
|
const cfgRef = useRef(initialConfig);
|
|
1740
|
+
/*
|
|
1741
|
+
* The settings file this session reads and writes: its own state home, when it was given one.
|
|
1742
|
+
*
|
|
1743
|
+
* `stateHome` exists so a session can keep its files somewhere other than ~/.koneck — the tests
|
|
1744
|
+
* rely on it to touch nothing real — and every call in here ignored it. So a test that typed /diff
|
|
1745
|
+
* saved `diffPanel: false` into the developer's own ~/.koneck/config.json, on every run of the
|
|
1746
|
+
* suite, turning their file-changes panel off behind their back. Confirmed by the file's timestamp
|
|
1747
|
+
* moving each time that one test ran.
|
|
1748
|
+
*
|
|
1749
|
+
* Bound here under the names the rest of this component already uses, so all thirty-odd calls
|
|
1750
|
+
* honour it without each having to remember to — which is the kind of remembering that failed.
|
|
1751
|
+
*/
|
|
1752
|
+
const loadKoneckConfig = () => loadConfigAt(cfgRef.current.stateHome);
|
|
1753
|
+
const saveKoneckConfig = (c) => saveConfigAt(c, cfgRef.current.stateHome);
|
|
1754
|
+
const setConfigKey = (key, value) => setConfigKeyAt(key, value, cfgRef.current.stateHome);
|
|
1723
1755
|
// Live activity accumulates in a ref and is painted by the FRAME_MS ticker. Mutating a ref
|
|
1724
1756
|
// instead of calling setState per token keeps a Raspberry Pi from re-rendering on every chunk.
|
|
1725
1757
|
const sayRef = useRef(''); // narration not yet committed
|
|
@@ -2015,6 +2047,8 @@ export function App({ config: initialConfig, clearFrame, synchronizedFrames = fa
|
|
|
2015
2047
|
}
|
|
2016
2048
|
/** The endpoint's answer wins over a catalogue or name-based reference. */
|
|
2017
2049
|
const [detectedContext, setDetectedContext] = useState(null);
|
|
2050
|
+
/** The last request's size and the window the engine compacts at — see onContextFill. */
|
|
2051
|
+
const [ctxFill, setCtxFill] = useState(null);
|
|
2018
2052
|
const sessionOpts = {
|
|
2019
2053
|
approve: approveTool,
|
|
2020
2054
|
onPlan: (next) => {
|
|
@@ -2066,7 +2100,12 @@ export function App({ config: initialConfig, clearFrame, synchronizedFrames = fa
|
|
|
2066
2100
|
thinkingTextRef.current = '';
|
|
2067
2101
|
charsRef.current = 0;
|
|
2068
2102
|
},
|
|
2069
|
-
onToolResult: (name, ok, ms, detail) =>
|
|
2103
|
+
onToolResult: (name, ok, ms, detail) => {
|
|
2104
|
+
finishTool(name, ok, ms, detail);
|
|
2105
|
+
// A file just changed, so the footer's +added −removed has too.
|
|
2106
|
+
if (ok && FILE_WRITING_TOOLS.has(name))
|
|
2107
|
+
refreshDelta();
|
|
2108
|
+
},
|
|
2070
2109
|
onToolOutput: (_name, line) => {
|
|
2071
2110
|
// Written to the ref rather than to state: a dev server logs a request every second or two,
|
|
2072
2111
|
// and a setState per line re-rendered the interface on each one. The ticker paints whatever
|
|
@@ -2143,6 +2182,7 @@ export function App({ config: initialConfig, clearFrame, synchronizedFrames = fa
|
|
|
2143
2182
|
},
|
|
2144
2183
|
onAgentProgress: (list) => { agentsRef.current = list; setAgents(list); },
|
|
2145
2184
|
onWindowDetected: (limit, source) => setDetectedContext({ limit, source }),
|
|
2185
|
+
onContextFill: (tokens, limit) => setCtxFill({ tokens, limit }),
|
|
2146
2186
|
/*
|
|
2147
2187
|
* A setting the server will not honour, said out loud.
|
|
2148
2188
|
*
|
|
@@ -3218,7 +3258,46 @@ export function App({ config: initialConfig, clearFrame, synchronizedFrames = fa
|
|
|
3218
3258
|
}, []);
|
|
3219
3259
|
// The tree as it stood before the session touched anything. Recorded once, so "code changes"
|
|
3220
3260
|
// stays a comparison against the starting point however long the session runs.
|
|
3221
|
-
useEffect(() => {
|
|
3261
|
+
useEffect(() => {
|
|
3262
|
+
void snapshotTree(cfg.cwd).then(t => {
|
|
3263
|
+
baseTreeRef.current = t;
|
|
3264
|
+
// Nothing has changed yet at the moment of the snapshot; outside git there is nothing to count.
|
|
3265
|
+
setUsageDiff(t ? { added: 0, removed: 0, files: 0 } : null);
|
|
3266
|
+
});
|
|
3267
|
+
}, [cfg.cwd]);
|
|
3268
|
+
/*
|
|
3269
|
+
* The footer's +added −removed, refreshed when files may have changed rather than on a timer.
|
|
3270
|
+
*
|
|
3271
|
+
* diffStatSince snapshots the tree and diffs it, which is not free in a large repository, so a
|
|
3272
|
+
* burst of edits costs two refreshes rather than one each: the first runs at once, and anything
|
|
3273
|
+
* in the next few seconds is folded into a single one at the end of that window.
|
|
3274
|
+
*/
|
|
3275
|
+
const deltaTimerRef = useRef(null);
|
|
3276
|
+
const deltaLastRef = useRef(0);
|
|
3277
|
+
function refreshDelta() {
|
|
3278
|
+
const run = () => {
|
|
3279
|
+
deltaLastRef.current = Date.now();
|
|
3280
|
+
// A refresh that comes back empty keeps the last figure: git can refuse a snapshot while
|
|
3281
|
+
// another is writing its index, and a transient refusal is not "outside a repository" —
|
|
3282
|
+
// that is decided once, by the snapshot taken at startup.
|
|
3283
|
+
void diffStatSince(cfgRef.current.cwd, baseTreeRef.current)
|
|
3284
|
+
.then(d => { if (d)
|
|
3285
|
+
setUsageDiff(d); })
|
|
3286
|
+
.catch(() => { });
|
|
3287
|
+
};
|
|
3288
|
+
const wait = 4_000 - (Date.now() - deltaLastRef.current);
|
|
3289
|
+
if (wait <= 0) {
|
|
3290
|
+
run();
|
|
3291
|
+
return;
|
|
3292
|
+
}
|
|
3293
|
+
if (deltaTimerRef.current)
|
|
3294
|
+
return;
|
|
3295
|
+
deltaTimerRef.current = setTimeout(() => { deltaTimerRef.current = null; run(); }, wait);
|
|
3296
|
+
}
|
|
3297
|
+
useEffect(() => () => { if (deltaTimerRef.current)
|
|
3298
|
+
clearTimeout(deltaTimerRef.current); }, []);
|
|
3299
|
+
// A new model is a new window, and a figure measured against the old one would mislead.
|
|
3300
|
+
useEffect(() => { setCtxFill(null); }, [cfg.model, cfg.provider]);
|
|
3222
3301
|
const addRow = (row) => setRows(prev => [...prev, row]);
|
|
3223
3302
|
const addSystem = (text) => addRow({ role: 'system', text });
|
|
3224
3303
|
/** Stops the in-flight turn without touching anything the developer is composing or queued. */
|
|
@@ -6207,10 +6286,9 @@ export function App({ config: initialConfig, clearFrame, synchronizedFrames = fa
|
|
|
6207
6286
|
}
|
|
6208
6287
|
// Shift+Tab → cycle mode
|
|
6209
6288
|
if (key.shift && key.tab) {
|
|
6210
|
-
|
|
6211
|
-
|
|
6212
|
-
|
|
6213
|
-
});
|
|
6289
|
+
// The same order the mode line's hint names, from the one place it is decided — so
|
|
6290
|
+
// "Shift+Tab to Accept Edits" is exactly where this goes, here and in the browser.
|
|
6291
|
+
setMode(prev => nextMode(prev));
|
|
6214
6292
|
return;
|
|
6215
6293
|
}
|
|
6216
6294
|
if (key.ctrl && input.toLowerCase() === 'v') {
|
|
@@ -6625,6 +6703,7 @@ export function App({ config: initialConfig, clearFrame, synchronizedFrames = fa
|
|
|
6625
6703
|
// whichever of those three happened last, which for anyone who closes the terminal
|
|
6626
6704
|
// normally was an old snapshot — the reported "always resumes the old one".
|
|
6627
6705
|
void doSave().catch(() => { });
|
|
6706
|
+
refreshDelta();
|
|
6628
6707
|
// A run that stopped short says so, rather than letting the footer imply it finished.
|
|
6629
6708
|
if (incompleteRef.current) {
|
|
6630
6709
|
addSystem(incompleteRef.current);
|
|
@@ -6666,6 +6745,7 @@ export function App({ config: initialConfig, clearFrame, synchronizedFrames = fa
|
|
|
6666
6745
|
liveToolRef.current = null;
|
|
6667
6746
|
flushAgents();
|
|
6668
6747
|
void doSave().catch(() => { });
|
|
6748
|
+
refreshDelta();
|
|
6669
6749
|
setRows(prev => [
|
|
6670
6750
|
...prev,
|
|
6671
6751
|
...(trailing ? [{ role: 'steps', steps: [{ kind: 'say', text: trailing }] }] : []),
|
|
@@ -7033,7 +7113,21 @@ export function App({ config: initialConfig, clearFrame, synchronizedFrames = fa
|
|
|
7033
7113
|
const width = Math.min(barWidth, usagePane === 'settings' ? 96 : 66);
|
|
7034
7114
|
const inner = width - 4;
|
|
7035
7115
|
const BAR_W = Math.max(12, inner - 14);
|
|
7036
|
-
|
|
7116
|
+
/*
|
|
7117
|
+
* The selected tab is a filled chip; the rest are quiet.
|
|
7118
|
+
*
|
|
7119
|
+
* It used to be the same word in bold, in the same colour as its neighbours — reported as
|
|
7120
|
+
* "the selected tab must indicate that it has been selected, not to look like the others",
|
|
7121
|
+
* which was fair: bold alone does not read as a state. The chip is the same CYAN-on-dark
|
|
7122
|
+
* the command palette uses for its highlighted row, so selection looks alike everywhere.
|
|
7123
|
+
*/
|
|
7124
|
+
const tabs = USAGE_TABS.flatMap((t, i) => {
|
|
7125
|
+
const label = ` ${t[0].toUpperCase() + t.slice(1)} `;
|
|
7126
|
+
const chip = t === usagePane
|
|
7127
|
+
? { text: label, bg: CYAN, color: ON_ACCENT, bold: true }
|
|
7128
|
+
: { text: label, color: MUTED };
|
|
7129
|
+
return i === 0 ? [chip] : [{ text: ' ' }, chip];
|
|
7130
|
+
});
|
|
7037
7131
|
/** A labelled bar with its percentage, the shape used for every proportion here. */
|
|
7038
7132
|
const meter = (fraction, label) => [`${bar(fraction, BAR_W)} ${Math.round(fraction * 100)}%`, `${label}`, ''];
|
|
7039
7133
|
const lines = [tabs, '---'];
|
|
@@ -7043,8 +7137,10 @@ export function App({ config: initialConfig, clearFrame, synchronizedFrames = fa
|
|
|
7043
7137
|
// path — plus the "Also:" line. Measured: nineteen wiped at thirty rows, twenty-two
|
|
7044
7138
|
// does not.
|
|
7045
7139
|
const chrome = compact ? 21 : 23;
|
|
7046
|
-
if (!compact)
|
|
7047
|
-
lines.push('
|
|
7140
|
+
if (!compact) {
|
|
7141
|
+
lines.push([{ text: 'Settings', color: CYAN, bold: true },
|
|
7142
|
+
{ text: ' — written to disk and applied now', color: MUTED }], '');
|
|
7143
|
+
}
|
|
7048
7144
|
// What is actually in force, not just what this file happens to hold. provider and
|
|
7049
7145
|
// baseURL commonly come from ~/.koneckrc, and showing those as "(not set)" made a
|
|
7050
7146
|
// configured session look unconfigured.
|
|
@@ -7070,8 +7166,10 @@ export function App({ config: initialConfig, clearFrame, synchronizedFrames = fa
|
|
|
7070
7166
|
* and the line naming the config file. They are the three that say least.
|
|
7071
7167
|
*/
|
|
7072
7168
|
const { start, end } = settingsWindow(CONFIG_SCHEMA.length, settingRow, Math.max(3, termRows - chrome));
|
|
7169
|
+
// Arrows, not the caret: the caret marks the selected row, and a second one lower down
|
|
7170
|
+
// read as a second selection.
|
|
7073
7171
|
if (start > 0)
|
|
7074
|
-
lines.push(`
|
|
7172
|
+
lines.push([{ text: ` ${G.up} ${start} more above`, color: DIM }]);
|
|
7075
7173
|
for (const [i, f] of CONFIG_SCHEMA.entries()) {
|
|
7076
7174
|
if (i < start || i >= end)
|
|
7077
7175
|
continue;
|
|
@@ -7086,28 +7184,67 @@ export function App({ config: initialConfig, clearFrame, synchronizedFrames = fa
|
|
|
7086
7184
|
const raw = f.key === 'maxTurns' && (value === 0 || value === undefined)
|
|
7087
7185
|
? 'no limit'
|
|
7088
7186
|
: displayValue(value);
|
|
7089
|
-
|
|
7090
|
-
|
|
7091
|
-
|
|
7092
|
-
|
|
7093
|
-
|
|
7094
|
-
|
|
7095
|
-
|
|
7096
|
-
const
|
|
7187
|
+
/*
|
|
7188
|
+
* The value, and a note on where it came from, kept apart so each can have its colour.
|
|
7189
|
+
*
|
|
7190
|
+
* Green is something set in this file; plain is in force from elsewhere; dim is not set
|
|
7191
|
+
* at all. Before, all three were the same white, so "(not set)" and a real value only
|
|
7192
|
+
* differed in their words, and a screen of twenty-two rows had to be read line by line.
|
|
7193
|
+
*/
|
|
7194
|
+
const valueText = beingTyped ? `${editing.value}_` : raw;
|
|
7195
|
+
const note = beingTyped ? ''
|
|
7196
|
+
: isEndpoint ? ` (${shortSource(endpoint.source)})`
|
|
7197
|
+
: isModel ? ` (${shortSource(modelFor(cfg.provider).source)})`
|
|
7198
|
+
: here || value === undefined ? '' : ' (inherited)';
|
|
7199
|
+
const unset = !beingTyped && value === undefined;
|
|
7200
|
+
const valueColor = beingTyped ? AMBER
|
|
7201
|
+
: unset ? DIM
|
|
7202
|
+
: isEndpoint || isModel ? CYAN
|
|
7203
|
+
: here ? GREEN
|
|
7204
|
+
: INK;
|
|
7097
7205
|
const hint = !selected ? ''
|
|
7098
7206
|
: f.type.kind === 'boolean' ? ' enter toggles'
|
|
7099
7207
|
: f.type.kind === 'choice' ? ` enter cycles: ${f.type.choices.join(' / ')}`
|
|
7100
7208
|
: f.type.kind === 'number' ? ` type a number, enter to save${f.clearable ? ', x clears' : ''}`
|
|
7101
7209
|
: ` enter to edit${f.clearable ? ', x clears' : ''}`;
|
|
7102
|
-
|
|
7210
|
+
/*
|
|
7211
|
+
* The selected row is a filled bar, the way the command palette marks its selection.
|
|
7212
|
+
*
|
|
7213
|
+
* The comment that stood here said the `>` marker was the only way to show a selection,
|
|
7214
|
+
* because a panel line was one string and could not carry colour per part. It can now,
|
|
7215
|
+
* so the row is highlighted as well — the caret stays for a screen that shows no colour.
|
|
7216
|
+
*/
|
|
7217
|
+
lines.push(selected
|
|
7218
|
+
? [
|
|
7219
|
+
{ text: `${G.caret} `, color: CYAN, bold: true },
|
|
7220
|
+
{ text: ` ${f.label.padEnd(labelW)} ${valueText}${note} `,
|
|
7221
|
+
bg: CYAN, color: ON_ACCENT, bold: true },
|
|
7222
|
+
{ text: hint, color: AMBER },
|
|
7223
|
+
]
|
|
7224
|
+
: [
|
|
7225
|
+
// Three columns, the width of the caret, its space and the chip's own padding, so
|
|
7226
|
+
// every label starts in the same column whether its row is selected or not.
|
|
7227
|
+
{ text: ' ' },
|
|
7228
|
+
{ text: f.label.padEnd(labelW), color: INK },
|
|
7229
|
+
{ text: ' ' },
|
|
7230
|
+
{ text: valueText, color: valueColor },
|
|
7231
|
+
{ text: note, color: DIM },
|
|
7232
|
+
]);
|
|
7103
7233
|
}
|
|
7104
7234
|
if (end < CONFIG_SCHEMA.length) {
|
|
7105
|
-
lines.push(`
|
|
7235
|
+
lines.push([{ text: ` ${G.down} ${CONFIG_SCHEMA.length - end} more below`, color: DIM }]);
|
|
7106
7236
|
}
|
|
7107
7237
|
lines.push('');
|
|
7238
|
+
/** A key in CYAN and what it does in MUTED, joined by quiet dots: the footer's shape. */
|
|
7239
|
+
const keys = (pairs) => pairs.flatMap(([k, what], i) => [
|
|
7240
|
+
...(i > 0 ? [{ text: ' · ', color: DIM }] : []),
|
|
7241
|
+
{ text: k, color: CYAN, bold: true },
|
|
7242
|
+
{ text: ` ${what}`, color: MUTED },
|
|
7243
|
+
]);
|
|
7108
7244
|
lines.push(editing
|
|
7109
|
-
? '
|
|
7110
|
-
:
|
|
7245
|
+
? keys([['enter', 'saves'], ['ctrl+u', 'empties the field'], ['esc', 'abandons']])
|
|
7246
|
+
: keys([[`${G.up}/${G.down}`, 'choose'], ['enter', 'change'], ['x', 'clear'],
|
|
7247
|
+
[`${G.left}/${G.right}`, 'tabs']]));
|
|
7111
7248
|
if (!compact) {
|
|
7112
7249
|
/*
|
|
7113
7250
|
* What this pane cannot edit, and where to go instead.
|
|
@@ -7120,7 +7257,7 @@ export function App({ config: initialConfig, clearFrame, synchronizedFrames = fa
|
|
|
7120
7257
|
* the difference between a deliberate omission and an oversight.
|
|
7121
7258
|
*/
|
|
7122
7259
|
lines.push('Also: `/endpoint` · `/model` · `/config <key> <value>` for the rest');
|
|
7123
|
-
lines.push(`Saved to ${CONFIG_FILE}
|
|
7260
|
+
lines.push([{ text: `Saved to ${CONFIG_FILE}`, color: DIM }]);
|
|
7124
7261
|
}
|
|
7125
7262
|
}
|
|
7126
7263
|
if (usagePane === 'session') {
|
|
@@ -7276,7 +7413,15 @@ export function App({ config: initialConfig, clearFrame, synchronizedFrames = fa
|
|
|
7276
7413
|
lines.push('show a real bar here with no further work.');
|
|
7277
7414
|
}
|
|
7278
7415
|
lines.push('---');
|
|
7279
|
-
|
|
7416
|
+
// `{left}/{right}` used to print exactly like that: it was written in plain quotes, not as a
|
|
7417
|
+
// template, so the arrows were never substituted.
|
|
7418
|
+
lines.push([
|
|
7419
|
+
{ text: `${G.left}/${G.right}`, color: CYAN, bold: true },
|
|
7420
|
+
{ text: ' switch tabs', color: MUTED },
|
|
7421
|
+
{ text: ' · ', color: DIM },
|
|
7422
|
+
{ text: 'esc', color: CYAN, bold: true },
|
|
7423
|
+
{ text: ' to close', color: MUTED },
|
|
7424
|
+
]);
|
|
7280
7425
|
return (_jsx(Box, { marginTop: 1, justifyContent: "flex-end", children: _jsx(Panel, { width: width, color: CYAN, title: "KONECK \u00B7 usage", children: lines }) }));
|
|
7281
7426
|
})(), updatePane && (() => {
|
|
7282
7427
|
const u = updatePane;
|
|
@@ -7448,20 +7593,64 @@ export function App({ config: initialConfig, clearFrame, synchronizedFrames = fa
|
|
|
7448
7593
|
const header = item.group && item.group !== lastGroup ? item.group : null;
|
|
7449
7594
|
lastGroup = item.group;
|
|
7450
7595
|
const label = pickerLabel(item.label, labelWidth);
|
|
7451
|
-
return (_jsx(Box, { flexDirection: "column", children: _jsx(Text, { backgroundColor: selected ? CYAN : undefined, color: selected ?
|
|
7596
|
+
return (_jsx(Box, { flexDirection: "column", children: _jsx(Text, { backgroundColor: selected ? CYAN : undefined, color: selected ? ON_ACCENT : INK, bold: selected, children: fitCells(`${selected ? G.caret + ' ' : ' '}${label}` +
|
|
7452
7597
|
`${item.current ? '(current) ' : ''}${header ? `${header} · ` : ''}${item.desc}`, width) }) }, item.value + absolute));
|
|
7453
7598
|
}), list.length > pickerRows && (_jsxs(Text, { color: DIM, children: ["\u2191\u2193 navigate \u00B7 pgup/pgdn jump \u00B7 enter select \u00B7 showing ", Math.max(0, start) + 1, "\u2013", Math.max(0, start) + shown.length, " of ", list.length] }))] }));
|
|
7454
|
-
})(),
|
|
7599
|
+
})(), (() => {
|
|
7600
|
+
const ml = modeLine(mode);
|
|
7601
|
+
const notices = [];
|
|
7602
|
+
if (agentState !== 'ready')
|
|
7603
|
+
notices.push({ text: statusLabel.toLowerCase(), color: statusColor });
|
|
7604
|
+
const planNote = plan ? planSummary(plan) : '';
|
|
7605
|
+
if (planNote)
|
|
7606
|
+
notices.push({ text: `plan ${planNote}`, color: CYAN });
|
|
7607
|
+
if (effort !== 'medium')
|
|
7608
|
+
notices.push({ text: `effort ${effort}`, color: AMBER });
|
|
7609
|
+
if (autoUpdated)
|
|
7610
|
+
notices.push({ text: `${G.ok} update installed · restart to use it`, color: GREEN });
|
|
7611
|
+
else if (updatePane?.behind)
|
|
7612
|
+
notices.push({ text: 'update available · /update', color: AMBER });
|
|
7613
|
+
if (mouse)
|
|
7614
|
+
notices.push({ text: 'WHEEL: on — shift to select · /mouse off', color: AMBER });
|
|
7615
|
+
if (pasteCount > 0) {
|
|
7616
|
+
notices.push({ text: `${pasteCount} paste${pasteCount === 1 ? '' : 's'} held, sent in full`,
|
|
7617
|
+
color: AMBER });
|
|
7618
|
+
}
|
|
7619
|
+
return (_jsx(Box, { marginTop: 1, paddingX: 2, width: uiWidth - 5, flexShrink: 0, children: _jsxs(Text, { wrap: "truncate", children: [_jsx(Text, { color: TONE[ml.tone], bold: true, children: ml.title }), _jsxs(Text, { color: MUTED, children: [' ', ml.hint] }), notices.map((n, i) => (_jsxs(Text, { children: [_jsx(Text, { color: DIM, children: ' · ' }), _jsx(Text, { color: n.color, children: n.text })] }, i)))] }, `m${notices.length}`) }));
|
|
7620
|
+
})(), _jsx(Box, { borderStyle: "single", borderLeft: false, borderRight: false, borderColor: DIM, paddingX: 2, width: uiWidth - 5, flexShrink: 0, children: _jsxs(Text, { wrap: "wrap", children: [_jsxs(Text, { color: busy ? DIM : AMBER, bold: true, children: [G.caret, " "] }), (() => {
|
|
7455
7621
|
const sel = selectionRange(selAnchor, caret, draft.length);
|
|
7456
7622
|
if (sel) {
|
|
7457
|
-
return (_jsxs(_Fragment, { children: [_jsx(Text, { color: INK, children: draft.slice(0, sel[0]) }), _jsx(Text, { backgroundColor: CYAN, color:
|
|
7623
|
+
return (_jsxs(_Fragment, { children: [_jsx(Text, { color: INK, children: draft.slice(0, sel[0]) }), _jsx(Text, { backgroundColor: CYAN, color: ON_ACCENT, children: draft.slice(sel[0], sel[1]) }), _jsx(Text, { color: INK, children: draft.slice(sel[1]) })] }));
|
|
7458
7624
|
}
|
|
7459
7625
|
return (_jsxs(_Fragment, { children: [_jsx(Text, { color: INK, children: draft.slice(0, caret) }), busy
|
|
7460
7626
|
? _jsx(Text, { color: INK, children: draft.slice(caret) })
|
|
7461
7627
|
: caret < draft.length
|
|
7462
|
-
? _jsxs(_Fragment, { children: [_jsx(Text, { backgroundColor: CYAN, color:
|
|
7463
|
-
: _jsx(Cursor, {})] }));
|
|
7464
|
-
})()] }) }), copyNotice && _jsx(Text, { color: CYAN, children: copyNotice }),
|
|
7628
|
+
? _jsxs(_Fragment, { children: [_jsx(Text, { backgroundColor: CYAN, color: ON_ACCENT, children: draft[caret] }), _jsx(Text, { color: INK, children: draft.slice(caret + 1) })] })
|
|
7629
|
+
: _jsx(Cursor, {}), _jsx(Text, { color: DIM, children: draft === '' && !busy ? ' ' + sliceToWidth(PLACEHOLDER, Math.max(0, uiWidth - 13)).text : '' })] }));
|
|
7630
|
+
})()] }) }), copyNotice && _jsx(Text, { color: CYAN, children: copyNotice }), (() => {
|
|
7631
|
+
const limit = ctxFill?.limit ?? detectedContext?.limit
|
|
7632
|
+
?? contextLimitWithSource(cfg.model, cfg.contextTokens, servesOwnWeights(cfg.provider)).limit;
|
|
7633
|
+
const facts = statusFacts({
|
|
7634
|
+
model: cfg.model, limit, promptTokens: ctxFill?.tokens ?? 0,
|
|
7635
|
+
cwd: cfg.cwd, home: os.homedir(), delta: usageDiff ?? null,
|
|
7636
|
+
});
|
|
7637
|
+
const sep = _jsx(Text, { color: DIM, children: ' · ' });
|
|
7638
|
+
const bar = facts.ctx ? barCells(facts.ctx.fraction, 10) : null;
|
|
7639
|
+
const hot = facts.ctx?.high ?? false;
|
|
7640
|
+
/*
|
|
7641
|
+
* Keyed on which segments are present, so the line remounts when one appears.
|
|
7642
|
+
*
|
|
7643
|
+
* Ink measures a truncating Text once and re-measures it when its text changes — but not
|
|
7644
|
+
* when a nested Text is inserted into it. So when the context bar arrived after the first
|
|
7645
|
+
* reply, the line kept the width it had without one and cut everything past the bar:
|
|
7646
|
+
* "ctx ▓▓▓▓ 73%…" with the workspace and the changes gone, at 110 columns and at 240
|
|
7647
|
+
* alike. Measured in isolation: longer text re-measures, an inserted segment does not, and
|
|
7648
|
+
* the same insertion under a changed key does. Segments appear rarely, so remounting is
|
|
7649
|
+
* cheap; growing numbers update in place.
|
|
7650
|
+
*/
|
|
7651
|
+
const segmentsKey = `f${facts.context !== '' ? 1 : 0}${facts.ctx ? 1 : 0}${facts.delta ? 1 : 0}`;
|
|
7652
|
+
return (_jsx(Box, { paddingX: 2, width: uiWidth - 5, flexShrink: 0, children: _jsxs(Text, { wrap: "truncate", children: [repaint % 2 === 1 ? '\u200b' : '', _jsx(Text, { color: MUTED, children: facts.model }), facts.context !== '' && _jsxs(_Fragment, { children: [sep, _jsx(Text, { color: MUTED, children: facts.context })] }), facts.ctx && bar && (_jsxs(_Fragment, { children: [sep, _jsx(Text, { color: hot ? CRIMSON : MUTED, children: "ctx " }), _jsx(Text, { backgroundColor: hot ? BAR_HOT_ON : BAR_ON, children: ' '.repeat(bar.filled) }), _jsx(Text, { backgroundColor: hot ? BAR_HOT_OFF : BAR_OFF, children: ' '.repeat(bar.empty) }), _jsxs(Text, { color: hot ? CRIMSON : MUTED, children: [' ', facts.ctx.percent, "%"] })] })), sep, _jsx(Text, { color: MUTED, children: facts.workspace }), facts.delta && (_jsxs(_Fragment, { children: [sep, _jsxs(Text, { color: GREEN, children: ["+", facts.delta.added] }), _jsxs(Text, { color: CRIMSON, children: [' ', "-", facts.delta.removed] })] }))] }, segmentsKey) }));
|
|
7653
|
+
})()] }));
|
|
7465
7654
|
}
|
|
7466
7655
|
export async function runInkChatMode(config) {
|
|
7467
7656
|
// Nothing is written before the first frame. Filling the screen to push the prompt to the foot
|