@qwen-code/qwen-code 0.10.0-preview.4 → 0.10.0-preview.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/cli.js +303 -467
- package/locales/de.js +0 -18
- package/locales/en.js +0 -37
- package/locales/ja.js +0 -18
- package/locales/pt.js +0 -18
- package/locales/ru.js +0 -18
- package/locales/zh.js +0 -36
- package/package.json +2 -2
package/cli.js
CHANGED
|
@@ -132808,16 +132808,11 @@ var init_modelRegistry = __esm({
|
|
|
132808
132808
|
}
|
|
132809
132809
|
}
|
|
132810
132810
|
/**
|
|
132811
|
-
* Register models for an authType
|
|
132812
|
-
* If multiple models have the same id, the first one takes precedence.
|
|
132811
|
+
* Register models for an authType
|
|
132813
132812
|
*/
|
|
132814
132813
|
registerAuthTypeModels(authType, models) {
|
|
132815
132814
|
const modelMap = /* @__PURE__ */ new Map();
|
|
132816
132815
|
for (const config2 of models) {
|
|
132817
|
-
if (modelMap.has(config2.id)) {
|
|
132818
|
-
debugLogger5.warn(`Duplicate model id "${config2.id}" for authType "${authType}". Using the first registered config.`);
|
|
132819
|
-
continue;
|
|
132820
|
-
}
|
|
132821
132816
|
const resolved = this.resolveModelConfig(config2, authType);
|
|
132822
132817
|
modelMap.set(config2.id, resolved);
|
|
132823
132818
|
}
|
|
@@ -132891,31 +132886,6 @@ var init_modelRegistry = __esm({
|
|
|
132891
132886
|
throw new Error(`Model config in authType '${authType}' missing required field: id`);
|
|
132892
132887
|
}
|
|
132893
132888
|
}
|
|
132894
|
-
/**
|
|
132895
|
-
* Reload models from updated configuration.
|
|
132896
|
-
* Clears existing user-configured models and re-registers from new config.
|
|
132897
|
-
* Preserves hard-coded qwen-oauth models.
|
|
132898
|
-
*/
|
|
132899
|
-
reloadModels(modelProvidersConfig) {
|
|
132900
|
-
for (const authType of this.modelsByAuthType.keys()) {
|
|
132901
|
-
if (authType !== AuthType2.QWEN_OAUTH) {
|
|
132902
|
-
this.modelsByAuthType.delete(authType);
|
|
132903
|
-
}
|
|
132904
|
-
}
|
|
132905
|
-
if (modelProvidersConfig) {
|
|
132906
|
-
for (const [rawKey, models] of Object.entries(modelProvidersConfig)) {
|
|
132907
|
-
const authType = validateAuthTypeKey(rawKey);
|
|
132908
|
-
if (!authType) {
|
|
132909
|
-
debugLogger5.warn(`Invalid authType key "${rawKey}" in modelProviders config. Expected one of: ${Object.values(AuthType2).join(", ")}. Skipping.`);
|
|
132910
|
-
continue;
|
|
132911
|
-
}
|
|
132912
|
-
if (authType === AuthType2.QWEN_OAUTH) {
|
|
132913
|
-
continue;
|
|
132914
|
-
}
|
|
132915
|
-
this.registerAuthTypeModels(authType, models);
|
|
132916
|
-
}
|
|
132917
|
-
}
|
|
132918
|
-
}
|
|
132919
132889
|
};
|
|
132920
132890
|
}
|
|
132921
132891
|
});
|
|
@@ -133728,15 +133698,6 @@ var init_modelsConfig = __esm({
|
|
|
133728
133698
|
this.activeRuntimeModelSnapshotId = void 0;
|
|
133729
133699
|
}
|
|
133730
133700
|
}
|
|
133731
|
-
/**
|
|
133732
|
-
* Reload model providers configuration at runtime.
|
|
133733
|
-
* This enables hot-reloading of modelProviders settings without restarting the CLI.
|
|
133734
|
-
*
|
|
133735
|
-
* @param modelProvidersConfig - The updated model providers configuration
|
|
133736
|
-
*/
|
|
133737
|
-
reloadModelProvidersConfig(modelProvidersConfig) {
|
|
133738
|
-
this.modelRegistry.reloadModels(modelProvidersConfig);
|
|
133739
|
-
}
|
|
133740
133701
|
};
|
|
133741
133702
|
}
|
|
133742
133703
|
});
|
|
@@ -156351,7 +156312,7 @@ __export(geminiContentGenerator_exports, {
|
|
|
156351
156312
|
createGeminiContentGenerator: () => createGeminiContentGenerator
|
|
156352
156313
|
});
|
|
156353
156314
|
function createGeminiContentGenerator(config2, gcConfig) {
|
|
156354
|
-
const version2 = "0.10.0-preview.
|
|
156315
|
+
const version2 = "0.10.0-preview.5";
|
|
156355
156316
|
const userAgent2 = config2.userAgent || `QwenCode/${version2} (${process.platform}; ${process.arch})`;
|
|
156356
156317
|
const baseHeaders = {
|
|
156357
156318
|
"User-Agent": userAgent2
|
|
@@ -238711,11 +238672,11 @@ var init_extensionManager = __esm({
|
|
|
238711
238672
|
installMetadata.source = path62.resolve(currentDir, installMetadata.source);
|
|
238712
238673
|
}
|
|
238713
238674
|
let tempDir;
|
|
238714
|
-
if (installMetadata.
|
|
238675
|
+
if (installMetadata.originSource === "Claude" && installMetadata.marketplaceConfig && !installMetadata.pluginName) {
|
|
238715
238676
|
const pluginName = await this.requestChoicePlugin(installMetadata.marketplaceConfig);
|
|
238716
238677
|
installMetadata.pluginName = pluginName;
|
|
238717
238678
|
}
|
|
238718
|
-
if (installMetadata.type === "
|
|
238679
|
+
if (installMetadata.type === "git" || installMetadata.type === "github-release") {
|
|
238719
238680
|
tempDir = await ExtensionStorage.createTmpDir();
|
|
238720
238681
|
try {
|
|
238721
238682
|
const result = await downloadFromGitHubRelease(installMetadata, tempDir);
|
|
@@ -238725,7 +238686,7 @@ var init_extensionManager = __esm({
|
|
|
238725
238686
|
}
|
|
238726
238687
|
} catch (_error) {
|
|
238727
238688
|
await cloneFromGit(installMetadata, tempDir);
|
|
238728
|
-
if (installMetadata.type === "
|
|
238689
|
+
if (installMetadata.type === "github-release") {
|
|
238729
238690
|
installMetadata.type = "git";
|
|
238730
238691
|
}
|
|
238731
238692
|
}
|
|
@@ -242454,16 +242415,6 @@ var init_config3 = __esm({
|
|
|
242454
242415
|
updateCredentials(credentials, settingsGenerationConfig) {
|
|
242455
242416
|
this.modelsConfig.updateCredentials(credentials, settingsGenerationConfig);
|
|
242456
242417
|
}
|
|
242457
|
-
/**
|
|
242458
|
-
* Reload model providers configuration at runtime.
|
|
242459
|
-
* This enables hot-reloading of modelProviders settings without restarting the CLI.
|
|
242460
|
-
* Should be called before refreshAuth when settings.json has been updated.
|
|
242461
|
-
*
|
|
242462
|
-
* @param modelProvidersConfig - The updated model providers configuration
|
|
242463
|
-
*/
|
|
242464
|
-
reloadModelProvidersConfig(modelProvidersConfig) {
|
|
242465
|
-
this.modelsConfig.reloadModelProvidersConfig(modelProvidersConfig);
|
|
242466
|
-
}
|
|
242467
242418
|
/**
|
|
242468
242419
|
* Refresh authentication and rebuild ContentGenerator.
|
|
242469
242420
|
*/
|
|
@@ -247785,7 +247736,20 @@ async function parseInstallSource(source2) {
|
|
|
247785
247736
|
let installMetadata;
|
|
247786
247737
|
let repoSource = repo;
|
|
247787
247738
|
let marketplaceConfig = null;
|
|
247788
|
-
|
|
247739
|
+
let isLocalPath = false;
|
|
247740
|
+
try {
|
|
247741
|
+
await stat7(repo);
|
|
247742
|
+
isLocalPath = true;
|
|
247743
|
+
} catch {
|
|
247744
|
+
}
|
|
247745
|
+
if (isLocalPath) {
|
|
247746
|
+
installMetadata = {
|
|
247747
|
+
source: repo,
|
|
247748
|
+
type: "local",
|
|
247749
|
+
pluginName
|
|
247750
|
+
};
|
|
247751
|
+
marketplaceConfig = await readLocalMarketplaceConfig(repo);
|
|
247752
|
+
} else if (isGitUrl(repo)) {
|
|
247789
247753
|
installMetadata = {
|
|
247790
247754
|
source: repoSource,
|
|
247791
247755
|
type: "git",
|
|
@@ -247809,20 +247773,9 @@ async function parseInstallSource(source2) {
|
|
|
247809
247773
|
} catch {
|
|
247810
247774
|
}
|
|
247811
247775
|
} else {
|
|
247812
|
-
|
|
247813
|
-
await stat7(repo);
|
|
247814
|
-
installMetadata = {
|
|
247815
|
-
source: repo,
|
|
247816
|
-
type: "local",
|
|
247817
|
-
pluginName
|
|
247818
|
-
};
|
|
247819
|
-
marketplaceConfig = await readLocalMarketplaceConfig(repo);
|
|
247820
|
-
} catch {
|
|
247821
|
-
throw new Error(`Install source not found: ${repo}`);
|
|
247822
|
-
}
|
|
247776
|
+
throw new Error(`Install source not found: ${repo}`);
|
|
247823
247777
|
}
|
|
247824
247778
|
if (marketplaceConfig) {
|
|
247825
|
-
installMetadata.type = "marketplace";
|
|
247826
247779
|
installMetadata.marketplaceConfig = marketplaceConfig;
|
|
247827
247780
|
installMetadata.originSource = "Claude";
|
|
247828
247781
|
}
|
|
@@ -281667,7 +281620,7 @@ var require_backend = __commonJS({
|
|
|
281667
281620
|
) : symbolOrNumber;
|
|
281668
281621
|
}
|
|
281669
281622
|
__name(getTypeSymbol, "getTypeSymbol");
|
|
281670
|
-
var _ReactTypeOfWork = ReactTypeOfWork, CacheComponent = _ReactTypeOfWork.CacheComponent, ClassComponent = _ReactTypeOfWork.ClassComponent, IncompleteClassComponent = _ReactTypeOfWork.IncompleteClassComponent, FunctionComponent = _ReactTypeOfWork.FunctionComponent, IndeterminateComponent = _ReactTypeOfWork.IndeterminateComponent, ForwardRef = _ReactTypeOfWork.ForwardRef, HostRoot = _ReactTypeOfWork.HostRoot, HostHoistable = _ReactTypeOfWork.HostHoistable, HostSingleton = _ReactTypeOfWork.HostSingleton, HostComponent = _ReactTypeOfWork.HostComponent, HostPortal = _ReactTypeOfWork.HostPortal, HostText = _ReactTypeOfWork.HostText,
|
|
281623
|
+
var _ReactTypeOfWork = ReactTypeOfWork, CacheComponent = _ReactTypeOfWork.CacheComponent, ClassComponent = _ReactTypeOfWork.ClassComponent, IncompleteClassComponent = _ReactTypeOfWork.IncompleteClassComponent, FunctionComponent = _ReactTypeOfWork.FunctionComponent, IndeterminateComponent = _ReactTypeOfWork.IndeterminateComponent, ForwardRef = _ReactTypeOfWork.ForwardRef, HostRoot = _ReactTypeOfWork.HostRoot, HostHoistable = _ReactTypeOfWork.HostHoistable, HostSingleton = _ReactTypeOfWork.HostSingleton, HostComponent = _ReactTypeOfWork.HostComponent, HostPortal = _ReactTypeOfWork.HostPortal, HostText = _ReactTypeOfWork.HostText, Fragment15 = _ReactTypeOfWork.Fragment, LazyComponent = _ReactTypeOfWork.LazyComponent, LegacyHiddenComponent = _ReactTypeOfWork.LegacyHiddenComponent, MemoComponent = _ReactTypeOfWork.MemoComponent, OffscreenComponent = _ReactTypeOfWork.OffscreenComponent, Profiler = _ReactTypeOfWork.Profiler, ScopeComponent = _ReactTypeOfWork.ScopeComponent, SimpleMemoComponent = _ReactTypeOfWork.SimpleMemoComponent, SuspenseComponent = _ReactTypeOfWork.SuspenseComponent, SuspenseListComponent = _ReactTypeOfWork.SuspenseListComponent, TracingMarkerComponent = _ReactTypeOfWork.TracingMarkerComponent;
|
|
281671
281624
|
function resolveFiberType(type) {
|
|
281672
281625
|
var typeSymbol = getTypeSymbol(type);
|
|
281673
281626
|
switch (typeSymbol) {
|
|
@@ -281713,7 +281666,7 @@ var require_backend = __commonJS({
|
|
|
281713
281666
|
case HostPortal:
|
|
281714
281667
|
case HostText:
|
|
281715
281668
|
return null;
|
|
281716
|
-
case
|
|
281669
|
+
case Fragment15:
|
|
281717
281670
|
return "Fragment";
|
|
281718
281671
|
case LazyComponent:
|
|
281719
281672
|
return "Lazy";
|
|
@@ -281779,7 +281732,7 @@ var require_backend = __commonJS({
|
|
|
281779
281732
|
function attach(hook2, rendererID, renderer2, global2) {
|
|
281780
281733
|
var version2 = renderer2.reconcilerVersion || renderer2.version;
|
|
281781
281734
|
var _getInternalReactCons = getInternalReactConstants(version2), getDisplayNameForFiber = _getInternalReactCons.getDisplayNameForFiber, getTypeSymbol = _getInternalReactCons.getTypeSymbol, ReactPriorityLevels = _getInternalReactCons.ReactPriorityLevels, ReactTypeOfWork = _getInternalReactCons.ReactTypeOfWork, StrictModeBits = _getInternalReactCons.StrictModeBits;
|
|
281782
|
-
var CacheComponent = ReactTypeOfWork.CacheComponent, ClassComponent = ReactTypeOfWork.ClassComponent, ContextConsumer = ReactTypeOfWork.ContextConsumer, DehydratedSuspenseComponent = ReactTypeOfWork.DehydratedSuspenseComponent, ForwardRef = ReactTypeOfWork.ForwardRef,
|
|
281735
|
+
var CacheComponent = ReactTypeOfWork.CacheComponent, ClassComponent = ReactTypeOfWork.ClassComponent, ContextConsumer = ReactTypeOfWork.ContextConsumer, DehydratedSuspenseComponent = ReactTypeOfWork.DehydratedSuspenseComponent, ForwardRef = ReactTypeOfWork.ForwardRef, Fragment15 = ReactTypeOfWork.Fragment, FunctionComponent = ReactTypeOfWork.FunctionComponent, HostRoot = ReactTypeOfWork.HostRoot, HostHoistable = ReactTypeOfWork.HostHoistable, HostSingleton = ReactTypeOfWork.HostSingleton, HostPortal = ReactTypeOfWork.HostPortal, HostComponent = ReactTypeOfWork.HostComponent, HostText = ReactTypeOfWork.HostText, IncompleteClassComponent = ReactTypeOfWork.IncompleteClassComponent, IndeterminateComponent = ReactTypeOfWork.IndeterminateComponent, LegacyHiddenComponent = ReactTypeOfWork.LegacyHiddenComponent, MemoComponent = ReactTypeOfWork.MemoComponent, OffscreenComponent = ReactTypeOfWork.OffscreenComponent, SimpleMemoComponent = ReactTypeOfWork.SimpleMemoComponent, SuspenseComponent = ReactTypeOfWork.SuspenseComponent, SuspenseListComponent = ReactTypeOfWork.SuspenseListComponent, TracingMarkerComponent = ReactTypeOfWork.TracingMarkerComponent;
|
|
281783
281736
|
var ImmediatePriority = ReactPriorityLevels.ImmediatePriority, UserBlockingPriority = ReactPriorityLevels.UserBlockingPriority, NormalPriority = ReactPriorityLevels.NormalPriority, LowPriority = ReactPriorityLevels.LowPriority, IdlePriority = ReactPriorityLevels.IdlePriority, NoPriority = ReactPriorityLevels.NoPriority;
|
|
281784
281737
|
var getLaneLabelMap = renderer2.getLaneLabelMap, injectProfilingHooks = renderer2.injectProfilingHooks, overrideHookState = renderer2.overrideHookState, overrideHookStateDeletePath = renderer2.overrideHookStateDeletePath, overrideHookStateRenamePath = renderer2.overrideHookStateRenamePath, overrideProps = renderer2.overrideProps, overridePropsDeletePath = renderer2.overridePropsDeletePath, overridePropsRenamePath = renderer2.overridePropsRenamePath, scheduleRefresh = renderer2.scheduleRefresh, setErrorHandler = renderer2.setErrorHandler, setSuspenseHandler = renderer2.setSuspenseHandler, scheduleUpdate = renderer2.scheduleUpdate;
|
|
281785
281738
|
var supportsTogglingError = typeof setErrorHandler === "function" && typeof scheduleUpdate === "function";
|
|
@@ -281994,7 +281947,7 @@ var require_backend = __commonJS({
|
|
|
281994
281947
|
return true;
|
|
281995
281948
|
case HostRoot:
|
|
281996
281949
|
return false;
|
|
281997
|
-
case
|
|
281950
|
+
case Fragment15:
|
|
281998
281951
|
return key === null;
|
|
281999
281952
|
default:
|
|
282000
281953
|
var typeSymbol = getTypeSymbol(type);
|
|
@@ -282069,7 +282022,7 @@ var require_backend = __commonJS({
|
|
|
282069
282022
|
return ElementTypeHostComponent;
|
|
282070
282023
|
case HostPortal:
|
|
282071
282024
|
case HostText:
|
|
282072
|
-
case
|
|
282025
|
+
case Fragment15:
|
|
282073
282026
|
return ElementTypeOtherOrUnknown;
|
|
282074
282027
|
case MemoComponent:
|
|
282075
282028
|
case SimpleMemoComponent:
|
|
@@ -297303,17 +297256,7 @@ var init_de = __esm({
|
|
|
297303
297256
|
"Opening extensions page in your browser: {{url}}": "Erweiterungsseite wird im Browser ge\xF6ffnet: {{url}}",
|
|
297304
297257
|
"Failed to open browser. Check out the extensions gallery at {{url}}": "Browser konnte nicht ge\xF6ffnet werden. Besuchen Sie die Erweiterungsgalerie unter {{url}}",
|
|
297305
297258
|
"You can switch permission mode quickly with Shift+Tab or /approval-mode.": "Sie k\xF6nnen den Berechtigungsmodus schnell mit Shift+Tab oder /approval-mode wechseln.",
|
|
297306
|
-
"You can switch permission mode quickly with Tab or /approval-mode.": "Sie k\xF6nnen den Berechtigungsmodus schnell mit Tab oder /approval-mode wechseln."
|
|
297307
|
-
// ============================================================================
|
|
297308
|
-
// Custom API-KEY Configuration
|
|
297309
|
-
// ============================================================================
|
|
297310
|
-
"For advanced users who want to configure models manually.": "F\xFCr fortgeschrittene Benutzer, die Modelle manuell konfigurieren m\xF6chten.",
|
|
297311
|
-
"Please configure your models in settings.json:": "Bitte konfigurieren Sie Ihre Modelle in settings.json:",
|
|
297312
|
-
"Set API key via environment variable (e.g., OPENAI_API_KEY)": "API-Schl\xFCssel \xFCber Umgebungsvariable setzen (z.B. OPENAI_API_KEY)",
|
|
297313
|
-
"Add model configuration to modelProviders['openai'] (or other auth types)": "Modellkonfiguration zu modelProviders['openai'] (oder anderen Authentifizierungstypen) hinzuf\xFCgen",
|
|
297314
|
-
"Each provider needs: id, envKey (required), plus optional baseUrl, generationConfig": "Jeder Anbieter ben\xF6tigt: id, envKey (erforderlich), plus optionale baseUrl, generationConfig",
|
|
297315
|
-
"Use /model command to select your preferred model from the configured list": "Verwenden Sie den /model-Befehl, um Ihr bevorzugtes Modell aus der konfigurierten Liste auszuw\xE4hlen",
|
|
297316
|
-
"Supported auth types: openai, anthropic, gemini, vertex-ai, etc.": "Unterst\xFCtzte Authentifizierungstypen: openai, anthropic, gemini, vertex-ai, usw."
|
|
297259
|
+
"You can switch permission mode quickly with Tab or /approval-mode.": "Sie k\xF6nnen den Berechtigungsmodus schnell mit Tab oder /approval-mode wechseln."
|
|
297317
297260
|
};
|
|
297318
297261
|
}
|
|
297319
297262
|
});
|
|
@@ -298351,32 +298294,7 @@ var init_en3 = __esm({
|
|
|
298351
298294
|
"Would open extensions page in your browser: {{url}} (skipped in test environment)": "Would open extensions page in your browser: {{url}} (skipped in test environment)",
|
|
298352
298295
|
"View available extensions at {{url}}": "View available extensions at {{url}}",
|
|
298353
298296
|
"Opening extensions page in your browser: {{url}}": "Opening extensions page in your browser: {{url}}",
|
|
298354
|
-
"Failed to open browser. Check out the extensions gallery at {{url}}": "Failed to open browser. Check out the extensions gallery at {{url}}"
|
|
298355
|
-
// ============================================================================
|
|
298356
|
-
// Coding Plan Authentication
|
|
298357
|
-
// ============================================================================
|
|
298358
|
-
"Please enter your API key:": "Please enter your API key:",
|
|
298359
|
-
"API key cannot be empty.": "API key cannot be empty.",
|
|
298360
|
-
"API key is stored in settings.env. You can migrate it to a .env file for better security.": "API key is stored in settings.env. You can migrate it to a .env file for better security.",
|
|
298361
|
-
// ============================================================================
|
|
298362
|
-
// Custom API-KEY Configuration
|
|
298363
|
-
// ============================================================================
|
|
298364
|
-
"For advanced users who want to configure models manually.": "For advanced users who want to configure models manually.",
|
|
298365
|
-
"Please configure your models in settings.json:": "Please configure your models in settings.json:",
|
|
298366
|
-
"Set API key via environment variable (e.g., OPENAI_API_KEY)": "Set API key via environment variable (e.g., OPENAI_API_KEY)",
|
|
298367
|
-
"Add model configuration to modelProviders['openai'] (or other auth types)": "Add model configuration to modelProviders['openai'] (or other auth types)",
|
|
298368
|
-
"Each provider needs: id, envKey (required), plus optional baseUrl, generationConfig": "Each provider needs: id, envKey (required), plus optional baseUrl, generationConfig",
|
|
298369
|
-
"Use /model command to select your preferred model from the configured list": "Use /model command to select your preferred model from the configured list",
|
|
298370
|
-
"Supported auth types: openai, anthropic, gemini, vertex-ai, etc.": "Supported auth types: openai, anthropic, gemini, vertex-ai, etc.",
|
|
298371
|
-
// ============================================================================
|
|
298372
|
-
// Auth Dialog - View Titles and Labels
|
|
298373
|
-
// ============================================================================
|
|
298374
|
-
"API-KEY": "API-KEY",
|
|
298375
|
-
"Coding Plan": "Coding Plan",
|
|
298376
|
-
Custom: "Custom",
|
|
298377
|
-
"Select API-KEY configuration mode:": "Select API-KEY configuration mode:",
|
|
298378
|
-
"(Press Escape to go back)": "(Press Escape to go back)",
|
|
298379
|
-
"(Press Enter to submit, Escape to cancel)": "(Press Enter to submit, Escape to cancel)"
|
|
298297
|
+
"Failed to open browser. Check out the extensions gallery at {{url}}": "Failed to open browser. Check out the extensions gallery at {{url}}"
|
|
298380
298298
|
};
|
|
298381
298299
|
}
|
|
298382
298300
|
});
|
|
@@ -299058,17 +298976,7 @@ var init_ja = __esm({
|
|
|
299058
298976
|
"\u30D7\u30ED\u30B0\u30E9\u30DE\u30FC\u304C\u30C0\u30FC\u30AF\u30E2\u30FC\u30C9\u306A\u306E\u306F\u30D0\u30B0\u3092\u898B\u305F\u304F\u306A\u3044\u304B\u3089...",
|
|
299059
298977
|
"\u30B3\u30FC\u30C9\u304C\u58CA\u308C\u305F?\u53E9\u3051\u3070\u6CBB\u308B\u3055",
|
|
299060
298978
|
"USB\u306E\u5DEE\u3057\u8FBC\u307F\u306B\u6311\u6226\u4E2D..."
|
|
299061
|
-
]
|
|
299062
|
-
// ============================================================================
|
|
299063
|
-
// Custom API-KEY Configuration
|
|
299064
|
-
// ============================================================================
|
|
299065
|
-
"For advanced users who want to configure models manually.": "\u30E2\u30C7\u30EB\u3092\u624B\u52D5\u3067\u8A2D\u5B9A\u3057\u305F\u3044\u4E0A\u7D1A\u30E6\u30FC\u30B6\u30FC\u5411\u3051\u3002",
|
|
299066
|
-
"Please configure your models in settings.json:": "settings.json \u3067\u30E2\u30C7\u30EB\u3092\u8A2D\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044\uFF1A",
|
|
299067
|
-
"Set API key via environment variable (e.g., OPENAI_API_KEY)": "\u74B0\u5883\u5909\u6570\u3092\u4F7F\u7528\u3057\u3066 API \u30AD\u30FC\u3092\u8A2D\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044\uFF08\u4F8B\uFF1AOPENAI_API_KEY\uFF09",
|
|
299068
|
-
"Add model configuration to modelProviders['openai'] (or other auth types)": "modelProviders['openai']\uFF08\u307E\u305F\u306F\u4ED6\u306E\u8A8D\u8A3C\u30BF\u30A4\u30D7\uFF09\u306B\u30E2\u30C7\u30EB\u8A2D\u5B9A\u3092\u8FFD\u52A0\u3057\u3066\u304F\u3060\u3055\u3044",
|
|
299069
|
-
"Each provider needs: id, envKey (required), plus optional baseUrl, generationConfig": "\u5404\u30D7\u30ED\u30D0\u30A4\u30C0\u30FC\u306B\u306F\uFF1Aid\u3001envKey\uFF08\u5FC5\u9808\uFF09\u3001\u304A\u3088\u3073\u30AA\u30D7\u30B7\u30E7\u30F3\u306E baseUrl\u3001generationConfig \u304C\u5FC5\u8981\u3067\u3059",
|
|
299070
|
-
"Use /model command to select your preferred model from the configured list": "/model \u30B3\u30DE\u30F3\u30C9\u3092\u4F7F\u7528\u3057\u3066\u3001\u8A2D\u5B9A\u6E08\u307F\u30EA\u30B9\u30C8\u304B\u3089\u304A\u597D\u307F\u306E\u30E2\u30C7\u30EB\u3092\u9078\u629E\u3057\u3066\u304F\u3060\u3055\u3044",
|
|
299071
|
-
"Supported auth types: openai, anthropic, gemini, vertex-ai, etc.": "\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u308B\u8A8D\u8A3C\u30BF\u30A4\u30D7\uFF1Aopenai\u3001anthropic\u3001gemini\u3001vertex-ai \u306A\u3069"
|
|
298979
|
+
]
|
|
299072
298980
|
};
|
|
299073
298981
|
}
|
|
299074
298982
|
});
|
|
@@ -300096,17 +300004,7 @@ var init_pt = __esm({
|
|
|
300096
300004
|
"Would open extensions page in your browser: {{url}} (skipped in test environment)": "Abriria a p\xE1gina de extens\xF5es no seu navegador: {{url}} (pulado no ambiente de teste)",
|
|
300097
300005
|
"View available extensions at {{url}}": "Ver extens\xF5es dispon\xEDveis em {{url}}",
|
|
300098
300006
|
"Opening extensions page in your browser: {{url}}": "Abrindo p\xE1gina de extens\xF5es no seu navegador: {{url}}",
|
|
300099
|
-
"Failed to open browser. Check out the extensions gallery at {{url}}": "Falha ao abrir o navegador. Confira a galeria de extens\xF5es em {{url}}"
|
|
300100
|
-
// ============================================================================
|
|
300101
|
-
// Custom API-KEY Configuration
|
|
300102
|
-
// ============================================================================
|
|
300103
|
-
"For advanced users who want to configure models manually.": "Para usu\xE1rios avan\xE7ados que desejam configurar modelos manualmente.",
|
|
300104
|
-
"Please configure your models in settings.json:": "Por favor, configure seus modelos em settings.json:",
|
|
300105
|
-
"Set API key via environment variable (e.g., OPENAI_API_KEY)": "Defina a chave de API via vari\xE1vel de ambiente (ex: OPENAI_API_KEY)",
|
|
300106
|
-
"Add model configuration to modelProviders['openai'] (or other auth types)": "Adicione a configura\xE7\xE3o do modelo a modelProviders['openai'] (ou outros tipos de autentica\xE7\xE3o)",
|
|
300107
|
-
"Each provider needs: id, envKey (required), plus optional baseUrl, generationConfig": "Cada provedor precisa de: id, envKey (obrigat\xF3rio), al\xE9m de baseUrl e generationConfig opcionais",
|
|
300108
|
-
"Use /model command to select your preferred model from the configured list": "Use o comando /model para selecionar seu modelo preferido da lista configurada",
|
|
300109
|
-
"Supported auth types: openai, anthropic, gemini, vertex-ai, etc.": "Tipos de autentica\xE7\xE3o suportados: openai, anthropic, gemini, vertex-ai, etc."
|
|
300007
|
+
"Failed to open browser. Check out the extensions gallery at {{url}}": "Falha ao abrir o navegador. Confira a galeria de extens\xF5es em {{url}}"
|
|
300110
300008
|
};
|
|
300111
300009
|
}
|
|
300112
300010
|
});
|
|
@@ -301142,17 +301040,7 @@ var init_ru = __esm({
|
|
|
301142
301040
|
"Opening extensions page in your browser: {{url}}": "\u041E\u0442\u043A\u0440\u044B\u0432\u0430\u0435\u043C \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u0438\u0439 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435: {{url}}",
|
|
301143
301041
|
"Failed to open browser. Check out the extensions gallery at {{url}}": "\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0442\u043A\u0440\u044B\u0442\u044C \u0431\u0440\u0430\u0443\u0437\u0435\u0440. \u041F\u043E\u0441\u0435\u0442\u0438\u0442\u0435 \u0433\u0430\u043B\u0435\u0440\u0435\u044E \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u0438\u0439 \u043F\u043E \u0430\u0434\u0440\u0435\u0441\u0443 {{url}}",
|
|
301144
301042
|
"You can switch permission mode quickly with Shift+Tab or /approval-mode.": "\u0412\u044B \u043C\u043E\u0436\u0435\u0442\u0435 \u0431\u044B\u0441\u0442\u0440\u043E \u043F\u0435\u0440\u0435\u043A\u043B\u044E\u0447\u0430\u0442\u044C \u0440\u0435\u0436\u0438\u043C \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043D\u0438\u0439 \u0441 \u043F\u043E\u043C\u043E\u0449\u044C\u044E Shift+Tab \u0438\u043B\u0438 /approval-mode.",
|
|
301145
|
-
"You can switch permission mode quickly with Tab or /approval-mode.": "\u0412\u044B \u043C\u043E\u0436\u0435\u0442\u0435 \u0431\u044B\u0441\u0442\u0440\u043E \u043F\u0435\u0440\u0435\u043A\u043B\u044E\u0447\u0430\u0442\u044C \u0440\u0435\u0436\u0438\u043C \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043D\u0438\u0439 \u0441 \u043F\u043E\u043C\u043E\u0449\u044C\u044E Tab \u0438\u043B\u0438 /approval-mode."
|
|
301146
|
-
// ============================================================================
|
|
301147
|
-
// Custom API-KEY Configuration
|
|
301148
|
-
// ============================================================================
|
|
301149
|
-
"For advanced users who want to configure models manually.": "\u0414\u043B\u044F \u043F\u0440\u043E\u0434\u0432\u0438\u043D\u0443\u0442\u044B\u0445 \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u0435\u0439, \u043A\u043E\u0442\u043E\u0440\u044B\u0435 \u0445\u043E\u0442\u044F\u0442 \u043D\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044C \u043C\u043E\u0434\u0435\u043B\u0438 \u0432\u0440\u0443\u0447\u043D\u0443\u044E.",
|
|
301150
|
-
"Please configure your models in settings.json:": "\u041F\u043E\u0436\u0430\u043B\u0443\u0439\u0441\u0442\u0430, \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u0442\u0435 \u0432\u0430\u0448\u0438 \u043C\u043E\u0434\u0435\u043B\u0438 \u0432 settings.json:",
|
|
301151
|
-
"Set API key via environment variable (e.g., OPENAI_API_KEY)": "\u0423\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u0435 \u043A\u043B\u044E\u0447 API \u0447\u0435\u0440\u0435\u0437 \u043F\u0435\u0440\u0435\u043C\u0435\u043D\u043D\u0443\u044E \u043E\u043A\u0440\u0443\u0436\u0435\u043D\u0438\u044F (\u043D\u0430\u043F\u0440\u0438\u043C\u0435\u0440, OPENAI_API_KEY)",
|
|
301152
|
-
"Add model configuration to modelProviders['openai'] (or other auth types)": "\u0414\u043E\u0431\u0430\u0432\u044C\u0442\u0435 \u043A\u043E\u043D\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044E \u043C\u043E\u0434\u0435\u043B\u0438 \u0432 modelProviders['openai'] (\u0438\u043B\u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0442\u0438\u043F\u044B \u0430\u0443\u0442\u0435\u043D\u0442\u0438\u0444\u0438\u043A\u0430\u0446\u0438\u0438)",
|
|
301153
|
-
"Each provider needs: id, envKey (required), plus optional baseUrl, generationConfig": "\u041A\u0430\u0436\u0434\u043E\u043C\u0443 \u043F\u0440\u043E\u0432\u0430\u0439\u0434\u0435\u0440\u0443 \u043D\u0443\u0436\u043D\u044B: id, envKey (\u043E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u043E), \u0430 \u0442\u0430\u043A\u0436\u0435 \u043E\u043F\u0446\u0438\u043E\u043D\u0430\u043B\u044C\u043D\u044B\u0435 baseUrl, generationConfig",
|
|
301154
|
-
"Use /model command to select your preferred model from the configured list": "\u0418\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0439\u0442\u0435 \u043A\u043E\u043C\u0430\u043D\u0434\u0443 /model, \u0447\u0442\u043E\u0431\u044B \u0432\u044B\u0431\u0440\u0430\u0442\u044C \u043F\u0440\u0435\u0434\u043F\u043E\u0447\u0438\u0442\u0430\u0435\u043C\u0443\u044E \u043C\u043E\u0434\u0435\u043B\u044C \u0438\u0437 \u043D\u0430\u0441\u0442\u0440\u043E\u0435\u043D\u043D\u043E\u0433\u043E \u0441\u043F\u0438\u0441\u043A\u0430",
|
|
301155
|
-
"Supported auth types: openai, anthropic, gemini, vertex-ai, etc.": "\u041F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043C\u044B\u0435 \u0442\u0438\u043F\u044B \u0430\u0443\u0442\u0435\u043D\u0442\u0438\u0444\u0438\u043A\u0430\u0446\u0438\u0438: openai, anthropic, gemini, vertex-ai \u0438 \u0434\u0440."
|
|
301043
|
+
"You can switch permission mode quickly with Tab or /approval-mode.": "\u0412\u044B \u043C\u043E\u0436\u0435\u0442\u0435 \u0431\u044B\u0441\u0442\u0440\u043E \u043F\u0435\u0440\u0435\u043A\u043B\u044E\u0447\u0430\u0442\u044C \u0440\u0435\u0436\u0438\u043C \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043D\u0438\u0439 \u0441 \u043F\u043E\u043C\u043E\u0449\u044C\u044E Tab \u0438\u043B\u0438 /approval-mode."
|
|
301156
301044
|
};
|
|
301157
301045
|
}
|
|
301158
301046
|
});
|
|
@@ -302089,32 +301977,7 @@ var init_zh = __esm({
|
|
|
302089
301977
|
"Would open extensions page in your browser: {{url}} (skipped in test environment)": "\u5C06\u5728\u6D4F\u89C8\u5668\u4E2D\u6253\u5F00\u6269\u5C55\u9875\u9762\uFF1A{{url}}\uFF08\u6D4B\u8BD5\u73AF\u5883\u4E2D\u5DF2\u8DF3\u8FC7\uFF09",
|
|
302090
301978
|
"View available extensions at {{url}}": "\u5728 {{url}} \u67E5\u770B\u53EF\u7528\u6269\u5C55",
|
|
302091
301979
|
"Opening extensions page in your browser: {{url}}": "\u6B63\u5728\u6D4F\u89C8\u5668\u4E2D\u6253\u5F00\u6269\u5C55\u9875\u9762\uFF1A{{url}}",
|
|
302092
|
-
"Failed to open browser. Check out the extensions gallery at {{url}}": "\u6253\u5F00\u6D4F\u89C8\u5668\u5931\u8D25\u3002\u8BF7\u8BBF\u95EE\u6269\u5C55\u5E02\u573A\uFF1A{{url}}"
|
|
302093
|
-
// ============================================================================
|
|
302094
|
-
// Coding Plan Authentication
|
|
302095
|
-
// ============================================================================
|
|
302096
|
-
"Please enter your API key:": "\u8BF7\u8F93\u5165\u60A8\u7684 API Key\uFF1A",
|
|
302097
|
-
"API key cannot be empty.": "API Key \u4E0D\u80FD\u4E3A\u7A7A\u3002",
|
|
302098
|
-
"API key is stored in settings.env. You can migrate it to a .env file for better security.": "API Key \u5DF2\u5B58\u50A8\u5728 settings.env \u4E2D\u3002\u60A8\u53EF\u4EE5\u5C06\u5176\u8FC1\u79FB\u5230 .env \u6587\u4EF6\u4EE5\u83B7\u5F97\u66F4\u597D\u7684\u5B89\u5168\u6027\u3002",
|
|
302099
|
-
// ============================================================================
|
|
302100
|
-
// Custom API-KEY Configuration
|
|
302101
|
-
// ============================================================================
|
|
302102
|
-
"For advanced users who want to configure models manually.": "\u9002\u5408\u9700\u8981\u624B\u52A8\u914D\u7F6E\u6A21\u578B\u7684\u9AD8\u7EA7\u7528\u6237\u3002",
|
|
302103
|
-
"Please configure your models in settings.json:": "\u8BF7\u5728 settings.json \u4E2D\u914D\u7F6E\u60A8\u7684\u6A21\u578B\uFF1A",
|
|
302104
|
-
"Set API key via environment variable (e.g., OPENAI_API_KEY)": "\u901A\u8FC7\u73AF\u5883\u53D8\u91CF\u8BBE\u7F6E API Key\uFF08\u4F8B\u5982\uFF1AOPENAI_API_KEY\uFF09",
|
|
302105
|
-
"Add model configuration to modelProviders['openai'] (or other auth types)": "\u5C06\u6A21\u578B\u914D\u7F6E\u6DFB\u52A0\u5230 modelProviders['openai']\uFF08\u6216\u5176\u4ED6\u8BA4\u8BC1\u7C7B\u578B\uFF09",
|
|
302106
|
-
"Each provider needs: id, envKey (required), plus optional baseUrl, generationConfig": "\u6BCF\u4E2A\u63D0\u4F9B\u5546\u9700\u8981\uFF1Aid\u3001envKey\uFF08\u5FC5\u9700\uFF09\uFF0C\u4EE5\u53CA\u53EF\u9009\u7684 baseUrl\u3001generationConfig",
|
|
302107
|
-
"Use /model command to select your preferred model from the configured list": "\u4F7F\u7528 /model \u547D\u4EE4\u4ECE\u914D\u7F6E\u5217\u8868\u4E2D\u9009\u62E9\u60A8\u504F\u597D\u7684\u6A21\u578B",
|
|
302108
|
-
"Supported auth types: openai, anthropic, gemini, vertex-ai, etc.": "\u652F\u6301\u7684\u8BA4\u8BC1\u7C7B\u578B\uFF1Aopenai\u3001anthropic\u3001gemini\u3001vertex-ai \u7B49",
|
|
302109
|
-
// ============================================================================
|
|
302110
|
-
// Auth Dialog - View Titles and Labels
|
|
302111
|
-
// ============================================================================
|
|
302112
|
-
"API-KEY": "API-KEY",
|
|
302113
|
-
"Coding Plan": "Coding Plan",
|
|
302114
|
-
Custom: "\u81EA\u5B9A\u4E49",
|
|
302115
|
-
"Select API-KEY configuration mode:": "\u9009\u62E9 API-KEY \u914D\u7F6E\u6A21\u5F0F\uFF1A",
|
|
302116
|
-
"(Press Escape to go back)": "(\u6309 Escape \u952E\u8FD4\u56DE)",
|
|
302117
|
-
"(Press Enter to submit, Escape to cancel)": "(\u6309 Enter \u63D0\u4EA4\uFF0CEscape \u53D6\u6D88)"
|
|
301980
|
+
"Failed to open browser. Check out the extensions gallery at {{url}}": "\u6253\u5F00\u6D4F\u89C8\u5668\u5931\u8D25\u3002\u8BF7\u8BBF\u95EE\u6269\u5C55\u5E02\u573A\uFF1A{{url}}"
|
|
302118
301981
|
};
|
|
302119
301982
|
}
|
|
302120
301983
|
});
|
|
@@ -337622,7 +337485,7 @@ var require_react_is_development = __commonJS({
|
|
|
337622
337485
|
var ContextProvider = REACT_PROVIDER_TYPE;
|
|
337623
337486
|
var Element2 = REACT_ELEMENT_TYPE;
|
|
337624
337487
|
var ForwardRef = REACT_FORWARD_REF_TYPE;
|
|
337625
|
-
var
|
|
337488
|
+
var Fragment15 = REACT_FRAGMENT_TYPE;
|
|
337626
337489
|
var Lazy = REACT_LAZY_TYPE;
|
|
337627
337490
|
var Memo = REACT_MEMO_TYPE;
|
|
337628
337491
|
var Portal = REACT_PORTAL_TYPE;
|
|
@@ -337694,7 +337557,7 @@ var require_react_is_development = __commonJS({
|
|
|
337694
337557
|
exports2.ContextProvider = ContextProvider;
|
|
337695
337558
|
exports2.Element = Element2;
|
|
337696
337559
|
exports2.ForwardRef = ForwardRef;
|
|
337697
|
-
exports2.Fragment =
|
|
337560
|
+
exports2.Fragment = Fragment15;
|
|
337698
337561
|
exports2.Lazy = Lazy;
|
|
337699
337562
|
exports2.Memo = Memo;
|
|
337700
337563
|
exports2.Portal = Portal;
|
|
@@ -373161,7 +373024,7 @@ __name(getPackageJson, "getPackageJson");
|
|
|
373161
373024
|
// packages/cli/src/utils/version.ts
|
|
373162
373025
|
async function getCliVersion() {
|
|
373163
373026
|
const pkgJson = await getPackageJson();
|
|
373164
|
-
return "0.10.0-preview.
|
|
373027
|
+
return "0.10.0-preview.5";
|
|
373165
373028
|
}
|
|
373166
373029
|
__name(getCliVersion, "getCliVersion");
|
|
373167
373030
|
|
|
@@ -380684,7 +380547,7 @@ var formatDuration = /* @__PURE__ */ __name((milliseconds) => {
|
|
|
380684
380547
|
|
|
380685
380548
|
// packages/cli/src/generated/git-commit.ts
|
|
380686
380549
|
init_esbuild_shims();
|
|
380687
|
-
var GIT_COMMIT_INFO = "
|
|
380550
|
+
var GIT_COMMIT_INFO = "e9669164";
|
|
380688
380551
|
|
|
380689
380552
|
// packages/cli/src/utils/systemInfo.ts
|
|
380690
380553
|
async function getNpmVersion() {
|
|
@@ -417469,47 +417332,13 @@ __name(QwenOAuthProgress, "QwenOAuthProgress");
|
|
|
417469
417332
|
init_esbuild_shims();
|
|
417470
417333
|
var import_react81 = __toESM(require_react(), 1);
|
|
417471
417334
|
|
|
417472
|
-
// packages/cli/src/ui/components/ApiKeyInput.tsx
|
|
417473
|
-
init_esbuild_shims();
|
|
417474
|
-
var import_react79 = __toESM(require_react(), 1);
|
|
417475
|
-
var import_jsx_runtime79 = __toESM(require_jsx_runtime(), 1);
|
|
417476
|
-
function ApiKeyInput({
|
|
417477
|
-
onSubmit,
|
|
417478
|
-
onCancel
|
|
417479
|
-
}) {
|
|
417480
|
-
const [apiKey, setApiKey] = (0, import_react79.useState)("");
|
|
417481
|
-
const [error2, setError] = (0, import_react79.useState)(null);
|
|
417482
|
-
useKeypress(
|
|
417483
|
-
(key) => {
|
|
417484
|
-
if (key.name === "escape") {
|
|
417485
|
-
onCancel();
|
|
417486
|
-
} else if (key.name === "return") {
|
|
417487
|
-
const trimmedKey = apiKey.trim();
|
|
417488
|
-
if (!trimmedKey) {
|
|
417489
|
-
setError(t4("API key cannot be empty."));
|
|
417490
|
-
return;
|
|
417491
|
-
}
|
|
417492
|
-
onSubmit(trimmedKey);
|
|
417493
|
-
}
|
|
417494
|
-
},
|
|
417495
|
-
{ isActive: true }
|
|
417496
|
-
);
|
|
417497
|
-
return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
417498
|
-
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(Box_default, { marginBottom: 1, children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(Text3, { children: t4("Please enter your API key:") }) }),
|
|
417499
|
-
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(TextInput, { value: apiKey, onChange: setApiKey, placeholder: "sk-..." }),
|
|
417500
|
-
error2 && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(Text3, { color: Colors.AccentRed, children: error2 }) }),
|
|
417501
|
-
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(Text3, { color: Colors.Gray, children: t4("(Press Enter to submit, Escape to cancel)") }) })
|
|
417502
|
-
] });
|
|
417503
|
-
}
|
|
417504
|
-
__name(ApiKeyInput, "ApiKeyInput");
|
|
417505
|
-
|
|
417506
417335
|
// packages/cli/src/ui/contexts/UIActionsContext.tsx
|
|
417507
417336
|
init_esbuild_shims();
|
|
417508
417337
|
var import_react80 = __toESM(require_react(), 1);
|
|
417509
417338
|
|
|
417510
417339
|
// packages/cli/src/ui/components/ModelSwitchDialog.tsx
|
|
417511
417340
|
init_esbuild_shims();
|
|
417512
|
-
var
|
|
417341
|
+
var import_jsx_runtime79 = __toESM(require_jsx_runtime(), 1);
|
|
417513
417342
|
var ModelSwitchDialog = /* @__PURE__ */ __name(({
|
|
417514
417343
|
onSelect
|
|
417515
417344
|
}) => {
|
|
@@ -417541,7 +417370,7 @@ var ModelSwitchDialog = /* @__PURE__ */ __name(({
|
|
|
417541
417370
|
const handleSelect = /* @__PURE__ */ __name((outcome) => {
|
|
417542
417371
|
onSelect(outcome);
|
|
417543
417372
|
}, "handleSelect");
|
|
417544
|
-
return /* @__PURE__ */ (0,
|
|
417373
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(
|
|
417545
417374
|
Box_default,
|
|
417546
417375
|
{
|
|
417547
417376
|
flexDirection: "column",
|
|
@@ -417551,12 +417380,12 @@ var ModelSwitchDialog = /* @__PURE__ */ __name(({
|
|
|
417551
417380
|
width: "100%",
|
|
417552
417381
|
marginLeft: 1,
|
|
417553
417382
|
children: [
|
|
417554
|
-
/* @__PURE__ */ (0,
|
|
417555
|
-
/* @__PURE__ */ (0,
|
|
417556
|
-
/* @__PURE__ */ (0,
|
|
417557
|
-
/* @__PURE__ */ (0,
|
|
417383
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(Box_default, { flexDirection: "column", marginBottom: 1, children: [
|
|
417384
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(Text3, { bold: true, children: "Vision Model Switch Required" }),
|
|
417385
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(Text3, { children: "Your message contains an image, but the current model doesn't support vision." }),
|
|
417386
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(Text3, { children: "How would you like to proceed?" })
|
|
417558
417387
|
] }),
|
|
417559
|
-
/* @__PURE__ */ (0,
|
|
417388
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(Box_default, { marginBottom: 1, children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
417560
417389
|
RadioButtonSelect,
|
|
417561
417390
|
{
|
|
417562
417391
|
items: options2,
|
|
@@ -417565,12 +417394,209 @@ var ModelSwitchDialog = /* @__PURE__ */ __name(({
|
|
|
417565
417394
|
isFocused: true
|
|
417566
417395
|
}
|
|
417567
417396
|
) }),
|
|
417568
|
-
/* @__PURE__ */ (0,
|
|
417397
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(Text3, { color: Colors.Gray, children: "Press Enter to select, Esc to cancel" }) })
|
|
417569
417398
|
]
|
|
417570
417399
|
}
|
|
417571
417400
|
);
|
|
417572
417401
|
}, "ModelSwitchDialog");
|
|
417573
417402
|
|
|
417403
|
+
// packages/cli/src/ui/components/OpenAIKeyPrompt.tsx
|
|
417404
|
+
init_esbuild_shims();
|
|
417405
|
+
var import_react79 = __toESM(require_react(), 1);
|
|
417406
|
+
init_zod();
|
|
417407
|
+
var import_jsx_runtime80 = __toESM(require_jsx_runtime(), 1);
|
|
417408
|
+
var credentialSchema = external_exports.object({
|
|
417409
|
+
apiKey: external_exports.string().min(1, "API key is required"),
|
|
417410
|
+
baseUrl: external_exports.union([external_exports.string().url("Base URL must be a valid URL"), external_exports.literal("")]).optional(),
|
|
417411
|
+
model: external_exports.string().min(1, "Model must be a non-empty string").optional()
|
|
417412
|
+
});
|
|
417413
|
+
function OpenAIKeyPrompt({
|
|
417414
|
+
onSubmit,
|
|
417415
|
+
onCancel,
|
|
417416
|
+
defaultApiKey,
|
|
417417
|
+
defaultBaseUrl,
|
|
417418
|
+
defaultModel
|
|
417419
|
+
}) {
|
|
417420
|
+
const [apiKey, setApiKey] = (0, import_react79.useState)(defaultApiKey || "");
|
|
417421
|
+
const [baseUrl, setBaseUrl] = (0, import_react79.useState)(defaultBaseUrl || "");
|
|
417422
|
+
const [model, setModel] = (0, import_react79.useState)(defaultModel || "");
|
|
417423
|
+
const [currentField, setCurrentField] = (0, import_react79.useState)("apiKey");
|
|
417424
|
+
const [validationError, setValidationError] = (0, import_react79.useState)(null);
|
|
417425
|
+
const validateAndSubmit = /* @__PURE__ */ __name(() => {
|
|
417426
|
+
setValidationError(null);
|
|
417427
|
+
try {
|
|
417428
|
+
const validated = credentialSchema.parse({
|
|
417429
|
+
apiKey: apiKey.trim(),
|
|
417430
|
+
baseUrl: baseUrl.trim() || void 0,
|
|
417431
|
+
model: model.trim() || void 0
|
|
417432
|
+
});
|
|
417433
|
+
onSubmit(
|
|
417434
|
+
validated.apiKey,
|
|
417435
|
+
validated.baseUrl === "" ? "" : validated.baseUrl || "",
|
|
417436
|
+
validated.model || ""
|
|
417437
|
+
);
|
|
417438
|
+
} catch (error2) {
|
|
417439
|
+
if (error2 instanceof external_exports.ZodError) {
|
|
417440
|
+
const errorMessage = error2.errors.map((e4) => `${e4.path.join(".")}: ${e4.message}`).join(", ");
|
|
417441
|
+
setValidationError(
|
|
417442
|
+
t4("Invalid credentials: {{errorMessage}}", { errorMessage })
|
|
417443
|
+
);
|
|
417444
|
+
} else {
|
|
417445
|
+
setValidationError(t4("Failed to validate credentials"));
|
|
417446
|
+
}
|
|
417447
|
+
}
|
|
417448
|
+
}, "validateAndSubmit");
|
|
417449
|
+
useKeypress(
|
|
417450
|
+
(key) => {
|
|
417451
|
+
if (key.name === "escape") {
|
|
417452
|
+
onCancel();
|
|
417453
|
+
return;
|
|
417454
|
+
}
|
|
417455
|
+
if (key.name === "return") {
|
|
417456
|
+
if (currentField === "apiKey") {
|
|
417457
|
+
setCurrentField("baseUrl");
|
|
417458
|
+
return;
|
|
417459
|
+
} else if (currentField === "baseUrl") {
|
|
417460
|
+
setCurrentField("model");
|
|
417461
|
+
return;
|
|
417462
|
+
} else if (currentField === "model") {
|
|
417463
|
+
if (apiKey.trim()) {
|
|
417464
|
+
validateAndSubmit();
|
|
417465
|
+
} else {
|
|
417466
|
+
setCurrentField("apiKey");
|
|
417467
|
+
}
|
|
417468
|
+
}
|
|
417469
|
+
return;
|
|
417470
|
+
}
|
|
417471
|
+
if (key.name === "tab") {
|
|
417472
|
+
if (currentField === "apiKey") {
|
|
417473
|
+
setCurrentField("baseUrl");
|
|
417474
|
+
} else if (currentField === "baseUrl") {
|
|
417475
|
+
setCurrentField("model");
|
|
417476
|
+
} else if (currentField === "model") {
|
|
417477
|
+
setCurrentField("apiKey");
|
|
417478
|
+
}
|
|
417479
|
+
return;
|
|
417480
|
+
}
|
|
417481
|
+
if (key.name === "up") {
|
|
417482
|
+
if (currentField === "baseUrl") {
|
|
417483
|
+
setCurrentField("apiKey");
|
|
417484
|
+
} else if (currentField === "model") {
|
|
417485
|
+
setCurrentField("baseUrl");
|
|
417486
|
+
}
|
|
417487
|
+
return;
|
|
417488
|
+
}
|
|
417489
|
+
if (key.name === "down") {
|
|
417490
|
+
if (currentField === "apiKey") {
|
|
417491
|
+
setCurrentField("baseUrl");
|
|
417492
|
+
} else if (currentField === "baseUrl") {
|
|
417493
|
+
setCurrentField("model");
|
|
417494
|
+
}
|
|
417495
|
+
return;
|
|
417496
|
+
}
|
|
417497
|
+
if (key.name === "backspace" || key.name === "delete") {
|
|
417498
|
+
if (currentField === "apiKey") {
|
|
417499
|
+
setApiKey((prev) => prev.slice(0, -1));
|
|
417500
|
+
} else if (currentField === "baseUrl") {
|
|
417501
|
+
setBaseUrl((prev) => prev.slice(0, -1));
|
|
417502
|
+
} else if (currentField === "model") {
|
|
417503
|
+
setModel((prev) => prev.slice(0, -1));
|
|
417504
|
+
}
|
|
417505
|
+
return;
|
|
417506
|
+
}
|
|
417507
|
+
if (key.paste && key.sequence) {
|
|
417508
|
+
let cleanInput = key.sequence.replace(/\u001b\[[0-9;]*[a-zA-Z]/g, "").replace(/\[200~/g, "").replace(/\[201~/g, "").replace(/^\[|~$/g, "");
|
|
417509
|
+
cleanInput = cleanInput.split("").filter((ch) => ch.charCodeAt(0) >= 32).join("");
|
|
417510
|
+
if (cleanInput.length > 0) {
|
|
417511
|
+
if (currentField === "apiKey") {
|
|
417512
|
+
setApiKey((prev) => prev + cleanInput);
|
|
417513
|
+
} else if (currentField === "baseUrl") {
|
|
417514
|
+
setBaseUrl((prev) => prev + cleanInput);
|
|
417515
|
+
} else if (currentField === "model") {
|
|
417516
|
+
setModel((prev) => prev + cleanInput);
|
|
417517
|
+
}
|
|
417518
|
+
}
|
|
417519
|
+
return;
|
|
417520
|
+
}
|
|
417521
|
+
if (key.sequence && !key.ctrl && !key.meta) {
|
|
417522
|
+
const cleanInput = key.sequence.split("").filter((ch) => ch.charCodeAt(0) >= 32).join("");
|
|
417523
|
+
if (cleanInput.length > 0) {
|
|
417524
|
+
if (currentField === "apiKey") {
|
|
417525
|
+
setApiKey((prev) => prev + cleanInput);
|
|
417526
|
+
} else if (currentField === "baseUrl") {
|
|
417527
|
+
setBaseUrl((prev) => prev + cleanInput);
|
|
417528
|
+
} else if (currentField === "model") {
|
|
417529
|
+
setModel((prev) => prev + cleanInput);
|
|
417530
|
+
}
|
|
417531
|
+
}
|
|
417532
|
+
}
|
|
417533
|
+
},
|
|
417534
|
+
{ isActive: true }
|
|
417535
|
+
);
|
|
417536
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(
|
|
417537
|
+
Box_default,
|
|
417538
|
+
{
|
|
417539
|
+
borderStyle: "round",
|
|
417540
|
+
borderColor: Colors.AccentBlue,
|
|
417541
|
+
flexDirection: "column",
|
|
417542
|
+
padding: 1,
|
|
417543
|
+
width: "100%",
|
|
417544
|
+
children: [
|
|
417545
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(Text3, { bold: true, color: Colors.AccentBlue, children: t4("OpenAI Configuration Required") }),
|
|
417546
|
+
validationError && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(Text3, { color: Colors.AccentRed, children: validationError }) }),
|
|
417547
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(Text3, { children: [
|
|
417548
|
+
t4(
|
|
417549
|
+
"Please enter your OpenAI configuration. You can get an API key from"
|
|
417550
|
+
),
|
|
417551
|
+
" ",
|
|
417552
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(Text3, { color: Colors.AccentBlue, children: "https://bailian.console.aliyun.com/?tab=model#/api-key" })
|
|
417553
|
+
] }) }),
|
|
417554
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(Box_default, { marginTop: 1, flexDirection: "row", children: [
|
|
417555
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(Box_default, { width: 12, children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
417556
|
+
Text3,
|
|
417557
|
+
{
|
|
417558
|
+
color: currentField === "apiKey" ? Colors.AccentBlue : Colors.Gray,
|
|
417559
|
+
children: t4("API Key:")
|
|
417560
|
+
}
|
|
417561
|
+
) }),
|
|
417562
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(Box_default, { flexGrow: 1, children: /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(Text3, { children: [
|
|
417563
|
+
currentField === "apiKey" ? "> " : " ",
|
|
417564
|
+
apiKey || " "
|
|
417565
|
+
] }) })
|
|
417566
|
+
] }),
|
|
417567
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(Box_default, { marginTop: 1, flexDirection: "row", children: [
|
|
417568
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(Box_default, { width: 12, children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
417569
|
+
Text3,
|
|
417570
|
+
{
|
|
417571
|
+
color: currentField === "baseUrl" ? Colors.AccentBlue : Colors.Gray,
|
|
417572
|
+
children: t4("Base URL:")
|
|
417573
|
+
}
|
|
417574
|
+
) }),
|
|
417575
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(Box_default, { flexGrow: 1, children: /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(Text3, { children: [
|
|
417576
|
+
currentField === "baseUrl" ? "> " : " ",
|
|
417577
|
+
baseUrl
|
|
417578
|
+
] }) })
|
|
417579
|
+
] }),
|
|
417580
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(Box_default, { marginTop: 1, flexDirection: "row", children: [
|
|
417581
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(Box_default, { width: 12, children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
417582
|
+
Text3,
|
|
417583
|
+
{
|
|
417584
|
+
color: currentField === "model" ? Colors.AccentBlue : Colors.Gray,
|
|
417585
|
+
children: t4("Model:")
|
|
417586
|
+
}
|
|
417587
|
+
) }),
|
|
417588
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(Box_default, { flexGrow: 1, children: /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(Text3, { children: [
|
|
417589
|
+
currentField === "model" ? "> " : " ",
|
|
417590
|
+
model
|
|
417591
|
+
] }) })
|
|
417592
|
+
] }),
|
|
417593
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(Text3, { color: Colors.Gray, children: t4("Press Enter to continue, Tab/\u2191\u2193 to navigate, Esc to cancel") }) })
|
|
417594
|
+
]
|
|
417595
|
+
}
|
|
417596
|
+
);
|
|
417597
|
+
}
|
|
417598
|
+
__name(OpenAIKeyPrompt, "OpenAIKeyPrompt");
|
|
417599
|
+
|
|
417574
417600
|
// packages/cli/src/ui/contexts/UIActionsContext.tsx
|
|
417575
417601
|
var UIActionsContext = (0, import_react80.createContext)(null);
|
|
417576
417602
|
var useUIActions = /* @__PURE__ */ __name(() => {
|
|
@@ -417592,39 +417618,25 @@ function parseDefaultAuthType(defaultAuthType) {
|
|
|
417592
417618
|
__name(parseDefaultAuthType, "parseDefaultAuthType");
|
|
417593
417619
|
function AuthDialog() {
|
|
417594
417620
|
const { pendingAuthType, authError } = useUIState();
|
|
417595
|
-
const { handleAuthSelect: onAuthSelect
|
|
417621
|
+
const { handleAuthSelect: onAuthSelect } = useUIActions();
|
|
417596
417622
|
const config2 = useConfig();
|
|
417597
417623
|
const [errorMessage, setErrorMessage] = (0, import_react81.useState)(null);
|
|
417598
417624
|
const [selectedIndex, setSelectedIndex] = (0, import_react81.useState)(null);
|
|
417599
|
-
const
|
|
417600
|
-
const [apiKeySubModeIndex, setApiKeySubModeIndex] = (0, import_react81.useState)(0);
|
|
417601
|
-
const mainItems = [
|
|
417625
|
+
const items = [
|
|
417602
417626
|
{
|
|
417603
417627
|
key: AuthType2.QWEN_OAUTH,
|
|
417604
417628
|
label: t4("Qwen OAuth"),
|
|
417605
417629
|
value: AuthType2.QWEN_OAUTH
|
|
417606
417630
|
},
|
|
417607
417631
|
{
|
|
417608
|
-
key:
|
|
417609
|
-
label: t4("
|
|
417610
|
-
value:
|
|
417611
|
-
}
|
|
417612
|
-
];
|
|
417613
|
-
const apiKeySubItems = [
|
|
417614
|
-
{
|
|
417615
|
-
key: "coding-plan",
|
|
417616
|
-
label: t4("Coding Plan"),
|
|
417617
|
-
value: "coding-plan"
|
|
417618
|
-
},
|
|
417619
|
-
{
|
|
417620
|
-
key: "custom",
|
|
417621
|
-
label: t4("Custom"),
|
|
417622
|
-
value: "custom"
|
|
417632
|
+
key: AuthType2.USE_OPENAI,
|
|
417633
|
+
label: t4("OpenAI"),
|
|
417634
|
+
value: AuthType2.USE_OPENAI
|
|
417623
417635
|
}
|
|
417624
417636
|
];
|
|
417625
417637
|
const initialAuthIndex = Math.max(
|
|
417626
417638
|
0,
|
|
417627
|
-
|
|
417639
|
+
items.findIndex((item) => {
|
|
417628
417640
|
if (pendingAuthType) {
|
|
417629
417641
|
return item.value === pendingAuthType;
|
|
417630
417642
|
}
|
|
@@ -417642,50 +417654,18 @@ function AuthDialog() {
|
|
|
417642
417654
|
})
|
|
417643
417655
|
);
|
|
417644
417656
|
const hasApiKey = Boolean(config2.getContentGeneratorConfig()?.apiKey);
|
|
417645
|
-
const currentSelectedAuthType = selectedIndex !== null ?
|
|
417646
|
-
const
|
|
417647
|
-
setErrorMessage(null);
|
|
417648
|
-
if (value === "API-KEY") {
|
|
417649
|
-
setViewLevel("api-key-sub");
|
|
417650
|
-
return;
|
|
417651
|
-
}
|
|
417652
|
-
await onAuthSelect(value);
|
|
417653
|
-
}, "handleMainSelect");
|
|
417654
|
-
const handleApiKeySubSelect = /* @__PURE__ */ __name(async (subMode) => {
|
|
417655
|
-
setErrorMessage(null);
|
|
417656
|
-
if (subMode === "coding-plan") {
|
|
417657
|
-
setViewLevel("api-key-input");
|
|
417658
|
-
} else {
|
|
417659
|
-
setViewLevel("custom-info");
|
|
417660
|
-
}
|
|
417661
|
-
}, "handleApiKeySubSelect");
|
|
417662
|
-
const handleApiKeyInputSubmit = /* @__PURE__ */ __name(async (apiKey) => {
|
|
417663
|
-
setErrorMessage(null);
|
|
417664
|
-
if (!apiKey.trim()) {
|
|
417665
|
-
setErrorMessage(t4("API key cannot be empty."));
|
|
417666
|
-
return;
|
|
417667
|
-
}
|
|
417668
|
-
await handleCodingPlanSubmit(apiKey);
|
|
417669
|
-
}, "handleApiKeyInputSubmit");
|
|
417670
|
-
const handleGoBack = /* @__PURE__ */ __name(() => {
|
|
417657
|
+
const currentSelectedAuthType = selectedIndex !== null ? items[selectedIndex]?.value : items[initialAuthIndex]?.value;
|
|
417658
|
+
const handleAuthSelect = /* @__PURE__ */ __name(async (authMethod) => {
|
|
417671
417659
|
setErrorMessage(null);
|
|
417672
|
-
|
|
417673
|
-
|
|
417674
|
-
|
|
417675
|
-
|
|
417676
|
-
|
|
417677
|
-
}, "
|
|
417660
|
+
await onAuthSelect(authMethod);
|
|
417661
|
+
}, "handleAuthSelect");
|
|
417662
|
+
const handleHighlight = /* @__PURE__ */ __name((authMethod) => {
|
|
417663
|
+
const index = items.findIndex((item) => item.value === authMethod);
|
|
417664
|
+
setSelectedIndex(index);
|
|
417665
|
+
}, "handleHighlight");
|
|
417678
417666
|
useKeypress(
|
|
417679
417667
|
(key) => {
|
|
417680
417668
|
if (key.name === "escape") {
|
|
417681
|
-
if (viewLevel === "api-key-sub") {
|
|
417682
|
-
handleGoBack();
|
|
417683
|
-
return;
|
|
417684
|
-
}
|
|
417685
|
-
if (viewLevel === "api-key-input" || viewLevel === "custom-info") {
|
|
417686
|
-
handleGoBack();
|
|
417687
|
-
return;
|
|
417688
|
-
}
|
|
417689
417669
|
if (errorMessage) {
|
|
417690
417670
|
return;
|
|
417691
417671
|
}
|
|
@@ -417702,88 +417682,6 @@ function AuthDialog() {
|
|
|
417702
417682
|
},
|
|
417703
417683
|
{ isActive: true }
|
|
417704
417684
|
);
|
|
417705
|
-
const renderMainView = /* @__PURE__ */ __name(() => /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(import_jsx_runtime81.Fragment, { children: [
|
|
417706
|
-
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Text3, { children: t4("How would you like to authenticate for this project?") }) }),
|
|
417707
|
-
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
417708
|
-
RadioButtonSelect,
|
|
417709
|
-
{
|
|
417710
|
-
items: mainItems,
|
|
417711
|
-
initialIndex: initialAuthIndex,
|
|
417712
|
-
onSelect: handleMainSelect,
|
|
417713
|
-
onHighlight: (value) => {
|
|
417714
|
-
const index = mainItems.findIndex((item) => item.value === value);
|
|
417715
|
-
setSelectedIndex(index);
|
|
417716
|
-
}
|
|
417717
|
-
}
|
|
417718
|
-
) })
|
|
417719
|
-
] }), "renderMainView");
|
|
417720
|
-
const renderApiKeySubView = /* @__PURE__ */ __name(() => /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(import_jsx_runtime81.Fragment, { children: [
|
|
417721
|
-
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Text3, { children: t4("Select API-KEY configuration mode:") }) }),
|
|
417722
|
-
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
417723
|
-
RadioButtonSelect,
|
|
417724
|
-
{
|
|
417725
|
-
items: apiKeySubItems,
|
|
417726
|
-
initialIndex: apiKeySubModeIndex,
|
|
417727
|
-
onSelect: handleApiKeySubSelect,
|
|
417728
|
-
onHighlight: (value) => {
|
|
417729
|
-
const index = apiKeySubItems.findIndex(
|
|
417730
|
-
(item) => item.value === value
|
|
417731
|
-
);
|
|
417732
|
-
setApiKeySubModeIndex(index);
|
|
417733
|
-
}
|
|
417734
|
-
}
|
|
417735
|
-
) }),
|
|
417736
|
-
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Text3, { color: Colors.Gray, children: t4("(Press Escape to go back)") }) })
|
|
417737
|
-
] }), "renderApiKeySubView");
|
|
417738
|
-
const renderApiKeyInputView = /* @__PURE__ */ __name(() => /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(ApiKeyInput, { onSubmit: handleApiKeyInputSubmit, onCancel: handleGoBack }) }), "renderApiKeyInputView");
|
|
417739
|
-
const renderCustomInfoView = /* @__PURE__ */ __name(() => /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(import_jsx_runtime81.Fragment, { children: [
|
|
417740
|
-
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Text3, { bold: true, children: t4("Custom API-KEY Configuration") }) }),
|
|
417741
|
-
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Text3, { children: t4("For advanced users who want to configure models manually.") }) }),
|
|
417742
|
-
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Text3, { children: t4("Please configure your models in settings.json:") }) }),
|
|
417743
|
-
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Box_default, { marginTop: 1, paddingLeft: 2, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(Text3, { color: Colors.AccentYellow, children: [
|
|
417744
|
-
"1. ",
|
|
417745
|
-
t4("Set API key via environment variable (e.g., OPENAI_API_KEY)")
|
|
417746
|
-
] }) }),
|
|
417747
|
-
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Box_default, { marginTop: 0, paddingLeft: 2, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(Text3, { color: Colors.AccentYellow, children: [
|
|
417748
|
-
"2.",
|
|
417749
|
-
" ",
|
|
417750
|
-
t4(
|
|
417751
|
-
"Add model configuration to modelProviders['openai'] (or other auth types)"
|
|
417752
|
-
)
|
|
417753
|
-
] }) }),
|
|
417754
|
-
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Box_default, { marginTop: 0, paddingLeft: 2, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(Text3, { color: Colors.AccentYellow, children: [
|
|
417755
|
-
"3.",
|
|
417756
|
-
" ",
|
|
417757
|
-
t4(
|
|
417758
|
-
"Each provider needs: id, envKey (required), plus optional baseUrl, generationConfig"
|
|
417759
|
-
)
|
|
417760
|
-
] }) }),
|
|
417761
|
-
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Box_default, { marginTop: 0, paddingLeft: 2, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(Text3, { color: Colors.AccentYellow, children: [
|
|
417762
|
-
"4.",
|
|
417763
|
-
" ",
|
|
417764
|
-
t4(
|
|
417765
|
-
"Use /model command to select your preferred model from the configured list"
|
|
417766
|
-
)
|
|
417767
|
-
] }) }),
|
|
417768
|
-
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Text3, { color: Colors.Gray, children: t4(
|
|
417769
|
-
"Supported auth types: openai, anthropic, gemini, vertex-ai, etc."
|
|
417770
|
-
) }) }),
|
|
417771
|
-
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Text3, { color: Colors.Gray, children: t4("(Press Escape to go back)") }) })
|
|
417772
|
-
] }), "renderCustomInfoView");
|
|
417773
|
-
const getViewTitle = /* @__PURE__ */ __name(() => {
|
|
417774
|
-
switch (viewLevel) {
|
|
417775
|
-
case "main":
|
|
417776
|
-
return t4("Get started");
|
|
417777
|
-
case "api-key-sub":
|
|
417778
|
-
return t4("API-KEY Configuration");
|
|
417779
|
-
case "api-key-input":
|
|
417780
|
-
return t4("Coding Plan Setup");
|
|
417781
|
-
case "custom-info":
|
|
417782
|
-
return t4("Custom Configuration");
|
|
417783
|
-
default:
|
|
417784
|
-
return t4("Get started");
|
|
417785
|
-
}
|
|
417786
|
-
}, "getViewTitle");
|
|
417787
417685
|
return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(
|
|
417788
417686
|
Box_default,
|
|
417789
417687
|
{
|
|
@@ -417793,20 +417691,24 @@ function AuthDialog() {
|
|
|
417793
417691
|
padding: 1,
|
|
417794
417692
|
width: "100%",
|
|
417795
417693
|
children: [
|
|
417796
|
-
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Text3, { bold: true, children:
|
|
417797
|
-
|
|
417798
|
-
|
|
417799
|
-
|
|
417800
|
-
|
|
417694
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Text3, { bold: true, children: t4("Get started") }),
|
|
417695
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Text3, { children: t4("How would you like to authenticate for this project?") }) }),
|
|
417696
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
417697
|
+
RadioButtonSelect,
|
|
417698
|
+
{
|
|
417699
|
+
items,
|
|
417700
|
+
initialIndex: initialAuthIndex,
|
|
417701
|
+
onSelect: handleAuthSelect,
|
|
417702
|
+
onHighlight: handleHighlight
|
|
417703
|
+
}
|
|
417704
|
+
) }),
|
|
417801
417705
|
(authError || errorMessage) && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Text3, { color: Colors.AccentRed, children: authError || errorMessage }) }),
|
|
417802
|
-
|
|
417803
|
-
|
|
417804
|
-
|
|
417805
|
-
|
|
417806
|
-
|
|
417807
|
-
|
|
417808
|
-
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Text3, { color: Colors.AccentBlue, children: "https://github.com/QwenLM/Qwen3-Coder/blob/main/README.md" }) })
|
|
417809
|
-
] })
|
|
417706
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Text3, { color: Colors.AccentPurple, children: t4("(Use Enter to Set Auth)") }) }),
|
|
417707
|
+
hasApiKey && currentSelectedAuthType === AuthType2.QWEN_OAUTH && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Text3, { color: Colors.Gray, children: t4(
|
|
417708
|
+
"Note: Your existing API key in settings.json will not be cleared when using Qwen OAuth. You can switch back to OpenAI authentication later if needed."
|
|
417709
|
+
) }) }),
|
|
417710
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Text3, { children: t4("Terms of Services and Privacy Notice for Qwen Code") }) }),
|
|
417711
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Text3, { color: Colors.AccentBlue, children: "https://github.com/QwenLM/Qwen3-Coder/blob/main/README.md" }) })
|
|
417810
417712
|
]
|
|
417811
417713
|
}
|
|
417812
417714
|
);
|
|
@@ -419216,6 +419118,15 @@ var DialogManager = /* @__PURE__ */ __name(({
|
|
|
419216
419118
|
const uiState = useUIState();
|
|
419217
419119
|
const uiActions = useUIActions();
|
|
419218
419120
|
const { constrainHeight, terminalHeight, staticExtraHeight, mainAreaWidth } = uiState;
|
|
419121
|
+
const getDefaultOpenAIConfig = /* @__PURE__ */ __name(() => {
|
|
419122
|
+
const fromSettings = settings.merged.security?.auth;
|
|
419123
|
+
const modelSettings = settings.merged.model;
|
|
419124
|
+
return {
|
|
419125
|
+
apiKey: fromSettings?.apiKey || process35.env["OPENAI_API_KEY"] || "",
|
|
419126
|
+
baseUrl: fromSettings?.baseUrl || process35.env["OPENAI_BASE_URL"] || "",
|
|
419127
|
+
model: modelSettings?.name || process35.env["OPENAI_MODEL"] || ""
|
|
419128
|
+
};
|
|
419129
|
+
}, "getDefaultOpenAIConfig");
|
|
419219
419130
|
if (uiState.showWelcomeBackDialog && uiState.welcomeBackInfo?.hasHistory) {
|
|
419220
419131
|
return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
419221
419132
|
WelcomeBackDialog,
|
|
@@ -419389,6 +419300,28 @@ var DialogManager = /* @__PURE__ */ __name(({
|
|
|
419389
419300
|
return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(Box_default, { flexDirection: "column", children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(AuthDialog, {}) });
|
|
419390
419301
|
}
|
|
419391
419302
|
if (uiState.isAuthenticating) {
|
|
419303
|
+
if (uiState.pendingAuthType === AuthType2.USE_OPENAI) {
|
|
419304
|
+
const defaults3 = getDefaultOpenAIConfig();
|
|
419305
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
419306
|
+
OpenAIKeyPrompt,
|
|
419307
|
+
{
|
|
419308
|
+
onSubmit: (apiKey, baseUrl, model) => {
|
|
419309
|
+
uiActions.handleAuthSelect(AuthType2.USE_OPENAI, {
|
|
419310
|
+
apiKey,
|
|
419311
|
+
baseUrl,
|
|
419312
|
+
model
|
|
419313
|
+
});
|
|
419314
|
+
},
|
|
419315
|
+
onCancel: () => {
|
|
419316
|
+
uiActions.cancelAuthentication();
|
|
419317
|
+
uiActions.setAuthState("updating" /* Updating */);
|
|
419318
|
+
},
|
|
419319
|
+
defaultApiKey: defaults3.apiKey,
|
|
419320
|
+
defaultBaseUrl: defaults3.baseUrl,
|
|
419321
|
+
defaultModel: defaults3.model
|
|
419322
|
+
}
|
|
419323
|
+
);
|
|
419324
|
+
}
|
|
419392
419325
|
if (uiState.pendingAuthType === AuthType2.QWEN_OAUTH) {
|
|
419393
419326
|
return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
419394
419327
|
QwenOAuthProgress,
|
|
@@ -422775,31 +422708,6 @@ var useQwenAuth = /* @__PURE__ */ __name((pendingAuthType, isAuthenticating) =>
|
|
|
422775
422708
|
};
|
|
422776
422709
|
}, "useQwenAuth");
|
|
422777
422710
|
|
|
422778
|
-
// packages/cli/src/constants/codingPlanTemplates.ts
|
|
422779
|
-
init_esbuild_shims();
|
|
422780
|
-
var CODING_PLAN_ENV_KEY = "BAILIAN_CODING_PLAN_API_KEY";
|
|
422781
|
-
var CODING_PLAN_TEMPLATE = [
|
|
422782
|
-
{
|
|
422783
|
-
id: "qwen3-coder-plus",
|
|
422784
|
-
name: "qwen3-coder-plur",
|
|
422785
|
-
baseUrl: "https://coding.dashscope.aliyuncs.com/v1",
|
|
422786
|
-
description: "Qwen3 Coder Plus model from Bailian Coding Plan",
|
|
422787
|
-
envKey: CODING_PLAN_ENV_KEY
|
|
422788
|
-
},
|
|
422789
|
-
{
|
|
422790
|
-
id: "qwen3-max-2026-01-23",
|
|
422791
|
-
name: "qwen3-max-2026-01-23",
|
|
422792
|
-
description: "Qwen3 Max Thinking model from Bailian Coding Plan",
|
|
422793
|
-
baseUrl: "https://coding.dashscope.aliyuncs.com/v1",
|
|
422794
|
-
envKey: CODING_PLAN_ENV_KEY,
|
|
422795
|
-
generationConfig: {
|
|
422796
|
-
extra_body: {
|
|
422797
|
-
enable_thinking: true
|
|
422798
|
-
}
|
|
422799
|
-
}
|
|
422800
|
-
}
|
|
422801
|
-
];
|
|
422802
|
-
|
|
422803
422711
|
// packages/cli/src/ui/auth/useAuth.ts
|
|
422804
422712
|
var useAuthCommand = /* @__PURE__ */ __name((settings, config2, addItem, onAuthChange) => {
|
|
422805
422713
|
const unAuthenticated = config2.getAuthType() === void 0;
|
|
@@ -422992,74 +422900,6 @@ var useAuthCommand = /* @__PURE__ */ __name((settings, config2, addItem, onAuthC
|
|
|
422992
422900
|
setIsAuthDialogOpen(true);
|
|
422993
422901
|
setAuthError(null);
|
|
422994
422902
|
}, [isAuthenticating, pendingAuthType, cancelQwenAuth, config2]);
|
|
422995
|
-
const handleCodingPlanSubmit = (0, import_react103.useCallback)(
|
|
422996
|
-
async (apiKey) => {
|
|
422997
|
-
try {
|
|
422998
|
-
setIsAuthenticating(true);
|
|
422999
|
-
setAuthError(null);
|
|
423000
|
-
const envKeyName = CODING_PLAN_ENV_KEY;
|
|
423001
|
-
const persistScope = getPersistScopeForModelSelection(settings);
|
|
423002
|
-
settings.setValue(persistScope, `env.${envKeyName}`, apiKey);
|
|
423003
|
-
process.env[envKeyName] = apiKey;
|
|
423004
|
-
const newConfigs = CODING_PLAN_TEMPLATE.map(
|
|
423005
|
-
(templateConfig) => ({
|
|
423006
|
-
...templateConfig,
|
|
423007
|
-
envKey: envKeyName
|
|
423008
|
-
})
|
|
423009
|
-
);
|
|
423010
|
-
const existingConfigs = settings.merged.modelProviders?.[AuthType2.USE_OPENAI] || [];
|
|
423011
|
-
const isDuplicate = /* @__PURE__ */ __name((config3) => existingConfigs.some(
|
|
423012
|
-
(existing) => existing.id === config3.id && existing.baseUrl === config3.baseUrl && existing.envKey === config3.envKey
|
|
423013
|
-
), "isDuplicate");
|
|
423014
|
-
const uniqueNewConfigs = newConfigs.filter(
|
|
423015
|
-
(config3) => !isDuplicate(config3)
|
|
423016
|
-
);
|
|
423017
|
-
const updatedConfigs = [...uniqueNewConfigs, ...existingConfigs];
|
|
423018
|
-
settings.setValue(
|
|
423019
|
-
persistScope,
|
|
423020
|
-
`modelProviders.${AuthType2.USE_OPENAI}`,
|
|
423021
|
-
updatedConfigs
|
|
423022
|
-
);
|
|
423023
|
-
settings.setValue(
|
|
423024
|
-
persistScope,
|
|
423025
|
-
"security.auth.selectedType",
|
|
423026
|
-
AuthType2.USE_OPENAI
|
|
423027
|
-
);
|
|
423028
|
-
if (updatedConfigs.length > 0 && updatedConfigs[0]?.id) {
|
|
423029
|
-
settings.setValue(persistScope, "model.name", updatedConfigs[0].id);
|
|
423030
|
-
}
|
|
423031
|
-
const updatedModelProviders = {
|
|
423032
|
-
...settings.merged.modelProviders,
|
|
423033
|
-
[AuthType2.USE_OPENAI]: updatedConfigs
|
|
423034
|
-
};
|
|
423035
|
-
config2.reloadModelProvidersConfig(updatedModelProviders);
|
|
423036
|
-
await config2.refreshAuth(AuthType2.USE_OPENAI);
|
|
423037
|
-
setAuthError(null);
|
|
423038
|
-
setAuthState("authenticated" /* Authenticated */);
|
|
423039
|
-
setIsAuthDialogOpen(false);
|
|
423040
|
-
setIsAuthenticating(false);
|
|
423041
|
-
onAuthChange?.();
|
|
423042
|
-
addItem(
|
|
423043
|
-
{
|
|
423044
|
-
type: "info" /* INFO */,
|
|
423045
|
-
text: t4(
|
|
423046
|
-
"Authenticated successfully with Coding Plan. API key is stored in settings.env."
|
|
423047
|
-
)
|
|
423048
|
-
},
|
|
423049
|
-
Date.now()
|
|
423050
|
-
);
|
|
423051
|
-
const authEvent = new AuthEvent(
|
|
423052
|
-
AuthType2.USE_OPENAI,
|
|
423053
|
-
"coding-plan",
|
|
423054
|
-
"success"
|
|
423055
|
-
);
|
|
423056
|
-
logAuth(config2, authEvent);
|
|
423057
|
-
} catch (error2) {
|
|
423058
|
-
handleAuthFailure(error2);
|
|
423059
|
-
}
|
|
423060
|
-
},
|
|
423061
|
-
[settings, config2, handleAuthFailure, addItem, onAuthChange]
|
|
423062
|
-
);
|
|
423063
422903
|
(0, import_react103.useEffect)(() => {
|
|
423064
422904
|
const defaultAuthType = process.env["QWEN_DEFAULT_AUTH_TYPE"];
|
|
423065
422905
|
if (defaultAuthType && ![
|
|
@@ -423096,7 +422936,6 @@ var useAuthCommand = /* @__PURE__ */ __name((settings, config2, addItem, onAuthC
|
|
|
423096
422936
|
pendingAuthType,
|
|
423097
422937
|
qwenAuthState,
|
|
423098
422938
|
handleAuthSelect,
|
|
423099
|
-
handleCodingPlanSubmit,
|
|
423100
422939
|
openAuthDialog,
|
|
423101
422940
|
cancelAuthentication
|
|
423102
422941
|
};
|
|
@@ -431018,7 +430857,6 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
431018
430857
|
pendingAuthType,
|
|
431019
430858
|
qwenAuthState,
|
|
431020
430859
|
handleAuthSelect,
|
|
431021
|
-
handleCodingPlanSubmit,
|
|
431022
430860
|
openAuthDialog,
|
|
431023
430861
|
cancelAuthentication
|
|
431024
430862
|
} = useAuthCommand(settings, config2, historyManager.addItem, refreshStatic);
|
|
@@ -431884,7 +431722,6 @@ ${migrationResult.failedFiles.map((f5) => ` \u2022 ${f5.file}: ${f5.error}`).jo
|
|
|
431884
431722
|
setAuthState,
|
|
431885
431723
|
onAuthError,
|
|
431886
431724
|
cancelAuthentication,
|
|
431887
|
-
handleCodingPlanSubmit,
|
|
431888
431725
|
handleEditorSelect,
|
|
431889
431726
|
exitEditorDialog,
|
|
431890
431727
|
closeSettingsDialog,
|
|
@@ -431929,7 +431766,6 @@ ${migrationResult.failedFiles.map((f5) => ` \u2022 ${f5.file}: ${f5.error}`).jo
|
|
|
431929
431766
|
setAuthState,
|
|
431930
431767
|
onAuthError,
|
|
431931
431768
|
cancelAuthentication,
|
|
431932
|
-
handleCodingPlanSubmit,
|
|
431933
431769
|
handleEditorSelect,
|
|
431934
431770
|
exitEditorDialog,
|
|
431935
431771
|
closeSettingsDialog,
|
|
@@ -434980,7 +434816,7 @@ var GeminiAgent = class {
|
|
|
434980
434816
|
name: APPROVAL_MODE_INFO[mode].name,
|
|
434981
434817
|
description: APPROVAL_MODE_INFO[mode].description
|
|
434982
434818
|
}));
|
|
434983
|
-
const version2 = "0.10.0-preview.
|
|
434819
|
+
const version2 = "0.10.0-preview.5";
|
|
434984
434820
|
return {
|
|
434985
434821
|
protocolVersion: PROTOCOL_VERSION,
|
|
434986
434822
|
agentInfo: {
|