koneck 2.128.47 → 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/activity.d.ts.map +1 -1
- package/dist/activity.js +2 -1
- package/dist/activity.js.map +1 -1
- package/dist/audit.d.ts.map +1 -1
- package/dist/audit.js +18 -0
- package/dist/audit.js.map +1 -1
- package/dist/checkpoint.d.ts.map +1 -1
- package/dist/checkpoint.js +4 -1
- package/dist/checkpoint.js.map +1 -1
- 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/cycle.d.ts +0 -38
- package/dist/cycle.d.ts.map +1 -1
- package/dist/cycle.js +2 -3
- package/dist/cycle.js.map +1 -1
- package/dist/engine.d.ts.map +1 -1
- package/dist/engine.js +11 -4
- 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/handoff.d.ts.map +1 -1
- package/dist/handoff.js +2 -1
- package/dist/handoff.js.map +1 -1
- package/dist/ink-chat.d.ts.map +1 -1
- package/dist/ink-chat.js +223 -33
- package/dist/ink-chat.js.map +1 -1
- package/dist/ledger.d.ts.map +1 -1
- package/dist/ledger.js +2 -1
- package/dist/ledger.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/policy.d.ts.map +1 -1
- package/dist/policy.js +4 -1
- package/dist/policy.js.map +1 -1
- package/dist/reading.d.ts +0 -27
- package/dist/reading.d.ts.map +1 -1
- package/dist/reading.js +2 -3
- package/dist/reading.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/tool-kinds.d.ts +48 -0
- package/dist/tool-kinds.d.ts.map +1 -0
- package/dist/tool-kinds.js +74 -0
- package/dist/tool-kinds.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/mention-signals.d.ts.map +1 -1
- package/dist/web/mention-signals.js +2 -1
- package/dist/web/mention-signals.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/handoff.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handoff.d.ts","sourceRoot":"","sources":["../src/handoff.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"handoff.d.ts","sourceRoot":"","sources":["../src/handoff.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAG3C,oEAAoE;AACpE,MAAM,WAAW,WAAW;IAC1B,oDAAoD;IACpD,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACjD,8FAA8F;IAC9F,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,qDAAqD;IACrD,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,sEAAsE;IACtE,MAAM,EAAE,KAAK,CAAC;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACjD;AAED,wDAAwD;AACxD,UAAU,KAAK;IACb,CAAC,EAAE,MAAM,CAAC;IACV,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,EAAE,CAAC,EAAE,OAAO,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,iDAAiD;AACjD,UAAU,IAAI;IAAG,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE;AAI9C;;;;;;GAMG;AACH,wBAAgB,WAAW,CACzB,MAAM,EAAE,SAAS,KAAK,EAAE,EACxB,IAAI,GAAE,SAAS,IAAI,EAAO,EAC1B,QAAQ,GAAE,SAAS,OAAO,EAAO,GAChC,WAAW,CA4Fb;AAED,oDAAoD;AACpD,wBAAgB,WAAW,CAAC,IAAI,EAAE,WAAW,GAAG,OAAO,CAEtD;AA8CD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,WAAW,EAAE,KAAK,SAAI,GAAG,MAAM,GAAG,IAAI,CAoC3E"}
|
package/dist/handoff.js
CHANGED
|
@@ -23,7 +23,8 @@
|
|
|
23
23
|
* named commands, listed steps. A handover that has to be read carefully has failed at being a
|
|
24
24
|
* handover.
|
|
25
25
|
*/
|
|
26
|
-
|
|
26
|
+
import { CONTENT_EDITING_TOOLS } from './tool-kinds.js';
|
|
27
|
+
const WRITES = CONTENT_EDITING_TOOLS;
|
|
27
28
|
/**
|
|
28
29
|
* Reads a handover out of what a session actually did.
|
|
29
30
|
*
|
package/dist/handoff.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handoff.js","sourceRoot":"","sources":["../src/handoff.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;
|
|
1
|
+
{"version":3,"file":"handoff.js","sourceRoot":"","sources":["../src/handoff.ts"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G,CAAC,KAAK,CAAC;aACV,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,MAAM,GAAG,IAAI,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC;aAC7D,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QACf,KAAK,MAAM,IAAI,IAAI,QAAQ;YAAE,GAAG,CAAC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC;IACrD,CAAC;IAED,IAAI,IAAI,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC/B,GAAG,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;QAC1B,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC;YAAE,GAAG,CAAC,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;IACnF,CAAC;IACD,OAAO,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACxB,CAAC;AAGD,0FAA0F;AAC1F,SAAS,WAAW,CAAC,OAAe;IAClC,OAAO,OAAO,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,CAAC;AACzE,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,gBAAgB,CAAC;A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H,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.
|
|
@@ -1121,6 +1138,7 @@ export function handoffSummaryInput(transcript) {
|
|
|
1121
1138
|
// Still exported from here, because the tests and the rest of this file reach for it by this name.
|
|
1122
1139
|
export { asideAllowsTool } from './aside.js';
|
|
1123
1140
|
import { asideAllowsTool } from './aside.js';
|
|
1141
|
+
import { FILE_WRITING_TOOLS } from './tool-kinds.js';
|
|
1124
1142
|
/**
|
|
1125
1143
|
* Reviews are promises of observation, not a request that the model happens to obey. Keep that
|
|
1126
1144
|
* promise at the approval boundary. This intentionally does not reuse `toolRisk(tool) ===
|
|
@@ -1217,7 +1235,7 @@ export function nativeRefactorPolicyReason(policy) {
|
|
|
1217
1235
|
if ((policy.allowedWritePaths?.length ?? 0) > 0 || (policy.protectedPaths?.length ?? 0) > 0) {
|
|
1218
1236
|
return 'workspace policy constrains write paths, but a native refactor may rewrite import sites beyond its explicit arguments';
|
|
1219
1237
|
}
|
|
1220
|
-
if ((policy.requireApprovalFor ?? []).some(tool =>
|
|
1238
|
+
if ((policy.requireApprovalFor ?? []).some(tool => FILE_WRITING_TOOLS.has(tool))) {
|
|
1221
1239
|
return 'workspace policy requires approval for writes; use a normal agent task so each write can be approved';
|
|
1222
1240
|
}
|
|
1223
1241
|
return null;
|
|
@@ -1719,6 +1737,21 @@ export function App({ config: initialConfig, clearFrame, synchronizedFrames = fa
|
|
|
1719
1737
|
// Tool approval callbacks belong to a session created on an earlier render. Keep the control
|
|
1720
1738
|
// posture live so turning approval on during a turn governs its next consequential tool call.
|
|
1721
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);
|
|
1722
1755
|
// Live activity accumulates in a ref and is painted by the FRAME_MS ticker. Mutating a ref
|
|
1723
1756
|
// instead of calling setState per token keeps a Raspberry Pi from re-rendering on every chunk.
|
|
1724
1757
|
const sayRef = useRef(''); // narration not yet committed
|
|
@@ -2014,6 +2047,8 @@ export function App({ config: initialConfig, clearFrame, synchronizedFrames = fa
|
|
|
2014
2047
|
}
|
|
2015
2048
|
/** The endpoint's answer wins over a catalogue or name-based reference. */
|
|
2016
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);
|
|
2017
2052
|
const sessionOpts = {
|
|
2018
2053
|
approve: approveTool,
|
|
2019
2054
|
onPlan: (next) => {
|
|
@@ -2065,7 +2100,12 @@ export function App({ config: initialConfig, clearFrame, synchronizedFrames = fa
|
|
|
2065
2100
|
thinkingTextRef.current = '';
|
|
2066
2101
|
charsRef.current = 0;
|
|
2067
2102
|
},
|
|
2068
|
-
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
|
+
},
|
|
2069
2109
|
onToolOutput: (_name, line) => {
|
|
2070
2110
|
// Written to the ref rather than to state: a dev server logs a request every second or two,
|
|
2071
2111
|
// and a setState per line re-rendered the interface on each one. The ticker paints whatever
|
|
@@ -2142,6 +2182,7 @@ export function App({ config: initialConfig, clearFrame, synchronizedFrames = fa
|
|
|
2142
2182
|
},
|
|
2143
2183
|
onAgentProgress: (list) => { agentsRef.current = list; setAgents(list); },
|
|
2144
2184
|
onWindowDetected: (limit, source) => setDetectedContext({ limit, source }),
|
|
2185
|
+
onContextFill: (tokens, limit) => setCtxFill({ tokens, limit }),
|
|
2145
2186
|
/*
|
|
2146
2187
|
* A setting the server will not honour, said out loud.
|
|
2147
2188
|
*
|
|
@@ -3217,7 +3258,46 @@ export function App({ config: initialConfig, clearFrame, synchronizedFrames = fa
|
|
|
3217
3258
|
}, []);
|
|
3218
3259
|
// The tree as it stood before the session touched anything. Recorded once, so "code changes"
|
|
3219
3260
|
// stays a comparison against the starting point however long the session runs.
|
|
3220
|
-
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]);
|
|
3221
3301
|
const addRow = (row) => setRows(prev => [...prev, row]);
|
|
3222
3302
|
const addSystem = (text) => addRow({ role: 'system', text });
|
|
3223
3303
|
/** Stops the in-flight turn without touching anything the developer is composing or queued. */
|
|
@@ -3377,7 +3457,7 @@ export function App({ config: initialConfig, clearFrame, synchronizedFrames = fa
|
|
|
3377
3457
|
async function buildHandoff(instruction) {
|
|
3378
3458
|
const changed = [...new Set(rows.flatMap(r => (r.steps ?? [])
|
|
3379
3459
|
.filter((st) => st.kind === 'tool')
|
|
3380
|
-
.filter(st =>
|
|
3460
|
+
.filter(st => FILE_WRITING_TOOLS.has(st.name))
|
|
3381
3461
|
.map(st => st.detail)
|
|
3382
3462
|
.filter(Boolean)))].slice(0, 12);
|
|
3383
3463
|
const transcript = handoffSummaryInput(rows
|
|
@@ -6206,10 +6286,9 @@ export function App({ config: initialConfig, clearFrame, synchronizedFrames = fa
|
|
|
6206
6286
|
}
|
|
6207
6287
|
// Shift+Tab → cycle mode
|
|
6208
6288
|
if (key.shift && key.tab) {
|
|
6209
|
-
|
|
6210
|
-
|
|
6211
|
-
|
|
6212
|
-
});
|
|
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));
|
|
6213
6292
|
return;
|
|
6214
6293
|
}
|
|
6215
6294
|
if (key.ctrl && input.toLowerCase() === 'v') {
|
|
@@ -6624,6 +6703,7 @@ export function App({ config: initialConfig, clearFrame, synchronizedFrames = fa
|
|
|
6624
6703
|
// whichever of those three happened last, which for anyone who closes the terminal
|
|
6625
6704
|
// normally was an old snapshot — the reported "always resumes the old one".
|
|
6626
6705
|
void doSave().catch(() => { });
|
|
6706
|
+
refreshDelta();
|
|
6627
6707
|
// A run that stopped short says so, rather than letting the footer imply it finished.
|
|
6628
6708
|
if (incompleteRef.current) {
|
|
6629
6709
|
addSystem(incompleteRef.current);
|
|
@@ -6665,6 +6745,7 @@ export function App({ config: initialConfig, clearFrame, synchronizedFrames = fa
|
|
|
6665
6745
|
liveToolRef.current = null;
|
|
6666
6746
|
flushAgents();
|
|
6667
6747
|
void doSave().catch(() => { });
|
|
6748
|
+
refreshDelta();
|
|
6668
6749
|
setRows(prev => [
|
|
6669
6750
|
...prev,
|
|
6670
6751
|
...(trailing ? [{ role: 'steps', steps: [{ kind: 'say', text: trailing }] }] : []),
|
|
@@ -7032,7 +7113,21 @@ export function App({ config: initialConfig, clearFrame, synchronizedFrames = fa
|
|
|
7032
7113
|
const width = Math.min(barWidth, usagePane === 'settings' ? 96 : 66);
|
|
7033
7114
|
const inner = width - 4;
|
|
7034
7115
|
const BAR_W = Math.max(12, inner - 14);
|
|
7035
|
-
|
|
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
|
+
});
|
|
7036
7131
|
/** A labelled bar with its percentage, the shape used for every proportion here. */
|
|
7037
7132
|
const meter = (fraction, label) => [`${bar(fraction, BAR_W)} ${Math.round(fraction * 100)}%`, `${label}`, ''];
|
|
7038
7133
|
const lines = [tabs, '---'];
|
|
@@ -7042,8 +7137,10 @@ export function App({ config: initialConfig, clearFrame, synchronizedFrames = fa
|
|
|
7042
7137
|
// path — plus the "Also:" line. Measured: nineteen wiped at thirty rows, twenty-two
|
|
7043
7138
|
// does not.
|
|
7044
7139
|
const chrome = compact ? 21 : 23;
|
|
7045
|
-
if (!compact)
|
|
7046
|
-
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
|
+
}
|
|
7047
7144
|
// What is actually in force, not just what this file happens to hold. provider and
|
|
7048
7145
|
// baseURL commonly come from ~/.koneckrc, and showing those as "(not set)" made a
|
|
7049
7146
|
// configured session look unconfigured.
|
|
@@ -7069,8 +7166,10 @@ export function App({ config: initialConfig, clearFrame, synchronizedFrames = fa
|
|
|
7069
7166
|
* and the line naming the config file. They are the three that say least.
|
|
7070
7167
|
*/
|
|
7071
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.
|
|
7072
7171
|
if (start > 0)
|
|
7073
|
-
lines.push(`
|
|
7172
|
+
lines.push([{ text: ` ${G.up} ${start} more above`, color: DIM }]);
|
|
7074
7173
|
for (const [i, f] of CONFIG_SCHEMA.entries()) {
|
|
7075
7174
|
if (i < start || i >= end)
|
|
7076
7175
|
continue;
|
|
@@ -7085,28 +7184,67 @@ export function App({ config: initialConfig, clearFrame, synchronizedFrames = fa
|
|
|
7085
7184
|
const raw = f.key === 'maxTurns' && (value === 0 || value === undefined)
|
|
7086
7185
|
? 'no limit'
|
|
7087
7186
|
: displayValue(value);
|
|
7088
|
-
|
|
7089
|
-
|
|
7090
|
-
|
|
7091
|
-
|
|
7092
|
-
|
|
7093
|
-
|
|
7094
|
-
|
|
7095
|
-
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;
|
|
7096
7205
|
const hint = !selected ? ''
|
|
7097
7206
|
: f.type.kind === 'boolean' ? ' enter toggles'
|
|
7098
7207
|
: f.type.kind === 'choice' ? ` enter cycles: ${f.type.choices.join(' / ')}`
|
|
7099
7208
|
: f.type.kind === 'number' ? ` type a number, enter to save${f.clearable ? ', x clears' : ''}`
|
|
7100
7209
|
: ` enter to edit${f.clearable ? ', x clears' : ''}`;
|
|
7101
|
-
|
|
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
|
+
]);
|
|
7102
7233
|
}
|
|
7103
7234
|
if (end < CONFIG_SCHEMA.length) {
|
|
7104
|
-
lines.push(`
|
|
7235
|
+
lines.push([{ text: ` ${G.down} ${CONFIG_SCHEMA.length - end} more below`, color: DIM }]);
|
|
7105
7236
|
}
|
|
7106
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
|
+
]);
|
|
7107
7244
|
lines.push(editing
|
|
7108
|
-
? '
|
|
7109
|
-
:
|
|
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']]));
|
|
7110
7248
|
if (!compact) {
|
|
7111
7249
|
/*
|
|
7112
7250
|
* What this pane cannot edit, and where to go instead.
|
|
@@ -7119,7 +7257,7 @@ export function App({ config: initialConfig, clearFrame, synchronizedFrames = fa
|
|
|
7119
7257
|
* the difference between a deliberate omission and an oversight.
|
|
7120
7258
|
*/
|
|
7121
7259
|
lines.push('Also: `/endpoint` · `/model` · `/config <key> <value>` for the rest');
|
|
7122
|
-
lines.push(`Saved to ${CONFIG_FILE}
|
|
7260
|
+
lines.push([{ text: `Saved to ${CONFIG_FILE}`, color: DIM }]);
|
|
7123
7261
|
}
|
|
7124
7262
|
}
|
|
7125
7263
|
if (usagePane === 'session') {
|
|
@@ -7275,7 +7413,15 @@ export function App({ config: initialConfig, clearFrame, synchronizedFrames = fa
|
|
|
7275
7413
|
lines.push('show a real bar here with no further work.');
|
|
7276
7414
|
}
|
|
7277
7415
|
lines.push('---');
|
|
7278
|
-
|
|
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
|
+
]);
|
|
7279
7425
|
return (_jsx(Box, { marginTop: 1, justifyContent: "flex-end", children: _jsx(Panel, { width: width, color: CYAN, title: "KONECK \u00B7 usage", children: lines }) }));
|
|
7280
7426
|
})(), updatePane && (() => {
|
|
7281
7427
|
const u = updatePane;
|
|
@@ -7447,20 +7593,64 @@ export function App({ config: initialConfig, clearFrame, synchronizedFrames = fa
|
|
|
7447
7593
|
const header = item.group && item.group !== lastGroup ? item.group : null;
|
|
7448
7594
|
lastGroup = item.group;
|
|
7449
7595
|
const label = pickerLabel(item.label, labelWidth);
|
|
7450
|
-
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}` +
|
|
7451
7597
|
`${item.current ? '(current) ' : ''}${header ? `${header} · ` : ''}${item.desc}`, width) }) }, item.value + absolute));
|
|
7452
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] }))] }));
|
|
7453
|
-
})(),
|
|
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, " "] }), (() => {
|
|
7454
7621
|
const sel = selectionRange(selAnchor, caret, draft.length);
|
|
7455
7622
|
if (sel) {
|
|
7456
|
-
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]) })] }));
|
|
7457
7624
|
}
|
|
7458
7625
|
return (_jsxs(_Fragment, { children: [_jsx(Text, { color: INK, children: draft.slice(0, caret) }), busy
|
|
7459
7626
|
? _jsx(Text, { color: INK, children: draft.slice(caret) })
|
|
7460
7627
|
: caret < draft.length
|
|
7461
|
-
? _jsxs(_Fragment, { children: [_jsx(Text, { backgroundColor: CYAN, color:
|
|
7462
|
-
: _jsx(Cursor, {})] }));
|
|
7463
|
-
})()] }) }), 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
|
+
})()] }));
|
|
7464
7654
|
}
|
|
7465
7655
|
export async function runInkChatMode(config) {
|
|
7466
7656
|
// Nothing is written before the first frame. Filling the screen to push the prompt to the foot
|