koneck 2.40.0 → 2.41.0
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.map +1 -1
- package/dist/ink-chat.js +27 -6
- package/dist/ink-chat.js.map +1 -1
- package/dist/model-catalog.d.ts +15 -1
- package/dist/model-catalog.d.ts.map +1 -1
- package/dist/model-catalog.js +39 -7
- package/dist/model-catalog.js.map +1 -1
- package/dist/providers.d.ts +12 -0
- package/dist/providers.d.ts.map +1 -1
- package/dist/providers.js +14 -0
- package/dist/providers.js.map +1 -1
- package/dist/usage.d.ts +26 -1
- package/dist/usage.d.ts.map +1 -1
- package/dist/usage.js +38 -1
- package/dist/usage.js.map +1 -1
- package/package.json +1 -1
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":"
|
|
1
|
+
{"version":3,"file":"ink-chat.d.ts","sourceRoot":"","sources":["../src/ink-chat.tsx"],"names":[],"mappings":"AAsDA,OAAO,KAAK,EAAY,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAY5D,OAAO,EAA6C,KAAK,YAAY,EAAE,MAAM,aAAa,CAAC;AAK3F,OAAO,KAAK,EAAE,WAAW,EAAiB,MAAM,YAAY,CAAC;AAgC7D,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;AAsCD,6FAA6F;AAC7F,wBAAgB,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAM7C;AA0BD,gGAAgG;AAChG,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAE/D;AAED;;;;;;;GAOG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, saveSession, listSessions, loadSession, relativeAge, renameSession, forkSession, archiveSession, findSession, } from './session.js';
|
|
8
8
|
import { loadMemory } from './memory.js';
|
|
9
9
|
import { loadKoneckConfig, saveKoneckConfig, setConfigKey, configKeyDescriptions, CONFIG_FILE, CONFIG_SCHEMA, stepValue, displayValue } from './config-store.js';
|
|
10
|
-
import { PROVIDERS, resolveProvider, getApiKey, addUserProvider, userProvidersPath,
|
|
10
|
+
import { PROVIDERS, resolveProvider, getApiKey, addUserProvider, userProvidersPath, servesLocally, servesOwnWeights, endpointForProvider } from './providers.js';
|
|
11
11
|
import { normaliseEndpoint, withEndpoint, savedEndpoints, shortSource, resolveModelChoice, withModel } from './endpoints.js';
|
|
12
12
|
import { loadProjectConfig, loadGlobalConfig, saveGlobalConfig, withoutStoredApiKey } from './config.js';
|
|
13
13
|
import { listCheckpoints, revertCheckpoint, previewCheckpoint, snapshotTree, filesTouchedBy, createWorkspaceCheckpoint, checkpointScope } from './checkpoint.js';
|
|
@@ -50,6 +50,7 @@ import { initializePolicy, loadPolicy, POLICY_FILE } from './policy.js';
|
|
|
50
50
|
import { isWorkspaceTrusted, trustWorkspace, untrustWorkspace } from './workspace-trust.js';
|
|
51
51
|
import { loadMCPConfig } from './mcp.js';
|
|
52
52
|
import { renameSymbol, extractInterface, moveSymbol } from './refactor.js';
|
|
53
|
+
import { rateText } from './model-catalog.js';
|
|
53
54
|
const CYAN = '#54D7E7';
|
|
54
55
|
const GREEN = '#9BCB8F';
|
|
55
56
|
const CRIMSON = '#E8878D';
|
|
@@ -4748,14 +4749,25 @@ function App({ config: initialConfig, clearFrame }) {
|
|
|
4748
4749
|
lines.push(catalogNote.current ?? 'Could not read the model list from this provider.');
|
|
4749
4750
|
}
|
|
4750
4751
|
else {
|
|
4751
|
-
|
|
4752
|
+
// Counted rather than assumed in either direction: what the provider said was free,
|
|
4753
|
+
// and separately how many it said nothing about at all. "Free 3" out of 447 used to
|
|
4754
|
+
// imply the other 444 were paid, which nobody had established.
|
|
4755
|
+
const free = modelCatalog.filter(m => m.cost === 'free');
|
|
4756
|
+
const priced = modelCatalog.filter(m => m.cost === 'paid');
|
|
4757
|
+
const unknown = modelCatalog.filter(m => m.cost === undefined);
|
|
4752
4758
|
// Status is keyed by provider, not by catalogue membership, so an alias that has
|
|
4753
4759
|
// actually been used still counts as tried.
|
|
4754
4760
|
const prefix = `${cfg.provider}:`;
|
|
4755
4761
|
const tried = Object.values(statuses).filter(s => s.model.startsWith(prefix));
|
|
4756
4762
|
const bad = tried.filter(s => s.state !== 'ok');
|
|
4757
4763
|
lines.push(`Listed ${modelCatalog.length}`);
|
|
4758
|
-
|
|
4764
|
+
if (free.length)
|
|
4765
|
+
lines.push(`Free ${free.length}`);
|
|
4766
|
+
if (priced.length)
|
|
4767
|
+
lines.push(`Priced ${priced.length}`);
|
|
4768
|
+
if (unknown.length) {
|
|
4769
|
+
lines.push(`No price reported ${unknown.length}`);
|
|
4770
|
+
}
|
|
4759
4771
|
lines.push(`Tried here ${tried.length} — ${tried.length - bad.length} worked, ${bad.length} failed`);
|
|
4760
4772
|
lines.push('');
|
|
4761
4773
|
// The model in use is not always a catalogue entry: `auto` and similar aliases are
|
|
@@ -4765,11 +4777,20 @@ function App({ config: initialConfig, clearFrame }) {
|
|
|
4765
4777
|
const st = statuses[`${cfg.provider}:${cfg.model}`];
|
|
4766
4778
|
lines.push(`**In use** ${cfg.model}`);
|
|
4767
4779
|
if (current) {
|
|
4768
|
-
|
|
4769
|
-
|
|
4780
|
+
// Local is about the runtime, not the address: a router on localhost needs no key and
|
|
4781
|
+
// runs nothing, forwarding to a cloud that bills per token.
|
|
4782
|
+
const hosted = servesOwnWeights(cfg.provider);
|
|
4783
|
+
const money = hosted ? 'local'
|
|
4784
|
+
: current.promptRate !== undefined && current.promptRate > 0
|
|
4785
|
+
? `$${rateText(current.promptRate)} per million in`
|
|
4786
|
+
: current.cost === 'free' ? 'free'
|
|
4787
|
+
: current.cost === 'paid' ? 'paid'
|
|
4788
|
+
: 'no price reported';
|
|
4789
|
+
lines.push(` ${money}` +
|
|
4770
4790
|
(current.contextLength ? ` · ${humanTokens(current.contextLength)} context` : '') +
|
|
4771
4791
|
(current.maxOutput ? ` · ${humanTokens(current.maxOutput)} max out` : '') +
|
|
4772
|
-
(current.toolCalling === false ? ' · no tool calling' : '')
|
|
4792
|
+
(current.toolCalling === false ? ' · no tool calling' : '') +
|
|
4793
|
+
(current.vision ? ' · takes images' : ''));
|
|
4773
4794
|
}
|
|
4774
4795
|
else {
|
|
4775
4796
|
lines.push(' a routing alias — the gateway picks the model per request');
|