ur-agent 1.27.4 → 1.27.5
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/CHANGELOG.md +10 -0
- package/README.md +11 -6
- package/dist/cli.js +698 -372
- package/docs/CONFIGURATION.md +7 -1
- package/docs/USAGE.md +5 -0
- package/docs/providers.md +27 -28
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -52895,44 +52895,6 @@ async function listOllamaModelNames(signal) {
|
|
|
52895
52895
|
setCachedOllamaModelNames(names);
|
|
52896
52896
|
return names;
|
|
52897
52897
|
}
|
|
52898
|
-
async function getOllamaModelOptions(signal) {
|
|
52899
|
-
const names = await listOllamaModelNames(signal);
|
|
52900
|
-
await Promise.allSettled(names.filter((name) => getOllamaContextLengthForModel(name) === undefined).map((name) => refreshOllamaModelMetadata(name, { timeoutMs: 500 })));
|
|
52901
|
-
const { coder, fast } = categorizeOllamaModels(names);
|
|
52902
|
-
const coderSet = new Set(coder);
|
|
52903
|
-
const fastSet = new Set(fast);
|
|
52904
|
-
return names.map((name) => ({
|
|
52905
|
-
value: name,
|
|
52906
|
-
label: name,
|
|
52907
|
-
description: describeOllamaModel(name, coderSet, fastSet)
|
|
52908
|
-
}));
|
|
52909
|
-
}
|
|
52910
|
-
function describeOllamaModel(name, coderSet, fastSet) {
|
|
52911
|
-
const tags = [];
|
|
52912
|
-
if (coderSet.has(name))
|
|
52913
|
-
tags.push("coder");
|
|
52914
|
-
else if (fastSet.has(name))
|
|
52915
|
-
tags.push("fast");
|
|
52916
|
-
const contextLength = getOllamaContextLengthForModel(name);
|
|
52917
|
-
if (contextLength && contextLength > 0) {
|
|
52918
|
-
tags.push(`${formatContextWindow(contextLength)} ctx`);
|
|
52919
|
-
}
|
|
52920
|
-
return tags.length > 0 ? `Installed \xB7 ${tags.join(" \xB7 ")}` : "Installed Ollama model";
|
|
52921
|
-
}
|
|
52922
|
-
function formatContextWindow(contextLength) {
|
|
52923
|
-
return contextLength >= 1024 ? `${Math.round(contextLength / 1024)}K` : String(contextLength);
|
|
52924
|
-
}
|
|
52925
|
-
function mergeModelOptions(baseOptions, extraOptions) {
|
|
52926
|
-
const result = [...baseOptions];
|
|
52927
|
-
const seen = new Set(result.map((option) => option.value));
|
|
52928
|
-
for (const option of extraOptions) {
|
|
52929
|
-
if (!seen.has(option.value)) {
|
|
52930
|
-
result.push(option);
|
|
52931
|
-
seen.add(option.value);
|
|
52932
|
-
}
|
|
52933
|
-
}
|
|
52934
|
-
return result;
|
|
52935
|
-
}
|
|
52936
52898
|
async function refreshOllamaModelMetadata(model, options = {}) {
|
|
52937
52899
|
const normalizedModel = model.trim();
|
|
52938
52900
|
if (!normalizedModel) {
|
|
@@ -53510,27 +53472,37 @@ var init_model = __esm(() => {
|
|
|
53510
53472
|
// src/services/providers/providerRegistry.ts
|
|
53511
53473
|
var exports_providerRegistry = {};
|
|
53512
53474
|
__export(exports_providerRegistry, {
|
|
53475
|
+
validateProviderModelPair: () => validateProviderModelPair,
|
|
53513
53476
|
validateProviderModelCompatibility: () => validateProviderModelCompatibility,
|
|
53514
53477
|
setSafeProviderConfig: () => setSafeProviderConfig,
|
|
53478
|
+
setProviderModel: () => setProviderModel,
|
|
53515
53479
|
resolveProviderId: () => resolveProviderId,
|
|
53516
53480
|
providerForAuthAlias: () => providerForAuthAlias,
|
|
53517
53481
|
providerAliasesFor: () => providerAliasesFor,
|
|
53518
53482
|
listProviders: () => listProviders,
|
|
53483
|
+
listModelsForProviderWithSource: () => listModelsForProviderWithSource,
|
|
53519
53484
|
listModelsForProvider: () => listModelsForProvider,
|
|
53520
53485
|
launchProviderAuth: () => launchProviderAuth,
|
|
53521
53486
|
isProviderId: () => isProviderId,
|
|
53522
53487
|
isModelSupportedByProvider: () => isModelSupportedByProvider,
|
|
53523
53488
|
getValidModelIdsForProvider: () => getValidModelIdsForProvider,
|
|
53489
|
+
getProviderStatus: () => getProviderStatus,
|
|
53524
53490
|
getProviderRuntimeInfo: () => getProviderRuntimeInfo,
|
|
53525
53491
|
getProviderDefinition: () => getProviderDefinition,
|
|
53492
|
+
getProviderAccessTypeLabel: () => getProviderAccessTypeLabel,
|
|
53526
53493
|
getDefaultModelForProvider: () => getDefaultModelForProvider,
|
|
53494
|
+
getConnectionStatusFromDoctorResult: () => getConnectionStatusFromDoctorResult,
|
|
53527
53495
|
getActiveProviderSettings: () => getActiveProviderSettings,
|
|
53496
|
+
formatProviderStatusLabel: () => formatProviderStatusLabel,
|
|
53528
53497
|
formatProviderStatus: () => formatProviderStatus,
|
|
53529
53498
|
formatProviderList: () => formatProviderList,
|
|
53530
53499
|
formatProviderDoctor: () => formatProviderDoctor,
|
|
53500
|
+
formatInvalidProviderModelMessage: () => formatInvalidProviderModelMessage,
|
|
53531
53501
|
doctorProvider: () => doctorProvider,
|
|
53532
53502
|
doctorActiveProvider: () => doctorActiveProvider,
|
|
53503
|
+
credentialTypeLabel: () => credentialTypeLabel,
|
|
53533
53504
|
classifyGeminiAccountSupport: () => classifyGeminiAccountSupport,
|
|
53505
|
+
cacheProviderModelsForProvider: () => cacheProviderModelsForProvider,
|
|
53534
53506
|
buildProviderAuthCommand: () => buildProviderAuthCommand,
|
|
53535
53507
|
authModeLabel: () => authModeLabel,
|
|
53536
53508
|
authAliasForProvider: () => authAliasForProvider,
|
|
@@ -53577,6 +53549,9 @@ function getProviderRuntimeInfo(settings = getInitialSettings()) {
|
|
|
53577
53549
|
return {
|
|
53578
53550
|
provider,
|
|
53579
53551
|
providerLabel: definition.statusBarName,
|
|
53552
|
+
accessType: definition.accessType,
|
|
53553
|
+
accessTypeLabel: getProviderAccessTypeLabel(definition),
|
|
53554
|
+
credentialType: definition.credentialType,
|
|
53580
53555
|
authMode: definition.authMode,
|
|
53581
53556
|
authLabel: authModeLabel(definition.authMode),
|
|
53582
53557
|
model: providerSettings.model,
|
|
@@ -53598,6 +53573,21 @@ function authModeLabel(mode) {
|
|
|
53598
53573
|
return "local";
|
|
53599
53574
|
}
|
|
53600
53575
|
}
|
|
53576
|
+
function getProviderAccessTypeLabel(provider) {
|
|
53577
|
+
return provider.accessTypeLabel ?? provider.accessType;
|
|
53578
|
+
}
|
|
53579
|
+
function credentialTypeLabel(type) {
|
|
53580
|
+
switch (type) {
|
|
53581
|
+
case "cli-login":
|
|
53582
|
+
return "subscription login";
|
|
53583
|
+
case "api-key":
|
|
53584
|
+
return "API key";
|
|
53585
|
+
case "local-runtime":
|
|
53586
|
+
return "local runtime";
|
|
53587
|
+
case "openai-compatible-endpoint":
|
|
53588
|
+
return "OpenAI-compatible endpoint";
|
|
53589
|
+
}
|
|
53590
|
+
}
|
|
53601
53591
|
function listProviders() {
|
|
53602
53592
|
return PROVIDER_IDS.map((id) => PROVIDERS[id]);
|
|
53603
53593
|
}
|
|
@@ -53637,6 +53627,7 @@ function setSafeProviderConfig(key, value) {
|
|
|
53637
53627
|
};
|
|
53638
53628
|
}
|
|
53639
53629
|
let settings;
|
|
53630
|
+
let providerModelInvalidated = false;
|
|
53640
53631
|
try {
|
|
53641
53632
|
if (key === "provider") {
|
|
53642
53633
|
const provider = resolveProviderId(trimmed);
|
|
@@ -53646,7 +53637,22 @@ function setSafeProviderConfig(key, value) {
|
|
|
53646
53637
|
message: `Unknown provider "${trimmed}". Run: ur provider list`
|
|
53647
53638
|
};
|
|
53648
53639
|
}
|
|
53649
|
-
|
|
53640
|
+
const currentSettings = getInitialSettings();
|
|
53641
|
+
const currentModel = getActiveProviderSettings(currentSettings).model;
|
|
53642
|
+
const nextProviderSettings = { active: provider };
|
|
53643
|
+
let invalidated = false;
|
|
53644
|
+
if (currentModel) {
|
|
53645
|
+
const validation = validateProviderModelPair(provider, currentModel);
|
|
53646
|
+
if (validation.valid === false) {
|
|
53647
|
+
nextProviderSettings.model = undefined;
|
|
53648
|
+
invalidated = true;
|
|
53649
|
+
providerModelInvalidated = true;
|
|
53650
|
+
}
|
|
53651
|
+
}
|
|
53652
|
+
settings = {
|
|
53653
|
+
provider: nextProviderSettings,
|
|
53654
|
+
...invalidated ? { model: undefined } : {}
|
|
53655
|
+
};
|
|
53650
53656
|
} else if (key === "provider.fallback") {
|
|
53651
53657
|
const fallback = trimmed === "disabled" ? "disabled" : resolveProviderId(trimmed);
|
|
53652
53658
|
if (!fallback) {
|
|
@@ -53661,13 +53667,11 @@ function setSafeProviderConfig(key, value) {
|
|
|
53661
53667
|
} else if (key === "model") {
|
|
53662
53668
|
const currentSettings = getInitialSettings();
|
|
53663
53669
|
const currentProvider = getActiveProviderSettings(currentSettings).active ?? "ollama";
|
|
53664
|
-
const validation =
|
|
53670
|
+
const validation = validateProviderModelPair(currentProvider, trimmed);
|
|
53665
53671
|
if (validation.valid === false) {
|
|
53666
|
-
const validModelsStr = validation.validModels.join(", ") || "(uses dynamic discovery)";
|
|
53667
|
-
const suggestedModel = validation.suggestedModel ?? "see provider docs";
|
|
53668
53672
|
return {
|
|
53669
53673
|
ok: false,
|
|
53670
|
-
message:
|
|
53674
|
+
message: validation.error
|
|
53671
53675
|
};
|
|
53672
53676
|
}
|
|
53673
53677
|
settings = { provider: { model: trimmed }, model: trimmed };
|
|
@@ -53688,7 +53692,10 @@ function setSafeProviderConfig(key, value) {
|
|
|
53688
53692
|
};
|
|
53689
53693
|
}
|
|
53690
53694
|
const savedValue = key === "provider" || key === "provider.fallback" ? key === "provider.fallback" && trimmed === "disabled" ? "disabled" : resolveProviderId(trimmed) ?? trimmed : trimmed;
|
|
53691
|
-
return {
|
|
53695
|
+
return {
|
|
53696
|
+
ok: true,
|
|
53697
|
+
message: `Set ${key} to ${savedValue}.${providerModelInvalidated ? " Cleared incompatible model for the new provider; run /model to choose a scoped model." : ""}`
|
|
53698
|
+
};
|
|
53692
53699
|
}
|
|
53693
53700
|
function outputText(result) {
|
|
53694
53701
|
return `${result.stdout}
|
|
@@ -53749,7 +53756,7 @@ function isLocalBaseUrl(value) {
|
|
|
53749
53756
|
async function checkEndpoint(definition, settings, adapters, result) {
|
|
53750
53757
|
if (!definition.endpointKind)
|
|
53751
53758
|
return;
|
|
53752
|
-
const baseUrl = settings.baseUrl ?? definition.defaultBaseUrl;
|
|
53759
|
+
const baseUrl = settings.baseUrl ?? (definition.id === "ollama" ? getOllamaBaseUrl() : definition.defaultBaseUrl);
|
|
53753
53760
|
if (!baseUrl) {
|
|
53754
53761
|
result.checks.push({
|
|
53755
53762
|
name: "base_url",
|
|
@@ -53956,7 +53963,7 @@ async function doctorProvider(provider, options = {}) {
|
|
|
53956
53963
|
await checkSubscriptionProvider(definition, settingsForProvider, options.adapters ?? {}, result);
|
|
53957
53964
|
} else if (definition.accessType === "api") {
|
|
53958
53965
|
await checkApiProvider(definition, settingsForProvider, options.adapters ?? {}, result);
|
|
53959
|
-
} else {
|
|
53966
|
+
} else if (definition.accessType === "local" || definition.accessType === "server") {
|
|
53960
53967
|
await checkEndpoint(definition, settingsForProvider, options.adapters ?? {}, result);
|
|
53961
53968
|
}
|
|
53962
53969
|
result.fallback = fallbackResult(providerSettings, active, result.ok);
|
|
@@ -53967,6 +53974,67 @@ async function doctorActiveProvider(options = {}) {
|
|
|
53967
53974
|
const active = getActiveProviderSettings(settings).active ?? "ollama";
|
|
53968
53975
|
return doctorProvider(active, options);
|
|
53969
53976
|
}
|
|
53977
|
+
function getConnectionStatusFromDoctorResult(result) {
|
|
53978
|
+
if (result.ok) {
|
|
53979
|
+
return "connected";
|
|
53980
|
+
}
|
|
53981
|
+
if (result.failureReason?.includes("CLI missing") || result.failureReason?.includes("not found")) {
|
|
53982
|
+
return "missing";
|
|
53983
|
+
}
|
|
53984
|
+
if (result.failureReason?.includes("not logged in") || result.failureReason?.includes("not authenticated") || result.failureReason?.includes("API key missing") || result.failureReason?.includes("endpoint") || result.failureReason?.includes("HTTP")) {
|
|
53985
|
+
return "unavailable";
|
|
53986
|
+
}
|
|
53987
|
+
return "unknown";
|
|
53988
|
+
}
|
|
53989
|
+
function formatProviderStatusLabel(status, provider, checks3) {
|
|
53990
|
+
switch (status) {
|
|
53991
|
+
case "connected":
|
|
53992
|
+
if (provider.credentialType === "api-key" && provider.envKey) {
|
|
53993
|
+
return `${provider.envKey} found`;
|
|
53994
|
+
}
|
|
53995
|
+
if (provider.id === "ollama") {
|
|
53996
|
+
return "localhost reachable";
|
|
53997
|
+
}
|
|
53998
|
+
if (provider.credentialType === "openai-compatible-endpoint") {
|
|
53999
|
+
return "OpenAI-compatible endpoint reachable";
|
|
54000
|
+
}
|
|
54001
|
+
if (provider.credentialType === "cli-login") {
|
|
54002
|
+
return "subscription login connected";
|
|
54003
|
+
}
|
|
54004
|
+
return "connected";
|
|
54005
|
+
case "missing":
|
|
54006
|
+
if (provider.commandCandidates) {
|
|
54007
|
+
return `CLI not found (tried: ${provider.commandCandidates.join(", ")})`;
|
|
54008
|
+
}
|
|
54009
|
+
return "missing";
|
|
54010
|
+
case "unavailable": {
|
|
54011
|
+
const failCheck = checks3.find((check3) => check3.status === "fail" || check3.status === "warn");
|
|
54012
|
+
return failCheck?.message ?? "unavailable";
|
|
54013
|
+
}
|
|
54014
|
+
case "unknown":
|
|
54015
|
+
return "status unknown";
|
|
54016
|
+
}
|
|
54017
|
+
}
|
|
54018
|
+
async function getProviderStatus(providerId, options = {}) {
|
|
54019
|
+
const provider = resolveProviderId(providerId);
|
|
54020
|
+
if (!provider) {
|
|
54021
|
+
throw new Error(`Unknown provider "${providerId}". Run: ur provider list`);
|
|
54022
|
+
}
|
|
54023
|
+
const definition = getProviderDefinition(provider);
|
|
54024
|
+
const doctor = await doctorProvider(provider, options);
|
|
54025
|
+
const status = getConnectionStatusFromDoctorResult(doctor);
|
|
54026
|
+
return {
|
|
54027
|
+
provider,
|
|
54028
|
+
displayName: definition.displayName,
|
|
54029
|
+
accessType: definition.accessType,
|
|
54030
|
+
accessTypeLabel: getProviderAccessTypeLabel(definition),
|
|
54031
|
+
credentialType: definition.credentialType,
|
|
54032
|
+
status,
|
|
54033
|
+
label: formatProviderStatusLabel(status, definition, doctor.checks),
|
|
54034
|
+
checks: doctor.checks,
|
|
54035
|
+
doctor
|
|
54036
|
+
};
|
|
54037
|
+
}
|
|
53970
54038
|
function authAliasForProvider(provider) {
|
|
53971
54039
|
switch (provider) {
|
|
53972
54040
|
case "codex-cli":
|
|
@@ -54074,16 +54142,20 @@ function formatProviderList(json2 = false) {
|
|
|
54074
54142
|
name: provider.displayName,
|
|
54075
54143
|
aliases: providerAliasesFor(provider.id),
|
|
54076
54144
|
accessType: provider.accessType,
|
|
54145
|
+
accessTypeLabel: getProviderAccessTypeLabel(provider),
|
|
54146
|
+
credentialType: provider.credentialType,
|
|
54147
|
+
modelDiscoveryType: provider.modelDiscoveryType,
|
|
54077
54148
|
authMode: provider.authMode,
|
|
54149
|
+
accessPath: provider.accessPathLabel,
|
|
54078
54150
|
legalPath: provider.legalPath
|
|
54079
54151
|
}));
|
|
54080
54152
|
if (json2) {
|
|
54081
54153
|
return JSON.stringify(providers, null, 2);
|
|
54082
54154
|
}
|
|
54083
54155
|
return [
|
|
54084
|
-
"Provider | ID | Aliases | Access type |
|
|
54085
|
-
"--- | --- | --- | --- | ---",
|
|
54086
|
-
...providers.map((provider) => `${provider.name} | ${provider.id} | ${provider.aliases.slice(0, 3).join(", ") || "-"} | ${provider.
|
|
54156
|
+
"Provider | ID | Aliases | Access type | Credential | Model discovery | Access path",
|
|
54157
|
+
"--- | --- | --- | --- | --- | --- | ---",
|
|
54158
|
+
...providers.map((provider) => `${provider.name} | ${provider.id} | ${provider.aliases.slice(0, 3).join(", ") || "-"} | ${provider.accessTypeLabel} | ${provider.credentialType} | ${provider.modelDiscoveryType} | ${provider.accessPath}`)
|
|
54087
54159
|
].join(`
|
|
54088
54160
|
`);
|
|
54089
54161
|
}
|
|
@@ -54093,6 +54165,8 @@ function formatProviderDoctor(result, json2 = false) {
|
|
|
54093
54165
|
}
|
|
54094
54166
|
const lines = [
|
|
54095
54167
|
`Provider: ${result.displayName} (${result.provider})`,
|
|
54168
|
+
`Access: ${getProviderAccessTypeLabel(getProviderDefinition(result.provider))}`,
|
|
54169
|
+
`Credential: ${getProviderDefinition(result.provider).credentialType}`,
|
|
54096
54170
|
`Auth: ${authModeLabel(result.authMode)}`,
|
|
54097
54171
|
`Status: ${result.ok ? "ready" : "not ready"}`
|
|
54098
54172
|
];
|
|
@@ -54119,31 +54193,191 @@ function formatProviderStatus(result, json2 = false) {
|
|
|
54119
54193
|
Failure reason: ${result.failureReason}` : "";
|
|
54120
54194
|
const fix = result.suggestedFix ? `
|
|
54121
54195
|
Suggested fix: ${result.suggestedFix}` : "";
|
|
54196
|
+
const definition = getProviderDefinition(result.provider);
|
|
54122
54197
|
return `Selected provider: ${result.displayName} (${result.provider})
|
|
54198
|
+
Access type: ${getProviderAccessTypeLabel(definition)}
|
|
54199
|
+
Credential: ${definition.credentialType}
|
|
54123
54200
|
Auth mode: ${authModeLabel(result.authMode)}
|
|
54124
54201
|
Ready: ${result.ok ? "yes" : "no"}${failure}${fix}`;
|
|
54125
54202
|
}
|
|
54126
|
-
function
|
|
54203
|
+
function providerBaseUrl(provider, definition, settings) {
|
|
54204
|
+
const providerSettings = getActiveProviderSettings(settings);
|
|
54205
|
+
if (providerSettings.baseUrl) {
|
|
54206
|
+
return providerSettings.baseUrl;
|
|
54207
|
+
}
|
|
54208
|
+
if (provider === "ollama") {
|
|
54209
|
+
return getOllamaBaseUrl(process.env, settings);
|
|
54210
|
+
}
|
|
54211
|
+
return definition.defaultBaseUrl;
|
|
54212
|
+
}
|
|
54213
|
+
function parseOpenAICompatibleModelNames(value) {
|
|
54214
|
+
if (!value || typeof value !== "object") {
|
|
54215
|
+
return [];
|
|
54216
|
+
}
|
|
54217
|
+
const data = value.data ?? value.models;
|
|
54218
|
+
if (!Array.isArray(data)) {
|
|
54219
|
+
return [];
|
|
54220
|
+
}
|
|
54221
|
+
const names = data.flatMap((model) => {
|
|
54222
|
+
if (typeof model === "string") {
|
|
54223
|
+
const trimmed2 = model.trim();
|
|
54224
|
+
return trimmed2 ? [trimmed2] : [];
|
|
54225
|
+
}
|
|
54226
|
+
if (!model || typeof model !== "object") {
|
|
54227
|
+
return [];
|
|
54228
|
+
}
|
|
54229
|
+
const entry = model;
|
|
54230
|
+
const name = entry.id ?? entry.name ?? entry.model;
|
|
54231
|
+
if (typeof name !== "string") {
|
|
54232
|
+
return [];
|
|
54233
|
+
}
|
|
54234
|
+
const trimmed = name.trim();
|
|
54235
|
+
return trimmed ? [trimmed] : [];
|
|
54236
|
+
});
|
|
54237
|
+
return [...new Set(names)].sort((a2, b) => a2.localeCompare(b));
|
|
54238
|
+
}
|
|
54239
|
+
function parseOllamaModelNamesFromTags(value) {
|
|
54240
|
+
if (!value || typeof value !== "object" || !("models" in value)) {
|
|
54241
|
+
return [];
|
|
54242
|
+
}
|
|
54243
|
+
const models = value.models;
|
|
54244
|
+
if (!Array.isArray(models)) {
|
|
54245
|
+
return [];
|
|
54246
|
+
}
|
|
54247
|
+
const names = models.flatMap((model) => {
|
|
54248
|
+
if (!model || typeof model !== "object") {
|
|
54249
|
+
return [];
|
|
54250
|
+
}
|
|
54251
|
+
const entry = model;
|
|
54252
|
+
const name = entry.name ?? entry.model;
|
|
54253
|
+
if (typeof name !== "string") {
|
|
54254
|
+
return [];
|
|
54255
|
+
}
|
|
54256
|
+
const trimmed = name.trim();
|
|
54257
|
+
return trimmed ? [trimmed] : [];
|
|
54258
|
+
});
|
|
54259
|
+
return [...new Set(names)].sort((a2, b) => a2.localeCompare(b));
|
|
54260
|
+
}
|
|
54261
|
+
function modelDefinitionsFromNames(provider, names, source) {
|
|
54262
|
+
const providerName = getProviderDefinition(provider).displayName;
|
|
54263
|
+
return names.map((name) => ({
|
|
54264
|
+
id: name,
|
|
54265
|
+
displayName: name,
|
|
54266
|
+
description: source === "cache" ? `Cached ${providerName} model` : `Discovered from ${providerName}`
|
|
54267
|
+
}));
|
|
54268
|
+
}
|
|
54269
|
+
function getCachedProviderModels(provider) {
|
|
54270
|
+
return cachedModelsByProvider.get(provider) ?? [];
|
|
54271
|
+
}
|
|
54272
|
+
function cacheProviderModelsForProvider(providerId, models) {
|
|
54127
54273
|
const provider = resolveProviderId(providerId);
|
|
54128
54274
|
if (!provider) {
|
|
54275
|
+
return;
|
|
54276
|
+
}
|
|
54277
|
+
const definitions = typeof models[0] === "string" ? modelDefinitionsFromNames(provider, models, "cache") : models;
|
|
54278
|
+
if (definitions.length > 0) {
|
|
54279
|
+
cachedModelsByProvider.set(provider, definitions);
|
|
54280
|
+
}
|
|
54281
|
+
}
|
|
54282
|
+
function staticModelsForProvider(provider) {
|
|
54283
|
+
return (PROVIDER_MODELS[provider] ?? []).filter((model) => !model.isDynamic);
|
|
54284
|
+
}
|
|
54285
|
+
async function discoverLiveModelsForProvider(provider, options = {}) {
|
|
54286
|
+
const definition = getProviderDefinition(provider);
|
|
54287
|
+
if (!definition.endpointKind) {
|
|
54129
54288
|
return [];
|
|
54130
54289
|
}
|
|
54131
|
-
|
|
54290
|
+
const settings = options.settings ?? getInitialSettings();
|
|
54291
|
+
const baseUrl = providerBaseUrl(provider, definition, settings);
|
|
54292
|
+
if (!baseUrl) {
|
|
54293
|
+
throw new Error(`No base_url configured for provider "${provider}".`);
|
|
54294
|
+
}
|
|
54295
|
+
const url3 = endpointUrl(baseUrl, definition.endpointKind);
|
|
54296
|
+
const env4 = options.adapters?.env ?? process.env;
|
|
54297
|
+
const response = await (options.adapters?.fetch ?? fetch)(url3, {
|
|
54298
|
+
method: "GET",
|
|
54299
|
+
signal: options.signal,
|
|
54300
|
+
headers: definition.accessType === "api" && definition.envKey && env4[definition.envKey] ? { Authorization: `Bearer ${env4[definition.envKey]}` } : undefined
|
|
54301
|
+
});
|
|
54302
|
+
if (!response.ok) {
|
|
54303
|
+
throw new Error(`${url3} returned HTTP ${response.status}.`);
|
|
54304
|
+
}
|
|
54305
|
+
const body = await response.json();
|
|
54306
|
+
const names = definition.endpointKind === "ollama" ? parseOllamaModelNamesFromTags(body) : parseOpenAICompatibleModelNames(body);
|
|
54307
|
+
return modelDefinitionsFromNames(provider, names, "live");
|
|
54132
54308
|
}
|
|
54133
|
-
function
|
|
54309
|
+
async function listModelsForProviderWithSource(providerId, options = {}) {
|
|
54134
54310
|
const provider = resolveProviderId(providerId);
|
|
54135
54311
|
if (!provider) {
|
|
54136
|
-
return
|
|
54312
|
+
return {
|
|
54313
|
+
provider: "ollama",
|
|
54314
|
+
models: [],
|
|
54315
|
+
source: "static",
|
|
54316
|
+
warning: `Unknown provider "${providerId}". Run: ur provider list`
|
|
54317
|
+
};
|
|
54137
54318
|
}
|
|
54138
|
-
const
|
|
54139
|
-
if (
|
|
54140
|
-
return
|
|
54319
|
+
const definition = getProviderDefinition(provider);
|
|
54320
|
+
if (definition.modelDiscoveryType === "static") {
|
|
54321
|
+
return {
|
|
54322
|
+
provider,
|
|
54323
|
+
models: staticModelsForProvider(provider),
|
|
54324
|
+
source: "static"
|
|
54325
|
+
};
|
|
54141
54326
|
}
|
|
54142
|
-
|
|
54143
|
-
|
|
54144
|
-
|
|
54327
|
+
try {
|
|
54328
|
+
const liveModels = await discoverLiveModelsForProvider(provider, options);
|
|
54329
|
+
if (liveModels.length > 0) {
|
|
54330
|
+
cachedModelsByProvider.set(provider, liveModels);
|
|
54331
|
+
return {
|
|
54332
|
+
provider,
|
|
54333
|
+
models: liveModels,
|
|
54334
|
+
source: "live"
|
|
54335
|
+
};
|
|
54336
|
+
}
|
|
54337
|
+
const cachedModels = getCachedProviderModels(provider);
|
|
54338
|
+
if (cachedModels.length > 0) {
|
|
54339
|
+
return {
|
|
54340
|
+
provider,
|
|
54341
|
+
models: cachedModels,
|
|
54342
|
+
source: "cache",
|
|
54343
|
+
warning: `Live model discovery for "${provider}" returned no models. Showing cached ${provider} models only.`
|
|
54344
|
+
};
|
|
54345
|
+
}
|
|
54346
|
+
const staticModels = staticModelsForProvider(provider);
|
|
54347
|
+
return {
|
|
54348
|
+
provider,
|
|
54349
|
+
models: staticModels,
|
|
54350
|
+
source: staticModels.length > 0 ? "static" : "live",
|
|
54351
|
+
warning: `Live model discovery for "${provider}" returned no models.`
|
|
54352
|
+
};
|
|
54353
|
+
} catch (error40) {
|
|
54354
|
+
const cachedModels = getCachedProviderModels(provider);
|
|
54355
|
+
if (cachedModels.length > 0) {
|
|
54356
|
+
return {
|
|
54357
|
+
provider,
|
|
54358
|
+
models: cachedModels,
|
|
54359
|
+
source: "cache",
|
|
54360
|
+
warning: `Live model discovery for "${provider}" failed: ${error40 instanceof Error ? error40.message : String(error40)}. Showing cached ${provider} models only.`
|
|
54361
|
+
};
|
|
54362
|
+
}
|
|
54363
|
+
const staticModels = staticModelsForProvider(provider);
|
|
54364
|
+
return {
|
|
54365
|
+
provider,
|
|
54366
|
+
models: staticModels,
|
|
54367
|
+
source: staticModels.length > 0 ? "static" : "live",
|
|
54368
|
+
warning: `Live model discovery for "${provider}" failed: ${error40 instanceof Error ? error40.message : String(error40)}.`
|
|
54369
|
+
};
|
|
54370
|
+
}
|
|
54371
|
+
}
|
|
54372
|
+
function listModelsForProvider(providerId) {
|
|
54373
|
+
const provider = resolveProviderId(providerId);
|
|
54374
|
+
if (!provider) {
|
|
54375
|
+
return [];
|
|
54145
54376
|
}
|
|
54146
|
-
return
|
|
54377
|
+
return PROVIDER_MODELS[provider] ?? [];
|
|
54378
|
+
}
|
|
54379
|
+
function isModelSupportedByProvider(providerId, modelId) {
|
|
54380
|
+
return validateProviderModelPair(providerId, modelId).valid;
|
|
54147
54381
|
}
|
|
54148
54382
|
function getDefaultModelForProvider(providerId) {
|
|
54149
54383
|
const provider = resolveProviderId(providerId);
|
|
@@ -54154,14 +54388,27 @@ function getDefaultModelForProvider(providerId) {
|
|
|
54154
54388
|
if (!models) {
|
|
54155
54389
|
return;
|
|
54156
54390
|
}
|
|
54157
|
-
const defaultModel = models.find((m) => m.isDefault);
|
|
54391
|
+
const defaultModel = models.find((m) => m.isDefault && !m.isDynamic) ?? models.find((m) => !m.isDynamic);
|
|
54158
54392
|
return defaultModel?.id;
|
|
54159
54393
|
}
|
|
54160
54394
|
function getValidModelIdsForProvider(providerId) {
|
|
54161
|
-
const
|
|
54162
|
-
|
|
54395
|
+
const provider = resolveProviderId(providerId);
|
|
54396
|
+
if (!provider) {
|
|
54397
|
+
return [];
|
|
54398
|
+
}
|
|
54399
|
+
const cached2 = getCachedProviderModels(provider);
|
|
54400
|
+
if (cached2.length > 0) {
|
|
54401
|
+
return cached2.map((model) => model.id);
|
|
54402
|
+
}
|
|
54403
|
+
return staticModelsForProvider(provider).map((model) => model.id);
|
|
54404
|
+
}
|
|
54405
|
+
function formatInvalidProviderModelMessage(providerId, modelId, validModels, suggestedModel) {
|
|
54406
|
+
const provider = resolveProviderId(providerId) ?? String(providerId);
|
|
54407
|
+
const validList = validModels.length > 0 ? validModels.join(", ") : "(no models discovered)";
|
|
54408
|
+
const suggested = suggestedModel ?? validModels[0] ?? "<valid-model>";
|
|
54409
|
+
return `Model "${modelId}" is not available for provider "${provider}". Valid models for ${provider}: ${validList}. Run /model and choose a model from ${provider}, or run: ur config set model ${suggested}`;
|
|
54163
54410
|
}
|
|
54164
|
-
function
|
|
54411
|
+
function validateProviderModelPair(providerId, modelId, options = {}) {
|
|
54165
54412
|
const provider = resolveProviderId(providerId);
|
|
54166
54413
|
if (!provider) {
|
|
54167
54414
|
return {
|
|
@@ -54178,26 +54425,66 @@ function validateProviderModelCompatibility(providerId, modelId) {
|
|
|
54178
54425
|
validModels: []
|
|
54179
54426
|
};
|
|
54180
54427
|
}
|
|
54181
|
-
const
|
|
54182
|
-
|
|
54428
|
+
const suppliedModels = (options.availableModels ?? []).map((model) => typeof model === "string" ? model : model.id);
|
|
54429
|
+
const cachedModels = getCachedProviderModels(provider).map((model) => model.id);
|
|
54430
|
+
const staticModelIds = staticModelsForProvider(provider).map((model) => model.id);
|
|
54431
|
+
const validModelIds = suppliedModels.length > 0 ? suppliedModels : cachedModels.length > 0 ? cachedModels : staticModelIds;
|
|
54432
|
+
if (validModelIds.includes(modelId)) {
|
|
54183
54433
|
return { valid: true };
|
|
54184
54434
|
}
|
|
54185
|
-
|
|
54186
|
-
if (modelExists) {
|
|
54435
|
+
if (models.some((m) => m.isDynamic) && options.allowUncachedDynamic && validModelIds.length === 0) {
|
|
54187
54436
|
return { valid: true };
|
|
54188
54437
|
}
|
|
54189
|
-
const validModelIds = getValidModelIdsForProvider(provider);
|
|
54190
54438
|
const defaultModel = getDefaultModelForProvider(provider);
|
|
54191
54439
|
return {
|
|
54192
54440
|
valid: false,
|
|
54193
|
-
error:
|
|
54441
|
+
error: formatInvalidProviderModelMessage(provider, modelId, validModelIds, defaultModel),
|
|
54194
54442
|
validModels: validModelIds,
|
|
54195
54443
|
suggestedModel: defaultModel
|
|
54196
54444
|
};
|
|
54197
54445
|
}
|
|
54198
|
-
|
|
54446
|
+
function setProviderModel(providerId, modelId, options = {}) {
|
|
54447
|
+
const provider = resolveProviderId(providerId);
|
|
54448
|
+
if (!provider) {
|
|
54449
|
+
return {
|
|
54450
|
+
ok: false,
|
|
54451
|
+
message: `Unknown provider "${providerId}". Run: ur provider list`
|
|
54452
|
+
};
|
|
54453
|
+
}
|
|
54454
|
+
const validation = validateProviderModelPair(provider, modelId, {
|
|
54455
|
+
availableModels: options.availableModels
|
|
54456
|
+
});
|
|
54457
|
+
if (validation.valid === false) {
|
|
54458
|
+
return {
|
|
54459
|
+
ok: false,
|
|
54460
|
+
message: validation.error
|
|
54461
|
+
};
|
|
54462
|
+
}
|
|
54463
|
+
const result = updateSettingsForSource("userSettings", {
|
|
54464
|
+
provider: {
|
|
54465
|
+
active: provider,
|
|
54466
|
+
model: modelId
|
|
54467
|
+
},
|
|
54468
|
+
model: modelId
|
|
54469
|
+
});
|
|
54470
|
+
if (result.error) {
|
|
54471
|
+
return {
|
|
54472
|
+
ok: false,
|
|
54473
|
+
message: `Failed to write UR-AGENT settings: ${result.error.message}`
|
|
54474
|
+
};
|
|
54475
|
+
}
|
|
54476
|
+
return {
|
|
54477
|
+
ok: true,
|
|
54478
|
+
message: `Selected provider ${provider} (${getProviderAccessTypeLabel(getProviderDefinition(provider))}) with model ${modelId} (${options.modelSource ?? "static"}).`,
|
|
54479
|
+
provider,
|
|
54480
|
+
model: modelId,
|
|
54481
|
+
modelSource: options.modelSource ?? "static"
|
|
54482
|
+
};
|
|
54483
|
+
}
|
|
54484
|
+
var PROVIDER_IDS, LOCALHOST_RE, PROVIDERS, PROVIDER_ALIAS_ENTRIES, PROVIDER_ALIASES, PROVIDER_MODELS, cachedModelsByProvider, validateProviderModelCompatibility;
|
|
54199
54485
|
var init_providerRegistry = __esm(() => {
|
|
54200
54486
|
init_execFileNoThrow();
|
|
54487
|
+
init_ollamaConfig();
|
|
54201
54488
|
init_settings2();
|
|
54202
54489
|
init_which();
|
|
54203
54490
|
PROVIDER_IDS = [
|
|
@@ -54219,11 +54506,17 @@ var init_providerRegistry = __esm(() => {
|
|
|
54219
54506
|
PROVIDERS = {
|
|
54220
54507
|
"codex-cli": {
|
|
54221
54508
|
id: "codex-cli",
|
|
54222
|
-
displayName: "
|
|
54223
|
-
statusBarName: "
|
|
54509
|
+
displayName: "Codex CLI",
|
|
54510
|
+
statusBarName: "Codex CLI",
|
|
54224
54511
|
accessType: "subscription",
|
|
54512
|
+
credentialType: "cli-login",
|
|
54513
|
+
modelDiscoveryType: "static",
|
|
54514
|
+
statusCheck: "cli-login",
|
|
54515
|
+
listModels: "static",
|
|
54516
|
+
validateModel: "static-list",
|
|
54225
54517
|
authMode: "subscription",
|
|
54226
54518
|
legalPath: "official Codex CLI login",
|
|
54519
|
+
accessPathLabel: "subscription login via official Codex CLI",
|
|
54227
54520
|
commandCandidates: ["codex"],
|
|
54228
54521
|
versionArgs: ["--version"],
|
|
54229
54522
|
statusArgs: ["login", "status"],
|
|
@@ -54235,8 +54528,14 @@ var init_providerRegistry = __esm(() => {
|
|
|
54235
54528
|
displayName: "Claude Code",
|
|
54236
54529
|
statusBarName: "Claude Code",
|
|
54237
54530
|
accessType: "subscription",
|
|
54531
|
+
credentialType: "cli-login",
|
|
54532
|
+
modelDiscoveryType: "static",
|
|
54533
|
+
statusCheck: "cli-login",
|
|
54534
|
+
listModels: "static",
|
|
54535
|
+
validateModel: "static-list",
|
|
54238
54536
|
authMode: "subscription",
|
|
54239
54537
|
legalPath: "official Claude Code CLI login",
|
|
54538
|
+
accessPathLabel: "subscription login via official Claude Code CLI",
|
|
54240
54539
|
commandCandidates: ["claude"],
|
|
54241
54540
|
versionArgs: ["--version"],
|
|
54242
54541
|
statusArgs: ["auth", "status"],
|
|
@@ -54247,8 +54546,14 @@ var init_providerRegistry = __esm(() => {
|
|
|
54247
54546
|
displayName: "Gemini CLI",
|
|
54248
54547
|
statusBarName: "Gemini CLI",
|
|
54249
54548
|
accessType: "subscription",
|
|
54549
|
+
credentialType: "cli-login",
|
|
54550
|
+
modelDiscoveryType: "static",
|
|
54551
|
+
statusCheck: "cli-login",
|
|
54552
|
+
listModels: "static",
|
|
54553
|
+
validateModel: "static-list",
|
|
54250
54554
|
authMode: "enterprise-login",
|
|
54251
54555
|
legalPath: "official Gemini Code Assist login",
|
|
54556
|
+
accessPathLabel: "subscription login via official Gemini CLI",
|
|
54252
54557
|
commandCandidates: ["gemini"],
|
|
54253
54558
|
versionArgs: ["--version"],
|
|
54254
54559
|
loginArgs: [],
|
|
@@ -54259,8 +54564,14 @@ var init_providerRegistry = __esm(() => {
|
|
|
54259
54564
|
displayName: "Antigravity",
|
|
54260
54565
|
statusBarName: "Antigravity",
|
|
54261
54566
|
accessType: "subscription",
|
|
54567
|
+
credentialType: "cli-login",
|
|
54568
|
+
modelDiscoveryType: "static",
|
|
54569
|
+
statusCheck: "cli-login",
|
|
54570
|
+
listModels: "static",
|
|
54571
|
+
validateModel: "static-list",
|
|
54262
54572
|
authMode: "personal-login",
|
|
54263
54573
|
legalPath: "official Antigravity CLI login, where supported",
|
|
54574
|
+
accessPathLabel: "subscription login via official Antigravity CLI",
|
|
54264
54575
|
commandCandidates: ["agy", "antigravity", "google-antigravity", "ag"],
|
|
54265
54576
|
versionArgs: ["--version"],
|
|
54266
54577
|
loginArgs: []
|
|
@@ -54270,17 +54581,29 @@ var init_providerRegistry = __esm(() => {
|
|
|
54270
54581
|
displayName: "OpenAI API",
|
|
54271
54582
|
statusBarName: "OpenAI",
|
|
54272
54583
|
accessType: "api",
|
|
54584
|
+
credentialType: "api-key",
|
|
54585
|
+
modelDiscoveryType: "static",
|
|
54586
|
+
statusCheck: "api-key",
|
|
54587
|
+
listModels: "static",
|
|
54588
|
+
validateModel: "static-list",
|
|
54273
54589
|
authMode: "api",
|
|
54274
54590
|
legalPath: "OPENAI_API_KEY",
|
|
54591
|
+
accessPathLabel: "API key from OPENAI_API_KEY",
|
|
54275
54592
|
envKey: "OPENAI_API_KEY"
|
|
54276
54593
|
},
|
|
54277
54594
|
"anthropic-api": {
|
|
54278
54595
|
id: "anthropic-api",
|
|
54279
|
-
displayName: "
|
|
54280
|
-
statusBarName: "
|
|
54596
|
+
displayName: "Claude API",
|
|
54597
|
+
statusBarName: "Claude API",
|
|
54281
54598
|
accessType: "api",
|
|
54599
|
+
credentialType: "api-key",
|
|
54600
|
+
modelDiscoveryType: "static",
|
|
54601
|
+
statusCheck: "api-key",
|
|
54602
|
+
listModels: "static",
|
|
54603
|
+
validateModel: "static-list",
|
|
54282
54604
|
authMode: "api",
|
|
54283
54605
|
legalPath: "ANTHROPIC_API_KEY",
|
|
54606
|
+
accessPathLabel: "API key from ANTHROPIC_API_KEY",
|
|
54284
54607
|
envKey: "ANTHROPIC_API_KEY"
|
|
54285
54608
|
},
|
|
54286
54609
|
"gemini-api": {
|
|
@@ -54288,8 +54611,14 @@ var init_providerRegistry = __esm(() => {
|
|
|
54288
54611
|
displayName: "Gemini API",
|
|
54289
54612
|
statusBarName: "Gemini API",
|
|
54290
54613
|
accessType: "api",
|
|
54614
|
+
credentialType: "api-key",
|
|
54615
|
+
modelDiscoveryType: "static",
|
|
54616
|
+
statusCheck: "api-key",
|
|
54617
|
+
listModels: "static",
|
|
54618
|
+
validateModel: "static-list",
|
|
54291
54619
|
authMode: "api",
|
|
54292
54620
|
legalPath: "GEMINI_API_KEY",
|
|
54621
|
+
accessPathLabel: "API key from GEMINI_API_KEY",
|
|
54293
54622
|
envKey: "GEMINI_API_KEY"
|
|
54294
54623
|
},
|
|
54295
54624
|
openrouter: {
|
|
@@ -54297,8 +54626,14 @@ var init_providerRegistry = __esm(() => {
|
|
|
54297
54626
|
displayName: "OpenRouter",
|
|
54298
54627
|
statusBarName: "OpenRouter",
|
|
54299
54628
|
accessType: "api",
|
|
54629
|
+
credentialType: "api-key",
|
|
54630
|
+
modelDiscoveryType: "static",
|
|
54631
|
+
statusCheck: "api-key",
|
|
54632
|
+
listModels: "static",
|
|
54633
|
+
validateModel: "static-list",
|
|
54300
54634
|
authMode: "api",
|
|
54301
54635
|
legalPath: "OPENROUTER_API_KEY",
|
|
54636
|
+
accessPathLabel: "API key from OPENROUTER_API_KEY",
|
|
54302
54637
|
envKey: "OPENROUTER_API_KEY"
|
|
54303
54638
|
},
|
|
54304
54639
|
"openai-compatible": {
|
|
@@ -54306,8 +54641,15 @@ var init_providerRegistry = __esm(() => {
|
|
|
54306
54641
|
displayName: "OpenAI-compatible",
|
|
54307
54642
|
statusBarName: "OpenAI-compatible",
|
|
54308
54643
|
accessType: "api",
|
|
54644
|
+
accessTypeLabel: "server/api",
|
|
54645
|
+
credentialType: "openai-compatible-endpoint",
|
|
54646
|
+
modelDiscoveryType: "live",
|
|
54647
|
+
statusCheck: "endpoint",
|
|
54648
|
+
listModels: "openai-compatible-models",
|
|
54649
|
+
validateModel: "discovered-list",
|
|
54309
54650
|
authMode: "api",
|
|
54310
54651
|
legalPath: "user-selected OpenAI-compatible base URL with API key only when required by that endpoint",
|
|
54652
|
+
accessPathLabel: "OpenAI-compatible endpoint",
|
|
54311
54653
|
envKey: "OPENAI_API_KEY",
|
|
54312
54654
|
endpointKind: "openai-compatible"
|
|
54313
54655
|
},
|
|
@@ -54316,8 +54658,14 @@ var init_providerRegistry = __esm(() => {
|
|
|
54316
54658
|
displayName: "Ollama",
|
|
54317
54659
|
statusBarName: "Ollama",
|
|
54318
54660
|
accessType: "local",
|
|
54661
|
+
credentialType: "local-runtime",
|
|
54662
|
+
modelDiscoveryType: "live",
|
|
54663
|
+
statusCheck: "endpoint",
|
|
54664
|
+
listModels: "ollama-tags",
|
|
54665
|
+
validateModel: "discovered-list",
|
|
54319
54666
|
authMode: "local",
|
|
54320
54667
|
legalPath: "localhost Ollama runtime",
|
|
54668
|
+
accessPathLabel: "local Ollama runtime",
|
|
54321
54669
|
defaultBaseUrl: "http://localhost:11434",
|
|
54322
54670
|
endpointKind: "ollama"
|
|
54323
54671
|
},
|
|
@@ -54325,9 +54673,16 @@ var init_providerRegistry = __esm(() => {
|
|
|
54325
54673
|
id: "lmstudio",
|
|
54326
54674
|
displayName: "LM Studio",
|
|
54327
54675
|
statusBarName: "LM Studio",
|
|
54328
|
-
accessType: "
|
|
54676
|
+
accessType: "server",
|
|
54677
|
+
accessTypeLabel: "local/server",
|
|
54678
|
+
credentialType: "openai-compatible-endpoint",
|
|
54679
|
+
modelDiscoveryType: "live",
|
|
54680
|
+
statusCheck: "endpoint",
|
|
54681
|
+
listModels: "openai-compatible-models",
|
|
54682
|
+
validateModel: "discovered-list",
|
|
54329
54683
|
authMode: "local",
|
|
54330
54684
|
legalPath: "local OpenAI-compatible server",
|
|
54685
|
+
accessPathLabel: "local OpenAI-compatible endpoint",
|
|
54331
54686
|
defaultBaseUrl: "http://localhost:1234/v1",
|
|
54332
54687
|
endpointKind: "openai-compatible"
|
|
54333
54688
|
},
|
|
@@ -54335,9 +54690,16 @@ var init_providerRegistry = __esm(() => {
|
|
|
54335
54690
|
id: "llama.cpp",
|
|
54336
54691
|
displayName: "llama.cpp",
|
|
54337
54692
|
statusBarName: "llama.cpp",
|
|
54338
|
-
accessType: "
|
|
54693
|
+
accessType: "server",
|
|
54694
|
+
accessTypeLabel: "local/server",
|
|
54695
|
+
credentialType: "openai-compatible-endpoint",
|
|
54696
|
+
modelDiscoveryType: "live",
|
|
54697
|
+
statusCheck: "endpoint",
|
|
54698
|
+
listModels: "openai-compatible-models",
|
|
54699
|
+
validateModel: "discovered-list",
|
|
54339
54700
|
authMode: "local",
|
|
54340
54701
|
legalPath: "local OpenAI-compatible server",
|
|
54702
|
+
accessPathLabel: "local OpenAI-compatible endpoint",
|
|
54341
54703
|
defaultBaseUrl: "http://localhost:8080/v1",
|
|
54342
54704
|
endpointKind: "openai-compatible"
|
|
54343
54705
|
},
|
|
@@ -54345,9 +54707,16 @@ var init_providerRegistry = __esm(() => {
|
|
|
54345
54707
|
id: "vllm",
|
|
54346
54708
|
displayName: "vLLM",
|
|
54347
54709
|
statusBarName: "vLLM",
|
|
54348
|
-
accessType: "
|
|
54710
|
+
accessType: "server",
|
|
54711
|
+
accessTypeLabel: "local/server",
|
|
54712
|
+
credentialType: "openai-compatible-endpoint",
|
|
54713
|
+
modelDiscoveryType: "live",
|
|
54714
|
+
statusCheck: "endpoint",
|
|
54715
|
+
listModels: "openai-compatible-models",
|
|
54716
|
+
validateModel: "discovered-list",
|
|
54349
54717
|
authMode: "local",
|
|
54350
54718
|
legalPath: "OpenAI-compatible server",
|
|
54719
|
+
accessPathLabel: "OpenAI-compatible endpoint runtime",
|
|
54351
54720
|
defaultBaseUrl: "http://localhost:8000/v1",
|
|
54352
54721
|
endpointKind: "openai-compatible"
|
|
54353
54722
|
}
|
|
@@ -54413,36 +54782,36 @@ var init_providerRegistry = __esm(() => {
|
|
|
54413
54782
|
]));
|
|
54414
54783
|
PROVIDER_MODELS = {
|
|
54415
54784
|
"codex-cli": [
|
|
54416
|
-
{ id: "gpt-5.5", displayName: "GPT-5.5", description: "
|
|
54417
|
-
{ id: "gpt-5.4", displayName: "GPT-5.4", description: "
|
|
54418
|
-
{ id: "gpt-5.4-mini", displayName: "GPT-5.4 Mini", description: "Fast
|
|
54419
|
-
{ id: "gpt-4o", displayName: "GPT-4o", description: "
|
|
54420
|
-
{ id: "gpt-4o-mini", displayName: "GPT-4o Mini", description: "Fast
|
|
54421
|
-
{ id: "o1", displayName: "o1", description: "
|
|
54422
|
-
{ id: "o3-mini", displayName: "o3-mini", description: "Fast reasoning model" }
|
|
54785
|
+
{ id: "codex/gpt-5.5", displayName: "GPT-5.5 (Codex CLI)", description: "Subscription model through official Codex CLI login", isDefault: true },
|
|
54786
|
+
{ id: "codex/gpt-5.4", displayName: "GPT-5.4 (Codex CLI)", description: "Subscription model through official Codex CLI login" },
|
|
54787
|
+
{ id: "codex/gpt-5.4-mini", displayName: "GPT-5.4 Mini (Codex CLI)", description: "Fast subscription model through official Codex CLI login" },
|
|
54788
|
+
{ id: "codex/gpt-4o", displayName: "GPT-4o (Codex CLI)", description: "Subscription model through official Codex CLI login" },
|
|
54789
|
+
{ id: "codex/gpt-4o-mini", displayName: "GPT-4o Mini (Codex CLI)", description: "Fast subscription model through official Codex CLI login" },
|
|
54790
|
+
{ id: "codex/o1", displayName: "o1 (Codex CLI)", description: "Reasoning model through official Codex CLI login" },
|
|
54791
|
+
{ id: "codex/o3-mini", displayName: "o3-mini (Codex CLI)", description: "Fast reasoning model through official Codex CLI login" }
|
|
54423
54792
|
],
|
|
54424
54793
|
"claude-code-cli": [
|
|
54425
|
-
{ id: "claude-sonnet-5", displayName: "Claude Sonnet 5", description: "
|
|
54426
|
-
{ id: "claude-opus-4-8", displayName: "Claude Opus 4.8", description: "
|
|
54427
|
-
{ id: "claude-opus-4-7", displayName: "Claude Opus 4.7", description: "
|
|
54428
|
-
{ id: "claude-opus-4-6", displayName: "Claude Opus 4.6", description: "
|
|
54429
|
-
{ id: "claude-opus-4-5", displayName: "Claude Opus 4.5", description: "
|
|
54430
|
-
{ id: "claude-sonnet-4-6", displayName: "Claude Sonnet 4.6", description: "
|
|
54431
|
-
{ id: "claude-sonnet-4-5", displayName: "Claude Sonnet 4.5", description: "
|
|
54432
|
-
{ id: "claude-haiku-4-5", displayName: "Claude Haiku 4.5", description: "
|
|
54794
|
+
{ id: "claude-code/sonnet-5", displayName: "Claude Sonnet 5 (Claude Code)", description: "Subscription model through official Claude Code login", isDefault: true },
|
|
54795
|
+
{ id: "claude-code/opus-4-8", displayName: "Claude Opus 4.8 (Claude Code)", description: "Subscription model through official Claude Code login" },
|
|
54796
|
+
{ id: "claude-code/opus-4-7", displayName: "Claude Opus 4.7 (Claude Code)", description: "Subscription model through official Claude Code login" },
|
|
54797
|
+
{ id: "claude-code/opus-4-6", displayName: "Claude Opus 4.6 (Claude Code)", description: "Subscription model through official Claude Code login" },
|
|
54798
|
+
{ id: "claude-code/opus-4-5", displayName: "Claude Opus 4.5 (Claude Code)", description: "Subscription model through official Claude Code login" },
|
|
54799
|
+
{ id: "claude-code/sonnet-4-6", displayName: "Claude Sonnet 4.6 (Claude Code)", description: "Subscription model through official Claude Code login" },
|
|
54800
|
+
{ id: "claude-code/sonnet-4-5", displayName: "Claude Sonnet 4.5 (Claude Code)", description: "Subscription model through official Claude Code login" },
|
|
54801
|
+
{ id: "claude-code/haiku-4-5", displayName: "Claude Haiku 4.5 (Claude Code)", description: "Subscription model through official Claude Code login" }
|
|
54433
54802
|
],
|
|
54434
54803
|
"gemini-cli": [
|
|
54435
|
-
{ id: "gemini-3.5-flash", displayName: "Gemini 3.5 Flash", description: "
|
|
54436
|
-
{ id: "gemini-3.1-pro", displayName: "Gemini 3.1 Pro", description: "
|
|
54437
|
-
{ id: "gemini-3.1-flash-lite", displayName: "Gemini 3.1 Flash Lite", description: "
|
|
54438
|
-
{ id: "gemini-2.5-pro", displayName: "Gemini 2.5 Pro", description: "
|
|
54439
|
-
{ id: "gemini-2.5-flash", displayName: "Gemini 2.5 Flash", description: "
|
|
54440
|
-
{ id: "gemini-2.5-flash-lite", displayName: "Gemini 2.5 Flash Lite", description: "
|
|
54804
|
+
{ id: "gemini-cli/gemini-3.5-flash", displayName: "Gemini 3.5 Flash (Gemini CLI)", description: "Subscription model through official Gemini CLI login", isDefault: true },
|
|
54805
|
+
{ id: "gemini-cli/gemini-3.1-pro", displayName: "Gemini 3.1 Pro (Gemini CLI)", description: "Subscription model through official Gemini CLI login" },
|
|
54806
|
+
{ id: "gemini-cli/gemini-3.1-flash-lite", displayName: "Gemini 3.1 Flash Lite (Gemini CLI)", description: "Subscription model through official Gemini CLI login" },
|
|
54807
|
+
{ id: "gemini-cli/gemini-2.5-pro", displayName: "Gemini 2.5 Pro (Gemini CLI)", description: "Subscription model through official Gemini CLI login" },
|
|
54808
|
+
{ id: "gemini-cli/gemini-2.5-flash", displayName: "Gemini 2.5 Flash (Gemini CLI)", description: "Subscription model through official Gemini CLI login" },
|
|
54809
|
+
{ id: "gemini-cli/gemini-2.5-flash-lite", displayName: "Gemini 2.5 Flash Lite (Gemini CLI)", description: "Subscription model through official Gemini CLI login" }
|
|
54441
54810
|
],
|
|
54442
54811
|
"antigravity-cli": [
|
|
54443
|
-
{ id: "gemini-3.5-flash", displayName: "Gemini 3.5 Flash", description: "
|
|
54444
|
-
{ id: "gemini-2.5-pro", displayName: "Gemini 2.5 Pro", description: "
|
|
54445
|
-
{ id: "gemini-2.5-flash", displayName: "Gemini 2.5 Flash", description: "
|
|
54812
|
+
{ id: "antigravity/gemini-3.5-flash", displayName: "Gemini 3.5 Flash (Antigravity)", description: "Subscription model through official Antigravity login", isDefault: true },
|
|
54813
|
+
{ id: "antigravity/gemini-2.5-pro", displayName: "Gemini 2.5 Pro (Antigravity)", description: "Subscription model through official Antigravity login" },
|
|
54814
|
+
{ id: "antigravity/gemini-2.5-flash", displayName: "Gemini 2.5 Flash (Antigravity)", description: "Subscription model through official Antigravity login" }
|
|
54446
54815
|
],
|
|
54447
54816
|
"openai-api": [
|
|
54448
54817
|
{ id: "gpt-5.5", displayName: "GPT-5.5", description: "Latest OpenAI model", isDefault: true },
|
|
@@ -54496,6 +54865,8 @@ var init_providerRegistry = __esm(() => {
|
|
|
54496
54865
|
{ id: "dynamic", displayName: "Discovered Models", description: "Models discovered from vLLM server", isDynamic: true, isDefault: true }
|
|
54497
54866
|
]
|
|
54498
54867
|
};
|
|
54868
|
+
cachedModelsByProvider = new Map;
|
|
54869
|
+
validateProviderModelCompatibility = validateProviderModelPair;
|
|
54499
54870
|
});
|
|
54500
54871
|
|
|
54501
54872
|
// src/utils/model/ollamaTuning.ts
|
|
@@ -68278,7 +68649,7 @@ var init_auth = __esm(() => {
|
|
|
68278
68649
|
|
|
68279
68650
|
// src/utils/userAgent.ts
|
|
68280
68651
|
function getURCodeUserAgent() {
|
|
68281
|
-
return `ur/${"1.27.
|
|
68652
|
+
return `ur/${"1.27.5"}`;
|
|
68282
68653
|
}
|
|
68283
68654
|
|
|
68284
68655
|
// src/utils/workloadContext.ts
|
|
@@ -68300,7 +68671,7 @@ function getUserAgent() {
|
|
|
68300
68671
|
const clientApp = process.env.UR_AGENT_SDK_CLIENT_APP ? `, client-app/${process.env.UR_AGENT_SDK_CLIENT_APP}` : "";
|
|
68301
68672
|
const workload = getWorkload();
|
|
68302
68673
|
const workloadSuffix = workload ? `, workload/${workload}` : "";
|
|
68303
|
-
return `ur-cli/${"1.27.
|
|
68674
|
+
return `ur-cli/${"1.27.5"} (${process.env.USER_TYPE}, ${process.env.UR_CODE_ENTRYPOINT ?? "cli"}${agentSdkVersion}${clientApp}${workloadSuffix})`;
|
|
68304
68675
|
}
|
|
68305
68676
|
function getMCPUserAgent() {
|
|
68306
68677
|
const parts = [];
|
|
@@ -68314,7 +68685,7 @@ function getMCPUserAgent() {
|
|
|
68314
68685
|
parts.push(`client-app/${process.env.UR_AGENT_SDK_CLIENT_APP}`);
|
|
68315
68686
|
}
|
|
68316
68687
|
const suffix = parts.length > 0 ? ` (${parts.join(", ")})` : "";
|
|
68317
|
-
return `ur/${"1.27.
|
|
68688
|
+
return `ur/${"1.27.5"}${suffix}`;
|
|
68318
68689
|
}
|
|
68319
68690
|
function getWebFetchUserAgent() {
|
|
68320
68691
|
return `UR-User (${getURCodeUserAgent()})`;
|
|
@@ -68452,7 +68823,7 @@ var init_user = __esm(() => {
|
|
|
68452
68823
|
deviceId,
|
|
68453
68824
|
sessionId: getSessionId(),
|
|
68454
68825
|
email: getEmail(),
|
|
68455
|
-
appVersion: "1.27.
|
|
68826
|
+
appVersion: "1.27.5",
|
|
68456
68827
|
platform: getHostPlatformForAnalytics(),
|
|
68457
68828
|
organizationUuid,
|
|
68458
68829
|
accountUuid,
|
|
@@ -74969,7 +75340,7 @@ var init_metadata = __esm(() => {
|
|
|
74969
75340
|
COMPOUND_OPERATOR_REGEX = /\s*(?:&&|\|\||[;|])\s*/;
|
|
74970
75341
|
WHITESPACE_REGEX = /\s+/;
|
|
74971
75342
|
getVersionBase = memoize_default(() => {
|
|
74972
|
-
const match = "1.27.
|
|
75343
|
+
const match = "1.27.5".match(/^\d+\.\d+\.\d+(?:-[a-z]+)?/);
|
|
74973
75344
|
return match ? match[0] : undefined;
|
|
74974
75345
|
});
|
|
74975
75346
|
buildEnvContext = memoize_default(async () => {
|
|
@@ -75009,7 +75380,7 @@ var init_metadata = __esm(() => {
|
|
|
75009
75380
|
isGithubAction: isEnvTruthy(process.env.GITHUB_ACTIONS),
|
|
75010
75381
|
isURCodeAction: isEnvTruthy(process.env.UR_CODE_ACTION),
|
|
75011
75382
|
isURAiAuth: isURAISubscriber2(),
|
|
75012
|
-
version: "1.27.
|
|
75383
|
+
version: "1.27.5",
|
|
75013
75384
|
versionBase: getVersionBase(),
|
|
75014
75385
|
buildTime: "",
|
|
75015
75386
|
deploymentEnvironment: env2.detectDeploymentEnvironment(),
|
|
@@ -75679,7 +76050,7 @@ function initialize1PEventLogging() {
|
|
|
75679
76050
|
const platform2 = getPlatform();
|
|
75680
76051
|
const attributes = {
|
|
75681
76052
|
[import_semantic_conventions4.ATTR_SERVICE_NAME]: "ur",
|
|
75682
|
-
[import_semantic_conventions4.ATTR_SERVICE_VERSION]: "1.27.
|
|
76053
|
+
[import_semantic_conventions4.ATTR_SERVICE_VERSION]: "1.27.5"
|
|
75683
76054
|
};
|
|
75684
76055
|
if (platform2 === "wsl") {
|
|
75685
76056
|
const wslVersion = getWslVersion();
|
|
@@ -75706,7 +76077,7 @@ function initialize1PEventLogging() {
|
|
|
75706
76077
|
})
|
|
75707
76078
|
]
|
|
75708
76079
|
});
|
|
75709
|
-
firstPartyEventLogger = firstPartyEventLoggerProvider.getLogger("com.urhq.ur.events", "1.27.
|
|
76080
|
+
firstPartyEventLogger = firstPartyEventLoggerProvider.getLogger("com.urhq.ur.events", "1.27.5");
|
|
75710
76081
|
}
|
|
75711
76082
|
async function reinitialize1PEventLoggingIfConfigChanged() {
|
|
75712
76083
|
if (!is1PEventLoggingEnabled() || !firstPartyEventLoggerProvider) {
|
|
@@ -81003,7 +81374,7 @@ function formatAgentTrendReport(report = buildAgentTrendReport()) {
|
|
|
81003
81374
|
function formatA2AAgentCard(options = {}, pretty = true) {
|
|
81004
81375
|
return JSON.stringify(buildA2AAgentCard(options), null, pretty ? 2 : 0);
|
|
81005
81376
|
}
|
|
81006
|
-
var urVersion = "1.27.
|
|
81377
|
+
var urVersion = "1.27.5", coverage, priorityRoadmap;
|
|
81007
81378
|
var init_trends = __esm(() => {
|
|
81008
81379
|
coverage = [
|
|
81009
81380
|
{
|
|
@@ -82995,7 +83366,7 @@ function getAttributionHeader(fingerprint) {
|
|
|
82995
83366
|
if (!isAttributionHeaderEnabled()) {
|
|
82996
83367
|
return "";
|
|
82997
83368
|
}
|
|
82998
|
-
const version2 = `${"1.27.
|
|
83369
|
+
const version2 = `${"1.27.5"}.${fingerprint}`;
|
|
82999
83370
|
const entrypoint = process.env.UR_CODE_ENTRYPOINT ?? "unknown";
|
|
83000
83371
|
const cch = "";
|
|
83001
83372
|
const workload = getWorkload();
|
|
@@ -190664,7 +191035,7 @@ function getTelemetryAttributes() {
|
|
|
190664
191035
|
attributes["session.id"] = sessionId;
|
|
190665
191036
|
}
|
|
190666
191037
|
if (shouldIncludeAttribute("OTEL_METRICS_INCLUDE_VERSION")) {
|
|
190667
|
-
attributes["app.version"] = "1.27.
|
|
191038
|
+
attributes["app.version"] = "1.27.5";
|
|
190668
191039
|
}
|
|
190669
191040
|
const oauthAccount = getOauthAccountInfo();
|
|
190670
191041
|
if (oauthAccount) {
|
|
@@ -226066,7 +226437,7 @@ function getInstallationEnv() {
|
|
|
226066
226437
|
return;
|
|
226067
226438
|
}
|
|
226068
226439
|
function getURCodeVersion() {
|
|
226069
|
-
return "1.27.
|
|
226440
|
+
return "1.27.5";
|
|
226070
226441
|
}
|
|
226071
226442
|
async function getInstalledVSCodeExtensionVersion(command) {
|
|
226072
226443
|
const { stdout } = await execFileNoThrow(command, ["--list-extensions", "--show-versions"], {
|
|
@@ -228905,7 +229276,7 @@ async function setupSdkMcpClients(sdkMcpConfigs, sendMcpMessage) {
|
|
|
228905
229276
|
const client2 = new Client({
|
|
228906
229277
|
name: "ur",
|
|
228907
229278
|
title: "UR",
|
|
228908
|
-
version: "1.27.
|
|
229279
|
+
version: "1.27.5",
|
|
228909
229280
|
description: "UR-AGENT autonomous engineering workflow engine",
|
|
228910
229281
|
websiteUrl: PRODUCT_URL
|
|
228911
229282
|
}, {
|
|
@@ -229259,7 +229630,7 @@ var init_client5 = __esm(() => {
|
|
|
229259
229630
|
const client2 = new Client({
|
|
229260
229631
|
name: "ur",
|
|
229261
229632
|
title: "UR",
|
|
229262
|
-
version: "1.27.
|
|
229633
|
+
version: "1.27.5",
|
|
229263
229634
|
description: "UR-AGENT autonomous engineering workflow engine",
|
|
229264
229635
|
websiteUrl: PRODUCT_URL
|
|
229265
229636
|
}, {
|
|
@@ -239072,9 +239443,9 @@ async function assertMinVersion() {
|
|
|
239072
239443
|
if (false) {}
|
|
239073
239444
|
try {
|
|
239074
239445
|
const versionConfig = await getDynamicConfig_BLOCKS_ON_INIT("tengu_version_config", { minVersion: "0.0.0" });
|
|
239075
|
-
if (versionConfig.minVersion && lt("1.27.
|
|
239446
|
+
if (versionConfig.minVersion && lt("1.27.5", versionConfig.minVersion)) {
|
|
239076
239447
|
console.error(`
|
|
239077
|
-
It looks like your version of UR (${"1.27.
|
|
239448
|
+
It looks like your version of UR (${"1.27.5"}) needs an update.
|
|
239078
239449
|
A newer version (${versionConfig.minVersion} or higher) is required to continue.
|
|
239079
239450
|
|
|
239080
239451
|
To update, please run:
|
|
@@ -239290,7 +239661,7 @@ async function installGlobalPackage(specificVersion) {
|
|
|
239290
239661
|
logError2(new AutoUpdaterError("Another process is currently installing an update"));
|
|
239291
239662
|
logEvent("tengu_auto_updater_lock_contention", {
|
|
239292
239663
|
pid: process.pid,
|
|
239293
|
-
currentVersion: "1.27.
|
|
239664
|
+
currentVersion: "1.27.5"
|
|
239294
239665
|
});
|
|
239295
239666
|
return "in_progress";
|
|
239296
239667
|
}
|
|
@@ -239299,7 +239670,7 @@ async function installGlobalPackage(specificVersion) {
|
|
|
239299
239670
|
if (!env2.isRunningWithBun() && env2.isNpmFromWindowsPath()) {
|
|
239300
239671
|
logError2(new Error("Windows NPM detected in WSL environment"));
|
|
239301
239672
|
logEvent("tengu_auto_updater_windows_npm_in_wsl", {
|
|
239302
|
-
currentVersion: "1.27.
|
|
239673
|
+
currentVersion: "1.27.5"
|
|
239303
239674
|
});
|
|
239304
239675
|
console.error(`
|
|
239305
239676
|
Error: Windows NPM detected in WSL
|
|
@@ -239834,7 +240205,7 @@ function detectLinuxGlobPatternWarnings() {
|
|
|
239834
240205
|
}
|
|
239835
240206
|
async function getDoctorDiagnostic() {
|
|
239836
240207
|
const installationType = await getCurrentInstallationType();
|
|
239837
|
-
const version2 = typeof MACRO !== "undefined" ? "1.27.
|
|
240208
|
+
const version2 = typeof MACRO !== "undefined" ? "1.27.5" : "unknown";
|
|
239838
240209
|
const installationPath = await getInstallationPath();
|
|
239839
240210
|
const invokedBinary = getInvokedBinary();
|
|
239840
240211
|
const multipleInstallations = await detectMultipleInstallations();
|
|
@@ -240769,8 +241140,8 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
|
|
|
240769
241140
|
const maxVersion = await getMaxVersion();
|
|
240770
241141
|
if (maxVersion && gt(version2, maxVersion)) {
|
|
240771
241142
|
logForDebugging(`Native installer: maxVersion ${maxVersion} is set, capping update from ${version2} to ${maxVersion}`);
|
|
240772
|
-
if (gte("1.27.
|
|
240773
|
-
logForDebugging(`Native installer: current version ${"1.27.
|
|
241143
|
+
if (gte("1.27.5", maxVersion)) {
|
|
241144
|
+
logForDebugging(`Native installer: current version ${"1.27.5"} is already at or above maxVersion ${maxVersion}, skipping update`);
|
|
240774
241145
|
logEvent("tengu_native_update_skipped_max_version", {
|
|
240775
241146
|
latency_ms: Date.now() - startTime,
|
|
240776
241147
|
max_version: maxVersion,
|
|
@@ -240781,7 +241152,7 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
|
|
|
240781
241152
|
version2 = maxVersion;
|
|
240782
241153
|
}
|
|
240783
241154
|
}
|
|
240784
|
-
if (!forceReinstall && version2 === "1.27.
|
|
241155
|
+
if (!forceReinstall && version2 === "1.27.5" && await versionIsAvailable(version2) && await isPossibleURBinary(executablePath)) {
|
|
240785
241156
|
logForDebugging(`Found ${version2} at ${executablePath}, skipping install`);
|
|
240786
241157
|
logEvent("tengu_native_update_complete", {
|
|
240787
241158
|
latency_ms: Date.now() - startTime,
|
|
@@ -337693,7 +338064,7 @@ function Feedback({
|
|
|
337693
338064
|
platform: env2.platform,
|
|
337694
338065
|
gitRepo: envInfo.isGit,
|
|
337695
338066
|
terminal: env2.terminal,
|
|
337696
|
-
version: "1.27.
|
|
338067
|
+
version: "1.27.5",
|
|
337697
338068
|
transcript: normalizeMessagesForAPI(messages),
|
|
337698
338069
|
errors: sanitizedErrors,
|
|
337699
338070
|
lastApiRequest: getLastAPIRequest(),
|
|
@@ -337885,7 +338256,7 @@ function Feedback({
|
|
|
337885
338256
|
", ",
|
|
337886
338257
|
env2.terminal,
|
|
337887
338258
|
", v",
|
|
337888
|
-
"1.27.
|
|
338259
|
+
"1.27.5"
|
|
337889
338260
|
]
|
|
337890
338261
|
}, undefined, true, undefined, this)
|
|
337891
338262
|
]
|
|
@@ -337991,7 +338362,7 @@ ${sanitizedDescription}
|
|
|
337991
338362
|
` + `**Environment Info**
|
|
337992
338363
|
` + `- Platform: ${env2.platform}
|
|
337993
338364
|
` + `- Terminal: ${env2.terminal}
|
|
337994
|
-
` + `- Version: ${"1.27.
|
|
338365
|
+
` + `- Version: ${"1.27.5"}
|
|
337995
338366
|
` + `- Feedback ID: ${feedbackId}
|
|
337996
338367
|
` + `
|
|
337997
338368
|
**Errors**
|
|
@@ -341102,7 +341473,7 @@ function buildPrimarySection() {
|
|
|
341102
341473
|
}, undefined, false, undefined, this);
|
|
341103
341474
|
return [{
|
|
341104
341475
|
label: "Version",
|
|
341105
|
-
value: "1.27.
|
|
341476
|
+
value: "1.27.5"
|
|
341106
341477
|
}, {
|
|
341107
341478
|
label: "Session name",
|
|
341108
341479
|
value: nameValue
|
|
@@ -341916,55 +342287,35 @@ function ModelPicker({
|
|
|
341916
342287
|
const appThinkingEnabled = useAppState(selectThinkingEnabled);
|
|
341917
342288
|
const [hasToggledThinking, setHasToggledThinking] = import_react101.useState(false);
|
|
341918
342289
|
const [thinkingEnabled, setThinkingEnabled] = import_react101.useState(() => appThinkingEnabled ?? shouldEnableThinkingByDefault());
|
|
341919
|
-
const [ollamaModelOptions, setOllamaModelOptions] = import_react101.useState([]);
|
|
341920
342290
|
const [providerModelOptions, setProviderModelOptions] = import_react101.useState([]);
|
|
341921
|
-
const
|
|
341922
|
-
const
|
|
341923
|
-
const isLocalProvider = ["ollama", "lmstudio", "llama.cpp", "vllm"].includes(currentProvider);
|
|
342291
|
+
const [pickerError, setPickerError] = import_react101.useState(null);
|
|
342292
|
+
const currentProvider = getActiveProviderSettings(getSettingsForSource("userSettings") ?? {}).active ?? "ollama";
|
|
341924
342293
|
import_react101.useEffect(() => {
|
|
341925
|
-
|
|
341926
|
-
|
|
341927
|
-
|
|
341928
|
-
|
|
341929
|
-
|
|
341930
|
-
|
|
341931
|
-
|
|
341932
|
-
|
|
341933
|
-
if (!controller.signal.aborted) {
|
|
341934
|
-
setOllamaModelOptions([]);
|
|
341935
|
-
setProviderModelOptions([]);
|
|
341936
|
-
}
|
|
341937
|
-
});
|
|
341938
|
-
return () => controller.abort();
|
|
341939
|
-
}
|
|
341940
|
-
if (isLocalProvider) {
|
|
341941
|
-
const controller = new AbortController;
|
|
341942
|
-
getOllamaModelOptions(controller.signal).then((options2) => {
|
|
341943
|
-
if (!controller.signal.aborted) {
|
|
341944
|
-
setProviderModelOptions(options2);
|
|
341945
|
-
}
|
|
341946
|
-
}).catch(() => {
|
|
341947
|
-
if (!controller.signal.aborted) {
|
|
341948
|
-
setProviderModelOptions([]);
|
|
341949
|
-
}
|
|
341950
|
-
});
|
|
341951
|
-
return () => controller.abort();
|
|
341952
|
-
}
|
|
341953
|
-
const models = listModelsForProvider(currentProvider);
|
|
341954
|
-
if (models.length > 0) {
|
|
341955
|
-
const options2 = models.map((model) => ({
|
|
342294
|
+
const controller = new AbortController;
|
|
342295
|
+
listModelsForProviderWithSource(currentProvider, {
|
|
342296
|
+
settings: getSettingsForSource("userSettings") ?? undefined,
|
|
342297
|
+
signal: controller.signal
|
|
342298
|
+
}).then((result) => {
|
|
342299
|
+
if (controller.signal.aborted)
|
|
342300
|
+
return;
|
|
342301
|
+
setProviderModelOptions(result.models.map((model) => ({
|
|
341956
342302
|
value: model.id,
|
|
341957
342303
|
label: model.displayName,
|
|
341958
|
-
description: model.description
|
|
341959
|
-
}));
|
|
341960
|
-
|
|
341961
|
-
}
|
|
342304
|
+
description: `${model.description} \xB7 ${result.source}`
|
|
342305
|
+
})));
|
|
342306
|
+
setPickerError(result.warning ?? null);
|
|
342307
|
+
}).catch((error40) => {
|
|
342308
|
+
if (controller.signal.aborted)
|
|
342309
|
+
return;
|
|
341962
342310
|
setProviderModelOptions([]);
|
|
341963
|
-
|
|
341964
|
-
|
|
341965
|
-
|
|
341966
|
-
|
|
341967
|
-
const
|
|
342311
|
+
setPickerError(error40 instanceof Error ? error40.message : String(error40));
|
|
342312
|
+
});
|
|
342313
|
+
return () => controller.abort();
|
|
342314
|
+
}, [currentProvider]);
|
|
342315
|
+
const modelOptions = providerModelOptions;
|
|
342316
|
+
const optionsWithInitial = initial !== null && validateProviderModelPair(currentProvider, initial, {
|
|
342317
|
+
availableModels: modelOptions.map((option) => option.value)
|
|
342318
|
+
}).valid && !modelOptions.some((opt) => opt.value === initial) ? [
|
|
341968
342319
|
...modelOptions,
|
|
341969
342320
|
{
|
|
341970
342321
|
value: initial,
|
|
@@ -342015,6 +342366,15 @@ function ModelPicker({
|
|
|
342015
342366
|
logEvent("tengu_model_command_menu_effort", {
|
|
342016
342367
|
effort
|
|
342017
342368
|
});
|
|
342369
|
+
if (value !== NO_PREFERENCE) {
|
|
342370
|
+
const validation = validateProviderModelPair(currentProvider, value, {
|
|
342371
|
+
availableModels: modelOptions.map((option) => option.value)
|
|
342372
|
+
});
|
|
342373
|
+
if (validation.valid === false) {
|
|
342374
|
+
setPickerError(validation.error);
|
|
342375
|
+
return;
|
|
342376
|
+
}
|
|
342377
|
+
}
|
|
342018
342378
|
if (!skipSettingsWrite) {
|
|
342019
342379
|
const effortLevel = resolvePickerEffortPersistence(effort, getDefaultEffortLevelForOption(value), getSettingsForSource("userSettings")?.effortLevel, hasToggledEffort);
|
|
342020
342380
|
const persistable = toPersistableEffort(effortLevel);
|
|
@@ -342187,6 +342547,13 @@ function ModelPicker({
|
|
|
342187
342547
|
}, undefined, true, undefined, this)
|
|
342188
342548
|
]
|
|
342189
342549
|
}, undefined, true, undefined, this),
|
|
342550
|
+
pickerError && /* @__PURE__ */ jsx_dev_runtime172.jsxDEV(ThemedBox_default, {
|
|
342551
|
+
marginBottom: 1,
|
|
342552
|
+
children: /* @__PURE__ */ jsx_dev_runtime172.jsxDEV(ThemedText, {
|
|
342553
|
+
color: "error",
|
|
342554
|
+
children: pickerError
|
|
342555
|
+
}, undefined, false, undefined, this)
|
|
342556
|
+
}, undefined, false, undefined, this),
|
|
342190
342557
|
fastModeNotice
|
|
342191
342558
|
]
|
|
342192
342559
|
}, undefined, true, undefined, this),
|
|
@@ -342264,8 +342631,6 @@ var init_ModelPicker = __esm(() => {
|
|
|
342264
342631
|
init_AppState();
|
|
342265
342632
|
init_effort();
|
|
342266
342633
|
init_model();
|
|
342267
|
-
init_modelOptions();
|
|
342268
|
-
init_ollamaModels();
|
|
342269
342634
|
init_settings2();
|
|
342270
342635
|
init_thinking();
|
|
342271
342636
|
init_providerRegistry();
|
|
@@ -344408,7 +344773,7 @@ function Config({
|
|
|
344408
344773
|
}
|
|
344409
344774
|
}, undefined, false, undefined, this)
|
|
344410
344775
|
}, undefined, false, undefined, this) : showSubmenu === "ChannelDowngrade" ? /* @__PURE__ */ jsx_dev_runtime177.jsxDEV(ChannelDowngradeDialog, {
|
|
344411
|
-
currentVersion: "1.27.
|
|
344776
|
+
currentVersion: "1.27.5",
|
|
344412
344777
|
onChoice: (choice) => {
|
|
344413
344778
|
setShowSubmenu(null);
|
|
344414
344779
|
setTabsHidden(false);
|
|
@@ -344420,7 +344785,7 @@ function Config({
|
|
|
344420
344785
|
autoUpdatesChannel: "stable"
|
|
344421
344786
|
};
|
|
344422
344787
|
if (choice === "stay") {
|
|
344423
|
-
newSettings.minimumVersion = "1.27.
|
|
344788
|
+
newSettings.minimumVersion = "1.27.5";
|
|
344424
344789
|
}
|
|
344425
344790
|
updateSettingsForSource("userSettings", newSettings);
|
|
344426
344791
|
setSettingsData((prev_27) => ({
|
|
@@ -352490,7 +352855,7 @@ function HelpV2(t0) {
|
|
|
352490
352855
|
let t6;
|
|
352491
352856
|
if ($3[31] !== tabs) {
|
|
352492
352857
|
t6 = /* @__PURE__ */ jsx_dev_runtime204.jsxDEV(Tabs, {
|
|
352493
|
-
title: `UR v${"1.27.
|
|
352858
|
+
title: `UR v${"1.27.5"}`,
|
|
352494
352859
|
color: "professionalBlue",
|
|
352495
352860
|
defaultTab: "general",
|
|
352496
352861
|
children: tabs
|
|
@@ -372592,7 +372957,7 @@ function getAllReleaseNotes(changelogContent = getStoredChangelogFromMemory()) {
|
|
|
372592
372957
|
return [];
|
|
372593
372958
|
}
|
|
372594
372959
|
}
|
|
372595
|
-
async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.27.
|
|
372960
|
+
async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.27.5") {
|
|
372596
372961
|
if (process.env.USER_TYPE === "ant") {
|
|
372597
372962
|
const changelog = "";
|
|
372598
372963
|
if (changelog) {
|
|
@@ -372619,7 +372984,7 @@ async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.27.4")
|
|
|
372619
372984
|
releaseNotes
|
|
372620
372985
|
};
|
|
372621
372986
|
}
|
|
372622
|
-
function checkForReleaseNotesSync(lastSeenVersion, currentVersion = "1.27.
|
|
372987
|
+
function checkForReleaseNotesSync(lastSeenVersion, currentVersion = "1.27.5") {
|
|
372623
372988
|
if (process.env.USER_TYPE === "ant") {
|
|
372624
372989
|
const changelog = "";
|
|
372625
372990
|
if (changelog) {
|
|
@@ -373789,7 +374154,7 @@ function getRecentActivitySync() {
|
|
|
373789
374154
|
return cachedActivity;
|
|
373790
374155
|
}
|
|
373791
374156
|
function getLogoDisplayData() {
|
|
373792
|
-
const version2 = process.env.DEMO_VERSION ?? "1.27.
|
|
374157
|
+
const version2 = process.env.DEMO_VERSION ?? "1.27.5";
|
|
373793
374158
|
const serverUrl = getDirectConnectServerUrl();
|
|
373794
374159
|
const displayPath = process.env.DEMO_VERSION ? "/code/ur" : getDisplayPath(getCwd2());
|
|
373795
374160
|
const cwd2 = serverUrl ? `${displayPath} in ${serverUrl.replace(/^https?:\/\//, "")}` : displayPath;
|
|
@@ -374578,7 +374943,7 @@ function LogoV2() {
|
|
|
374578
374943
|
if ($3[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
374579
374944
|
t2 = () => {
|
|
374580
374945
|
const currentConfig = getGlobalConfig();
|
|
374581
|
-
if (currentConfig.lastReleaseNotesSeen === "1.27.
|
|
374946
|
+
if (currentConfig.lastReleaseNotesSeen === "1.27.5") {
|
|
374582
374947
|
return;
|
|
374583
374948
|
}
|
|
374584
374949
|
saveGlobalConfig(_temp326);
|
|
@@ -375263,12 +375628,12 @@ function LogoV2() {
|
|
|
375263
375628
|
return t41;
|
|
375264
375629
|
}
|
|
375265
375630
|
function _temp326(current) {
|
|
375266
|
-
if (current.lastReleaseNotesSeen === "1.27.
|
|
375631
|
+
if (current.lastReleaseNotesSeen === "1.27.5") {
|
|
375267
375632
|
return current;
|
|
375268
375633
|
}
|
|
375269
375634
|
return {
|
|
375270
375635
|
...current,
|
|
375271
|
-
lastReleaseNotesSeen: "1.27.
|
|
375636
|
+
lastReleaseNotesSeen: "1.27.5"
|
|
375272
375637
|
};
|
|
375273
375638
|
}
|
|
375274
375639
|
function _temp243(s_0) {
|
|
@@ -392257,7 +392622,7 @@ function buildToolUseContext(tools, readFileStateCache) {
|
|
|
392257
392622
|
async function handleInitialize() {
|
|
392258
392623
|
return {
|
|
392259
392624
|
name: "ur-agent",
|
|
392260
|
-
version: "1.27.
|
|
392625
|
+
version: "1.27.5",
|
|
392261
392626
|
protocolVersion: "0.1.0"
|
|
392262
392627
|
};
|
|
392263
392628
|
}
|
|
@@ -591251,7 +591616,7 @@ async function captureMemoryDiagnostics(trigger2, dumpNumber = 0) {
|
|
|
591251
591616
|
smapsRollup,
|
|
591252
591617
|
platform: process.platform,
|
|
591253
591618
|
nodeVersion: process.version,
|
|
591254
|
-
ccVersion: "1.27.
|
|
591619
|
+
ccVersion: "1.27.5"
|
|
591255
591620
|
};
|
|
591256
591621
|
}
|
|
591257
591622
|
async function performHeapDump(trigger2 = "manual", dumpNumber = 0) {
|
|
@@ -591837,7 +592202,7 @@ var init_bridge_kick = __esm(() => {
|
|
|
591837
592202
|
var call136 = async () => {
|
|
591838
592203
|
return {
|
|
591839
592204
|
type: "text",
|
|
591840
|
-
value: "1.27.
|
|
592205
|
+
value: "1.27.5"
|
|
591841
592206
|
};
|
|
591842
592207
|
}, version2, version_default;
|
|
591843
592208
|
var init_version = __esm(() => {
|
|
@@ -594697,64 +595062,6 @@ var init_export2 = __esm(() => {
|
|
|
594697
595062
|
});
|
|
594698
595063
|
|
|
594699
595064
|
// src/components/ProviderFirstModelPicker.tsx
|
|
594700
|
-
function getStatusFromDoctorResult(doctorResult) {
|
|
594701
|
-
if (doctorResult.ok) {
|
|
594702
|
-
return "connected";
|
|
594703
|
-
}
|
|
594704
|
-
if (doctorResult.failureReason?.includes("CLI missing") || doctorResult.failureReason?.includes("not found")) {
|
|
594705
|
-
return "missing";
|
|
594706
|
-
}
|
|
594707
|
-
if (doctorResult.failureReason?.includes("not logged in") || doctorResult.failureReason?.includes("not authenticated")) {
|
|
594708
|
-
return "unavailable";
|
|
594709
|
-
}
|
|
594710
|
-
if (doctorResult.failureReason?.includes("API key missing") || doctorResult.failureReason?.includes("endpoint")) {
|
|
594711
|
-
return "unavailable";
|
|
594712
|
-
}
|
|
594713
|
-
return "unknown";
|
|
594714
|
-
}
|
|
594715
|
-
function getCredentialType(provider) {
|
|
594716
|
-
switch (provider.authMode) {
|
|
594717
|
-
case "subscription":
|
|
594718
|
-
return "cli-login";
|
|
594719
|
-
case "enterprise-login":
|
|
594720
|
-
case "personal-login":
|
|
594721
|
-
return "cli-login";
|
|
594722
|
-
case "api":
|
|
594723
|
-
return "api-key";
|
|
594724
|
-
case "local":
|
|
594725
|
-
return provider.endpointKind ? "openai-compatible-endpoint" : "local-runtime";
|
|
594726
|
-
default:
|
|
594727
|
-
return "unknown";
|
|
594728
|
-
}
|
|
594729
|
-
}
|
|
594730
|
-
function formatStatusMessage(status2, provider, checks4) {
|
|
594731
|
-
switch (status2) {
|
|
594732
|
-
case "connected":
|
|
594733
|
-
if (provider.accessType === "api") {
|
|
594734
|
-
const envKey = provider.envKey;
|
|
594735
|
-
if (envKey) {
|
|
594736
|
-
return `${envKey} found`;
|
|
594737
|
-
}
|
|
594738
|
-
}
|
|
594739
|
-
if (provider.accessType === "local" || provider.accessType === "subscription") {
|
|
594740
|
-
return "connected";
|
|
594741
|
-
}
|
|
594742
|
-
return "available";
|
|
594743
|
-
case "missing":
|
|
594744
|
-
if (provider.commandCandidates) {
|
|
594745
|
-
return `CLI not found (tried: ${provider.commandCandidates.join(", ")})`;
|
|
594746
|
-
}
|
|
594747
|
-
return "CLI not found";
|
|
594748
|
-
case "unavailable":
|
|
594749
|
-
const failCheck = checks4.find((c4) => c4.status === "fail" || c4.status === "warn");
|
|
594750
|
-
if (failCheck) {
|
|
594751
|
-
return failCheck.message;
|
|
594752
|
-
}
|
|
594753
|
-
return "not available";
|
|
594754
|
-
case "unknown":
|
|
594755
|
-
return "status unknown";
|
|
594756
|
-
}
|
|
594757
|
-
}
|
|
594758
595065
|
function ProviderFirstModelPicker({
|
|
594759
595066
|
initial,
|
|
594760
595067
|
onSelect,
|
|
@@ -594773,28 +595080,30 @@ function ProviderFirstModelPicker({
|
|
|
594773
595080
|
const [loadingModels, setLoadingModels] = import_react188.useState(false);
|
|
594774
595081
|
const [selectedProvider, setSelectedProvider] = import_react188.useState(null);
|
|
594775
595082
|
const [modelSource, setModelSource] = import_react188.useState("static");
|
|
594776
|
-
const
|
|
595083
|
+
const [modelWarning, setModelWarning] = import_react188.useState(null);
|
|
594777
595084
|
const effortValue = useAppState(selectEffortValue2);
|
|
594778
|
-
const [effort
|
|
595085
|
+
const [effort] = import_react188.useState(effortValue !== undefined ? convertEffortValueToLevel(effortValue) : undefined);
|
|
594779
595086
|
const appThinkingEnabled = useAppState(selectThinkingEnabled2);
|
|
594780
|
-
const
|
|
594781
|
-
const [thinkingEnabled
|
|
595087
|
+
const hasToggledThinking = false;
|
|
595088
|
+
const [thinkingEnabled] = import_react188.useState(() => appThinkingEnabled ?? shouldEnableThinkingByDefault());
|
|
594782
595089
|
import_react188.useEffect(() => {
|
|
594783
595090
|
async function loadProviderStatus() {
|
|
594784
595091
|
setLoadingProviders(true);
|
|
594785
595092
|
const providers = listProviders();
|
|
595093
|
+
const settings = getSettingsForSource("userSettings");
|
|
594786
595094
|
const options2 = await Promise.all(providers.map(async (provider) => {
|
|
594787
|
-
const
|
|
594788
|
-
|
|
594789
|
-
|
|
594790
|
-
const
|
|
595095
|
+
const status2 = await getProviderStatus(provider.id, {
|
|
595096
|
+
settings: settings ?? undefined
|
|
595097
|
+
});
|
|
595098
|
+
const accessType = getProviderAccessTypeLabel(provider);
|
|
594791
595099
|
return {
|
|
594792
595100
|
value: provider.id,
|
|
594793
595101
|
label: provider.displayName,
|
|
594794
|
-
description: `${
|
|
594795
|
-
status: status2,
|
|
594796
|
-
|
|
594797
|
-
|
|
595102
|
+
description: `${accessType} \xB7 ${status2.label}`,
|
|
595103
|
+
status: status2.status,
|
|
595104
|
+
statusLabel: status2.label,
|
|
595105
|
+
accessType,
|
|
595106
|
+
credentialType: provider.credentialType,
|
|
594798
595107
|
provider
|
|
594799
595108
|
};
|
|
594800
595109
|
}));
|
|
@@ -594808,49 +595117,22 @@ function ProviderFirstModelPicker({
|
|
|
594808
595117
|
return;
|
|
594809
595118
|
async function loadModels() {
|
|
594810
595119
|
setLoadingModels(true);
|
|
595120
|
+
setModelWarning(null);
|
|
594811
595121
|
const providerId = selectedProvider.value;
|
|
594812
|
-
const
|
|
594813
|
-
|
|
594814
|
-
|
|
594815
|
-
|
|
594816
|
-
|
|
594817
|
-
|
|
594818
|
-
|
|
594819
|
-
|
|
594820
|
-
|
|
594821
|
-
|
|
594822
|
-
|
|
594823
|
-
|
|
594824
|
-
|
|
594825
|
-
|
|
594826
|
-
const options2 = await getOllamaModelOptions(controller.signal);
|
|
594827
|
-
setModelOptions(options2);
|
|
594828
|
-
setModelSource("live");
|
|
594829
|
-
controller.abort();
|
|
594830
|
-
} else {
|
|
594831
|
-
const options2 = models.map((model) => ({
|
|
594832
|
-
value: model.id,
|
|
594833
|
-
label: model.displayName,
|
|
594834
|
-
description: model.description
|
|
594835
|
-
}));
|
|
594836
|
-
setModelOptions(options2);
|
|
594837
|
-
setModelSource("static");
|
|
594838
|
-
}
|
|
594839
|
-
} else {
|
|
594840
|
-
setModelOptions([]);
|
|
594841
|
-
setModelSource("static");
|
|
594842
|
-
}
|
|
594843
|
-
}
|
|
594844
|
-
} catch (error40) {
|
|
594845
|
-
const models = listModelsForProvider(providerId);
|
|
594846
|
-
const options2 = models.filter((m) => !m.isDynamic).map((model) => ({
|
|
594847
|
-
value: model.id,
|
|
594848
|
-
label: model.displayName,
|
|
594849
|
-
description: `${model.description} (cached)`
|
|
594850
|
-
}));
|
|
594851
|
-
setModelOptions(options2);
|
|
594852
|
-
setModelSource("cache");
|
|
594853
|
-
}
|
|
595122
|
+
const controller = new AbortController;
|
|
595123
|
+
const result = await listModelsForProviderWithSource(providerId, {
|
|
595124
|
+
settings: getSettingsForSource("userSettings") ?? undefined,
|
|
595125
|
+
signal: controller.signal
|
|
595126
|
+
});
|
|
595127
|
+
controller.abort();
|
|
595128
|
+
const options2 = result.models.map((model) => ({
|
|
595129
|
+
value: model.id,
|
|
595130
|
+
label: model.displayName,
|
|
595131
|
+
description: `${model.description} \xB7 ${result.source}`
|
|
595132
|
+
}));
|
|
595133
|
+
setModelOptions(options2);
|
|
595134
|
+
setModelSource(result.source);
|
|
595135
|
+
setModelWarning(result.warning ?? null);
|
|
594854
595136
|
setLoadingModels(false);
|
|
594855
595137
|
}
|
|
594856
595138
|
loadModels();
|
|
@@ -594890,18 +595172,23 @@ function ProviderFirstModelPicker({
|
|
|
594890
595172
|
source: modelSource
|
|
594891
595173
|
});
|
|
594892
595174
|
if (selectedProvider) {
|
|
594893
|
-
const validation =
|
|
595175
|
+
const validation = validateProviderModelPair(selectedProvider.value, value, {
|
|
595176
|
+
availableModels: modelOptions.map((option22) => option22.value)
|
|
595177
|
+
});
|
|
594894
595178
|
if (validation.valid === false) {
|
|
595179
|
+
setModelWarning(validation.error);
|
|
594895
595180
|
return;
|
|
594896
595181
|
}
|
|
594897
595182
|
}
|
|
594898
595183
|
if (selectedProvider) {
|
|
594899
|
-
|
|
594900
|
-
|
|
594901
|
-
|
|
594902
|
-
model: value
|
|
594903
|
-
}
|
|
595184
|
+
const saveResult = setProviderModel(selectedProvider.value, value, {
|
|
595185
|
+
availableModels: modelOptions.map((option22) => option22.value),
|
|
595186
|
+
modelSource
|
|
594904
595187
|
});
|
|
595188
|
+
if (!saveResult.ok) {
|
|
595189
|
+
setModelWarning(saveResult.message);
|
|
595190
|
+
return;
|
|
595191
|
+
}
|
|
594905
595192
|
}
|
|
594906
595193
|
setAppState((prev) => ({
|
|
594907
595194
|
...prev,
|
|
@@ -594913,23 +595200,18 @@ function ProviderFirstModelPicker({
|
|
|
594913
595200
|
effortValue: effort,
|
|
594914
595201
|
...hasToggledThinking ? { thinkingEnabled } : {}
|
|
594915
595202
|
}));
|
|
594916
|
-
|
|
594917
|
-
|
|
594918
|
-
|
|
594919
|
-
|
|
594920
|
-
|
|
594921
|
-
|
|
594922
|
-
confirmationParts.push(`Effort: ${capitalize_default(effort)}`);
|
|
594923
|
-
}
|
|
594924
|
-
if (thinkingEnabled && focusedModel && modelSupportsThinking(parseUserSpecifiedModel(value))) {
|
|
594925
|
-
confirmationParts.push(`Thinking: on`);
|
|
594926
|
-
}
|
|
594927
|
-
onSelect(value, effort);
|
|
595203
|
+
onSelect(value, effort, selectedProvider ? {
|
|
595204
|
+
providerId: selectedProvider.value,
|
|
595205
|
+
providerName: selectedProvider.label,
|
|
595206
|
+
accessType: selectedProvider.accessType,
|
|
595207
|
+
modelSource
|
|
595208
|
+
} : undefined);
|
|
594928
595209
|
}
|
|
594929
595210
|
function handleBack() {
|
|
594930
595211
|
setStep("provider");
|
|
594931
595212
|
setSelectedProvider(null);
|
|
594932
595213
|
setModelOptions([]);
|
|
595214
|
+
setModelWarning(null);
|
|
594933
595215
|
}
|
|
594934
595216
|
if (step === "provider") {
|
|
594935
595217
|
const content2 = /* @__PURE__ */ jsx_dev_runtime346.jsxDEV(ThemedBox_default, {
|
|
@@ -595006,12 +595288,19 @@ function ProviderFirstModelPicker({
|
|
|
595006
595288
|
/* @__PURE__ */ jsx_dev_runtime346.jsxDEV(ThemedText, {
|
|
595007
595289
|
color: focusedProvider.status === "connected" ? "success" : "error",
|
|
595008
595290
|
children: focusedProvider.status
|
|
595009
|
-
}, undefined, false, undefined, this)
|
|
595291
|
+
}, undefined, false, undefined, this),
|
|
595292
|
+
/* @__PURE__ */ jsx_dev_runtime346.jsxDEV(ThemedText, {
|
|
595293
|
+
dimColor: true,
|
|
595294
|
+
children: [
|
|
595295
|
+
" \xB7 ",
|
|
595296
|
+
focusedProvider.statusLabel
|
|
595297
|
+
]
|
|
595298
|
+
}, undefined, true, undefined, this)
|
|
595010
595299
|
]
|
|
595011
595300
|
}, undefined, true, undefined, this),
|
|
595012
595301
|
/* @__PURE__ */ jsx_dev_runtime346.jsxDEV(ThemedText, {
|
|
595013
595302
|
dimColor: true,
|
|
595014
|
-
children: focusedProvider.provider.
|
|
595303
|
+
children: focusedProvider.provider.accessPathLabel
|
|
595015
595304
|
}, undefined, false, undefined, this),
|
|
595016
595305
|
focusedProvider.status !== "connected" && /* @__PURE__ */ jsx_dev_runtime346.jsxDEV(ThemedText, {
|
|
595017
595306
|
dimColor: true,
|
|
@@ -595081,6 +595370,14 @@ function ProviderFirstModelPicker({
|
|
|
595081
595370
|
")"
|
|
595082
595371
|
]
|
|
595083
595372
|
}, undefined, true, undefined, this),
|
|
595373
|
+
/* @__PURE__ */ jsx_dev_runtime346.jsxDEV(ThemedText, {
|
|
595374
|
+
dimColor: true,
|
|
595375
|
+
color: "subtle",
|
|
595376
|
+
children: [
|
|
595377
|
+
"Model source: ",
|
|
595378
|
+
modelSource
|
|
595379
|
+
]
|
|
595380
|
+
}, undefined, true, undefined, this),
|
|
595084
595381
|
/* @__PURE__ */ jsx_dev_runtime346.jsxDEV(ThemedText, {
|
|
595085
595382
|
dimColor: true,
|
|
595086
595383
|
color: "subtle",
|
|
@@ -595138,8 +595435,18 @@ function ProviderFirstModelPicker({
|
|
|
595138
595435
|
}, undefined, false, undefined, this)
|
|
595139
595436
|
]
|
|
595140
595437
|
}, undefined, true, undefined, this),
|
|
595438
|
+
modelWarning && /* @__PURE__ */ jsx_dev_runtime346.jsxDEV(ThemedBox_default, {
|
|
595439
|
+
marginBottom: 1,
|
|
595440
|
+
flexDirection: "column",
|
|
595441
|
+
children: /* @__PURE__ */ jsx_dev_runtime346.jsxDEV(ThemedText, {
|
|
595442
|
+
dimColor: true,
|
|
595443
|
+
color: "error",
|
|
595444
|
+
children: modelWarning
|
|
595445
|
+
}, undefined, false, undefined, this)
|
|
595446
|
+
}, undefined, false, undefined, this),
|
|
595141
595447
|
modelOptions.length === 0 && /* @__PURE__ */ jsx_dev_runtime346.jsxDEV(ThemedBox_default, {
|
|
595142
595448
|
marginBottom: 1,
|
|
595449
|
+
flexDirection: "column",
|
|
595143
595450
|
children: [
|
|
595144
595451
|
/* @__PURE__ */ jsx_dev_runtime346.jsxDEV(ThemedText, {
|
|
595145
595452
|
dimColor: true,
|
|
@@ -595188,14 +595495,12 @@ function ProviderFirstModelPicker({
|
|
|
595188
595495
|
}, undefined, false, undefined, this);
|
|
595189
595496
|
}
|
|
595190
595497
|
function noop8() {}
|
|
595191
|
-
var import_react188, jsx_dev_runtime346, selectCurrentProvider = (s) => s.provider?.active ?? "ollama", selectEffortValue2 = (s) => s.effortValue,
|
|
595498
|
+
var import_react188, jsx_dev_runtime346, selectCurrentProvider = (s) => s.provider?.active ?? "ollama", selectEffortValue2 = (s) => s.effortValue, selectThinkingEnabled2 = (s) => s.thinkingEnabled;
|
|
595192
595499
|
var init_ProviderFirstModelPicker = __esm(() => {
|
|
595193
|
-
init_capitalize();
|
|
595194
595500
|
init_analytics();
|
|
595195
595501
|
init_providerRegistry();
|
|
595196
595502
|
init_AppState();
|
|
595197
595503
|
init_settings2();
|
|
595198
|
-
init_ollamaModels();
|
|
595199
595504
|
init_ink2();
|
|
595200
595505
|
init_AppState();
|
|
595201
595506
|
init_ConfigurableShortcutHint();
|
|
@@ -595244,7 +595549,7 @@ function ModelPickerWrapper(t0) {
|
|
|
595244
595549
|
const handleCancel = t1;
|
|
595245
595550
|
let t2;
|
|
595246
595551
|
if ($3[3] !== isFastMode || $3[4] !== mainLoopModel || $3[5] !== onDone || $3[6] !== setAppState) {
|
|
595247
|
-
t2 = function handleSelect2(model, effort) {
|
|
595552
|
+
t2 = function handleSelect2(model, effort, metadata) {
|
|
595248
595553
|
logEvent("tengu_model_command_menu", {
|
|
595249
595554
|
action: model,
|
|
595250
595555
|
from_model: mainLoopModel,
|
|
@@ -595255,7 +595560,9 @@ function ModelPickerWrapper(t0) {
|
|
|
595255
595560
|
mainLoopModel: model,
|
|
595256
595561
|
mainLoopModelForSession: null
|
|
595257
595562
|
}));
|
|
595258
|
-
let message = `
|
|
595563
|
+
let message = metadata ? `Selected provider: ${source_default.bold(metadata.providerName)} (${metadata.accessType})
|
|
595564
|
+
Selected model: ${source_default.bold(renderModelLabel(model))}
|
|
595565
|
+
Model source: ${metadata.modelSource}` : `Set model to ${source_default.bold(renderModelLabel(model))}`;
|
|
595259
595566
|
if (effort !== undefined) {
|
|
595260
595567
|
message = message + ` with ${source_default.bold(effort)} effort`;
|
|
595261
595568
|
}
|
|
@@ -595363,10 +595670,28 @@ function SetModelAndClose({
|
|
|
595363
595670
|
setModel(null);
|
|
595364
595671
|
return;
|
|
595365
595672
|
}
|
|
595366
|
-
|
|
595367
|
-
|
|
595673
|
+
const currentProvider = getActiveProviderSettings(getInitialSettings()).active ?? "ollama";
|
|
595674
|
+
const providerValidation = validateProviderModelPair(currentProvider, model);
|
|
595675
|
+
if (providerValidation.valid === false) {
|
|
595676
|
+
onDone(`Invalid model for current provider:
|
|
595677
|
+
Selected provider: ${currentProvider}
|
|
595678
|
+
Selected model: ${model}
|
|
595679
|
+
Valid models for ${currentProvider}: ${providerValidation.validModels.join(", ") || "(no models discovered)"}
|
|
595680
|
+
Suggested action: Run /model and choose a model from ${currentProvider}${providerValidation.suggestedModel ? `, or run: ur config set model ${providerValidation.suggestedModel}` : ""}
|
|
595681
|
+
Error: ${providerValidation.error}`, {
|
|
595682
|
+
display: "system"
|
|
595683
|
+
});
|
|
595684
|
+
return;
|
|
595685
|
+
}
|
|
595686
|
+
const saved = setProviderModel(currentProvider, model);
|
|
595687
|
+
if (!saved.ok) {
|
|
595688
|
+
onDone(saved.message, {
|
|
595689
|
+
display: "system"
|
|
595690
|
+
});
|
|
595368
595691
|
return;
|
|
595369
595692
|
}
|
|
595693
|
+
setModel(model);
|
|
595694
|
+
return;
|
|
595370
595695
|
try {
|
|
595371
595696
|
const {
|
|
595372
595697
|
valid,
|
|
@@ -595418,9 +595743,6 @@ function SetModelAndClose({
|
|
|
595418
595743
|
}, [model, onDone, setAppState]);
|
|
595419
595744
|
return null;
|
|
595420
595745
|
}
|
|
595421
|
-
function isKnownAlias(model) {
|
|
595422
|
-
return MODEL_ALIASES.includes(model.toLowerCase().trim());
|
|
595423
|
-
}
|
|
595424
595746
|
function ismodelO1mUnavailable(model) {
|
|
595425
595747
|
const m = model.toLowerCase();
|
|
595426
595748
|
return !checkmodelO1mAccess() && !ismodelO1mMergeEnabled() && m.includes("modelO") && m.includes("[1m]");
|
|
@@ -595501,6 +595823,8 @@ var init_model2 = __esm(() => {
|
|
|
595501
595823
|
init_model();
|
|
595502
595824
|
init_modelAllowlist();
|
|
595503
595825
|
init_validateModel();
|
|
595826
|
+
init_providerRegistry();
|
|
595827
|
+
init_settings2();
|
|
595504
595828
|
import_compiler_runtime263 = __toESM(require_compiler_runtime(), 1);
|
|
595505
595829
|
React105 = __toESM(require_react(), 1);
|
|
595506
595830
|
jsx_dev_runtime347 = __toESM(require_jsx_dev_runtime(), 1);
|
|
@@ -595555,7 +595879,7 @@ function ProviderPicker({
|
|
|
595555
595879
|
const selectOptions = providers.map((provider) => ({
|
|
595556
595880
|
value: provider.id,
|
|
595557
595881
|
label: provider.displayName,
|
|
595558
|
-
description: `${
|
|
595882
|
+
description: `${getProviderAccessTypeLabel(provider)} \xB7 ${provider.credentialType}`
|
|
595559
595883
|
}));
|
|
595560
595884
|
const visibleCount = Math.min(10, selectOptions.length);
|
|
595561
595885
|
const hiddenCount = Math.max(0, selectOptions.length - visibleCount);
|
|
@@ -595569,14 +595893,17 @@ function ProviderPicker({
|
|
|
595569
595893
|
from_provider: currentProvider,
|
|
595570
595894
|
to_provider: value
|
|
595571
595895
|
});
|
|
595572
|
-
|
|
595573
|
-
|
|
595574
|
-
|
|
595896
|
+
const result = setSafeProviderConfig("provider", value);
|
|
595897
|
+
if (!result.ok) {
|
|
595898
|
+
return;
|
|
595899
|
+
}
|
|
595900
|
+
const saved = getActiveProviderSettings(getSettingsForSource("userSettings") ?? {});
|
|
595575
595901
|
setAppState((prev) => ({
|
|
595576
595902
|
...prev,
|
|
595577
595903
|
provider: {
|
|
595578
595904
|
...prev.provider ?? {},
|
|
595579
|
-
active: value
|
|
595905
|
+
active: saved.active ?? value,
|
|
595906
|
+
model: saved.model
|
|
595580
595907
|
}
|
|
595581
595908
|
}));
|
|
595582
595909
|
onSelect(value);
|
|
@@ -595642,10 +595969,10 @@ function ProviderPicker({
|
|
|
595642
595969
|
focusedProvider.id,
|
|
595643
595970
|
") \xB7",
|
|
595644
595971
|
" ",
|
|
595645
|
-
|
|
595972
|
+
getProviderAccessTypeLabel(focusedProvider),
|
|
595646
595973
|
" \xB7",
|
|
595647
595974
|
" ",
|
|
595648
|
-
focusedProvider.
|
|
595975
|
+
focusedProvider.accessPathLabel
|
|
595649
595976
|
]
|
|
595650
595977
|
}, undefined, true, undefined, this)
|
|
595651
595978
|
}, undefined, false, undefined, this)
|
|
@@ -595682,7 +596009,6 @@ function ProviderPicker({
|
|
|
595682
596009
|
function noop9() {}
|
|
595683
596010
|
var import_react189, jsx_dev_runtime348, selectCurrentProvider2 = (s) => s.provider?.active ?? "ollama";
|
|
595684
596011
|
var init_ProviderPicker = __esm(() => {
|
|
595685
|
-
init_capitalize();
|
|
595686
596012
|
init_analytics();
|
|
595687
596013
|
init_providerRegistry();
|
|
595688
596014
|
init_AppState();
|
|
@@ -595787,7 +596113,7 @@ var jsx_dev_runtime349, call143 = async (onDone, _context, args) => {
|
|
|
595787
596113
|
const {
|
|
595788
596114
|
resolveProviderId: resolveProviderId2,
|
|
595789
596115
|
setSafeProviderConfig: setSafeProviderConfig2,
|
|
595790
|
-
validateProviderModelCompatibility:
|
|
596116
|
+
validateProviderModelCompatibility: validateProviderModelCompatibility2,
|
|
595791
596117
|
getActiveProviderSettings: getActiveProviderSettings2
|
|
595792
596118
|
} = await Promise.resolve().then(() => (init_providerRegistry(), exports_providerRegistry));
|
|
595793
596119
|
const { getInitialSettings: getInitialSettings2 } = await Promise.resolve().then(() => (init_settings2(), exports_settings));
|
|
@@ -595801,7 +596127,7 @@ var jsx_dev_runtime349, call143 = async (onDone, _context, args) => {
|
|
|
595801
596127
|
const settings = getInitialSettings2();
|
|
595802
596128
|
const currentModel = getActiveProviderSettings2(settings).model;
|
|
595803
596129
|
if (currentModel) {
|
|
595804
|
-
const validation =
|
|
596130
|
+
const validation = validateProviderModelCompatibility2(resolvedProvider, currentModel);
|
|
595805
596131
|
if (validation.valid === false) {
|
|
595806
596132
|
const validModelsStr = validation.validModels.join(", ") || "(uses dynamic discovery)";
|
|
595807
596133
|
const suggestedModel = validation.suggestedModel ?? "see available models";
|
|
@@ -601756,7 +602082,7 @@ function generateHtmlReport(data, insights) {
|
|
|
601756
602082
|
</html>`;
|
|
601757
602083
|
}
|
|
601758
602084
|
function buildExportData(data, insights, facets, remoteStats) {
|
|
601759
|
-
const version3 = typeof MACRO !== "undefined" ? "1.27.
|
|
602085
|
+
const version3 = typeof MACRO !== "undefined" ? "1.27.5" : "unknown";
|
|
601760
602086
|
const remote_hosts_collected = remoteStats?.hosts.filter((h2) => h2.sessionCount > 0).map((h2) => h2.name);
|
|
601761
602087
|
const facets_summary = {
|
|
601762
602088
|
total: facets.size,
|
|
@@ -606033,7 +606359,7 @@ var init_sessionStorage = __esm(() => {
|
|
|
606033
606359
|
init_settings2();
|
|
606034
606360
|
init_slowOperations();
|
|
606035
606361
|
init_uuid();
|
|
606036
|
-
VERSION5 = typeof MACRO !== "undefined" ? "1.27.
|
|
606362
|
+
VERSION5 = typeof MACRO !== "undefined" ? "1.27.5" : "unknown";
|
|
606037
606363
|
MAX_TOMBSTONE_REWRITE_BYTES = 50 * 1024 * 1024;
|
|
606038
606364
|
SKIP_FIRST_PROMPT_PATTERN = /^(?:\s*<[a-z][\w-]*[\s>]|\[Request interrupted by user[^\]]*\])/;
|
|
606039
606365
|
EPHEMERAL_PROGRESS_TYPES = new Set([
|
|
@@ -607238,7 +607564,7 @@ var init_filesystem = __esm(() => {
|
|
|
607238
607564
|
});
|
|
607239
607565
|
getBundledSkillsRoot = memoize_default(function getBundledSkillsRoot2() {
|
|
607240
607566
|
const nonce = randomBytes18(16).toString("hex");
|
|
607241
|
-
return join200(getURTempDir(), "bundled-skills", "1.27.
|
|
607567
|
+
return join200(getURTempDir(), "bundled-skills", "1.27.5", nonce);
|
|
607242
607568
|
});
|
|
607243
607569
|
getResolvedWorkingDirPaths = memoize_default(getPathsForPermissionCheck);
|
|
607244
607570
|
});
|
|
@@ -613528,7 +613854,7 @@ function computeFingerprint(messageText, version3) {
|
|
|
613528
613854
|
}
|
|
613529
613855
|
function computeFingerprintFromMessages(messages) {
|
|
613530
613856
|
const firstMessageText = extractFirstMessageText(messages);
|
|
613531
|
-
return computeFingerprint(firstMessageText, "1.27.
|
|
613857
|
+
return computeFingerprint(firstMessageText, "1.27.5");
|
|
613532
613858
|
}
|
|
613533
613859
|
var FINGERPRINT_SALT = "59cf53e54c78";
|
|
613534
613860
|
var init_fingerprint = () => {};
|
|
@@ -615394,7 +615720,7 @@ async function sideQuery(opts) {
|
|
|
615394
615720
|
betas.push(STRUCTURED_OUTPUTS_BETA_HEADER);
|
|
615395
615721
|
}
|
|
615396
615722
|
const messageText = extractFirstUserMessageText(messages);
|
|
615397
|
-
const fingerprint = computeFingerprint(messageText, "1.27.
|
|
615723
|
+
const fingerprint = computeFingerprint(messageText, "1.27.5");
|
|
615398
615724
|
const attributionHeader = getAttributionHeader(fingerprint);
|
|
615399
615725
|
const systemBlocks = [
|
|
615400
615726
|
attributionHeader ? { type: "text", text: attributionHeader } : null,
|
|
@@ -620131,7 +620457,7 @@ function buildSystemInitMessage(inputs) {
|
|
|
620131
620457
|
slash_commands: inputs.commands.filter((c4) => c4.userInvocable !== false).map((c4) => c4.name),
|
|
620132
620458
|
apiKeySource: getURHQApiKeyWithSource().source,
|
|
620133
620459
|
betas: getSdkBetas(),
|
|
620134
|
-
ur_version: "1.27.
|
|
620460
|
+
ur_version: "1.27.5",
|
|
620135
620461
|
output_style: outputStyle2,
|
|
620136
620462
|
agents: inputs.agents.map((agent) => agent.agentType),
|
|
620137
620463
|
skills: inputs.skills.filter((s) => s.userInvocable !== false).map((skill2) => skill2.name),
|
|
@@ -634759,7 +635085,7 @@ var init_useVoiceEnabled = __esm(() => {
|
|
|
634759
635085
|
function getSemverPart(version3) {
|
|
634760
635086
|
return `${import_semver13.major(version3, { loose: true })}.${import_semver13.minor(version3, { loose: true })}.${import_semver13.patch(version3, { loose: true })}`;
|
|
634761
635087
|
}
|
|
634762
|
-
function useUpdateNotification(updatedVersion, initialVersion = "1.27.
|
|
635088
|
+
function useUpdateNotification(updatedVersion, initialVersion = "1.27.5") {
|
|
634763
635089
|
const [lastNotifiedSemver, setLastNotifiedSemver] = import_react226.useState(() => getSemverPart(initialVersion));
|
|
634764
635090
|
if (!updatedVersion) {
|
|
634765
635091
|
return null;
|
|
@@ -634808,7 +635134,7 @@ function AutoUpdater({
|
|
|
634808
635134
|
return;
|
|
634809
635135
|
}
|
|
634810
635136
|
if (false) {}
|
|
634811
|
-
const currentVersion = "1.27.
|
|
635137
|
+
const currentVersion = "1.27.5";
|
|
634812
635138
|
const channel = getInitialSettings()?.autoUpdatesChannel ?? "latest";
|
|
634813
635139
|
let latestVersion = await getLatestVersion(channel);
|
|
634814
635140
|
const isDisabled = isAutoUpdaterDisabled();
|
|
@@ -635037,12 +635363,12 @@ function NativeAutoUpdater({
|
|
|
635037
635363
|
logEvent("tengu_native_auto_updater_start", {});
|
|
635038
635364
|
try {
|
|
635039
635365
|
const maxVersion = await getMaxVersion();
|
|
635040
|
-
if (maxVersion && gt("1.27.
|
|
635366
|
+
if (maxVersion && gt("1.27.5", maxVersion)) {
|
|
635041
635367
|
const msg = await getMaxVersionMessage();
|
|
635042
635368
|
setMaxVersionIssue(msg ?? "affects your version");
|
|
635043
635369
|
}
|
|
635044
635370
|
const result = await installLatest(channel);
|
|
635045
|
-
const currentVersion = "1.27.
|
|
635371
|
+
const currentVersion = "1.27.5";
|
|
635046
635372
|
const latencyMs = Date.now() - startTime;
|
|
635047
635373
|
if (result.lockFailed) {
|
|
635048
635374
|
logEvent("tengu_native_auto_updater_lock_contention", {
|
|
@@ -635179,17 +635505,17 @@ function PackageManagerAutoUpdater(t0) {
|
|
|
635179
635505
|
const maxVersion = await getMaxVersion();
|
|
635180
635506
|
if (maxVersion && latest && gt(latest, maxVersion)) {
|
|
635181
635507
|
logForDebugging(`PackageManagerAutoUpdater: maxVersion ${maxVersion} is set, capping update from ${latest} to ${maxVersion}`);
|
|
635182
|
-
if (gte("1.27.
|
|
635183
|
-
logForDebugging(`PackageManagerAutoUpdater: current version ${"1.27.
|
|
635508
|
+
if (gte("1.27.5", maxVersion)) {
|
|
635509
|
+
logForDebugging(`PackageManagerAutoUpdater: current version ${"1.27.5"} is already at or above maxVersion ${maxVersion}, skipping update`);
|
|
635184
635510
|
setUpdateAvailable(false);
|
|
635185
635511
|
return;
|
|
635186
635512
|
}
|
|
635187
635513
|
latest = maxVersion;
|
|
635188
635514
|
}
|
|
635189
|
-
const hasUpdate = latest && !gte("1.27.
|
|
635515
|
+
const hasUpdate = latest && !gte("1.27.5", latest) && !shouldSkipVersion(latest);
|
|
635190
635516
|
setUpdateAvailable(!!hasUpdate);
|
|
635191
635517
|
if (hasUpdate) {
|
|
635192
|
-
logForDebugging(`PackageManagerAutoUpdater: Update available ${"1.27.
|
|
635518
|
+
logForDebugging(`PackageManagerAutoUpdater: Update available ${"1.27.5"} -> ${latest}`);
|
|
635193
635519
|
}
|
|
635194
635520
|
};
|
|
635195
635521
|
$3[0] = t1;
|
|
@@ -635223,7 +635549,7 @@ function PackageManagerAutoUpdater(t0) {
|
|
|
635223
635549
|
wrap: "truncate",
|
|
635224
635550
|
children: [
|
|
635225
635551
|
"currentVersion: ",
|
|
635226
|
-
"1.27.
|
|
635552
|
+
"1.27.5"
|
|
635227
635553
|
]
|
|
635228
635554
|
}, undefined, true, undefined, this);
|
|
635229
635555
|
$3[3] = verbose;
|
|
@@ -647669,7 +647995,7 @@ function buildStatusLineCommandInput(permissionMode, exceeds200kTokens, settings
|
|
|
647669
647995
|
project_dir: getOriginalCwd(),
|
|
647670
647996
|
added_dirs: addedDirs
|
|
647671
647997
|
},
|
|
647672
|
-
version: "1.27.
|
|
647998
|
+
version: "1.27.5",
|
|
647673
647999
|
output_style: {
|
|
647674
648000
|
name: outputStyleName
|
|
647675
648001
|
},
|
|
@@ -647744,7 +648070,7 @@ function StatusLineInner({
|
|
|
647744
648070
|
const taskValues = Object.values(tasks2);
|
|
647745
648071
|
const taskRunningCount = taskValues.filter((task2) => task2.status === "running" || task2.status === "pending").length;
|
|
647746
648072
|
const defaultStatusLineText = buildDefaultStatusBar({
|
|
647747
|
-
version: "1.27.
|
|
648073
|
+
version: "1.27.5",
|
|
647748
648074
|
providerLabel: providerRuntime.providerLabel,
|
|
647749
648075
|
authMode: providerRuntime.authLabel,
|
|
647750
648076
|
model: providerRuntime.model ?? renderModelName(mainLoopModel),
|
|
@@ -659230,7 +659556,7 @@ async function submitTranscriptShare(messages, trigger2, appearanceId) {
|
|
|
659230
659556
|
} catch {}
|
|
659231
659557
|
const data = {
|
|
659232
659558
|
trigger: trigger2,
|
|
659233
|
-
version: "1.27.
|
|
659559
|
+
version: "1.27.5",
|
|
659234
659560
|
platform: process.platform,
|
|
659235
659561
|
transcript,
|
|
659236
659562
|
subagentTranscripts: Object.keys(subagentTranscripts).length > 0 ? subagentTranscripts : undefined,
|
|
@@ -671112,7 +671438,7 @@ function WelcomeV2() {
|
|
|
671112
671438
|
dimColor: true,
|
|
671113
671439
|
children: [
|
|
671114
671440
|
"v",
|
|
671115
|
-
"1.27.
|
|
671441
|
+
"1.27.5"
|
|
671116
671442
|
]
|
|
671117
671443
|
}, undefined, true, undefined, this)
|
|
671118
671444
|
]
|
|
@@ -672372,7 +672698,7 @@ function completeOnboarding() {
|
|
|
672372
672698
|
saveGlobalConfig((current) => ({
|
|
672373
672699
|
...current,
|
|
672374
672700
|
hasCompletedOnboarding: true,
|
|
672375
|
-
lastOnboardingVersion: "1.27.
|
|
672701
|
+
lastOnboardingVersion: "1.27.5"
|
|
672376
672702
|
}));
|
|
672377
672703
|
}
|
|
672378
672704
|
function showDialog(root2, renderer) {
|
|
@@ -677473,7 +677799,7 @@ function appendToLog(path24, message) {
|
|
|
677473
677799
|
cwd: getFsImplementation().cwd(),
|
|
677474
677800
|
userType: process.env.USER_TYPE,
|
|
677475
677801
|
sessionId: getSessionId(),
|
|
677476
|
-
version: "1.27.
|
|
677802
|
+
version: "1.27.5"
|
|
677477
677803
|
};
|
|
677478
677804
|
getLogWriter(path24).write(messageWithTimestamp);
|
|
677479
677805
|
}
|
|
@@ -681567,8 +681893,8 @@ async function getEnvLessBridgeConfig() {
|
|
|
681567
681893
|
}
|
|
681568
681894
|
async function checkEnvLessBridgeMinVersion() {
|
|
681569
681895
|
const cfg = await getEnvLessBridgeConfig();
|
|
681570
|
-
if (cfg.min_version && lt("1.27.
|
|
681571
|
-
return `Your version of UR (${"1.27.
|
|
681896
|
+
if (cfg.min_version && lt("1.27.5", cfg.min_version)) {
|
|
681897
|
+
return `Your version of UR (${"1.27.5"}) is too old for Remote Control.
|
|
681572
681898
|
Version ${cfg.min_version} or higher is required. Run \`ur update\` to update.`;
|
|
681573
681899
|
}
|
|
681574
681900
|
return null;
|
|
@@ -682042,7 +682368,7 @@ async function initBridgeCore(params) {
|
|
|
682042
682368
|
const rawApi = createBridgeApiClient({
|
|
682043
682369
|
baseUrl,
|
|
682044
682370
|
getAccessToken,
|
|
682045
|
-
runnerVersion: "1.27.
|
|
682371
|
+
runnerVersion: "1.27.5",
|
|
682046
682372
|
onDebug: logForDebugging,
|
|
682047
682373
|
onAuth401,
|
|
682048
682374
|
getTrustedDeviceToken
|
|
@@ -687723,7 +688049,7 @@ async function startMCPServer(cwd3, debug2, verbose) {
|
|
|
687723
688049
|
setCwd(cwd3);
|
|
687724
688050
|
const server2 = new Server({
|
|
687725
688051
|
name: "ur/tengu",
|
|
687726
|
-
version: "1.27.
|
|
688052
|
+
version: "1.27.5"
|
|
687727
688053
|
}, {
|
|
687728
688054
|
capabilities: {
|
|
687729
688055
|
tools: {}
|
|
@@ -688333,9 +688659,9 @@ async function configSetHandler(key, values2) {
|
|
|
688333
688659
|
writeError(`Invalid model for current provider:
|
|
688334
688660
|
Selected provider: ${currentProvider}
|
|
688335
688661
|
Selected model: ${value}
|
|
688336
|
-
|
|
688337
|
-
|
|
688338
|
-
|
|
688662
|
+
Valid models for ${currentProvider}: ${validation.validModels.join(", ") || "(no models discovered)"}
|
|
688663
|
+
Suggested action: Run /model and choose a model from ${currentProvider}${validation.suggestedModel ? `, or run: ur config set model ${validation.suggestedModel}` : ""}
|
|
688664
|
+
Error: ${validation.error}`);
|
|
688339
688665
|
process.exit(1);
|
|
688340
688666
|
}
|
|
688341
688667
|
}
|
|
@@ -688349,9 +688675,9 @@ async function configSetHandler(key, values2) {
|
|
|
688349
688675
|
if (validation.valid === false) {
|
|
688350
688676
|
const validModelsStr = validation.validModels.join(", ") || "(uses dynamic discovery)";
|
|
688351
688677
|
const suggestedModel = validation.suggestedModel ?? "<model-name>";
|
|
688352
|
-
writeError(`Warning: Current model "${currentModel}" is not available for provider "${newProvider}".
|
|
688678
|
+
writeError(`Warning: Current model "${currentModel}" is not available for provider "${newProvider}" and will be cleared.
|
|
688353
688679
|
Valid models for ${newProvider}: ${validModelsStr}
|
|
688354
|
-
After changing provider, run: ur config set model ${suggestedModel}`);
|
|
688680
|
+
After changing provider, run /model or: ur config set model ${suggestedModel}`);
|
|
688355
688681
|
}
|
|
688356
688682
|
}
|
|
688357
688683
|
}
|
|
@@ -689536,7 +689862,7 @@ async function update() {
|
|
|
689536
689862
|
logEvent("tengu_update_check", {});
|
|
689537
689863
|
const diagnostic = await getDoctorDiagnostic();
|
|
689538
689864
|
const result = await checkUpgradeStatus({
|
|
689539
|
-
currentVersion: "1.27.
|
|
689865
|
+
currentVersion: "1.27.5",
|
|
689540
689866
|
packageName: UR_AGENT_PACKAGE_NAME,
|
|
689541
689867
|
installationType: diagnostic.installationType,
|
|
689542
689868
|
latestVersion: () => getLatestNpmPackageVersion(UR_AGENT_PACKAGE_NAME)
|
|
@@ -690782,7 +691108,7 @@ ${customInstructions}` : customInstructions;
|
|
|
690782
691108
|
}
|
|
690783
691109
|
}
|
|
690784
691110
|
logForDiagnosticsNoPII("info", "started", {
|
|
690785
|
-
version: "1.27.
|
|
691111
|
+
version: "1.27.5",
|
|
690786
691112
|
is_native_binary: isInBundledMode()
|
|
690787
691113
|
});
|
|
690788
691114
|
registerCleanup(async () => {
|
|
@@ -691566,7 +691892,7 @@ Usage: ur --remote "your task description"`, () => gracefulShutdown(1));
|
|
|
691566
691892
|
pendingHookMessages
|
|
691567
691893
|
}, renderAndRun);
|
|
691568
691894
|
}
|
|
691569
|
-
}).version("1.27.
|
|
691895
|
+
}).version("1.27.5 (UR-AGENT)", "-v, --version", "Output the version number");
|
|
691570
691896
|
program2.option("-w, --worktree [name]", "Create a new git worktree for this session (optionally specify a name)");
|
|
691571
691897
|
program2.option("--tmux", "Create a tmux session for the worktree (requires --worktree). Uses iTerm2 native panes when available; use --tmux=classic for traditional tmux.");
|
|
691572
691898
|
if (canUserConfigureAdvisor()) {
|
|
@@ -692443,7 +692769,7 @@ if (false) {}
|
|
|
692443
692769
|
async function main2() {
|
|
692444
692770
|
const args = process.argv.slice(2);
|
|
692445
692771
|
if (args.length === 1 && (args[0] === "--version" || args[0] === "-v" || args[0] === "-V")) {
|
|
692446
|
-
console.log(`${"1.27.
|
|
692772
|
+
console.log(`${"1.27.5"} (UR-AGENT)`);
|
|
692447
692773
|
return;
|
|
692448
692774
|
}
|
|
692449
692775
|
if (args[0] === "a2a" && args[1] === "serve" && !args.includes("--help") && !args.includes("-h")) {
|