koneck 2.25.57 → 2.25.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/context-limit.d.ts +21 -0
- package/dist/context-limit.d.ts.map +1 -1
- package/dist/context-limit.js +29 -0
- package/dist/context-limit.js.map +1 -1
- package/dist/engine.d.ts +20 -1
- package/dist/engine.d.ts.map +1 -1
- package/dist/engine.js +80 -13
- package/dist/engine.js.map +1 -1
- package/dist/glyphs.d.ts +2 -0
- package/dist/glyphs.d.ts.map +1 -1
- package/dist/glyphs.js +2 -0
- package/dist/glyphs.js.map +1 -1
- package/dist/ink-chat.d.ts +15 -0
- package/dist/ink-chat.d.ts.map +1 -1
- package/dist/ink-chat.js +34 -3
- package/dist/ink-chat.js.map +1 -1
- package/dist/logo.d.ts +7 -3
- package/dist/logo.d.ts.map +1 -1
- package/dist/logo.js +15 -11
- package/dist/logo.js.map +1 -1
- package/package.json +1 -1
package/dist/glyphs.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"glyphs.d.ts","sourceRoot":"","sources":["../src/glyphs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,MAAM,WAAW,QAAQ;IACvB,oCAAoC;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,kCAAkC;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,kDAAkD;IAClD,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,wEAAwE;IACxE,QAAQ,EAAE,MAAM,CAAC;IACjB,iBAAiB;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,uCAAuC;IACvC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IAC3B,yFAAyF;IACzF,KAAK,EAAE,OAAO,CAAC;CAChB;
|
|
1
|
+
{"version":3,"file":"glyphs.d.ts","sourceRoot":"","sources":["../src/glyphs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,MAAM,WAAW,QAAQ;IACvB,oCAAoC;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,kCAAkC;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,kDAAkD;IAClD,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,wEAAwE;IACxE,QAAQ,EAAE,MAAM,CAAC;IACjB,4BAA4B;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,iBAAiB;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,uCAAuC;IACvC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IAC3B,yFAAyF;IACzF,KAAK,EAAE,OAAO,CAAC;CAChB;AA6BD;;;;;;GAMG;AACH,wBAAgB,UAAU,CACxB,QAAQ,GAAE,MAAyB,EACnC,QAAQ,GAAE,MAAM,GAAG,SAAwC,EAC3D,IAAI,GAAE,MAAM,GAAG,SAA+B,GAC7C,QAAQ,CAKV;AAED,eAAO,MAAM,CAAC,EAAE,QAAuB,CAAC"}
|
package/dist/glyphs.js
CHANGED
|
@@ -18,6 +18,7 @@ const UNICODE = {
|
|
|
18
18
|
ok: '✓',
|
|
19
19
|
fail: '✖',
|
|
20
20
|
ellipsis: '…',
|
|
21
|
+
search: '⌕',
|
|
21
22
|
left: '←',
|
|
22
23
|
right: '→',
|
|
23
24
|
spinner: ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏'],
|
|
@@ -30,6 +31,7 @@ const ASCII = {
|
|
|
30
31
|
ok: '+',
|
|
31
32
|
fail: 'x',
|
|
32
33
|
ellipsis: '...',
|
|
34
|
+
search: '/',
|
|
33
35
|
left: '<',
|
|
34
36
|
right: '>',
|
|
35
37
|
spinner: ['|', '/', '-', '\\'],
|
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;AAuBH,MAAM,OAAO,GAAa;IACxB,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,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,OAAO,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC;IAC9B,KAAK,EAAE,IAAI;CACZ,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,UAAU,UAAU,CACxB,WAAmB,OAAO,CAAC,QAAQ,EACnC,WAA+B,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,EAC3D,OAA2B,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC;IAE9C,IAAI,QAAQ,KAAK,OAAO;QAAE,OAAO,KAAK,CAAC;IACvC,IAAI,QAAQ,KAAK,SAAS;QAAE,OAAO,OAAO,CAAC;IAC3C,IAAI,IAAI,KAAK,MAAM;QAAE,OAAO,KAAK,CAAC;IAClC,OAAO,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC;AAChD,CAAC;AAED,MAAM,CAAC,MAAM,CAAC,GAAa,UAAU,EAAE,CAAC"}
|
package/dist/ink-chat.d.ts
CHANGED
|
@@ -156,6 +156,21 @@ export declare function sessionTitle(meta: {
|
|
|
156
156
|
task?: string;
|
|
157
157
|
id: string;
|
|
158
158
|
}): string;
|
|
159
|
+
/**
|
|
160
|
+
* The line at the top right of a picker.
|
|
161
|
+
*
|
|
162
|
+
* Says where you are, not merely how many rows exist — and says when a filter is hiding some,
|
|
163
|
+
* which "9 matches" cannot. A list that silently narrowed as you typed was indistinguishable
|
|
164
|
+
* from one that had mysteriously changed.
|
|
165
|
+
*/
|
|
166
|
+
export declare function pickerCountText(selected: number, shown: number, total: number): string;
|
|
167
|
+
/**
|
|
168
|
+
* How much of a row belongs to the label.
|
|
169
|
+
*
|
|
170
|
+
* Sized from the rows actually on screen rather than fixed: a session title is what identifies
|
|
171
|
+
* its row, and the constant 36 that was here cut most of them in half.
|
|
172
|
+
*/
|
|
173
|
+
export declare function pickerLabelWidth(labels: readonly string[], descs: readonly string[], width: number): number;
|
|
159
174
|
export declare function runInkChatMode(config: AgentConfig): Promise<void>;
|
|
160
175
|
export {};
|
|
161
176
|
//# sourceMappingURL=ink-chat.d.ts.map
|
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":"AAgDA,OAAO,KAAK,EAAY,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAS5D,OAAO,KAAK,EAAE,WAAW,EAAiB,MAAM,YAAY,CAAC;AAoE7D,6FAA6F;AAC7F,wBAAgB,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAM7C;AA0BD;;;;;;;GAOG;AACH,wBAAgB,cAAc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AY,GAAG,UAAU,GAAG,MAAM,CAAC;AAE7D,wBAAgB,WAAW,CAAC,IAAI,EAAE;IAChC,SAAS,CAAC,EAAE,OAAO,CAAC;IAAC,MAAM,CAAC,EAAE,OAAO,CAAC;IAAC,GAAG,CAAC,EAAE,OAAO,CAAC;CACtD,GAAG,WAAW,CAMd;AAGD,2DAA2D;AAC3D,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAIhD;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAKvF;AAGD;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAKtF;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,SAAS,MAAM,EAAE,EACzB,KAAK,EAAE,SAAS,MAAM,EAAE,EACxB,KAAK,EAAE,MAAM,GACZ,MAAM,CAIR;AA8jGD,wBAAsB,cAAc,CAAC,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAQvE"}
|
package/dist/ink-chat.js
CHANGED
|
@@ -594,6 +594,31 @@ export function sessionTitle(meta) {
|
|
|
594
594
|
return meta.id;
|
|
595
595
|
return task.length > 64 ? task.slice(0, 63) + '…' : task;
|
|
596
596
|
}
|
|
597
|
+
/**
|
|
598
|
+
* The line at the top right of a picker.
|
|
599
|
+
*
|
|
600
|
+
* Says where you are, not merely how many rows exist — and says when a filter is hiding some,
|
|
601
|
+
* which "9 matches" cannot. A list that silently narrowed as you typed was indistinguishable
|
|
602
|
+
* from one that had mysteriously changed.
|
|
603
|
+
*/
|
|
604
|
+
export function pickerCountText(selected, shown, total) {
|
|
605
|
+
if (shown === 0)
|
|
606
|
+
return 'no matches · esc to close';
|
|
607
|
+
return `${selected + 1} of ${shown}` +
|
|
608
|
+
(shown < total ? ` (filtered from ${total})` : '') +
|
|
609
|
+
' · esc to close';
|
|
610
|
+
}
|
|
611
|
+
/**
|
|
612
|
+
* How much of a row belongs to the label.
|
|
613
|
+
*
|
|
614
|
+
* Sized from the rows actually on screen rather than fixed: a session title is what identifies
|
|
615
|
+
* its row, and the constant 36 that was here cut most of them in half.
|
|
616
|
+
*/
|
|
617
|
+
export function pickerLabelWidth(labels, descs, width) {
|
|
618
|
+
const longestDesc = Math.max(0, ...descs.map(d => d.length));
|
|
619
|
+
const longestLabel = Math.max(18, ...labels.map(l => l.length));
|
|
620
|
+
return Math.max(18, Math.min(longestLabel, width - longestDesc - 4));
|
|
621
|
+
}
|
|
597
622
|
const MODES = MODE_SPECS.map(m => m.name);
|
|
598
623
|
const HELP_TEXT = `
|
|
599
624
|
Type / on an empty line to browse every command; keep typing to filter.
|
|
@@ -3318,19 +3343,25 @@ function App({ config: initialConfig }) {
|
|
|
3318
3343
|
// screen a list of short model names in a full-width box is mostly empty box.
|
|
3319
3344
|
// The header is a title on the left and a count on the right, on one line. Estimating the
|
|
3320
3345
|
// right-hand side at a constant made "Reference a file or directory" wrap onto two rows.
|
|
3321
|
-
const countText =
|
|
3346
|
+
const countText = pickerCountText(pickIndex, list.length, picker.items.length);
|
|
3322
3347
|
const headWidth = title.length + countText.length + 3;
|
|
3323
3348
|
const rowWidth = Math.max(headWidth, ...shown.map(it => 38 + (it.current ? 10 : 0) + it.desc.length));
|
|
3324
3349
|
const boxWidth = Math.max(40, Math.min(barWidth, rowWidth + 4));
|
|
3325
3350
|
const width = boxWidth - 4;
|
|
3351
|
+
// Room for the longest label the list actually holds, rather than a constant. A session
|
|
3352
|
+
// title is what identifies the row, and 36 cells cut most of them in half.
|
|
3353
|
+
const labelWidth = pickerLabelWidth(shown.map(it => it.label), shown.map(it => it.desc), width);
|
|
3326
3354
|
let lastGroup;
|
|
3327
|
-
return (_jsxs(Box, { flexDirection: "column", borderStyle: "round", borderColor: CYAN, paddingX: 1, marginTop: 1, width: boxWidth, children: [_jsxs(Box, { justifyContent: "space-between", children: [_jsx(Text, { color: CYAN, bold: true, children: title }), _jsx(Text, { color: DIM, children: countText })] }),
|
|
3355
|
+
return (_jsxs(Box, { flexDirection: "column", borderStyle: "round", borderColor: CYAN, paddingX: 1, marginTop: 1, width: boxWidth, children: [_jsxs(Box, { justifyContent: "space-between", children: [_jsx(Text, { color: CYAN, bold: true, children: title }), _jsx(Text, { color: DIM, children: countText })] }), _jsxs(Box, { children: [_jsxs(Text, { color: DIM, children: [G.search, " "] }), pickQuery === ''
|
|
3356
|
+
? _jsx(Text, { color: DIM, children: "type to search" })
|
|
3357
|
+
: _jsx(Text, { color: INK, children: pickQuery }), _jsx(Text, { color: CYAN, children: pickQuery === '' ? '' : '▌' })] }), list.length === 0 && _jsxs(Text, { color: MUTED, children: ["Nothing matches \"", pickQuery, "\""] }), shown.map((item, i) => {
|
|
3328
3358
|
const absolute = Math.max(0, start) + i;
|
|
3329
3359
|
const selected = absolute === pickIndex;
|
|
3330
3360
|
const header = item.group && item.group !== lastGroup ? item.group : null;
|
|
3331
3361
|
lastGroup = item.group;
|
|
3332
3362
|
const label = item.label.length > 34 ? item.label.slice(0, 31) + '...' : item.label;
|
|
3333
|
-
return (_jsxs(Box, { flexDirection: "column", children: [header && _jsx(Text, { color: DIM, children: header }), _jsx(Text, { backgroundColor: selected ? CYAN : undefined, color: selected ? '#10222A' : INK, bold: selected, children: fitCells(`${selected ? G.caret + ' ' : ' '}${fitCells(label,
|
|
3363
|
+
return (_jsxs(Box, { flexDirection: "column", children: [header && _jsx(Text, { color: DIM, children: header }), _jsx(Text, { backgroundColor: selected ? CYAN : undefined, color: selected ? '#10222A' : INK, bold: selected, children: fitCells(`${selected ? G.caret + ' ' : ' '}${fitCells(label, labelWidth)}` +
|
|
3364
|
+
`${item.current ? '(current) ' : ''}${item.desc}`, width) })] }, item.value + absolute));
|
|
3334
3365
|
}), list.length > PICKER_ROWS && (_jsxs(Text, { color: DIM, children: ["\u2191\u2193 navigate \u00B7 enter select \u00B7 showing ", Math.max(0, start) + 1, "\u2013", Math.max(0, start) + shown.length, " of ", list.length] }))] }));
|
|
3335
3366
|
})(), 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. Held in memory for this session only; esc to cancel." }), _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(Text, { color: CYAN, children: "\u2588" })] })] })), ask && (() => {
|
|
3336
3367
|
let detail = '';
|