koneck 2.128.54 → 2.128.56
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/engine.js +1 -1
- package/dist/engine.js.map +1 -1
- package/dist/ink-chat.d.ts +19 -0
- package/dist/ink-chat.d.ts.map +1 -1
- package/dist/ink-chat.js +42 -25
- package/dist/ink-chat.js.map +1 -1
- package/dist/status-line.d.ts +34 -0
- package/dist/status-line.d.ts.map +1 -1
- package/dist/status-line.js +26 -0
- package/dist/status-line.js.map +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/version.d.ts +9 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +20 -0
- package/dist/version.js.map +1 -0
- package/dist/web/sessions.d.ts.map +1 -1
- package/dist/web/sessions.js +4 -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 +17 -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 +3 -0
- package/dist/web/ui-css.js.map +1 -1
- package/package.json +1 -1
package/dist/ink-chat.d.ts
CHANGED
|
@@ -381,6 +381,25 @@ export type ContextWindowFact = {
|
|
|
381
381
|
source: string;
|
|
382
382
|
};
|
|
383
383
|
/** A context report names the evidence for its denominator instead of pretending every model fits. */
|
|
384
|
+
/**
|
|
385
|
+
* What the turn is waiting on, for the bracket after the elapsed time.
|
|
386
|
+
*
|
|
387
|
+
* Reasoning comes first once any has arrived. A reasoning chunk carries no reply text, so it
|
|
388
|
+
* counted as a frame "before content" and the line said "ollama is holding the line, no output
|
|
389
|
+
* yet" — with the thinking count tacked on after it — for the whole time the model was visibly
|
|
390
|
+
* thinking. Reported as: "koneck write 'ollama is holding the line, no output' yet the model is
|
|
391
|
+
* already thinking". Holding the line is for frames that carry nothing at all: a gateway's
|
|
392
|
+
* keep-alives. The browser already said "thinking" here.
|
|
393
|
+
*/
|
|
394
|
+
export declare function waitDetail(w: {
|
|
395
|
+
liveTokens: number;
|
|
396
|
+
tool: string | null;
|
|
397
|
+
provider: string;
|
|
398
|
+
frames: number;
|
|
399
|
+
elapsedMs: number;
|
|
400
|
+
thinkingChars: number;
|
|
401
|
+
thinkingRecent: boolean;
|
|
402
|
+
}): string;
|
|
384
403
|
export declare function contextStatusText(model: string, sessionPromptTokens: number, configuredLimit?: number, detected?: ContextWindowFact | null): string;
|
|
385
404
|
export declare function commandRunsWhileBusy(cmd: string, arg?: string): boolean;
|
|
386
405
|
export declare function commandNeedsArgument(cmd: string): boolean;
|
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;
|
|
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;AAuB5D,OAAO,EAA6C,KAAK,YAAY,EAAE,MAAM,aAAa,CAAC;AAG3F,OAAO,KAAK,EAAE,WAAW,EAAiB,MAAM,YAAY,CAAC;AAmE7D,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,g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E,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,CA4zMhE;AAED,wBAAsB,cAAc,CAAC,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAmFvE"}
|
package/dist/ink-chat.js
CHANGED
|
@@ -31,20 +31,12 @@ import { bar, humanTokens, humanDuration, contextWindowFor, recordStatus, classi
|
|
|
31
31
|
import { Markdown, Panel, panelWidth, safeCommitPoint, displayWidth, sliceToWidth } from './markdown-ink.js';
|
|
32
32
|
import { G } from './glyphs.js';
|
|
33
33
|
import { fetchUpdateStatus, updateCommand } from './update-check.js';
|
|
34
|
-
import {
|
|
34
|
+
import { statSync } from 'fs';
|
|
35
35
|
import { promises as fsp } from 'fs';
|
|
36
36
|
import { fileURLToPath } from 'url';
|
|
37
37
|
import path from 'path';
|
|
38
38
|
/** Read once at load so the running version can always be shown without a lookup per render. */
|
|
39
|
-
const VERSION =
|
|
40
|
-
try {
|
|
41
|
-
const here = path.dirname(fileURLToPath(import.meta.url));
|
|
42
|
-
return JSON.parse(readFileSync(path.resolve(here, '..', 'package.json'), 'utf-8')).version;
|
|
43
|
-
}
|
|
44
|
-
catch {
|
|
45
|
-
return 'unknown';
|
|
46
|
-
}
|
|
47
|
-
})();
|
|
39
|
+
const VERSION = KONECK_VERSION;
|
|
48
40
|
import { startBus, listSessions as listBusSessions, resolveTarget, deliver, } from './session-bus.js';
|
|
49
41
|
import { MODES as MODE_SPECS, modeSpec, decide, loadRules, saveRules, addRule, commandPrefixSuggestion, describeRule, ruleMatches, toolRisk, isReadOnlyCommand, } from './permissions.js';
|
|
50
42
|
import { AskQueue } from './ask-queue.js';
|
|
@@ -52,7 +44,8 @@ import { contextLimitWithSource } from './context-limit.js';
|
|
|
52
44
|
import { planSummary } from './plan.js';
|
|
53
45
|
import { SessionChanges, readForDiff as readForDiffAt, totalsOf } from './session-changes.js';
|
|
54
46
|
import os from 'node:os';
|
|
55
|
-
import { modeLine, nextMode, statusFacts, barCells, PLACEHOLDER } from './status-line.js';
|
|
47
|
+
import { modeLine, nextMode, statusFacts, barCells, PLACEHOLDER, contextSplit, contextSplitLines } from './status-line.js';
|
|
48
|
+
import { KONECK_VERSION } from './version.js';
|
|
56
49
|
import { savePlan, plansDir, PLAN_CHOICES, PROCEED_PROMPT } from './plan-file.js';
|
|
57
50
|
import { logoFor } from './logo.js';
|
|
58
51
|
import { describeActivity } from './activity.js';
|
|
@@ -1270,6 +1263,34 @@ export function inkApprovalDecision(requireApproval, mode, tool, argsJson, rules
|
|
|
1270
1263
|
return rules.some(rule => ruleMatches(rule, tool, argsJson)) ? 'allow' : 'ask';
|
|
1271
1264
|
}
|
|
1272
1265
|
/** A context report names the evidence for its denominator instead of pretending every model fits. */
|
|
1266
|
+
/**
|
|
1267
|
+
* What the turn is waiting on, for the bracket after the elapsed time.
|
|
1268
|
+
*
|
|
1269
|
+
* Reasoning comes first once any has arrived. A reasoning chunk carries no reply text, so it
|
|
1270
|
+
* counted as a frame "before content" and the line said "ollama is holding the line, no output
|
|
1271
|
+
* yet" — with the thinking count tacked on after it — for the whole time the model was visibly
|
|
1272
|
+
* thinking. Reported as: "koneck write 'ollama is holding the line, no output' yet the model is
|
|
1273
|
+
* already thinking". Holding the line is for frames that carry nothing at all: a gateway's
|
|
1274
|
+
* keep-alives. The browser already said "thinking" here.
|
|
1275
|
+
*/
|
|
1276
|
+
export function waitDetail(w) {
|
|
1277
|
+
const thinking = `thinking, ${fmtTokens(Math.round(w.thinkingChars / 4))} reasoning tokens`;
|
|
1278
|
+
if (w.liveTokens > 0) {
|
|
1279
|
+
// Reply text has come and the model has gone back to reasoning: both are true, both are said.
|
|
1280
|
+
return `${fmtTokens(w.liveTokens)} tokens` + (w.thinkingChars > 0 && w.thinkingRecent ? ` | ${thinking}` : '');
|
|
1281
|
+
}
|
|
1282
|
+
if (w.tool)
|
|
1283
|
+
return 'running ' + w.tool;
|
|
1284
|
+
if (w.thinkingChars > 0)
|
|
1285
|
+
return thinking;
|
|
1286
|
+
// A gateway routing to several backends sends content-free frames while it finds one. Saying
|
|
1287
|
+
// "waiting for the first token" through that reads as a hang, when the request was accepted.
|
|
1288
|
+
if (w.frames > 0)
|
|
1289
|
+
return `${w.provider} is holding the line, no output yet`;
|
|
1290
|
+
if (w.elapsedMs > 8_000)
|
|
1291
|
+
return `no response from ${w.provider} yet`;
|
|
1292
|
+
return 'starting';
|
|
1293
|
+
}
|
|
1273
1294
|
export function contextStatusText(model, sessionPromptTokens, configuredLimit, detected) {
|
|
1274
1295
|
const known = detected?.limit ?? configuredLimit ?? contextWindowFor(model);
|
|
1275
1296
|
const source = detected?.source === 'provider' ? 'reported by the connected provider'
|
|
@@ -2161,7 +2182,7 @@ export function App({ config: initialConfig, clearFrame, synchronizedFrames = fa
|
|
|
2161
2182
|
},
|
|
2162
2183
|
onAgentProgress: (list) => { agentsRef.current = list; setAgents(list); },
|
|
2163
2184
|
onWindowDetected: (limit, source) => setDetectedContext({ limit, source }),
|
|
2164
|
-
onContextFill: (tokens, limit) => setCtxFill({ tokens, limit }),
|
|
2185
|
+
onContextFill: (tokens, limit, fixed = 0) => setCtxFill({ tokens, limit, fixed }),
|
|
2165
2186
|
/*
|
|
2166
2187
|
* A hand-back, shown. The engine runs silent under this interface, so its own warning never
|
|
2167
2188
|
* prints — and this callback was never wired, so every "waiting for you" the engine decided
|
|
@@ -4245,7 +4266,7 @@ export function App({ config: initialConfig, clearFrame, synchronizedFrames = fa
|
|
|
4245
4266
|
return;
|
|
4246
4267
|
}
|
|
4247
4268
|
case '/context': {
|
|
4248
|
-
addSystem(contextStatusText(cfg.model, stats.promptTokens, cfg.contextTokens, detectedContext));
|
|
4269
|
+
addSystem(contextStatusText(cfg.model, stats.promptTokens, cfg.contextTokens, detectedContext) + '\n\n**What the last request was made of**\n\n' + contextSplitLines(contextSplit(ctxFill?.tokens ?? 0, ctxFill?.fixed ?? 0, ctxFill?.limit ?? detectedContext?.limit ?? null)).join('\n'));
|
|
4249
4270
|
return;
|
|
4250
4271
|
}
|
|
4251
4272
|
case '/permissions': {
|
|
@@ -7083,17 +7104,12 @@ export function App({ config: initialConfig, clearFrame, synchronizedFrames = fa
|
|
|
7083
7104
|
})(), _jsx(Box, { marginTop: 1, children: _jsxs(Text, { children: [_jsxs(Text, { color: GREEN, children: [animate ? SPINNER[spinFrame] : '●', " "] }), _jsx(Shimmer, { text: workWord({
|
|
7084
7105
|
elapsedMs, tools: turnToolsRef.current,
|
|
7085
7106
|
tokens: liveTokens, recovered: turnRecoveredRef.current,
|
|
7086
|
-
}, spinWord)[0], frame: shimmerFrame, base: MUTED }), _jsx(Text, { color: MUTED, children: "\u2026 " }), _jsxs(Text, { color: DIM, children: ["(", fmtElapsed(elapsedMs), " | ",
|
|
7087
|
-
|
|
7088
|
-
|
|
7089
|
-
|
|
7090
|
-
|
|
7091
|
-
|
|
7092
|
-
: providerFramesRef.current > 0 ? `${cfg.provider} is holding the line, no output yet`
|
|
7093
|
-
: elapsedMs > 8_000 ? `no response from ${cfg.provider} yet`
|
|
7094
|
-
: 'starting', thinkingRef.current.chars > 0 && Date.now() - thinkingRef.current.at < 2_000
|
|
7095
|
-
? ` | thinking, ${fmtTokens(Math.round(thinkingRef.current.chars / 4))} reasoning tokens`
|
|
7096
|
-
: '', ")"] })] }) }), showThinking && !ask && thinkingTextRef.current.trim() !== '' && (_jsx(Box, { flexDirection: "column", paddingLeft: 2, children: thinkingTail(thinkingTextRef.current, THINKING_LINES, barWidth - 6).map((line, i) => (_jsx(Text, { color: DIM, italic: true, children: line }, i))) })), _jsx(Box, { paddingLeft: 2, children: _jsx(Text, { color: DIM, children: "esc to cancel and keep your input \u00B7 ctrl+c to exit" }) })] })) }), usagePane && (() => {
|
|
7107
|
+
}, spinWord)[0], frame: shimmerFrame, base: MUTED }), _jsx(Text, { color: MUTED, children: "\u2026 " }), _jsxs(Text, { color: DIM, children: ["(", fmtElapsed(elapsedMs), " | ", waitDetail({
|
|
7108
|
+
liveTokens, tool: liveToolRef.current?.name ?? null, provider: cfg.provider,
|
|
7109
|
+
frames: providerFramesRef.current, elapsedMs,
|
|
7110
|
+
thinkingChars: thinkingRef.current.chars,
|
|
7111
|
+
thinkingRecent: Date.now() - thinkingRef.current.at < 2_000,
|
|
7112
|
+
}), ")"] })] }) }), showThinking && !ask && thinkingTextRef.current.trim() !== '' && (_jsx(Box, { flexDirection: "column", paddingLeft: 2, children: thinkingTail(thinkingTextRef.current, THINKING_LINES, barWidth - 6).map((line, i) => (_jsx(Text, { color: DIM, italic: true, children: line }, i))) })), _jsx(Box, { paddingLeft: 2, children: _jsx(Text, { color: DIM, children: "esc to cancel and keep your input \u00B7 ctrl+c to exit" }) })] })) }), usagePane && (() => {
|
|
7097
7113
|
const width = Math.min(barWidth, usagePane === 'settings' ? 96 : 66);
|
|
7098
7114
|
const inner = width - 4;
|
|
7099
7115
|
const BAR_W = Math.max(12, inner - 14);
|
|
@@ -7618,6 +7634,7 @@ export function App({ config: initialConfig, clearFrame, synchronizedFrames = fa
|
|
|
7618
7634
|
const facts = statusFacts({
|
|
7619
7635
|
model: cfg.model, limit, promptTokens: ctxFill?.tokens ?? 0,
|
|
7620
7636
|
cwd: cfg.cwd, home: os.homedir(), delta: totalsOf(liveDiffs),
|
|
7637
|
+
version: VERSION, fixedTokens: ctxFill?.fixed,
|
|
7621
7638
|
});
|
|
7622
7639
|
const sep = _jsx(Text, { color: DIM, children: ' · ' });
|
|
7623
7640
|
const bar = facts.ctx ? barCells(facts.ctx.fraction, 10) : null;
|
|
@@ -7634,7 +7651,7 @@ export function App({ config: initialConfig, clearFrame, synchronizedFrames = fa
|
|
|
7634
7651
|
* cheap; growing numbers update in place.
|
|
7635
7652
|
*/
|
|
7636
7653
|
const segmentsKey = `f${facts.context !== '' ? 1 : 0}${facts.ctx ? 1 : 0}${facts.delta ? 1 : 0}`;
|
|
7637
|
-
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) }));
|
|
7654
|
+
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] })] })), sep, _jsxs(Text, { color: DIM, children: ["v", facts.version] })] }, segmentsKey) }));
|
|
7638
7655
|
})()] }));
|
|
7639
7656
|
}
|
|
7640
7657
|
export async function runInkChatMode(config) {
|