koneck 2.128.57 → 2.128.59
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/chat.d.ts.map +1 -1
- package/dist/chat.js +11 -4
- package/dist/chat.js.map +1 -1
- package/dist/click-targets.d.ts +76 -0
- package/dist/click-targets.d.ts.map +1 -0
- package/dist/click-targets.js +135 -0
- package/dist/click-targets.js.map +1 -0
- package/dist/config-store.d.ts +2 -0
- package/dist/config-store.d.ts.map +1 -1
- package/dist/config-store.js +13 -1
- package/dist/config-store.js.map +1 -1
- package/dist/entry-screen.d.ts +58 -0
- package/dist/entry-screen.d.ts.map +1 -0
- package/dist/entry-screen.js +154 -0
- package/dist/entry-screen.js.map +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +30 -5
- package/dist/index.js.map +1 -1
- package/dist/ink-chat.d.ts.map +1 -1
- package/dist/ink-chat.js +247 -44
- package/dist/ink-chat.js.map +1 -1
- package/dist/markdown-ink.d.ts.map +1 -1
- package/dist/markdown-ink.js +16 -6
- package/dist/markdown-ink.js.map +1 -1
- package/dist/status-line.d.ts +16 -0
- package/dist/status-line.d.ts.map +1 -1
- package/dist/status-line.js +9 -0
- package/dist/status-line.js.map +1 -1
- package/dist/theme.d.ts +98 -0
- package/dist/theme.d.ts.map +1 -0
- package/dist/theme.js +174 -0
- package/dist/theme.js.map +1 -0
- package/dist/tui.d.ts.map +1 -1
- package/dist/tui.js +17 -7
- package/dist/tui.js.map +1 -1
- package/dist/use-click.d.ts +11 -0
- package/dist/use-click.d.ts.map +1 -0
- package/dist/use-click.js +46 -0
- package/dist/use-click.js.map +1 -0
- package/dist/web/events.d.ts +8 -0
- package/dist/web/events.d.ts.map +1 -1
- package/dist/web/events.js.map +1 -1
- package/dist/web/sessions.d.ts.map +1 -1
- package/dist/web/sessions.js +7 -3
- package/dist/web/sessions.js.map +1 -1
- package/dist/web/ui-client.d.ts.map +1 -1
- package/dist/web/ui-client.js +35 -11
- 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 +12 -4
- package/dist/web/ui-css.js.map +1 -1
- package/dist/web/ui.js +1 -1
- package/package.json +1 -1
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;AA8B3D,OAAO,EAAyB,KAAK,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAgCtE,OAAO,KAAK,EAAY,SAAS,EAAE,MAAM,kBAAkB,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;AAgCtE,OAAO,KAAK,EAAY,SAAS,EAAE,MAAM,kBAAkB,CAAC;AA4B5D,OAAO,EAA6C,KAAK,YAAY,EAAE,MAAM,aAAa,CAAC;AAG3F,OAAO,KAAK,EAAE,WAAW,EAAiB,MAAM,YAAY,CAAC;AA6E7D,KAAK,MAAM,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,KAAK,CAAC;AAGhD,mFAAmF;AACnF,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAI9D;AAyED,6FAA6F;AAC7F,wBAAgB,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAM7C;AA0BD,gGAAgG;AAChG,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAY/D;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,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AAC;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,CA0/MhE;AAED,wBAAsB,cAAc,CAAC,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAmFvE"}
|
package/dist/ink-chat.js
CHANGED
|
@@ -46,6 +46,10 @@ import { SessionChanges, readForDiff as readForDiffAt, totalsOf } from './sessio
|
|
|
46
46
|
import os from 'node:os';
|
|
47
47
|
import { modeLine, nextMode, statusFacts, barCells, PLACEHOLDER, contextSplit, contextSplitLines } from './status-line.js';
|
|
48
48
|
import { KONECK_VERSION } from './version.js';
|
|
49
|
+
import { palette, onThemeChange, applyTheme, currentTheme, THEMES, themeNamed } from './theme.js';
|
|
50
|
+
import { ThemePreview } from './entry-screen.js';
|
|
51
|
+
import { looksLikeCursorReport } from './click-targets.js';
|
|
52
|
+
import { useClickTargets } from './use-click.js';
|
|
49
53
|
import { fileListView, listLength, diffRows, PANEL_CONTEXT, PANEL_DIFF_LINES } from './diff-layout.js';
|
|
50
54
|
import { savePlan, plansDir, PLAN_CHOICES, PROCEED_PROMPT } from './plan-file.js';
|
|
51
55
|
import { logoFor } from './logo.js';
|
|
@@ -64,32 +68,32 @@ import { renderTrajectory } from './trajectory.js';
|
|
|
64
68
|
import { listAuditEvents } from './audit.js';
|
|
65
69
|
import { initializePolicy, loadPolicy, POLICY_FILE } from './policy.js';
|
|
66
70
|
import { isWorkspaceTrusted, trustWorkspace, untrustWorkspace } from './workspace-trust.js';
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
71
|
+
let CYAN = palette.cyan;
|
|
72
|
+
let GREEN = palette.green;
|
|
73
|
+
let CRIMSON = palette.crimson;
|
|
74
|
+
let AMBER = palette.amber;
|
|
75
|
+
let MUTED = palette.muted;
|
|
76
|
+
let INK = palette.ink;
|
|
77
|
+
let DIM = palette.dim;
|
|
74
78
|
/**
|
|
75
79
|
* Text drawn on a CYAN background: how KONECK marks the thing that is selected.
|
|
76
80
|
*
|
|
77
81
|
* One value for the command palette's highlighted row and the usage pane's selected tab and row, so
|
|
78
82
|
* a selection looks the same wherever it appears.
|
|
79
83
|
*/
|
|
80
|
-
|
|
84
|
+
let ON_ACCENT = palette.onAccent;
|
|
81
85
|
/** Plan mode's colour: read-only, so neither the warning of amber nor the go of green. */
|
|
82
|
-
|
|
86
|
+
let VIOLET = palette.violet;
|
|
83
87
|
/** The context bar's two cells, normal and past the point compaction fires. */
|
|
84
|
-
|
|
88
|
+
let BAR_ON = palette.barOn, BAR_OFF = palette.barOff, BAR_HOT_ON = palette.barHotOn, BAR_HOT_OFF = palette.barHotOff;
|
|
85
89
|
/** The shared tones, in this terminal's shades. The browser maps the same names onto its theme. */
|
|
86
90
|
const TONE = {
|
|
87
|
-
amber:
|
|
91
|
+
amber: AMBER, cyan: CYAN, green: GREEN, violet: VIOLET, red: CRIMSON, muted: MUTED,
|
|
88
92
|
};
|
|
89
93
|
// Diff colours. Deliberately not terminal green/red: those clash with the warm palette and read
|
|
90
94
|
// as errors. These are the existing accents lifted a little, over bands dark enough to sit on a
|
|
91
95
|
// black terminal without glowing.
|
|
92
|
-
|
|
96
|
+
let DIFF_ADD = palette.diffAdd;
|
|
93
97
|
/*
|
|
94
98
|
* Syntax colours for the diff panel.
|
|
95
99
|
*
|
|
@@ -101,23 +105,46 @@ const DIFF_ADD = '#7FE3B0';
|
|
|
101
105
|
* Each is legible on the tinted add and delete bands as well as on the panel's own background,
|
|
102
106
|
* which is the constraint that rules out anything dark.
|
|
103
107
|
*/
|
|
104
|
-
const SYNTAX = {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
number: '#B5CEA8',
|
|
109
|
-
fn: '#DCDCAA',
|
|
110
|
-
type: '#4EC9B0',
|
|
111
|
-
plain: '#9CDCFE',
|
|
112
|
-
punct: '#A6ADB2',
|
|
113
|
-
};
|
|
114
|
-
const DIFF_ADD_BG = '#10291F';
|
|
115
|
-
const DIFF_DEL = '#F2909B';
|
|
116
|
-
const DIFF_DEL_BG = '#2B1419';
|
|
108
|
+
const SYNTAX = { ...palette.syntax };
|
|
109
|
+
let DIFF_ADD_BG = palette.diffAddBg;
|
|
110
|
+
let DIFF_DEL = palette.diffDel;
|
|
111
|
+
let DIFF_DEL_BG = palette.diffDelBg;
|
|
117
112
|
// The user's message bar: light-on-dark, high contrast against the terminal ground so an
|
|
118
113
|
// input is easy to find when scrolling back. Deliberately not the cyan used for KONECK.
|
|
119
|
-
|
|
120
|
-
|
|
114
|
+
let USER_BG = palette.userBg;
|
|
115
|
+
let USER_FG = palette.userFg;
|
|
116
|
+
/** Headings' strongest level; white on a dark theme, black on a light one. */
|
|
117
|
+
let STRONG = palette.strong;
|
|
118
|
+
/*
|
|
119
|
+
* The colours above are read at render, so a theme change is these names reassigned and a repaint.
|
|
120
|
+
* Lines already coloured into strings are dropped from their cache, or they would keep the old
|
|
121
|
+
* theme's syntax colours until they scrolled away.
|
|
122
|
+
*/
|
|
123
|
+
onThemeChange(() => {
|
|
124
|
+
CYAN = palette.cyan;
|
|
125
|
+
GREEN = palette.green;
|
|
126
|
+
CRIMSON = palette.crimson;
|
|
127
|
+
AMBER = palette.amber;
|
|
128
|
+
MUTED = palette.muted;
|
|
129
|
+
INK = palette.ink;
|
|
130
|
+
DIM = palette.dim;
|
|
131
|
+
ON_ACCENT = palette.onAccent;
|
|
132
|
+
VIOLET = palette.violet;
|
|
133
|
+
STRONG = palette.strong;
|
|
134
|
+
BAR_ON = palette.barOn;
|
|
135
|
+
BAR_OFF = palette.barOff;
|
|
136
|
+
BAR_HOT_ON = palette.barHotOn;
|
|
137
|
+
BAR_HOT_OFF = palette.barHotOff;
|
|
138
|
+
Object.assign(TONE, { amber: AMBER, cyan: CYAN, green: GREEN, violet: VIOLET, red: CRIMSON, muted: MUTED });
|
|
139
|
+
DIFF_ADD = palette.diffAdd;
|
|
140
|
+
DIFF_ADD_BG = palette.diffAddBg;
|
|
141
|
+
DIFF_DEL = palette.diffDel;
|
|
142
|
+
DIFF_DEL_BG = palette.diffDelBg;
|
|
143
|
+
Object.assign(SYNTAX, palette.syntax);
|
|
144
|
+
USER_BG = palette.userBg;
|
|
145
|
+
USER_FG = palette.userFg;
|
|
146
|
+
CODE_LINE_CACHE.clear();
|
|
147
|
+
});
|
|
121
148
|
const EFFORT_LEVELS = ['low', 'medium', 'high', 'max'];
|
|
122
149
|
/** A corrupt or obsolete setting must not turn into an invalid prompt modifier. */
|
|
123
150
|
export function savedEffort(value) {
|
|
@@ -647,7 +674,7 @@ function Shimmer({ text, frame, base }) {
|
|
|
647
674
|
const head = frame % span;
|
|
648
675
|
return (_jsx(_Fragment, { children: [...text].map((ch, i) => {
|
|
649
676
|
const d = head - i;
|
|
650
|
-
const color = d === 0 ?
|
|
677
|
+
const color = d === 0 ? STRONG : d === 1 ? CYAN : d === 2 ? GREEN : base;
|
|
651
678
|
return _jsx(Text, { color: color, bold: d === 0, children: ch }, i);
|
|
652
679
|
}) }));
|
|
653
680
|
}
|
|
@@ -674,6 +701,7 @@ const COMMANDS = [
|
|
|
674
701
|
{ cmd: '/goal', desc: 'Set, inspect, or clear the session’s persistent outcome' },
|
|
675
702
|
{ cmd: '/doctor', desc: 'Check the active provider, workspace, and developer tools' },
|
|
676
703
|
{ cmd: '/context', desc: 'Show the active model context-window source and limit' },
|
|
704
|
+
{ cmd: '/theme', desc: 'Choose a colour theme, with a preview (or /theme <name>)' },
|
|
677
705
|
{ cmd: '/mcp', desc: 'Show configured MCP integrations and live tools' },
|
|
678
706
|
{ cmd: '/init', desc: 'Create or refresh KONECK.md project instructions' },
|
|
679
707
|
{ cmd: '/rename', desc: 'Safely rename a TypeScript symbol across the workspace' },
|
|
@@ -2028,6 +2056,8 @@ export function App({ config: initialConfig, clearFrame, synchronizedFrames = fa
|
|
|
2028
2056
|
const [detectedContext, setDetectedContext] = useState(null);
|
|
2029
2057
|
/** The last request's size and the window the engine compacts at — see onContextFill. */
|
|
2030
2058
|
const [ctxFill, setCtxFill] = useState(null);
|
|
2059
|
+
/** Tokens this session has sent and received, for the right of the footer — see onTokens. */
|
|
2060
|
+
const [sessionTok, setSessionTok] = useState({ sent: 0, received: 0 });
|
|
2031
2061
|
const sessionOpts = {
|
|
2032
2062
|
approve: approveTool,
|
|
2033
2063
|
onPlan: (next) => {
|
|
@@ -2165,6 +2195,10 @@ export function App({ config: initialConfig, clearFrame, synchronizedFrames = fa
|
|
|
2165
2195
|
* on was invisible in the terminal: the run just stopped.
|
|
2166
2196
|
*/
|
|
2167
2197
|
onAwaitingUser: (message) => addSystem(message),
|
|
2198
|
+
onAskUser: (question, options) => {
|
|
2199
|
+
if (options.length)
|
|
2200
|
+
setUserQ({ question, options, choice: 0 });
|
|
2201
|
+
},
|
|
2168
2202
|
/*
|
|
2169
2203
|
* A setting the server will not honour, said out loud.
|
|
2170
2204
|
*
|
|
@@ -2189,6 +2223,10 @@ export function App({ config: initialConfig, clearFrame, synchronizedFrames = fa
|
|
|
2189
2223
|
onTruncation: (_window, notice) => addSystem(notice),
|
|
2190
2224
|
onTokens: (s) => {
|
|
2191
2225
|
realTokRef.current = Math.max(0, s.completionTokens - tokBaseRef.current);
|
|
2226
|
+
// The session's totals for the footer. Reported once per request, when its usage arrives,
|
|
2227
|
+
// so this is a repaint per request rather than per token.
|
|
2228
|
+
setSessionTok(t => (t.sent === s.promptTokens && t.received === s.completionTokens
|
|
2229
|
+
? t : { sent: s.promptTokens, received: s.completionTokens }));
|
|
2192
2230
|
},
|
|
2193
2231
|
};
|
|
2194
2232
|
/**
|
|
@@ -2618,6 +2656,42 @@ export function App({ config: initialConfig, clearFrame, synchronizedFrames = fa
|
|
|
2618
2656
|
setAsk(next ? { ...next, choice: 0, waiting: askQueueRef.current.pending } : null);
|
|
2619
2657
|
}
|
|
2620
2658
|
/** Answers the question on screen and moves to the next. */
|
|
2659
|
+
/** Carries out, or reopens, the plan waiting for an answer — by key or by click. */
|
|
2660
|
+
function choosePlan(index) {
|
|
2661
|
+
const chosen = PLAN_CHOICES[index];
|
|
2662
|
+
if (!chosen || !planAsk)
|
|
2663
|
+
return;
|
|
2664
|
+
const file = planAsk.file;
|
|
2665
|
+
setPlanAsk(null);
|
|
2666
|
+
if (chosen.mode === null) {
|
|
2667
|
+
addSystem('Tell it what to change, and it will plan again.');
|
|
2668
|
+
return;
|
|
2669
|
+
}
|
|
2670
|
+
setMode(chosen.mode);
|
|
2671
|
+
modeRef.current = chosen.mode;
|
|
2672
|
+
addSystem(`Carrying out the plan in **${modeSpec(chosen.mode).label}** mode.`
|
|
2673
|
+
+ (file ? `\nSaved to \`${file}\`` : ''));
|
|
2674
|
+
// The mode has to be in force before the turn starts, which is why it is set on the ref as
|
|
2675
|
+
// well as in state — the turn reads the ref, and state has not settled by the time it does.
|
|
2676
|
+
setTimeout(() => submitDraft(PROCEED_PROMPT), 0);
|
|
2677
|
+
}
|
|
2678
|
+
/** Keeps a theme from the /theme picker and saves it. */
|
|
2679
|
+
function chooseTheme(index) {
|
|
2680
|
+
const t = THEMES[index];
|
|
2681
|
+
if (!t)
|
|
2682
|
+
return;
|
|
2683
|
+
applyTheme(t.name);
|
|
2684
|
+
setThemePick(null);
|
|
2685
|
+
void setConfigKey('theme', t.name).then(() => addSystem(`Theme set to **${t.label}**.`), () => addSystem(`Theme set to **${t.label}** for now — it could not be saved to the config file.`));
|
|
2686
|
+
}
|
|
2687
|
+
/** Answers the model's question with one of the options it offered, as if it had been typed. */
|
|
2688
|
+
function answerUserQ(index) {
|
|
2689
|
+
const option = userQ?.options[index];
|
|
2690
|
+
if (option === undefined)
|
|
2691
|
+
return;
|
|
2692
|
+
setUserQ(null);
|
|
2693
|
+
setTimeout(() => submitDraft(option), 0);
|
|
2694
|
+
}
|
|
2621
2695
|
function answerAsk(rule, ok) {
|
|
2622
2696
|
const current = askQueueRef.current.current();
|
|
2623
2697
|
if (!current) {
|
|
@@ -2747,6 +2821,17 @@ export function App({ config: initialConfig, clearFrame, synchronizedFrames = fa
|
|
|
2747
2821
|
* that was missing: the plan, where it was saved, and the obvious question.
|
|
2748
2822
|
*/
|
|
2749
2823
|
const [planAsk, setPlanAsk] = useState(null);
|
|
2824
|
+
/** The /theme picker: the theme under the cursor, and the one to go back to on Escape. */
|
|
2825
|
+
const [themePick, setThemePick] = useState(null);
|
|
2826
|
+
/**
|
|
2827
|
+
* A question the model asked with options (ask_user), shown as a numbered list to answer from.
|
|
2828
|
+
*
|
|
2829
|
+
* The terminal never wired onAskUser, so the options a model offered were never shown here at
|
|
2830
|
+
* all — only in the browser, and there as plain text.
|
|
2831
|
+
*/
|
|
2832
|
+
const [userQ, setUserQ] = useState(null);
|
|
2833
|
+
/** The picker's rows as last drawn, for a click to be matched against. */
|
|
2834
|
+
const pickerTargetsRef = useRef([]);
|
|
2750
2835
|
const [updatePane, setUpdatePane] = useState(null);
|
|
2751
2836
|
/**
|
|
2752
2837
|
* The version installed in the background, if one was; see auto-update.ts.
|
|
@@ -4459,6 +4544,7 @@ export function App({ config: initialConfig, clearFrame, synchronizedFrames = fa
|
|
|
4459
4544
|
setPlan(null);
|
|
4460
4545
|
setSessionGoal(null);
|
|
4461
4546
|
setStats({ turns: 0, promptTokens: 0, completionTokens: 0, totalTokens: 0 });
|
|
4547
|
+
setSessionTok({ sent: 0, received: 0 });
|
|
4462
4548
|
addSystem('Conversation cleared. The previous session is kept; /resume lists it.');
|
|
4463
4549
|
return;
|
|
4464
4550
|
}
|
|
@@ -4602,6 +4688,27 @@ export function App({ config: initialConfig, clearFrame, synchronizedFrames = fa
|
|
|
4602
4688
|
await choosePick({ value: def.name, label: def.name, desc: '' }, 'provider');
|
|
4603
4689
|
return;
|
|
4604
4690
|
}
|
|
4691
|
+
/*
|
|
4692
|
+
* The theme: the picker with its preview, or a name to switch straight to.
|
|
4693
|
+
*
|
|
4694
|
+
* The same list and the same preview as the screen KONECK opens on the first time, so a
|
|
4695
|
+
* theme looks the same when it is chosen as when it is changed.
|
|
4696
|
+
*/
|
|
4697
|
+
case '/theme': {
|
|
4698
|
+
const want = arg.trim().toLowerCase();
|
|
4699
|
+
if (want === '') {
|
|
4700
|
+
setThemePick({ at: Math.max(0, THEMES.findIndex(t => t.name === currentTheme())), was: currentTheme() });
|
|
4701
|
+
return;
|
|
4702
|
+
}
|
|
4703
|
+
if (!themeNamed(want)) {
|
|
4704
|
+
addSystem(`No theme called \`${want}\`. Themes: ${THEMES.map(t => `\`${t.name}\``).join(', ')} — or \`/theme\` to see each one.`);
|
|
4705
|
+
return;
|
|
4706
|
+
}
|
|
4707
|
+
applyTheme(want);
|
|
4708
|
+
await setConfigKey('theme', want);
|
|
4709
|
+
addSystem(`Theme set to **${themeNamed(want).label}**.`);
|
|
4710
|
+
return;
|
|
4711
|
+
}
|
|
4605
4712
|
case '/mouse': {
|
|
4606
4713
|
const want = arg.trim().toLowerCase();
|
|
4607
4714
|
if (want !== '' && want !== 'on' && want !== 'off') {
|
|
@@ -5746,7 +5853,7 @@ export function App({ config: initialConfig, clearFrame, synchronizedFrames = fa
|
|
|
5746
5853
|
// to the tail. That fixed the scroll and left the sequence being typed, and the test I wrote
|
|
5747
5854
|
// checked only that the scroll happened. Swallowed here instead: the wheel is read from stdin
|
|
5748
5855
|
// directly, so nothing below needs mouse data at all.
|
|
5749
|
-
if (looksLikeMouseReport(input))
|
|
5856
|
+
if (looksLikeMouseReport(input) || looksLikeCursorReport(input))
|
|
5750
5857
|
return;
|
|
5751
5858
|
// ── Bracketed paste ─────────────────────────────────────────────────────
|
|
5752
5859
|
// This runs before every other branch. A paste carries newlines, and any handler that treats
|
|
@@ -5938,6 +6045,42 @@ export function App({ config: initialConfig, clearFrame, synchronizedFrames = fa
|
|
|
5938
6045
|
* question on screen should not also be typed into a draft behind it. Escape puts it away
|
|
5939
6046
|
* without choosing, which leaves the plan in the transcript and the mode alone.
|
|
5940
6047
|
*/
|
|
6048
|
+
if (themePick) {
|
|
6049
|
+
/*
|
|
6050
|
+
* Read from the theme applied, not from `themePick.at`: a key can arrive before the render
|
|
6051
|
+
* that follows the one before it, and this handler then still holds the old position — Enter
|
|
6052
|
+
* straight after "6" saved the theme the cursor had just left.
|
|
6053
|
+
*/
|
|
6054
|
+
const at = Math.max(0, THEMES.findIndex(t => t.name === currentTheme()));
|
|
6055
|
+
const move = (i) => {
|
|
6056
|
+
const n = (i + THEMES.length) % THEMES.length;
|
|
6057
|
+
applyTheme(THEMES[n].name);
|
|
6058
|
+
setThemePick(p => (p ? { ...p, at: n } : p));
|
|
6059
|
+
};
|
|
6060
|
+
if (key.upArrow) {
|
|
6061
|
+
move(at - 1);
|
|
6062
|
+
return;
|
|
6063
|
+
}
|
|
6064
|
+
if (key.downArrow) {
|
|
6065
|
+
move(at + 1);
|
|
6066
|
+
return;
|
|
6067
|
+
}
|
|
6068
|
+
const digit = Number(input);
|
|
6069
|
+
if (Number.isInteger(digit) && digit >= 1 && digit <= THEMES.length) {
|
|
6070
|
+
move(digit - 1);
|
|
6071
|
+
return;
|
|
6072
|
+
}
|
|
6073
|
+
if (key.return) {
|
|
6074
|
+
chooseTheme(at);
|
|
6075
|
+
return;
|
|
6076
|
+
}
|
|
6077
|
+
if (key.escape) {
|
|
6078
|
+
applyTheme(themePick.was);
|
|
6079
|
+
setThemePick(null);
|
|
6080
|
+
return;
|
|
6081
|
+
}
|
|
6082
|
+
return;
|
|
6083
|
+
}
|
|
5941
6084
|
if (planAsk) {
|
|
5942
6085
|
if (key.escape) {
|
|
5943
6086
|
setPlanAsk(null);
|
|
@@ -5958,20 +6101,36 @@ export function App({ config: initialConfig, clearFrame, synchronizedFrames = fa
|
|
|
5958
6101
|
const index = typed >= 0 ? typed : key.return ? planAsk.choice : -1;
|
|
5959
6102
|
if (index < 0)
|
|
5960
6103
|
return;
|
|
5961
|
-
|
|
5962
|
-
|
|
5963
|
-
|
|
5964
|
-
|
|
6104
|
+
choosePlan(index);
|
|
6105
|
+
return;
|
|
6106
|
+
}
|
|
6107
|
+
/*
|
|
6108
|
+
* A question the model asked with options. The keys answer it only while nothing has been
|
|
6109
|
+
* typed: once somebody starts writing, they are answering in their own words, and the
|
|
6110
|
+
* composer below gets the keys as usual.
|
|
6111
|
+
*/
|
|
6112
|
+
if (userQ && draft === '') {
|
|
6113
|
+
if (key.escape) {
|
|
6114
|
+
setUserQ(null);
|
|
6115
|
+
return;
|
|
6116
|
+
}
|
|
6117
|
+
if (key.upArrow) {
|
|
6118
|
+
setUserQ(q => (q ? { ...q, choice: Math.max(0, q.choice - 1) } : q));
|
|
6119
|
+
return;
|
|
6120
|
+
}
|
|
6121
|
+
if (key.downArrow) {
|
|
6122
|
+
setUserQ(q => (q ? { ...q, choice: Math.min(q.options.length - 1, q.choice + 1) } : q));
|
|
6123
|
+
return;
|
|
6124
|
+
}
|
|
6125
|
+
const digit = Number(input);
|
|
6126
|
+
if (Number.isInteger(digit) && digit >= 1 && digit <= userQ.options.length) {
|
|
6127
|
+
answerUserQ(digit - 1);
|
|
6128
|
+
return;
|
|
6129
|
+
}
|
|
6130
|
+
if (key.return) {
|
|
6131
|
+
answerUserQ(userQ.choice);
|
|
5965
6132
|
return;
|
|
5966
6133
|
}
|
|
5967
|
-
setMode(chosen.mode);
|
|
5968
|
-
modeRef.current = chosen.mode;
|
|
5969
|
-
addSystem(`Carrying out the plan in **${modeSpec(chosen.mode).label}** mode.`
|
|
5970
|
-
+ (planAsk.file ? `\nSaved to \`${planAsk.file}\`` : ''));
|
|
5971
|
-
// The mode has to be in force before the turn starts, which is why it is set on the ref as
|
|
5972
|
-
// well as in state — the turn reads the ref, and state has not settled by the time it does.
|
|
5973
|
-
setTimeout(() => submitDraft(PROCEED_PROMPT), 0);
|
|
5974
|
-
return;
|
|
5975
6134
|
}
|
|
5976
6135
|
if (addProv) {
|
|
5977
6136
|
if (key.escape) {
|
|
@@ -6545,6 +6704,8 @@ export function App({ config: initialConfig, clearFrame, synchronizedFrames = fa
|
|
|
6545
6704
|
}
|
|
6546
6705
|
/** Sends the composer contents: a slash command, or a task for the agent. */
|
|
6547
6706
|
function submitDraft(raw) {
|
|
6707
|
+
// Whatever is sent answers a question on screen, in the options' words or in its own.
|
|
6708
|
+
setUserQ(null);
|
|
6548
6709
|
// The draft is about to be replaced, so an anchor into it no longer points at anything.
|
|
6549
6710
|
setSelAnchor(null);
|
|
6550
6711
|
{
|
|
@@ -6820,6 +6981,21 @@ export function App({ config: initialConfig, clearFrame, synchronizedFrames = fa
|
|
|
6820
6981
|
// Read by renderStep, which is defined above this line, so it goes through a ref rather than
|
|
6821
6982
|
// depending on declaration order.
|
|
6822
6983
|
diffPanelOpenRef.current = diffPanelOpen;
|
|
6984
|
+
/*
|
|
6985
|
+
* The choices on screen, clickable — see click-targets.ts. In the order the keys take them, so
|
|
6986
|
+
* a click answers the prompt the keys would: the theme picker, a permission, a plan, the
|
|
6987
|
+
* model's question, then a picker.
|
|
6988
|
+
*/
|
|
6989
|
+
const clickTargets = themePick
|
|
6990
|
+
? THEMES.map((t, i) => ({ label: t.label, value: () => chooseTheme(i) }))
|
|
6991
|
+
: ask
|
|
6992
|
+
? askOptions(ask.tool, ask.prefix).map(o => ({ label: o.label, value: () => answerAsk(o.rule, o.allow) }))
|
|
6993
|
+
: planAsk
|
|
6994
|
+
? PLAN_CHOICES.map((c, i) => ({ label: c.label, value: () => choosePlan(i) }))
|
|
6995
|
+
: userQ && draft === ''
|
|
6996
|
+
? userQ.options.map((o, i) => ({ label: o, value: () => answerUserQ(i) }))
|
|
6997
|
+
: picker ? pickerTargetsRef.current : null;
|
|
6998
|
+
useClickTargets(clickTargets, run => run(), { mouseAlreadyOn: mouse && altScreen });
|
|
6823
6999
|
sidePanelOpenRef.current = sidePanelOpen;
|
|
6824
7000
|
showDiffsRef.current = showDiffPanel;
|
|
6825
7001
|
const diffPanelWidth = sidePanelOpen
|
|
@@ -7459,7 +7635,23 @@ export function App({ config: initialConfig, clearFrame, synchronizedFrames = fa
|
|
|
7459
7635
|
: { label: 'repoint ' + addProv.name + '? (y/n)',
|
|
7460
7636
|
hint: `it ships with KONECK, pointing at ${shadowed?.baseURL}` };
|
|
7461
7637
|
return (_jsxs(Box, { flexDirection: "column", borderStyle: "round", borderColor: CYAN, paddingX: 1, marginTop: 1, width: barWidth, children: [_jsx(Text, { color: CYAN, bold: true, children: "Declare a provider" }), _jsxs(Text, { color: MUTED, children: [ask.hint, " \u00B7 esc to cancel"] }), addProv.name !== '' && (_jsxs(Text, { color: DIM, children: [addProv.name, addProv.url ? ' ' + addProv.url : ''] })), addProv.error && _jsx(Text, { color: CRIMSON, children: addProv.error }), _jsxs(Box, { marginTop: 1, children: [_jsxs(Text, { color: MUTED, children: [ask.label, ": "] }), _jsx(Text, { color: INK, children: addProv.value }), _jsx(Cursor, {})] })] }));
|
|
7462
|
-
})(), keyPrompt && (_jsxs(Box, { flexDirection: "column", borderStyle: "round", borderColor: AMBER, paddingX: 1, marginTop: 1, width: barWidth, children: [_jsxs(Text, { color: AMBER, bold: true, children: ["API key for ", keyPrompt.provider] }), _jsx(Text, { color: MUTED, children: "Paste it and press enter, or ctrl+v to read the clipboard. Held in memory for this session only; esc to cancel." }), keyPrompt.note && _jsx(Text, { color: CYAN, children: keyPrompt.note }), _jsxs(Box, { marginTop: 1, children: [_jsxs(Text, { color: MUTED, children: [keyPrompt.env, ": "] }), _jsx(Text, { color: INK, children: '*'.repeat(Math.min(keyPrompt.value.length, 48)) }), _jsx(Cursor, {}), keyPrompt.value.length > 0 && (_jsxs(Text, { color: DIM, children: [" ", keyPrompt.value.length, " characters"] }))] })] })),
|
|
7638
|
+
})(), keyPrompt && (_jsxs(Box, { flexDirection: "column", borderStyle: "round", borderColor: AMBER, paddingX: 1, marginTop: 1, width: barWidth, children: [_jsxs(Text, { color: AMBER, bold: true, children: ["API key for ", keyPrompt.provider] }), _jsx(Text, { color: MUTED, children: "Paste it and press enter, or ctrl+v to read the clipboard. Held in memory for this session only; esc to cancel." }), keyPrompt.note && _jsx(Text, { color: CYAN, children: keyPrompt.note }), _jsxs(Box, { marginTop: 1, children: [_jsxs(Text, { color: MUTED, children: [keyPrompt.env, ": "] }), _jsx(Text, { color: INK, children: '*'.repeat(Math.min(keyPrompt.value.length, 48)) }), _jsx(Cursor, {}), keyPrompt.value.length > 0 && (_jsxs(Text, { color: DIM, children: [" ", keyPrompt.value.length, " characters"] }))] })] })), themePick && (() => {
|
|
7639
|
+
const w = Math.min(barWidth, 84);
|
|
7640
|
+
const labelWidth = Math.max(...THEMES.map(t => t.label.length));
|
|
7641
|
+
return (_jsxs(Box, { marginTop: 1, flexDirection: "column", borderStyle: "round", borderColor: CYAN, paddingX: 1, width: w, children: [_jsx(Text, { color: INK, bold: true, children: "Theme" }), _jsx(Text, { color: MUTED, children: "Sets KONECK's colours, not your terminal's background." }), _jsx(Text, { children: " " }), THEMES.map((t, i) => {
|
|
7642
|
+
const on = i === themePick.at;
|
|
7643
|
+
return (_jsxs(Text, { wrap: "truncate", ...(on ? { backgroundColor: CYAN, color: ON_ACCENT } : { color: INK }), children: [on ? ' › ' : ' ', _jsx(Text, { bold: true, children: i + 1 }), ' ', t.label.padEnd(labelWidth), _jsx(Text, { ...(on ? {} : { color: DIM }), children: ' ' + t.note }), t.name === themePick.was ? ' (current)' : '', ' '] }, t.name));
|
|
7644
|
+
}), _jsx(Text, { children: " " }), _jsx(ThemePreview, { theme: THEMES[themePick.at].name, width: w - 4 }), _jsxs(Text, { color: DIM, children: ["\u2191\u2193 or 1\u2013", THEMES.length, " to try \u00B7 enter to keep \u00B7 esc to go back"] })] }));
|
|
7645
|
+
})(), userQ && !planAsk && !ask && (() => {
|
|
7646
|
+
const lines = [
|
|
7647
|
+
userQ.question,
|
|
7648
|
+
'',
|
|
7649
|
+
...userQ.options.map((o, i) => i === userQ.choice ? `**${G.caret} ${i + 1}. ${o}**` : ` ${i + 1}. ${o}`),
|
|
7650
|
+
'',
|
|
7651
|
+
'Press a number, or up/down and enter, or click one — or type your own answer. Esc hides this.',
|
|
7652
|
+
];
|
|
7653
|
+
return (_jsx(Box, { marginTop: 1, children: _jsx(Panel, { width: Math.min(barWidth, 84), color: AMBER, title: "The model is asking", children: lines }) }));
|
|
7654
|
+
})(), planAsk && (() => {
|
|
7463
7655
|
/*
|
|
7464
7656
|
* The question, straight after the plan rather than instead of it.
|
|
7465
7657
|
*
|
|
@@ -7582,6 +7774,9 @@ export function App({ config: initialConfig, clearFrame, synchronizedFrames = fa
|
|
|
7582
7774
|
const header = item.group && item.group !== lastGroup ? item.group : null;
|
|
7583
7775
|
lastGroup = item.group;
|
|
7584
7776
|
const label = pickerLabel(item.label, labelWidth);
|
|
7777
|
+
if (i === 0)
|
|
7778
|
+
pickerTargetsRef.current = [];
|
|
7779
|
+
pickerTargetsRef.current.push({ label: label.trimEnd(), value: () => { void choosePick(item); } });
|
|
7585
7780
|
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}` +
|
|
7586
7781
|
`${item.current ? '(current) ' : ''}${header ? `${header} · ` : ''}${item.desc}`, width) }) }, item.value + absolute));
|
|
7587
7782
|
}), 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] }))] }));
|
|
@@ -7622,7 +7817,7 @@ export function App({ config: initialConfig, clearFrame, synchronizedFrames = fa
|
|
|
7622
7817
|
const facts = statusFacts({
|
|
7623
7818
|
model: cfg.model, limit, promptTokens: ctxFill?.tokens ?? 0,
|
|
7624
7819
|
cwd: cfg.cwd, home: os.homedir(), delta: totalsOf(liveDiffs),
|
|
7625
|
-
version: VERSION, fixedTokens: ctxFill?.fixed,
|
|
7820
|
+
version: VERSION, fixedTokens: ctxFill?.fixed, session: sessionTok,
|
|
7626
7821
|
});
|
|
7627
7822
|
const sep = _jsx(Text, { color: DIM, children: ' · ' });
|
|
7628
7823
|
const bar = facts.ctx ? barCells(facts.ctx.fraction, 10) : null;
|
|
@@ -7639,7 +7834,15 @@ export function App({ config: initialConfig, clearFrame, synchronizedFrames = fa
|
|
|
7639
7834
|
* cheap; growing numbers update in place.
|
|
7640
7835
|
*/
|
|
7641
7836
|
const segmentsKey = `f${facts.context !== '' ? 1 : 0}${facts.ctx ? 1 : 0}${facts.delta ? 1 : 0}`;
|
|
7642
|
-
|
|
7837
|
+
/*
|
|
7838
|
+
* The session's tokens on the right, as Claude Code puts its count: asked for as "does
|
|
7839
|
+
* koneck cli show total tokens as they accumulate for the session". It gives way first —
|
|
7840
|
+
* the left side is what somebody glances at — so it is left out when the line would leave
|
|
7841
|
+
* the left side fewer than sixty columns.
|
|
7842
|
+
*/
|
|
7843
|
+
const label = facts.tokens?.label ?? '';
|
|
7844
|
+
const right = label !== '' && uiWidth - 9 - label.length - 2 >= 60 ? label : '';
|
|
7845
|
+
return (_jsxs(Box, { paddingX: 2, width: uiWidth - 5, flexShrink: 0, justifyContent: "space-between", children: [_jsx(Box, { flexShrink: 1, flexGrow: 1, 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] })] })), sep, _jsxs(Text, { color: DIM, children: ["v", facts.version] })] }, segmentsKey) }), right !== '' && (_jsx(Box, { flexShrink: 0, marginLeft: 2, children: _jsx(Text, { color: MUTED, children: right }) }))] }));
|
|
7643
7846
|
})()] }));
|
|
7644
7847
|
}
|
|
7645
7848
|
export async function runInkChatMode(config) {
|