@ashx-j/lunr-dev 0.2.13-dev.7.1 → 0.2.13-dev.8.1
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/catalog/models.json +1 -1
- package/dist/catalog/providers/amazon-bedrock.json +1 -1
- package/dist/catalog/providers/azure-openai-responses.json +1 -1
- package/dist/catalog/providers/fireworks.json +1 -1
- package/dist/catalog/providers/github-copilot.json +1 -1
- package/dist/catalog/providers/openai-codex.json +1 -1
- package/dist/catalog/providers/openai.json +1 -1
- package/dist/catalog/providers/opencode.json +1 -1
- package/dist/catalog/providers/openrouter.json +1 -1
- package/dist/catalog/providers/vercel-ai-gateway.json +1 -1
- package/dist/catalog/publication.json +131 -3
- package/dist/cli/list-models.d.ts.map +1 -1
- package/dist/cli/list-models.js +1 -0
- package/dist/cli/list-models.js.map +1 -1
- package/dist/core/catalog-cache-scope.d.ts +3 -0
- package/dist/core/catalog-cache-scope.d.ts.map +1 -0
- package/dist/core/catalog-cache-scope.js +12 -0
- package/dist/core/catalog-cache-scope.js.map +1 -0
- package/dist/core/catalog-merge.d.ts +2 -0
- package/dist/core/catalog-merge.d.ts.map +1 -1
- package/dist/core/catalog-merge.js +29 -2
- package/dist/core/catalog-merge.js.map +1 -1
- package/dist/core/catalog-refresh-polling.d.ts +8 -0
- package/dist/core/catalog-refresh-polling.d.ts.map +1 -0
- package/dist/core/catalog-refresh-polling.js +30 -0
- package/dist/core/catalog-refresh-polling.js.map +1 -0
- package/dist/core/codex-catalog.d.ts +3 -0
- package/dist/core/codex-catalog.d.ts.map +1 -0
- package/dist/core/codex-catalog.js +15 -0
- package/dist/core/codex-catalog.js.map +1 -0
- package/dist/core/live-catalog.d.ts +5 -2
- package/dist/core/live-catalog.d.ts.map +1 -1
- package/dist/core/live-catalog.js +108 -27
- package/dist/core/live-catalog.js.map +1 -1
- package/dist/core/model-runtime.d.ts +8 -0
- package/dist/core/model-runtime.d.ts.map +1 -1
- package/dist/core/model-runtime.js +64 -12
- package/dist/core/model-runtime.js.map +1 -1
- package/dist/core/official-catalog.d.ts +4 -0
- package/dist/core/official-catalog.d.ts.map +1 -1
- package/dist/core/official-catalog.js +86 -21
- package/dist/core/official-catalog.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +9 -0
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/model-selector.js +4 -1
- package/dist/modes/interactive/components/model-selector.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +34 -76
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/docs/model-catalog.md +29 -0
- package/package.json +4 -4
|
@@ -15,13 +15,13 @@ import { parseSkillBlock } from "../../core/agent-session.js";
|
|
|
15
15
|
import { SessionImportFileNotFoundError } from "../../core/agent-session-runtime.js";
|
|
16
16
|
import { CACHE_TTL_MS, collectCacheMisses, computeCacheWaste, detectCacheMiss, } from "../../core/cache-stats.js";
|
|
17
17
|
import { formatCatalogRefreshSummary } from "../../core/catalog-merge.js";
|
|
18
|
+
import { startCatalogRefreshPolling } from "../../core/catalog-refresh-polling.js";
|
|
18
19
|
import { computeContextBreakdown } from "../../core/context-breakdown.js";
|
|
19
20
|
import { FooterDataProvider } from "../../core/footer-data-provider.js";
|
|
20
21
|
import { hasGrokCliXaiAuth } from "../../core/grok-cli-auth.js";
|
|
21
22
|
import { configureHttpDispatcher, formatHttpIdleTimeoutMs } from "../../core/http-dispatcher.js";
|
|
22
23
|
import { detectInjectedPrompt } from "../../core/injected-prompt.js";
|
|
23
24
|
import { KeybindingsManager } from "../../core/keybindings.js";
|
|
24
|
-
import { applyIncompleteAnswers, describeIncomplete, INCOMPLETE_PROMPT_CAP, parsePositiveInt, } from "../../core/live-catalog.js";
|
|
25
25
|
import { createCompactionSummaryMessage } from "../../core/messages.js";
|
|
26
26
|
import { isValidProviderBaseUrl, parseModelIds, slugifyProviderId, upsertCustomProvider, } from "../../core/model-config-writer.js";
|
|
27
27
|
import { getGlobalInstructionsPath, getModelInstructionsPath } from "../../core/model-instructions.js";
|
|
@@ -43,7 +43,6 @@ import { time } from "../../core/timings.js";
|
|
|
43
43
|
import { hasTrustRequiringProjectResources, ProjectTrustStore } from "../../core/trust-manager.js";
|
|
44
44
|
import { checkForUpdate, markUpdateNotified } from "../../core/update-check.js";
|
|
45
45
|
import { getAllPlanUsageResults, getUsageServiceBridge } from "../../core/usage-service.js";
|
|
46
|
-
import { modelToUserEntry } from "../../core/user-models.js";
|
|
47
46
|
import { markStartupMilestone } from "../../startup/startup-milestones.js";
|
|
48
47
|
import { copyToClipboard, readClipboardText } from "../../utils/clipboard.js";
|
|
49
48
|
import { extensionForImageMimeType, readClipboardImage } from "../../utils/clipboard-image.js";
|
|
@@ -225,6 +224,7 @@ export class InteractiveMode {
|
|
|
225
224
|
keybindings;
|
|
226
225
|
version;
|
|
227
226
|
isInitialized = false;
|
|
227
|
+
stopCatalogRefresh;
|
|
228
228
|
onInputCallback;
|
|
229
229
|
pendingUserInputs = [];
|
|
230
230
|
startupUserInputs = [];
|
|
@@ -691,6 +691,19 @@ export class InteractiveMode {
|
|
|
691
691
|
const callerMaintenance = startupBenchmark
|
|
692
692
|
? Promise.resolve()
|
|
693
693
|
: this.waitForPromptBarrier().then(() => this.options.deferredMaintenance?.());
|
|
694
|
+
if (!startupBenchmark)
|
|
695
|
+
void this.waitForPromptBarrier().then(() => {
|
|
696
|
+
if (!this.isInitialized)
|
|
697
|
+
return;
|
|
698
|
+
this.stopCatalogRefresh = startCatalogRefreshPolling({
|
|
699
|
+
refresh: (signal) => this.session.modelRuntime.refreshIfStale({ signal }),
|
|
700
|
+
isBusy: () => this.session.isStreaming,
|
|
701
|
+
onUpdate: () => {
|
|
702
|
+
this.session.refreshModelFromRegistry();
|
|
703
|
+
this.footer.invalidate();
|
|
704
|
+
},
|
|
705
|
+
});
|
|
706
|
+
});
|
|
694
707
|
void Promise.allSettled([toolMaintenance, updateMaintenance, providerMaintenance, callerMaintenance]).then(() => {
|
|
695
708
|
markStartupMilestone("deferred_maintenance_idle");
|
|
696
709
|
});
|
|
@@ -2932,6 +2945,7 @@ export class InteractiveMode {
|
|
|
2932
2945
|
break;
|
|
2933
2946
|
}
|
|
2934
2947
|
case "agent_end":
|
|
2948
|
+
this.session.refreshModelFromRegistry();
|
|
2935
2949
|
if (this.settingsManager.getShowTerminalProgress()) {
|
|
2936
2950
|
this.ui.terminal.setProgress(false);
|
|
2937
2951
|
}
|
|
@@ -4322,40 +4336,9 @@ export class InteractiveMode {
|
|
|
4322
4336
|
this.footer.invalidate();
|
|
4323
4337
|
return;
|
|
4324
4338
|
}
|
|
4325
|
-
|
|
4326
|
-
const
|
|
4327
|
-
const extraDefaults = Math.max(0, incomplete.length - toPrompt.length);
|
|
4328
|
-
const persisted = [];
|
|
4339
|
+
// Discovered metadata stays in its cache, not in user overrides. Enrichment is automatic.
|
|
4340
|
+
const extraDefaults = result.incomplete.length;
|
|
4329
4341
|
const asked = [];
|
|
4330
|
-
let skipRemaining = false;
|
|
4331
|
-
for (const item of toPrompt) {
|
|
4332
|
-
if (skipRemaining) {
|
|
4333
|
-
persisted.push(modelToUserEntry(item.draft));
|
|
4334
|
-
continue;
|
|
4335
|
-
}
|
|
4336
|
-
const choice = await this.showExtensionSelector(describeIncomplete(item), [
|
|
4337
|
-
"Enter details",
|
|
4338
|
-
"Use defaults",
|
|
4339
|
-
"Skip remaining",
|
|
4340
|
-
]);
|
|
4341
|
-
asked.push(`${item.provider}/${item.id}`);
|
|
4342
|
-
if (choice === "Skip remaining") {
|
|
4343
|
-
skipRemaining = true;
|
|
4344
|
-
persisted.push(modelToUserEntry(item.draft));
|
|
4345
|
-
continue;
|
|
4346
|
-
}
|
|
4347
|
-
if (choice === "Enter details") {
|
|
4348
|
-
const detailed = await this.promptIncompleteModelDetails(item);
|
|
4349
|
-
persisted.push(modelToUserEntry(detailed ?? item.draft));
|
|
4350
|
-
continue;
|
|
4351
|
-
}
|
|
4352
|
-
persisted.push(modelToUserEntry(item.draft));
|
|
4353
|
-
}
|
|
4354
|
-
for (const item of incomplete.slice(toPrompt.length)) {
|
|
4355
|
-
persisted.push(modelToUserEntry(item.draft));
|
|
4356
|
-
}
|
|
4357
|
-
if (persisted.length > 0)
|
|
4358
|
-
runtime.persistUserModels(persisted);
|
|
4359
4342
|
let ollama;
|
|
4360
4343
|
const runner = this.session.extensionRunner;
|
|
4361
4344
|
const cloudRefresh = globalThis[Symbol.for("@lunr/ollama-cloud-refresh")];
|
|
@@ -4376,53 +4359,26 @@ export class InteractiveMode {
|
|
|
4376
4359
|
evictedUserRows: result.official.evictedUserRows,
|
|
4377
4360
|
}
|
|
4378
4361
|
: undefined,
|
|
4379
|
-
providers:
|
|
4380
|
-
|
|
4381
|
-
|
|
4382
|
-
|
|
4383
|
-
|
|
4384
|
-
|
|
4385
|
-
|
|
4362
|
+
providers: [
|
|
4363
|
+
...result.live.map((entry) => ({
|
|
4364
|
+
id: entry.providerId,
|
|
4365
|
+
status: entry.status,
|
|
4366
|
+
added: entry.added,
|
|
4367
|
+
total: entry.total,
|
|
4368
|
+
error: entry.error,
|
|
4369
|
+
})),
|
|
4370
|
+
...Object.entries(result.official?.errors ?? {}).map(([id, error]) => ({
|
|
4371
|
+
id,
|
|
4372
|
+
status: "error",
|
|
4373
|
+
error,
|
|
4374
|
+
})),
|
|
4375
|
+
],
|
|
4386
4376
|
asked,
|
|
4387
4377
|
extraDefaults,
|
|
4388
4378
|
ollama,
|
|
4389
4379
|
}));
|
|
4390
4380
|
this.footer.invalidate();
|
|
4391
4381
|
}
|
|
4392
|
-
async promptIncompleteModelDetails(item) {
|
|
4393
|
-
const contextInput = await this.showExtensionInput(`${item.provider}/${item.id} — context window:`, String(item.draft.contextWindow || 128000));
|
|
4394
|
-
if (contextInput === undefined)
|
|
4395
|
-
return undefined;
|
|
4396
|
-
const maxTokensInput = await this.showExtensionInput(`${item.provider}/${item.id} — max output tokens:`, String(item.draft.maxTokens || 8192));
|
|
4397
|
-
if (maxTokensInput === undefined)
|
|
4398
|
-
return undefined;
|
|
4399
|
-
const inputChoice = await this.showExtensionSelector(`${item.provider}/${item.id} — input:`, [
|
|
4400
|
-
"text",
|
|
4401
|
-
"text + image",
|
|
4402
|
-
]);
|
|
4403
|
-
if (inputChoice === undefined)
|
|
4404
|
-
return undefined;
|
|
4405
|
-
const reasoningChoice = await this.showExtensionSelector(`${item.provider}/${item.id} — reasoning:`, [
|
|
4406
|
-
"yes",
|
|
4407
|
-
"no",
|
|
4408
|
-
]);
|
|
4409
|
-
if (reasoningChoice === undefined)
|
|
4410
|
-
return undefined;
|
|
4411
|
-
let api = item.draft.api;
|
|
4412
|
-
if (item.availableApis.length > 1) {
|
|
4413
|
-
const apiChoice = await this.showExtensionSelector(`${item.provider}/${item.id} — API protocol:`, item.availableApis.map(String));
|
|
4414
|
-
if (apiChoice === undefined)
|
|
4415
|
-
return undefined;
|
|
4416
|
-
api = apiChoice;
|
|
4417
|
-
}
|
|
4418
|
-
return applyIncompleteAnswers(item.draft, {
|
|
4419
|
-
contextWindow: parsePositiveInt(contextInput, item.draft.contextWindow),
|
|
4420
|
-
maxTokens: parsePositiveInt(maxTokensInput, item.draft.maxTokens),
|
|
4421
|
-
input: inputChoice === "text + image" ? ["text", "image"] : ["text"],
|
|
4422
|
-
reasoning: reasoningChoice === "yes",
|
|
4423
|
-
api,
|
|
4424
|
-
});
|
|
4425
|
-
}
|
|
4426
4382
|
async findExactModelMatch(searchTerm) {
|
|
4427
4383
|
const models = await this.getModelCandidates();
|
|
4428
4384
|
return findExactModelReferenceMatch(searchTerm, models);
|
|
@@ -6849,6 +6805,8 @@ ${cycleThinkingLevel ? `| \`${cycleThinkingLevel}\` | Cycle thinking level |\n`
|
|
|
6849
6805
|
}
|
|
6850
6806
|
}
|
|
6851
6807
|
stop() {
|
|
6808
|
+
this.stopCatalogRefresh?.();
|
|
6809
|
+
this.stopCatalogRefresh = undefined;
|
|
6852
6810
|
if (this.settingsManager.getShowTerminalProgress()) {
|
|
6853
6811
|
this.ui.terminal.setProgress(false);
|
|
6854
6812
|
}
|