koneck 2.88.2 → 2.88.3
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/web/ui-client.d.ts.map +1 -1
- package/dist/web/ui-client.js +38 -19
- package/dist/web/ui-client.js.map +1 -1
- package/dist/web/ui.d.ts.map +1 -1
- package/dist/web/ui.js +23 -10
- package/dist/web/ui.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ui-client.d.ts","sourceRoot":"","sources":["../../src/web/ui-client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,wBAAgB,YAAY,IAAI,MAAM,
|
|
1
|
+
{"version":3,"file":"ui-client.d.ts","sourceRoot":"","sources":["../../src/web/ui-client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,wBAAgB,YAAY,IAAI,MAAM,CA+7LrC"}
|
package/dist/web/ui-client.js
CHANGED
|
@@ -2163,7 +2163,7 @@ async function drawProviderList(host) {
|
|
|
2163
2163
|
const add = el('button', 'act', '+ add a provider');
|
|
2164
2164
|
add.style.marginTop = '10px';
|
|
2165
2165
|
add.onclick = () => {
|
|
2166
|
-
$('
|
|
2166
|
+
$('proverr').hidden = true;
|
|
2167
2167
|
$('provdlg').showModal();
|
|
2168
2168
|
// Whatever the dialog does, this list should be right afterwards.
|
|
2169
2169
|
$('provdlg').addEventListener('close', () => drawProviderList(host), { once: true });
|
|
@@ -5878,13 +5878,13 @@ $('pmodel').onclick = async () => {
|
|
|
5878
5878
|
if (!info) {
|
|
5879
5879
|
// Said inside the dialog, where the person is looking, and without hiding what still works:
|
|
5880
5880
|
// the endpoint and key fields are usable even when the listing is not.
|
|
5881
|
-
$('
|
|
5882
|
-
$('
|
|
5881
|
+
$('proverr').hidden = false;
|
|
5882
|
+
$('proverr').textContent =
|
|
5883
5883
|
'The provider list could not be loaded, so the menu above may be incomplete. '
|
|
5884
5884
|
+ 'Declaring one with + provider still works.';
|
|
5885
5885
|
return;
|
|
5886
5886
|
}
|
|
5887
|
-
$('
|
|
5887
|
+
$('proverr').hidden = true;
|
|
5888
5888
|
void loadModels($('mprov').value, state.model === '-' ? '' : state.model);
|
|
5889
5889
|
};
|
|
5890
5890
|
$('mprov').onchange = () => {
|
|
@@ -5896,31 +5896,48 @@ $('mprov').onchange = () => {
|
|
|
5896
5896
|
};
|
|
5897
5897
|
$('mmodel').oninput = () => drawModels();
|
|
5898
5898
|
|
|
5899
|
+
/*
|
|
5900
|
+
* The key variable's placeholder follows the name being typed.
|
|
5901
|
+
*
|
|
5902
|
+
* It said OPENROUTER_API_KEY whatever you were adding, which is another provider's answer to your
|
|
5903
|
+
* question — and worse, a wrong one: the variable KONECK will actually look for is derived from the
|
|
5904
|
+
* name you give it. The same derivation the server uses, so what is shown is what will be read.
|
|
5905
|
+
*/
|
|
5906
|
+
function keyEnvPlaceholder(name) {
|
|
5907
|
+
const derived = String(name || '').trim().toUpperCase()
|
|
5908
|
+
.replace(/[^A-Z0-9]+/g, '_').replace(/^_+|_+$/g, '');
|
|
5909
|
+
return derived ? derived + '_API_KEY' : 'KONECK_API_KEY';
|
|
5910
|
+
}
|
|
5911
|
+
|
|
5912
|
+
$('provname').addEventListener('input', () => {
|
|
5913
|
+
$('provkey').placeholder = keyEnvPlaceholder($('provname').value);
|
|
5914
|
+
});
|
|
5915
|
+
|
|
5899
5916
|
$('addprov').onclick = () => {
|
|
5900
|
-
$('
|
|
5917
|
+
$('proverr').hidden = true;
|
|
5901
5918
|
$('provdlg').showModal();
|
|
5902
5919
|
};
|
|
5903
5920
|
/** Submits the form, once plainly and once with consent if a built-in is in the way. */
|
|
5904
5921
|
async function saveProvider(replace) {
|
|
5905
5922
|
const body = {
|
|
5906
|
-
name: $('
|
|
5907
|
-
label: $('
|
|
5908
|
-
baseURL: $('
|
|
5909
|
-
defaultModel: $('
|
|
5910
|
-
apiKeyEnv: $('
|
|
5923
|
+
name: $('provname').value.trim(),
|
|
5924
|
+
label: $('provname').value.trim(),
|
|
5925
|
+
baseURL: $('provurl').value.trim(),
|
|
5926
|
+
defaultModel: $('provmodel').value.trim(),
|
|
5927
|
+
apiKeyEnv: $('provkey').value.trim(),
|
|
5911
5928
|
};
|
|
5912
5929
|
if (replace) body.replace = true;
|
|
5913
5930
|
return api('/api/providers', { method: 'POST', body: JSON.stringify(body) });
|
|
5914
5931
|
}
|
|
5915
5932
|
|
|
5916
|
-
$('
|
|
5933
|
+
$('provsave').onclick = async (ev) => {
|
|
5917
5934
|
let out;
|
|
5918
5935
|
try { out = await saveProvider(false); }
|
|
5919
5936
|
catch (e) {
|
|
5920
5937
|
// Kept open on failure: the message says what to change, and closing would lose the typing.
|
|
5921
5938
|
ev.preventDefault();
|
|
5922
|
-
$('
|
|
5923
|
-
$('
|
|
5939
|
+
$('proverr').textContent = e.message;
|
|
5940
|
+
$('proverr').hidden = false;
|
|
5924
5941
|
// A name KONECK ships with is not a mistake to correct, it is a decision to confirm — putting a
|
|
5925
5942
|
// company proxy in front of a vendor is exactly this. So the refusal comes with the way through
|
|
5926
5943
|
// rather than being a dead end.
|
|
@@ -5931,12 +5948,12 @@ $('pvsave').onclick = async (ev) => {
|
|
|
5931
5948
|
go.onclick = async () => {
|
|
5932
5949
|
let done;
|
|
5933
5950
|
try { done = await saveProvider(true); }
|
|
5934
|
-
catch (e2) { $('
|
|
5951
|
+
catch (e2) { $('proverr').textContent = e2.message; return; }
|
|
5935
5952
|
$('provdlg').close();
|
|
5936
5953
|
await afterProviderSaved(done);
|
|
5937
5954
|
};
|
|
5938
|
-
$('
|
|
5939
|
-
$('
|
|
5955
|
+
$('proverr').appendChild(document.createElement('br'));
|
|
5956
|
+
$('proverr').appendChild(go);
|
|
5940
5957
|
}
|
|
5941
5958
|
return;
|
|
5942
5959
|
}
|
|
@@ -5946,7 +5963,9 @@ $('pvsave').onclick = async (ev) => {
|
|
|
5946
5963
|
/** Clears the form and moves the model dialog onto whatever was just declared. */
|
|
5947
5964
|
async function afterProviderSaved(out) {
|
|
5948
5965
|
$('provdlg').close();
|
|
5949
|
-
for (const id of ['
|
|
5966
|
+
for (const id of ['provname', 'provurl', 'provmodel', 'provkey']) $(id).value = '';
|
|
5967
|
+
// The placeholder followed a name that is no longer there.
|
|
5968
|
+
$('provkey').placeholder = keyEnvPlaceholder('');
|
|
5950
5969
|
await fillProviders(out.name);
|
|
5951
5970
|
$('mmodel').value = out.defaultModel === 'default' ? '' : out.defaultModel;
|
|
5952
5971
|
catalog.provider = null;
|
|
@@ -5962,8 +5981,8 @@ $('msave').onclick = async () => {
|
|
|
5962
5981
|
body: JSON.stringify({ session: state.session, provider: provider, model: model }) });
|
|
5963
5982
|
} catch (e) {
|
|
5964
5983
|
// Kept open, with the reason: the dialog used to close on the way out and take this with it.
|
|
5965
|
-
$('
|
|
5966
|
-
$('
|
|
5984
|
+
$('proverr').hidden = false;
|
|
5985
|
+
$('proverr').textContent = e.message;
|
|
5967
5986
|
return;
|
|
5968
5987
|
}
|
|
5969
5988
|
state.provider = info.provider; state.model = info.model;
|
|
@@ -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;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,YAAY;IAC1B,OAAO,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA67LlB,CAAC;AACF,CAAC"}
|
package/dist/web/ui.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ui.d.ts","sourceRoot":"","sources":["../../src/web/ui.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAOH,wBAAgB,IAAI,IAAI,MAAM,
|
|
1
|
+
{"version":3,"file":"ui.d.ts","sourceRoot":"","sources":["../../src/web/ui.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAOH,wBAAgB,IAAI,IAAI,MAAM,CAkjB7B"}
|
package/dist/web/ui.js
CHANGED
|
@@ -537,19 +537,32 @@ export function page() {
|
|
|
537
537
|
<h3>Add a provider</h3>
|
|
538
538
|
<p>Anything with an OpenAI-compatible endpoint — a gateway, a company proxy, a vendor that
|
|
539
539
|
launched last week. It joins the list everywhere, including the CLI.</p>
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
540
|
+
<!--
|
|
541
|
+
prov-, not pv-.
|
|
542
|
+
===============
|
|
543
|
+
The browser panel above uses pv- for "page view", and its address bar was id="pvurl" — the same
|
|
544
|
+
id this endpoint field had. getElementById returns the first match in the document, so the
|
|
545
|
+
client read the address bar, found it empty, and sent an empty endpoint. The dialog showed the
|
|
546
|
+
URL the whole time; nothing was reading it.
|
|
547
|
+
-->
|
|
548
|
+
<label for="provname">Name</label>
|
|
549
|
+
<input id="provname" placeholder="the name you will refer to it by" autocomplete="off"
|
|
550
|
+
spellcheck="false">
|
|
551
|
+
<label for="provurl">Endpoint</label>
|
|
552
|
+
<input id="provurl" placeholder="https://api.example.com/v1" autocomplete="off"
|
|
553
|
+
spellcheck="false">
|
|
554
|
+
<label for="provmodel">Default model</label>
|
|
555
|
+
<input id="provmodel" placeholder="optional — the model to start on" autocomplete="off"
|
|
556
|
+
spellcheck="false">
|
|
557
|
+
<label for="provkey">Environment variable holding the key</label>
|
|
558
|
+
<!-- The placeholder follows the name as it is typed: it is the variable KONECK will actually
|
|
559
|
+
look for, so showing another provider's was showing the wrong answer. -->
|
|
560
|
+
<input id="provkey" placeholder="KONECK_API_KEY" autocomplete="off" spellcheck="false">
|
|
548
561
|
<div class="mnote">The <em>name</em> of the variable, never the key itself. A key typed here would
|
|
549
562
|
be written to a file and travel through this request; keep the value in your environment or a
|
|
550
563
|
password manager. Leave it empty for a keyless endpoint such as one on your own network.</div>
|
|
551
|
-
<div class="perr" id="
|
|
552
|
-
<div class="row"><button>Cancel</button><button type="button" class="go" id="
|
|
564
|
+
<div class="perr" id="proverr" hidden></div>
|
|
565
|
+
<div class="row"><button>Cancel</button><button type="button" class="go" id="provsave">Add</button></div>
|
|
553
566
|
</form></dialog>
|
|
554
567
|
|
|
555
568
|
<script>
|
package/dist/web/ui.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ui.js","sourceRoot":"","sources":["../../src/web/ui.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,MAAM,UAAU,IAAI;IAClB,OAAO;;;;;;;SAOA,GAAG,CAAC,SAAS,CAAC
|
|
1
|
+
{"version":3,"file":"ui.js","sourceRoot":"","sources":["../../src/web/ui.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,MAAM,UAAU,IAAI;IAClB,OAAO;;;;;;;SAOA,GAAG,CAAC,SAAS,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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