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/web/ui-client.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { THEMES } from '../theme.js';
|
|
1
2
|
/**
|
|
2
3
|
* The client, as a string.
|
|
3
4
|
*
|
|
@@ -11,7 +12,9 @@
|
|
|
11
12
|
* untrusted text and routinely contains HTML, because it is often writing HTML.
|
|
12
13
|
*/
|
|
13
14
|
export function clientScript() {
|
|
14
|
-
|
|
15
|
+
// The theme list from theme.ts, so the browser offers exactly the terminal's themes.
|
|
16
|
+
const themes = JSON.stringify(THEMES.map(t => ({ name: t.name, label: t.label, base: t.base })));
|
|
17
|
+
return 'const THEME_LIST = ' + themes + ';\n' + String.raw `
|
|
15
18
|
const $ = (id) => document.getElementById(id);
|
|
16
19
|
|
|
17
20
|
const state = {
|
|
@@ -38,21 +41,20 @@ if (state.token) localStorage.setItem('koneck.token', state.token);
|
|
|
38
41
|
if (location.search.indexOf('token=') !== -1) history.replaceState({}, '', location.pathname);
|
|
39
42
|
|
|
40
43
|
/* ── theme ─────────────────────────────────────────────────── */
|
|
41
|
-
|
|
44
|
+
// The terminal's themes (theme.ts), and "system", which lets the browser's own preference decide.
|
|
45
|
+
const THEMES = [{ name: 'system', label: 'System' }].concat(THEME_LIST);
|
|
42
46
|
function applyTheme(name) {
|
|
47
|
+
if (!THEMES.some((t) => t.name === name)) name = 'system';
|
|
43
48
|
localStorage.setItem('koneck.theme', name);
|
|
44
49
|
// Nothing written means the browser decides, which is what "system" is.
|
|
45
50
|
if (name === 'system') document.documentElement.removeAttribute('data-theme');
|
|
46
51
|
else document.documentElement.setAttribute('data-theme', name);
|
|
47
|
-
|
|
48
|
-
$('theme').
|
|
49
|
-
$('theme').title = 'Theme: ' + label + ' (click to change)';
|
|
52
|
+
$('theme').value = name;
|
|
53
|
+
$('theme').title = 'Theme: ' + THEMES.find((t) => t.name === name).label;
|
|
50
54
|
}
|
|
55
|
+
THEMES.forEach((t) => { const o = document.createElement('option'); o.value = t.name; o.textContent = t.label; $('theme').appendChild(o); });
|
|
51
56
|
applyTheme(localStorage.getItem('koneck.theme') || 'system');
|
|
52
|
-
$('theme').
|
|
53
|
-
const now = localStorage.getItem('koneck.theme') || 'system';
|
|
54
|
-
applyTheme(THEMES[(THEMES.indexOf(now) + 1) % THEMES.length]);
|
|
55
|
-
};
|
|
57
|
+
$('theme').onchange = () => applyTheme($('theme').value);
|
|
56
58
|
|
|
57
59
|
/* ── talking to the server ─────────────────────────────────── */
|
|
58
60
|
const api = async (path, opts) => {
|
|
@@ -155,8 +157,9 @@ function loadMermaid() {
|
|
|
155
157
|
const done = (ok) => {
|
|
156
158
|
mermaidState = ok ? 'ready' : 'unavailable';
|
|
157
159
|
if (ok && window.mermaid) {
|
|
158
|
-
|
|
159
|
-
|
|
160
|
+
// A chosen theme says which ground it is for; with none chosen the browser's preference does.
|
|
161
|
+
const chosen = THEME_LIST.find((t) => t.name === document.documentElement.dataset.theme);
|
|
162
|
+
const dark = chosen ? chosen.base === 'dark' : matchMedia('(prefers-color-scheme: dark)').matches;
|
|
160
163
|
try { window.mermaid.initialize({ startOnLoad: false, securityLevel: 'strict',
|
|
161
164
|
theme: dark ? 'dark' : 'default' }); } catch (e) {}
|
|
162
165
|
}
|
|
@@ -937,6 +940,24 @@ function onEvent(e) {
|
|
|
937
940
|
case 'notice':
|
|
938
941
|
add(el('div', 'notice ' + (e.level === 'info' ? 'info' : ''), e.text));
|
|
939
942
|
break;
|
|
943
|
+
case 'ask-user': {
|
|
944
|
+
// The model's question, with its options as buttons; typing an answer works as ever.
|
|
945
|
+
const box = el('div', 'askuser');
|
|
946
|
+
box.appendChild(el('div', 'aq', e.question));
|
|
947
|
+
const row = el('div', 'aopts');
|
|
948
|
+
e.options.forEach((o, i) => {
|
|
949
|
+
const b = el('button', 'aopt', (i + 1) + '. ' + o);
|
|
950
|
+
b.onclick = () => {
|
|
951
|
+
row.querySelectorAll('button').forEach((x) => { x.disabled = true; });
|
|
952
|
+
b.classList.add('on');
|
|
953
|
+
void send(o);
|
|
954
|
+
};
|
|
955
|
+
row.appendChild(b);
|
|
956
|
+
});
|
|
957
|
+
box.appendChild(row);
|
|
958
|
+
add(box);
|
|
959
|
+
break;
|
|
960
|
+
}
|
|
940
961
|
case 'error': {
|
|
941
962
|
const box = add(el('div', 'err', e.text));
|
|
942
963
|
setBusy(false);
|
|
@@ -3710,10 +3731,13 @@ function renderStatus(st) {
|
|
|
3710
3731
|
parts.push(d);
|
|
3711
3732
|
}
|
|
3712
3733
|
if (f.version) parts.push(el('span', 'sver', 'v' + f.version));
|
|
3734
|
+
// The session's tokens, at the right as the terminal draws them: the same words from the server.
|
|
3735
|
+
const tok = f.tokens ? el('span', 'stok', f.tokens.label) : null;
|
|
3713
3736
|
state.contextLines = f.contextLines || null;
|
|
3714
3737
|
const sl = $('statusline');
|
|
3715
3738
|
sl.textContent = '';
|
|
3716
3739
|
parts.forEach((p, i) => { if (i) sl.append(el('span', 'ssep', '·')); sl.append(p); });
|
|
3740
|
+
if (tok) sl.append(tok);
|
|
3717
3741
|
state.mode = st.mode.mode;
|
|
3718
3742
|
$('pmode').innerHTML = 'mode <b>' + esc(st.mode.title) + '</b>';
|
|
3719
3743
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ui-client.js","sourceRoot":"","sources":["../../src/web/ui-client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,YAAY;IAC1B,OAAO,MAAM,CAAC,GAAG,CAAA
|
|
1
|
+
{"version":3,"file":"ui-client.js","sourceRoot":"","sources":["../../src/web/ui-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,YAAY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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAq4N3D,CAAC;AACF,CAAC"}
|
package/dist/web/ui-css.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ui-css.d.ts","sourceRoot":"","sources":["../../src/web/ui-css.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ui-css.d.ts","sourceRoot":"","sources":["../../src/web/ui-css.ts"],"names":[],"mappings":"AA+CA,wBAAgB,GAAG,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAuoD3C"}
|
package/dist/web/ui-css.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { themeCss } from '../theme.js';
|
|
1
2
|
/**
|
|
2
3
|
* The stylesheet, and the three themes.
|
|
3
4
|
*
|
|
@@ -71,10 +72,7 @@ export function css(markUrl) {
|
|
|
71
72
|
--radius:10px; --mono:ui-monospace,'SF Mono',Menlo,Consolas,'DejaVu Sans Mono',monospace;
|
|
72
73
|
--mark:url("${markUrl}");
|
|
73
74
|
}
|
|
74
|
-
|
|
75
|
-
:root:not([data-theme="light"]){${DARK}}
|
|
76
|
-
}
|
|
77
|
-
:root[data-theme="dark"]{${DARK}}
|
|
75
|
+
${themeCss(DARK)}
|
|
78
76
|
|
|
79
77
|
|
|
80
78
|
*{box-sizing:border-box}
|
|
@@ -547,6 +545,15 @@ pre.chart:not([data-drawn]){opacity:.6}
|
|
|
547
545
|
.diff .a .dc span,.diff .d .dc span{color:inherit!important}
|
|
548
546
|
.diff .h{color:var(--dim);background:var(--panel-2);padding:2px 12px}
|
|
549
547
|
|
|
548
|
+
/* A question the model asked with options: the options are buttons. */
|
|
549
|
+
.askuser{border:1px solid var(--amber);border-radius:8px;padding:10px 13px;margin:8px 0;background:var(--panel)}
|
|
550
|
+
.askuser .aq{font-weight:600;margin-bottom:8px;white-space:pre-wrap}
|
|
551
|
+
.askuser .aopts{display:flex;flex-wrap:wrap;gap:6px}
|
|
552
|
+
.askuser .aopt{border:1px solid var(--line-2);border-radius:7px;padding:4px 10px;text-align:left}
|
|
553
|
+
.askuser .aopt:hover:not(:disabled){border-color:var(--cyan);color:var(--cyan)}
|
|
554
|
+
.askuser .aopt.on{border-color:var(--cyan);background:var(--panel-2)}
|
|
555
|
+
.askuser .aopt:disabled{cursor:default;opacity:.7}
|
|
556
|
+
|
|
550
557
|
/* The Changes view, laid out as the terminal's diff panel: the list, then the one file. */
|
|
551
558
|
.dpanel{border:1px solid var(--line);border-radius:8px;background:var(--panel);overflow:hidden}
|
|
552
559
|
.dphead{display:flex;gap:10px;align-items:baseline;padding:10px 13px;font-variant-numeric:tabular-nums}
|
|
@@ -851,6 +858,7 @@ footer[hidden]{display:none}
|
|
|
851
858
|
.statusline:empty{display:none}
|
|
852
859
|
.statusline .ssep{color:var(--dim)}
|
|
853
860
|
.statusline .sver{color:var(--dim)}
|
|
861
|
+
.statusline .stok{margin-left:auto;color:var(--muted);padding-left:12px}
|
|
854
862
|
.notice.ctxsplit{white-space:pre-wrap;font-variant-numeric:tabular-nums}
|
|
855
863
|
.notice.ctxsplit b{display:block;margin-bottom:4px}
|
|
856
864
|
.statusline .sctx{display:inline-flex;align-items:center;gap:6px}
|
package/dist/web/ui-css.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ui-css.js","sourceRoot":"","sources":["../../src/web/ui-css.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH;;;;;;;;;;;;GAYG;AACH,MAAM,IAAI,GAAG;;;;;;;;;;;;;;;;;;CAkBZ,CAAC;AAEF,MAAM,UAAU,GAAG,CAAC,OAAe;IACjC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;gBAyBO,OAAO
|
|
1
|
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
35
35
|
<span id="wsname" style="overflow:hidden;text-overflow:ellipsis;white-space:nowrap">—</span>
|
|
36
|
-
<
|
|
36
|
+
<select class="themebtn" id="theme" aria-label="Theme"></select>
|
|
37
37
|
<span id="conn">offline</span>
|
|
38
38
|
</div>
|
|
39
39
|
</aside>
|