koneck 2.128.70 → 2.128.71
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/ink-chat.d.ts +25 -0
- package/dist/ink-chat.d.ts.map +1 -1
- package/dist/ink-chat.js +87 -8
- package/dist/ink-chat.js.map +1 -1
- package/package.json +1 -1
package/dist/ink-chat.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { type FileDiff } from './diff-view.js';
|
|
3
3
|
import type { AllowRule } from './permissions.js';
|
|
4
4
|
import { type KoneckPolicy } from './policy.js';
|
|
5
|
+
import type { Plan } from './plan.js';
|
|
5
6
|
import type { AgentConfig } from './types.js';
|
|
6
7
|
type Effort = 'low' | 'medium' | 'high' | 'max';
|
|
7
8
|
/** A corrupt or obsolete setting must not turn into an invalid prompt modifier. */
|
|
@@ -162,6 +163,30 @@ export declare function forkRow(task: string, meta: string, width: number, inden
|
|
|
162
163
|
gap: string;
|
|
163
164
|
meta: string;
|
|
164
165
|
};
|
|
166
|
+
/** How long each half of a blink lasts, and how long the cursor stays solid after a key. */
|
|
167
|
+
export declare const BLINK_MS = 530;
|
|
168
|
+
export declare const SOLID_AFTER_KEY_MS = 600;
|
|
169
|
+
/**
|
|
170
|
+
* Whether the painted cursor is showing at this moment.
|
|
171
|
+
*
|
|
172
|
+
* Asked for: "it does not indicate where the typing is, like a blinking indicator". It blinks only
|
|
173
|
+
* where the terminal redraws atomically — elsewhere every blink is a repaint the eye can see, the
|
|
174
|
+
* flicker this interface has spent a long time getting rid of — and stays solid for a moment after
|
|
175
|
+
* each key, as an editor's does, so it is never off while somebody is looking for it.
|
|
176
|
+
*/
|
|
177
|
+
/**
|
|
178
|
+
* The running task in a few lines, for /aside: what was asked, how far the plan has got, how long.
|
|
179
|
+
* Null when nothing is running and there is no plan, so an ordinary aside is left as it was.
|
|
180
|
+
*/
|
|
181
|
+
export declare function asideStatus(s: {
|
|
182
|
+
task: string | null;
|
|
183
|
+
plan: Plan | null;
|
|
184
|
+
busy: boolean;
|
|
185
|
+
elapsedMs: number;
|
|
186
|
+
tools: number;
|
|
187
|
+
liveTool: string | null;
|
|
188
|
+
}): string | null;
|
|
189
|
+
export declare function cursorShowing(now: number, lastKeyAt: number, canBlink: boolean): boolean;
|
|
165
190
|
/**
|
|
166
191
|
* Whether the terminal should report the wheel to KONECK, when nothing has been saved either way.
|
|
167
192
|
*
|
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,KAAmD,MAAM,OAAO,CAAC;AA8BxE,OAAO,EAAyB,KAAK,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAgCtE,OAAO,KAAK,EAAY,SAAS,EAAE,MAAM,kBAAkB,CAAC;AA8B5D,OAAO,EAA6C,KAAK,YAAY,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"ink-chat.d.ts","sourceRoot":"","sources":["../src/ink-chat.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAC;AA8BxE,OAAO,EAAyB,KAAK,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAgCtE,OAAO,KAAK,EAAY,SAAS,EAAE,MAAM,kBAAkB,CAAC;AA8B5D,OAAO,EAA6C,KAAK,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3F,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACtC,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;;;;;;;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AC,CAyFvE"}
|
package/dist/ink-chat.js
CHANGED
|
@@ -624,8 +624,53 @@ export function forkRow(task, meta, width, indent = FORK_LEAD) {
|
|
|
624
624
|
* cursor is drawn when it sits on a character mid-string. Now both cases are the same thing: a
|
|
625
625
|
* painted cell, in the same place, whatever the terminal has to draw with.
|
|
626
626
|
*/
|
|
627
|
-
function Cursor() {
|
|
628
|
-
|
|
627
|
+
function Cursor({ on = true }) {
|
|
628
|
+
// Off is a plain space, not nothing: the cell stays, so the line does not shift as it blinks.
|
|
629
|
+
return on ? _jsx(Text, { backgroundColor: CYAN, children: " " }) : _jsx(Text, { children: " " });
|
|
630
|
+
}
|
|
631
|
+
/** How long each half of a blink lasts, and how long the cursor stays solid after a key. */
|
|
632
|
+
export const BLINK_MS = 530;
|
|
633
|
+
export const SOLID_AFTER_KEY_MS = 600;
|
|
634
|
+
/**
|
|
635
|
+
* Whether the painted cursor is showing at this moment.
|
|
636
|
+
*
|
|
637
|
+
* Asked for: "it does not indicate where the typing is, like a blinking indicator". It blinks only
|
|
638
|
+
* where the terminal redraws atomically — elsewhere every blink is a repaint the eye can see, the
|
|
639
|
+
* flicker this interface has spent a long time getting rid of — and stays solid for a moment after
|
|
640
|
+
* each key, as an editor's does, so it is never off while somebody is looking for it.
|
|
641
|
+
*/
|
|
642
|
+
/**
|
|
643
|
+
* The running task in a few lines, for /aside: what was asked, how far the plan has got, how long.
|
|
644
|
+
* Null when nothing is running and there is no plan, so an ordinary aside is left as it was.
|
|
645
|
+
*/
|
|
646
|
+
export function asideStatus(s) {
|
|
647
|
+
const steps = s.plan?.steps ?? [];
|
|
648
|
+
if (!s.busy && steps.length === 0)
|
|
649
|
+
return null;
|
|
650
|
+
const lines = ['**Status now**'];
|
|
651
|
+
if (s.task)
|
|
652
|
+
lines.push(`Task: ${s.task.length > 160 ? s.task.slice(0, 157) + '…' : s.task}`);
|
|
653
|
+
if (steps.length) {
|
|
654
|
+
const done = steps.filter(x => x.state === 'done').length;
|
|
655
|
+
const doing = steps.find(x => x.state === 'doing') ?? steps.find(x => x.state === 'todo');
|
|
656
|
+
const blocked = steps.filter(x => x.state === 'blocked').length;
|
|
657
|
+
lines.push(`Plan: ${done} of ${steps.length} steps done`
|
|
658
|
+
+ (blocked ? `, ${blocked} blocked` : '')
|
|
659
|
+
+ (doing ? ` — now on "${doing.text}"` : ''));
|
|
660
|
+
}
|
|
661
|
+
if (s.busy) {
|
|
662
|
+
lines.push(`Working for ${fmtElapsed(s.elapsedMs)}`
|
|
663
|
+
+ (s.tools ? `, ${s.tools} tool call${s.tools === 1 ? '' : 's'} so far` : '')
|
|
664
|
+
+ (s.liveTool ? `, running ${s.liveTool} now` : '') + '.');
|
|
665
|
+
}
|
|
666
|
+
return lines.join('\n');
|
|
667
|
+
}
|
|
668
|
+
export function cursorShowing(now, lastKeyAt, canBlink) {
|
|
669
|
+
if (!canBlink)
|
|
670
|
+
return true;
|
|
671
|
+
if (now - lastKeyAt < SOLID_AFTER_KEY_MS)
|
|
672
|
+
return true;
|
|
673
|
+
return Math.floor(now / BLINK_MS) % 2 === 0;
|
|
629
674
|
}
|
|
630
675
|
/**
|
|
631
676
|
* Whether the terminal should report the wheel to KONECK, when nothing has been saved either way.
|
|
@@ -3170,6 +3215,20 @@ export function App({ config: initialConfig, clearFrame, synchronizedFrames = fa
|
|
|
3170
3215
|
const showDiffsRef = useRef(true);
|
|
3171
3216
|
/** When a key was last pressed. The animation stands down while somebody is typing. */
|
|
3172
3217
|
const lastKeyAtRef = useRef(0);
|
|
3218
|
+
/*
|
|
3219
|
+
* The cursor's blink while nothing else redraws. A turn in progress redraws on its own — the
|
|
3220
|
+
* spinner — and carries the blink with it; idle, this is the only thing that does, and only where
|
|
3221
|
+
* a redraw is composited (see cursorShowing).
|
|
3222
|
+
*/
|
|
3223
|
+
const [, setBlinkTick] = useState(0);
|
|
3224
|
+
useEffect(() => {
|
|
3225
|
+
if (!syncedFramesRef.current)
|
|
3226
|
+
return;
|
|
3227
|
+
if (busy && animate)
|
|
3228
|
+
return;
|
|
3229
|
+
const timer = setInterval(() => setBlinkTick(n => n + 1), BLINK_MS);
|
|
3230
|
+
return () => clearInterval(timer);
|
|
3231
|
+
}, [busy, animate]);
|
|
3173
3232
|
const wordTimer = useRef(0);
|
|
3174
3233
|
// Register on the session bus so other running KONECK instances can reach this one.
|
|
3175
3234
|
useEffect(() => {
|
|
@@ -3947,9 +4006,28 @@ export function App({ config: initialConfig, clearFrame, synchronizedFrames = fa
|
|
|
3947
4006
|
return;
|
|
3948
4007
|
}
|
|
3949
4008
|
addRow({ role: 'user', text: `/aside ${question}` });
|
|
4009
|
+
/*
|
|
4010
|
+
* What KONECK already knows, said at once, and handed to the model with the question.
|
|
4011
|
+
*
|
|
4012
|
+
* The aside ran a fresh agent on the bare question, so "how far from finishing" was asked of
|
|
4013
|
+
* something that had never heard of the task — and on a local Ollama it waited behind the main
|
|
4014
|
+
* turn's request before even guessing. The plan, the step in progress and the time spent are
|
|
4015
|
+
* facts this interface holds; they need no model and no wait.
|
|
4016
|
+
*/
|
|
4017
|
+
const status = asideStatus({
|
|
4018
|
+
task: retryTaskRef.current, plan, busy,
|
|
4019
|
+
elapsedMs: busy && busyStart.current ? Date.now() - busyStart.current : 0,
|
|
4020
|
+
tools: turnToolsRef.current, liveTool: liveToolRef.current?.name ?? null,
|
|
4021
|
+
});
|
|
4022
|
+
if (status)
|
|
4023
|
+
addSystem(status);
|
|
3950
4024
|
try {
|
|
3951
4025
|
const { runAgent } = await import('./engine.js');
|
|
3952
|
-
const result = await runAgent(
|
|
4026
|
+
const result = await runAgent(status
|
|
4027
|
+
? `[A side question, asked while another agent works on the task below. Answer it from this `
|
|
4028
|
+
+ `status first; read files only if the status does not answer it. Do not change anything.]\n`
|
|
4029
|
+
+ `${status}\n\nQuestion: ${question}`
|
|
4030
|
+
: question, {
|
|
3953
4031
|
...cfg, ci: true, silent: true,
|
|
3954
4032
|
// This is enforced at the engine approval boundary, not left as a prompt suggestion:
|
|
3955
4033
|
// a concurrent side question cannot edit, run a command, persist memory, or call MCP.
|
|
@@ -7898,11 +7976,12 @@ export function App({ config: initialConfig, clearFrame, synchronizedFrames = fa
|
|
|
7898
7976
|
if (sel) {
|
|
7899
7977
|
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]) })] }));
|
|
7900
7978
|
}
|
|
7901
|
-
return (_jsxs(_Fragment, { children: [_jsx(Text, { color: INK, children: draft.slice(0, caret) }),
|
|
7902
|
-
|
|
7903
|
-
|
|
7904
|
-
? _jsxs(_Fragment, { children: [_jsx(Text, { backgroundColor: CYAN, color: ON_ACCENT, children: draft[caret] }), _jsx(Text, { color: INK, children: draft.slice(caret + 1) })] })
|
|
7905
|
-
: _jsx(Cursor, {
|
|
7979
|
+
return (_jsxs(_Fragment, { children: [_jsx(Text, { color: INK, children: draft.slice(0, caret) }), (() => {
|
|
7980
|
+
const on = cursorShowing(Date.now(), lastKeyAtRef.current, syncedFramesRef.current);
|
|
7981
|
+
return caret < draft.length
|
|
7982
|
+
? _jsxs(_Fragment, { children: [_jsx(Text, { ...(on ? { backgroundColor: CYAN, color: ON_ACCENT } : { color: INK }), children: draft[caret] }), _jsx(Text, { color: INK, children: draft.slice(caret + 1) })] })
|
|
7983
|
+
: _jsx(Cursor, { on: on });
|
|
7984
|
+
})(), _jsx(Text, { color: DIM, children: draft === '' && !busy ? ' ' + sliceToWidth(PLACEHOLDER, Math.max(0, uiWidth - 13)).text : '' })] }));
|
|
7906
7985
|
})()] }) }), copyNotice && _jsx(Text, { color: CYAN, children: copyNotice }), (() => {
|
|
7907
7986
|
const limit = ctxFill?.limit ?? detectedContext?.limit
|
|
7908
7987
|
?? contextLimitWithSource(cfg.model, cfg.contextTokens, servesOwnWeights(cfg.provider)).limit;
|