@qwen-code/qwen-code 0.10.0-preview.5 → 0.10.0-preview.6
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 +679 -301
- package/locales/de.js +39 -0
- package/locales/en.js +46 -0
- package/locales/ja.js +38 -0
- package/locales/pt.js +39 -0
- package/locales/ru.js +38 -0
- package/locales/zh.js +45 -0
- package/package.json +2 -2
package/cli.js
CHANGED
|
@@ -71639,6 +71639,17 @@ var init_tools = __esm({
|
|
|
71639
71639
|
});
|
|
71640
71640
|
|
|
71641
71641
|
// packages/core/dist/src/tools/mcp-tool.js
|
|
71642
|
+
function wrapMcpCallToolResultAsParts(toolName, result) {
|
|
71643
|
+
const response = result.isError ? { error: result, content: result.content } : result;
|
|
71644
|
+
return [
|
|
71645
|
+
{
|
|
71646
|
+
functionResponse: {
|
|
71647
|
+
name: toolName,
|
|
71648
|
+
response
|
|
71649
|
+
}
|
|
71650
|
+
}
|
|
71651
|
+
];
|
|
71652
|
+
}
|
|
71642
71653
|
function transformTextBlock(block2) {
|
|
71643
71654
|
return { text: block2.text };
|
|
71644
71655
|
}
|
|
@@ -71756,8 +71767,10 @@ var init_mcp_tool = __esm({
|
|
|
71756
71767
|
displayName;
|
|
71757
71768
|
trust;
|
|
71758
71769
|
cliConfig;
|
|
71770
|
+
mcpClient;
|
|
71771
|
+
mcpTimeout;
|
|
71759
71772
|
static allowlist = /* @__PURE__ */ new Set();
|
|
71760
|
-
constructor(mcpTool, serverName, serverToolName, displayName, trust, params = {}, cliConfig) {
|
|
71773
|
+
constructor(mcpTool, serverName, serverToolName, displayName, trust, params = {}, cliConfig, mcpClient, mcpTimeout) {
|
|
71761
71774
|
super(params);
|
|
71762
71775
|
this.mcpTool = mcpTool;
|
|
71763
71776
|
this.serverName = serverName;
|
|
@@ -71765,6 +71778,8 @@ var init_mcp_tool = __esm({
|
|
|
71765
71778
|
this.displayName = displayName;
|
|
71766
71779
|
this.trust = trust;
|
|
71767
71780
|
this.cliConfig = cliConfig;
|
|
71781
|
+
this.mcpClient = mcpClient;
|
|
71782
|
+
this.mcpTimeout = mcpTimeout;
|
|
71768
71783
|
}
|
|
71769
71784
|
async shouldConfirmExecute(_abortSignal) {
|
|
71770
71785
|
const serverAllowListKey = this.serverName;
|
|
@@ -71808,7 +71823,63 @@ var init_mcp_tool = __esm({
|
|
|
71808
71823
|
}
|
|
71809
71824
|
return false;
|
|
71810
71825
|
}
|
|
71811
|
-
async execute(signal) {
|
|
71826
|
+
async execute(signal, updateOutput2) {
|
|
71827
|
+
if (this.mcpClient) {
|
|
71828
|
+
return this.executeWithDirectClient(signal, updateOutput2);
|
|
71829
|
+
}
|
|
71830
|
+
return this.executeWithCallableTool(signal);
|
|
71831
|
+
}
|
|
71832
|
+
/**
|
|
71833
|
+
* Execute using the raw MCP SDK Client, which supports progress
|
|
71834
|
+
* notifications via the onprogress callback. This enables real-time
|
|
71835
|
+
* streaming of progress updates to the user during long-running
|
|
71836
|
+
* MCP tool calls (e.g., browser automation).
|
|
71837
|
+
*/
|
|
71838
|
+
async executeWithDirectClient(signal, updateOutput2) {
|
|
71839
|
+
const callToolResult = await this.mcpClient.callTool({
|
|
71840
|
+
name: this.serverToolName,
|
|
71841
|
+
arguments: this.params
|
|
71842
|
+
}, void 0, {
|
|
71843
|
+
onprogress: /* @__PURE__ */ __name((progress) => {
|
|
71844
|
+
if (updateOutput2) {
|
|
71845
|
+
const progressData = {
|
|
71846
|
+
type: "mcp_tool_progress",
|
|
71847
|
+
progress: progress.progress,
|
|
71848
|
+
...progress.total != null && { total: progress.total },
|
|
71849
|
+
...progress.message != null && { message: progress.message }
|
|
71850
|
+
};
|
|
71851
|
+
updateOutput2(progressData);
|
|
71852
|
+
}
|
|
71853
|
+
}, "onprogress"),
|
|
71854
|
+
timeout: this.mcpTimeout,
|
|
71855
|
+
signal
|
|
71856
|
+
});
|
|
71857
|
+
const rawResponseParts = wrapMcpCallToolResultAsParts(this.serverToolName, callToolResult);
|
|
71858
|
+
if (this.isMCPToolError(rawResponseParts)) {
|
|
71859
|
+
const errorMessage = `MCP tool '${this.serverToolName}' reported tool error for function call: ${safeJsonStringify({
|
|
71860
|
+
name: this.serverToolName,
|
|
71861
|
+
args: this.params
|
|
71862
|
+
})} with response: ${safeJsonStringify(rawResponseParts)}`;
|
|
71863
|
+
return {
|
|
71864
|
+
llmContent: errorMessage,
|
|
71865
|
+
returnDisplay: `Error: MCP tool '${this.serverToolName}' reported an error.`,
|
|
71866
|
+
error: {
|
|
71867
|
+
message: errorMessage,
|
|
71868
|
+
type: ToolErrorType.MCP_TOOL_ERROR
|
|
71869
|
+
}
|
|
71870
|
+
};
|
|
71871
|
+
}
|
|
71872
|
+
const transformedParts = transformMcpContentToParts(rawResponseParts);
|
|
71873
|
+
return {
|
|
71874
|
+
llmContent: transformedParts,
|
|
71875
|
+
returnDisplay: getStringifiedResultForDisplay(rawResponseParts)
|
|
71876
|
+
};
|
|
71877
|
+
}
|
|
71878
|
+
/**
|
|
71879
|
+
* Fallback: execute using the @google/genai CallableTool wrapper.
|
|
71880
|
+
* This path does NOT support progress notifications.
|
|
71881
|
+
*/
|
|
71882
|
+
async executeWithCallableTool(signal) {
|
|
71812
71883
|
const functionCalls = [
|
|
71813
71884
|
{
|
|
71814
71885
|
name: this.serverToolName,
|
|
@@ -71871,7 +71942,9 @@ var init_mcp_tool = __esm({
|
|
|
71871
71942
|
parameterSchema;
|
|
71872
71943
|
trust;
|
|
71873
71944
|
cliConfig;
|
|
71874
|
-
|
|
71945
|
+
mcpClient;
|
|
71946
|
+
mcpTimeout;
|
|
71947
|
+
constructor(mcpTool, serverName, serverToolName, description, parameterSchema, trust, nameOverride, cliConfig, mcpClient, mcpTimeout) {
|
|
71875
71948
|
super(
|
|
71876
71949
|
nameOverride ?? generateValidName(`mcp__${serverName}__${serverToolName}`),
|
|
71877
71950
|
`${serverToolName} (${serverName} MCP Server)`,
|
|
@@ -71880,7 +71953,7 @@ var init_mcp_tool = __esm({
|
|
|
71880
71953
|
parameterSchema,
|
|
71881
71954
|
true,
|
|
71882
71955
|
// isOutputMarkdown
|
|
71883
|
-
|
|
71956
|
+
true
|
|
71884
71957
|
);
|
|
71885
71958
|
this.mcpTool = mcpTool;
|
|
71886
71959
|
this.serverName = serverName;
|
|
@@ -71888,14 +71961,17 @@ var init_mcp_tool = __esm({
|
|
|
71888
71961
|
this.parameterSchema = parameterSchema;
|
|
71889
71962
|
this.trust = trust;
|
|
71890
71963
|
this.cliConfig = cliConfig;
|
|
71964
|
+
this.mcpClient = mcpClient;
|
|
71965
|
+
this.mcpTimeout = mcpTimeout;
|
|
71891
71966
|
}
|
|
71892
71967
|
asFullyQualifiedTool() {
|
|
71893
|
-
return new _DiscoveredMCPTool(this.mcpTool, this.serverName, this.serverToolName, this.description, this.parameterSchema, this.trust, generateValidName(`mcp__${this.serverName}__${this.serverToolName}`), this.cliConfig);
|
|
71968
|
+
return new _DiscoveredMCPTool(this.mcpTool, this.serverName, this.serverToolName, this.description, this.parameterSchema, this.trust, generateValidName(`mcp__${this.serverName}__${this.serverToolName}`), this.cliConfig, this.mcpClient, this.mcpTimeout);
|
|
71894
71969
|
}
|
|
71895
71970
|
createInvocation(params) {
|
|
71896
|
-
return new DiscoveredMCPToolInvocation(this.mcpTool, this.serverName, this.serverToolName, this.displayName, this.trust, params, this.cliConfig);
|
|
71971
|
+
return new DiscoveredMCPToolInvocation(this.mcpTool, this.serverName, this.serverToolName, this.displayName, this.trust, params, this.cliConfig, this.mcpClient, this.mcpTimeout);
|
|
71897
71972
|
}
|
|
71898
71973
|
};
|
|
71974
|
+
__name(wrapMcpCallToolResultAsParts, "wrapMcpCallToolResultAsParts");
|
|
71899
71975
|
__name(transformTextBlock, "transformTextBlock");
|
|
71900
71976
|
__name(transformImageAudioBlock, "transformImageAudioBlock");
|
|
71901
71977
|
__name(transformResourceBlock, "transformResourceBlock");
|
|
@@ -132808,11 +132884,16 @@ var init_modelRegistry = __esm({
|
|
|
132808
132884
|
}
|
|
132809
132885
|
}
|
|
132810
132886
|
/**
|
|
132811
|
-
* Register models for an authType
|
|
132887
|
+
* Register models for an authType.
|
|
132888
|
+
* If multiple models have the same id, the first one takes precedence.
|
|
132812
132889
|
*/
|
|
132813
132890
|
registerAuthTypeModels(authType, models) {
|
|
132814
132891
|
const modelMap = /* @__PURE__ */ new Map();
|
|
132815
132892
|
for (const config2 of models) {
|
|
132893
|
+
if (modelMap.has(config2.id)) {
|
|
132894
|
+
debugLogger5.warn(`Duplicate model id "${config2.id}" for authType "${authType}". Using the first registered config.`);
|
|
132895
|
+
continue;
|
|
132896
|
+
}
|
|
132816
132897
|
const resolved = this.resolveModelConfig(config2, authType);
|
|
132817
132898
|
modelMap.set(config2.id, resolved);
|
|
132818
132899
|
}
|
|
@@ -132886,6 +132967,31 @@ var init_modelRegistry = __esm({
|
|
|
132886
132967
|
throw new Error(`Model config in authType '${authType}' missing required field: id`);
|
|
132887
132968
|
}
|
|
132888
132969
|
}
|
|
132970
|
+
/**
|
|
132971
|
+
* Reload models from updated configuration.
|
|
132972
|
+
* Clears existing user-configured models and re-registers from new config.
|
|
132973
|
+
* Preserves hard-coded qwen-oauth models.
|
|
132974
|
+
*/
|
|
132975
|
+
reloadModels(modelProvidersConfig) {
|
|
132976
|
+
for (const authType of this.modelsByAuthType.keys()) {
|
|
132977
|
+
if (authType !== AuthType2.QWEN_OAUTH) {
|
|
132978
|
+
this.modelsByAuthType.delete(authType);
|
|
132979
|
+
}
|
|
132980
|
+
}
|
|
132981
|
+
if (modelProvidersConfig) {
|
|
132982
|
+
for (const [rawKey, models] of Object.entries(modelProvidersConfig)) {
|
|
132983
|
+
const authType = validateAuthTypeKey(rawKey);
|
|
132984
|
+
if (!authType) {
|
|
132985
|
+
debugLogger5.warn(`Invalid authType key "${rawKey}" in modelProviders config. Expected one of: ${Object.values(AuthType2).join(", ")}. Skipping.`);
|
|
132986
|
+
continue;
|
|
132987
|
+
}
|
|
132988
|
+
if (authType === AuthType2.QWEN_OAUTH) {
|
|
132989
|
+
continue;
|
|
132990
|
+
}
|
|
132991
|
+
this.registerAuthTypeModels(authType, models);
|
|
132992
|
+
}
|
|
132993
|
+
}
|
|
132994
|
+
}
|
|
132889
132995
|
};
|
|
132890
132996
|
}
|
|
132891
132997
|
});
|
|
@@ -133698,6 +133804,15 @@ var init_modelsConfig = __esm({
|
|
|
133698
133804
|
this.activeRuntimeModelSnapshotId = void 0;
|
|
133699
133805
|
}
|
|
133700
133806
|
}
|
|
133807
|
+
/**
|
|
133808
|
+
* Reload model providers configuration at runtime.
|
|
133809
|
+
* This enables hot-reloading of modelProviders settings without restarting the CLI.
|
|
133810
|
+
*
|
|
133811
|
+
* @param modelProvidersConfig - The updated model providers configuration
|
|
133812
|
+
*/
|
|
133813
|
+
reloadModelProvidersConfig(modelProvidersConfig) {
|
|
133814
|
+
this.modelRegistry.reloadModels(modelProvidersConfig);
|
|
133815
|
+
}
|
|
133701
133816
|
};
|
|
133702
133817
|
}
|
|
133703
133818
|
});
|
|
@@ -156312,7 +156427,7 @@ __export(geminiContentGenerator_exports, {
|
|
|
156312
156427
|
createGeminiContentGenerator: () => createGeminiContentGenerator
|
|
156313
156428
|
});
|
|
156314
156429
|
function createGeminiContentGenerator(config2, gcConfig) {
|
|
156315
|
-
const version2 = "0.10.0-preview.
|
|
156430
|
+
const version2 = "0.10.0-preview.6";
|
|
156316
156431
|
const userAgent2 = config2.userAgent || `QwenCode/${version2} (${process.platform}; ${process.arch})`;
|
|
156317
156432
|
const baseHeaders = {
|
|
156318
156433
|
"User-Agent": userAgent2
|
|
@@ -210519,13 +210634,26 @@ async function discoverTools(mcpServerName, mcpServerConfig, mcpClient, cliConfi
|
|
|
210519
210634
|
if (!Array.isArray(tool.functionDeclarations)) {
|
|
210520
210635
|
return [];
|
|
210521
210636
|
}
|
|
210637
|
+
const mcpTimeout = mcpServerConfig.timeout ?? MCP_DEFAULT_TIMEOUT_MSEC;
|
|
210522
210638
|
const discoveredTools = [];
|
|
210523
210639
|
for (const funcDecl of tool.functionDeclarations) {
|
|
210524
210640
|
try {
|
|
210525
210641
|
if (!isEnabled(funcDecl, mcpServerName, mcpServerConfig)) {
|
|
210526
210642
|
continue;
|
|
210527
210643
|
}
|
|
210528
|
-
discoveredTools.push(new DiscoveredMCPTool(
|
|
210644
|
+
discoveredTools.push(new DiscoveredMCPTool(
|
|
210645
|
+
mcpCallableTool,
|
|
210646
|
+
mcpServerName,
|
|
210647
|
+
funcDecl.name,
|
|
210648
|
+
funcDecl.description ?? "",
|
|
210649
|
+
funcDecl.parametersJsonSchema ?? { type: "object", properties: {} },
|
|
210650
|
+
mcpServerConfig.trust,
|
|
210651
|
+
void 0,
|
|
210652
|
+
cliConfig,
|
|
210653
|
+
mcpClient,
|
|
210654
|
+
// raw MCP Client for direct callTool with progress
|
|
210655
|
+
mcpTimeout
|
|
210656
|
+
));
|
|
210529
210657
|
} catch (error2) {
|
|
210530
210658
|
debugLogger49.error(`Error discovering tool: '${funcDecl.name}' from MCP server '${mcpServerName}': ${error2.message}`);
|
|
210531
210659
|
}
|
|
@@ -242415,6 +242543,16 @@ var init_config3 = __esm({
|
|
|
242415
242543
|
updateCredentials(credentials, settingsGenerationConfig) {
|
|
242416
242544
|
this.modelsConfig.updateCredentials(credentials, settingsGenerationConfig);
|
|
242417
242545
|
}
|
|
242546
|
+
/**
|
|
242547
|
+
* Reload model providers configuration at runtime.
|
|
242548
|
+
* This enables hot-reloading of modelProviders settings without restarting the CLI.
|
|
242549
|
+
* Should be called before refreshAuth when settings.json has been updated.
|
|
242550
|
+
*
|
|
242551
|
+
* @param modelProvidersConfig - The updated model providers configuration
|
|
242552
|
+
*/
|
|
242553
|
+
reloadModelProvidersConfig(modelProvidersConfig) {
|
|
242554
|
+
this.modelsConfig.reloadModelProvidersConfig(modelProvidersConfig);
|
|
242555
|
+
}
|
|
242418
242556
|
/**
|
|
242419
242557
|
* Refresh authentication and rebuild ContentGenerator.
|
|
242420
242558
|
*/
|
|
@@ -281620,7 +281758,7 @@ var require_backend = __commonJS({
|
|
|
281620
281758
|
) : symbolOrNumber;
|
|
281621
281759
|
}
|
|
281622
281760
|
__name(getTypeSymbol, "getTypeSymbol");
|
|
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,
|
|
281761
|
+
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, Fragment16 = _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;
|
|
281624
281762
|
function resolveFiberType(type) {
|
|
281625
281763
|
var typeSymbol = getTypeSymbol(type);
|
|
281626
281764
|
switch (typeSymbol) {
|
|
@@ -281666,7 +281804,7 @@ var require_backend = __commonJS({
|
|
|
281666
281804
|
case HostPortal:
|
|
281667
281805
|
case HostText:
|
|
281668
281806
|
return null;
|
|
281669
|
-
case
|
|
281807
|
+
case Fragment16:
|
|
281670
281808
|
return "Fragment";
|
|
281671
281809
|
case LazyComponent:
|
|
281672
281810
|
return "Lazy";
|
|
@@ -281732,7 +281870,7 @@ var require_backend = __commonJS({
|
|
|
281732
281870
|
function attach(hook2, rendererID, renderer2, global2) {
|
|
281733
281871
|
var version2 = renderer2.reconcilerVersion || renderer2.version;
|
|
281734
281872
|
var _getInternalReactCons = getInternalReactConstants(version2), getDisplayNameForFiber = _getInternalReactCons.getDisplayNameForFiber, getTypeSymbol = _getInternalReactCons.getTypeSymbol, ReactPriorityLevels = _getInternalReactCons.ReactPriorityLevels, ReactTypeOfWork = _getInternalReactCons.ReactTypeOfWork, StrictModeBits = _getInternalReactCons.StrictModeBits;
|
|
281735
|
-
var CacheComponent = ReactTypeOfWork.CacheComponent, ClassComponent = ReactTypeOfWork.ClassComponent, ContextConsumer = ReactTypeOfWork.ContextConsumer, DehydratedSuspenseComponent = ReactTypeOfWork.DehydratedSuspenseComponent, ForwardRef = ReactTypeOfWork.ForwardRef,
|
|
281873
|
+
var CacheComponent = ReactTypeOfWork.CacheComponent, ClassComponent = ReactTypeOfWork.ClassComponent, ContextConsumer = ReactTypeOfWork.ContextConsumer, DehydratedSuspenseComponent = ReactTypeOfWork.DehydratedSuspenseComponent, ForwardRef = ReactTypeOfWork.ForwardRef, Fragment16 = 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;
|
|
281736
281874
|
var ImmediatePriority = ReactPriorityLevels.ImmediatePriority, UserBlockingPriority = ReactPriorityLevels.UserBlockingPriority, NormalPriority = ReactPriorityLevels.NormalPriority, LowPriority = ReactPriorityLevels.LowPriority, IdlePriority = ReactPriorityLevels.IdlePriority, NoPriority = ReactPriorityLevels.NoPriority;
|
|
281737
281875
|
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;
|
|
281738
281876
|
var supportsTogglingError = typeof setErrorHandler === "function" && typeof scheduleUpdate === "function";
|
|
@@ -281947,7 +282085,7 @@ var require_backend = __commonJS({
|
|
|
281947
282085
|
return true;
|
|
281948
282086
|
case HostRoot:
|
|
281949
282087
|
return false;
|
|
281950
|
-
case
|
|
282088
|
+
case Fragment16:
|
|
281951
282089
|
return key === null;
|
|
281952
282090
|
default:
|
|
281953
282091
|
var typeSymbol = getTypeSymbol(type);
|
|
@@ -282022,7 +282160,7 @@ var require_backend = __commonJS({
|
|
|
282022
282160
|
return ElementTypeHostComponent;
|
|
282023
282161
|
case HostPortal:
|
|
282024
282162
|
case HostText:
|
|
282025
|
-
case
|
|
282163
|
+
case Fragment16:
|
|
282026
282164
|
return ElementTypeOtherOrUnknown;
|
|
282027
282165
|
case MemoComponent:
|
|
282028
282166
|
case SimpleMemoComponent:
|
|
@@ -296912,6 +297050,9 @@ var init_de = __esm({
|
|
|
296912
297050
|
"(Use Enter to Set Auth)": "(Enter zum Festlegen der Authentifizierung)",
|
|
296913
297051
|
"Terms of Services and Privacy Notice for Qwen Code": "Nutzungsbedingungen und Datenschutzhinweis f\xFCr Qwen Code",
|
|
296914
297052
|
"Qwen OAuth": "Qwen OAuth",
|
|
297053
|
+
"Login with QwenChat account to use daily free quota.": "Melden Sie sich mit Ihrem QwenChat-Konto an, um das t\xE4gliche kostenlose Kontingent zu nutzen.",
|
|
297054
|
+
"API-KEY": "API-KEY",
|
|
297055
|
+
"Use coding plan credentials or your own api-keys/providers.": "Verwenden Sie Coding Plan-Anmeldedaten oder Ihre eigenen API-Schl\xFCssel/Anbieter.",
|
|
296915
297056
|
OpenAI: "OpenAI",
|
|
296916
297057
|
"Failed to login. Message: {{message}}": "Anmeldung fehlgeschlagen. Meldung: {{message}}",
|
|
296917
297058
|
"Authentication is enforced to be {{enforcedType}}, but you are currently using {{currentType}}.": "Authentifizierung ist auf {{enforcedType}} festgelegt, aber Sie verwenden derzeit {{currentType}}.",
|
|
@@ -297256,7 +297397,28 @@ var init_de = __esm({
|
|
|
297256
297397
|
"Opening extensions page in your browser: {{url}}": "Erweiterungsseite wird im Browser ge\xF6ffnet: {{url}}",
|
|
297257
297398
|
"Failed to open browser. Check out the extensions gallery at {{url}}": "Browser konnte nicht ge\xF6ffnet werden. Besuchen Sie die Erweiterungsgalerie unter {{url}}",
|
|
297258
297399
|
"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.",
|
|
297259
|
-
"You can switch permission mode quickly with Tab or /approval-mode.": "Sie k\xF6nnen den Berechtigungsmodus schnell mit Tab oder /approval-mode wechseln."
|
|
297400
|
+
"You can switch permission mode quickly with Tab or /approval-mode.": "Sie k\xF6nnen den Berechtigungsmodus schnell mit Tab oder /approval-mode wechseln.",
|
|
297401
|
+
// ============================================================================
|
|
297402
|
+
// Custom API-KEY Configuration
|
|
297403
|
+
// ============================================================================
|
|
297404
|
+
"For advanced users who want to configure models manually.": "F\xFCr fortgeschrittene Benutzer, die Modelle manuell konfigurieren m\xF6chten.",
|
|
297405
|
+
"Please configure your models in settings.json:": "Bitte konfigurieren Sie Ihre Modelle in settings.json:",
|
|
297406
|
+
"Set API key via environment variable (e.g., OPENAI_API_KEY)": "API-Schl\xFCssel \xFCber Umgebungsvariable setzen (z.B. OPENAI_API_KEY)",
|
|
297407
|
+
"Add model configuration to modelProviders['openai'] (or other auth types)": "Modellkonfiguration zu modelProviders['openai'] (oder anderen Authentifizierungstypen) hinzuf\xFCgen",
|
|
297408
|
+
"Each provider needs: id, envKey (required), plus optional baseUrl, generationConfig": "Jeder Anbieter ben\xF6tigt: id, envKey (erforderlich), plus optionale baseUrl, generationConfig",
|
|
297409
|
+
"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",
|
|
297410
|
+
"Supported auth types: openai, anthropic, gemini, vertex-ai, etc.": "Unterst\xFCtzte Authentifizierungstypen: openai, anthropic, gemini, vertex-ai, usw.",
|
|
297411
|
+
// ============================================================================
|
|
297412
|
+
// Auth Dialog - View Titles and Labels
|
|
297413
|
+
// ============================================================================
|
|
297414
|
+
"Coding Plan": "Coding Plan",
|
|
297415
|
+
"Paste your api key of Bailian Coding Plan and you're all set!": "F\xFCgen Sie Ihren Bailian Coding Plan API-Schl\xFCssel ein und Sie sind bereit!",
|
|
297416
|
+
Custom: "Benutzerdefiniert",
|
|
297417
|
+
"More instructions about configuring `modelProviders` manually.": "Weitere Anweisungen zur manuellen Konfiguration von `modelProviders`.",
|
|
297418
|
+
"Select API-KEY configuration mode:": "API-KEY-Konfigurationsmodus ausw\xE4hlen:",
|
|
297419
|
+
"(Press Escape to go back)": "(Escape dr\xFCcken zum Zur\xFCckgehen)",
|
|
297420
|
+
"(Press Enter to submit, Escape to cancel)": "(Enter zum Absenden, Escape zum Abbrechen)",
|
|
297421
|
+
"More instructions please check:": "Weitere Anweisungen finden Sie unter:"
|
|
297260
297422
|
};
|
|
297261
297423
|
}
|
|
297262
297424
|
});
|
|
@@ -297947,6 +298109,9 @@ var init_en3 = __esm({
|
|
|
297947
298109
|
"(Use Enter to Set Auth)": "(Use Enter to Set Auth)",
|
|
297948
298110
|
"Terms of Services and Privacy Notice for Qwen Code": "Terms of Services and Privacy Notice for Qwen Code",
|
|
297949
298111
|
"Qwen OAuth": "Qwen OAuth",
|
|
298112
|
+
"Login with QwenChat account to use daily free quota.": "Login with QwenChat account to use daily free quota.",
|
|
298113
|
+
"API-KEY": "API-KEY",
|
|
298114
|
+
"Use coding plan credentials or your own api-keys/providers.": "Use coding plan credentials or your own api-keys/providers.",
|
|
297950
298115
|
OpenAI: "OpenAI",
|
|
297951
298116
|
"Failed to login. Message: {{message}}": "Failed to login. Message: {{message}}",
|
|
297952
298117
|
"Authentication is enforced to be {{enforcedType}}, but you are currently using {{currentType}}.": "Authentication is enforced to be {{enforcedType}}, but you are currently using {{currentType}}.",
|
|
@@ -298294,7 +298459,34 @@ var init_en3 = __esm({
|
|
|
298294
298459
|
"Would open extensions page in your browser: {{url}} (skipped in test environment)": "Would open extensions page in your browser: {{url}} (skipped in test environment)",
|
|
298295
298460
|
"View available extensions at {{url}}": "View available extensions at {{url}}",
|
|
298296
298461
|
"Opening extensions page in your browser: {{url}}": "Opening extensions page in your browser: {{url}}",
|
|
298297
|
-
"Failed to open browser. Check out the extensions gallery at {{url}}": "Failed to open browser. Check out the extensions gallery at {{url}}"
|
|
298462
|
+
"Failed to open browser. Check out the extensions gallery at {{url}}": "Failed to open browser. Check out the extensions gallery at {{url}}",
|
|
298463
|
+
// ============================================================================
|
|
298464
|
+
// Coding Plan Authentication
|
|
298465
|
+
// ============================================================================
|
|
298466
|
+
"Please enter your API key:": "Please enter your API key:",
|
|
298467
|
+
"API key cannot be empty.": "API key cannot be empty.",
|
|
298468
|
+
"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.",
|
|
298469
|
+
// ============================================================================
|
|
298470
|
+
// Custom API-KEY Configuration
|
|
298471
|
+
// ============================================================================
|
|
298472
|
+
"For advanced users who want to configure models manually.": "For advanced users who want to configure models manually.",
|
|
298473
|
+
"Please configure your models in settings.json:": "Please configure your models in settings.json:",
|
|
298474
|
+
"Set API key via environment variable (e.g., OPENAI_API_KEY)": "Set API key via environment variable (e.g., OPENAI_API_KEY)",
|
|
298475
|
+
"Add model configuration to modelProviders['openai'] (or other auth types)": "Add model configuration to modelProviders['openai'] (or other auth types)",
|
|
298476
|
+
"Each provider needs: id, envKey (required), plus optional baseUrl, generationConfig": "Each provider needs: id, envKey (required), plus optional baseUrl, generationConfig",
|
|
298477
|
+
"Use /model command to select your preferred model from the configured list": "Use /model command to select your preferred model from the configured list",
|
|
298478
|
+
"Supported auth types: openai, anthropic, gemini, vertex-ai, etc.": "Supported auth types: openai, anthropic, gemini, vertex-ai, etc.",
|
|
298479
|
+
"More instructions please check:": "More instructions please check:",
|
|
298480
|
+
// ============================================================================
|
|
298481
|
+
// Auth Dialog - View Titles and Labels
|
|
298482
|
+
// ============================================================================
|
|
298483
|
+
"Coding Plan": "Coding Plan",
|
|
298484
|
+
"Paste your api key of Bailian Coding Plan and you're all set!": "Paste your api key of Bailian Coding Plan and you're all set!",
|
|
298485
|
+
Custom: "Custom",
|
|
298486
|
+
"More instructions about configuring `modelProviders` manually.": "More instructions about configuring `modelProviders` manually.",
|
|
298487
|
+
"Select API-KEY configuration mode:": "Select API-KEY configuration mode:",
|
|
298488
|
+
"(Press Escape to go back)": "(Press Escape to go back)",
|
|
298489
|
+
"(Press Enter to submit, Escape to cancel)": "(Press Enter to submit, Escape to cancel)"
|
|
298298
298490
|
};
|
|
298299
298491
|
}
|
|
298300
298492
|
});
|
|
@@ -298805,6 +298997,9 @@ var init_ja = __esm({
|
|
|
298805
298997
|
"(Use Enter to Set Auth)": "(Enter \u3067\u8A8D\u8A3C\u3092\u8A2D\u5B9A)",
|
|
298806
298998
|
"Terms of Services and Privacy Notice for Qwen Code": "Qwen Code \u306E\u5229\u7528\u898F\u7D04\u3068\u30D7\u30E9\u30A4\u30D0\u30B7\u30FC\u901A\u77E5",
|
|
298807
298999
|
"Qwen OAuth": "Qwen OAuth",
|
|
299000
|
+
"Login with QwenChat account to use daily free quota.": "QwenChat\u30A2\u30AB\u30A6\u30F3\u30C8\u3067\u30ED\u30B0\u30A4\u30F3\u3057\u3066\u3001\u6BCE\u65E5\u306E\u7121\u6599\u30AF\u30A9\u30FC\u30BF\u3092\u3054\u5229\u7528\u304F\u3060\u3055\u3044\u3002",
|
|
299001
|
+
"API-KEY": "API-KEY",
|
|
299002
|
+
"Use coding plan credentials or your own api-keys/providers.": "Coding Plan\u306E\u8A8D\u8A3C\u60C5\u5831\u307E\u305F\u306F\u3054\u81EA\u8EAB\u306EAPI\u30AD\u30FC/\u30D7\u30ED\u30D0\u30A4\u30C0\u30FC\u3092\u3054\u5229\u7528\u304F\u3060\u3055\u3044\u3002",
|
|
298808
299003
|
OpenAI: "OpenAI",
|
|
298809
299004
|
"Failed to login. Message: {{message}}": "\u30ED\u30B0\u30A4\u30F3\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002\u30E1\u30C3\u30BB\u30FC\u30B8: {{message}}",
|
|
298810
299005
|
"Authentication is enforced to be {{enforcedType}}, but you are currently using {{currentType}}.": "\u8A8D\u8A3C\u306F {{enforcedType}} \u306B\u5F37\u5236\u3055\u308C\u3066\u3044\u307E\u3059\u304C\u3001\u73FE\u5728 {{currentType}} \u3092\u4F7F\u7528\u3057\u3066\u3044\u307E\u3059",
|
|
@@ -298976,7 +299171,28 @@ var init_ja = __esm({
|
|
|
298976
299171
|
"\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...",
|
|
298977
299172
|
"\u30B3\u30FC\u30C9\u304C\u58CA\u308C\u305F?\u53E9\u3051\u3070\u6CBB\u308B\u3055",
|
|
298978
299173
|
"USB\u306E\u5DEE\u3057\u8FBC\u307F\u306B\u6311\u6226\u4E2D..."
|
|
298979
|
-
]
|
|
299174
|
+
],
|
|
299175
|
+
// ============================================================================
|
|
299176
|
+
// Custom API-KEY Configuration
|
|
299177
|
+
// ============================================================================
|
|
299178
|
+
"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",
|
|
299179
|
+
"Please configure your models in settings.json:": "settings.json \u3067\u30E2\u30C7\u30EB\u3092\u8A2D\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044\uFF1A",
|
|
299180
|
+
"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",
|
|
299181
|
+
"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",
|
|
299182
|
+
"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",
|
|
299183
|
+
"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",
|
|
299184
|
+
"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",
|
|
299185
|
+
// ============================================================================
|
|
299186
|
+
// Auth Dialog - View Titles and Labels
|
|
299187
|
+
// ============================================================================
|
|
299188
|
+
"Coding Plan": "Coding Plan",
|
|
299189
|
+
"Paste your api key of Bailian Coding Plan and you're all set!": "Bailian Coding Plan\u306EAPI\u30AD\u30FC\u3092\u8CBC\u308A\u4ED8\u3051\u308B\u3060\u3051\u3067\u6E96\u5099\u5B8C\u4E86\u3067\u3059\uFF01",
|
|
299190
|
+
Custom: "\u30AB\u30B9\u30BF\u30E0",
|
|
299191
|
+
"More instructions about configuring `modelProviders` manually.": "`modelProviders`\u3092\u624B\u52D5\u3067\u8A2D\u5B9A\u3059\u308B\u65B9\u6CD5\u306E\u8A73\u7D30\u306F\u3053\u3061\u3089\u3002",
|
|
299192
|
+
"Select API-KEY configuration mode:": "API-KEY\u8A2D\u5B9A\u30E2\u30FC\u30C9\u3092\u9078\u629E\u3057\u3066\u304F\u3060\u3055\u3044\uFF1A",
|
|
299193
|
+
"(Press Escape to go back)": "(Escape\u30AD\u30FC\u3067\u623B\u308B)",
|
|
299194
|
+
"(Press Enter to submit, Escape to cancel)": "(Enter\u3067\u9001\u4FE1\u3001Escape\u3067\u30AD\u30E3\u30F3\u30BB\u30EB)",
|
|
299195
|
+
"More instructions please check:": "\u8A73\u7D30\u306A\u624B\u9806\u306F\u3053\u3061\u3089\u3092\u3054\u78BA\u8A8D\u304F\u3060\u3055\u3044\uFF1A"
|
|
298980
299196
|
};
|
|
298981
299197
|
}
|
|
298982
299198
|
});
|
|
@@ -299661,6 +299877,9 @@ var init_pt = __esm({
|
|
|
299661
299877
|
"(Use Enter to Set Auth)": "(Use Enter para Definir Autentica\xE7\xE3o)",
|
|
299662
299878
|
"Terms of Services and Privacy Notice for Qwen Code": "Termos de Servi\xE7o e Aviso de Privacidade do Qwen Code",
|
|
299663
299879
|
"Qwen OAuth": "Qwen OAuth",
|
|
299880
|
+
"Login with QwenChat account to use daily free quota.": "Fa\xE7a login com sua conta QwenChat para usar a cota gratuita di\xE1ria.",
|
|
299881
|
+
"API-KEY": "API-KEY",
|
|
299882
|
+
"Use coding plan credentials or your own api-keys/providers.": "Use credenciais do Coding Plan ou suas pr\xF3prias chaves API/provedores.",
|
|
299664
299883
|
OpenAI: "OpenAI",
|
|
299665
299884
|
"Failed to login. Message: {{message}}": "Falha ao fazer login. Mensagem: {{message}}",
|
|
299666
299885
|
"Authentication is enforced to be {{enforcedType}}, but you are currently using {{currentType}}.": "A autentica\xE7\xE3o \xE9 for\xE7ada para {{enforcedType}}, mas voc\xEA est\xE1 usando {{currentType}} no momento.",
|
|
@@ -300004,7 +300223,28 @@ var init_pt = __esm({
|
|
|
300004
300223
|
"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)",
|
|
300005
300224
|
"View available extensions at {{url}}": "Ver extens\xF5es dispon\xEDveis em {{url}}",
|
|
300006
300225
|
"Opening extensions page in your browser: {{url}}": "Abrindo p\xE1gina de extens\xF5es no seu navegador: {{url}}",
|
|
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}}"
|
|
300226
|
+
"Failed to open browser. Check out the extensions gallery at {{url}}": "Falha ao abrir o navegador. Confira a galeria de extens\xF5es em {{url}}",
|
|
300227
|
+
// ============================================================================
|
|
300228
|
+
// Custom API-KEY Configuration
|
|
300229
|
+
// ============================================================================
|
|
300230
|
+
"For advanced users who want to configure models manually.": "Para usu\xE1rios avan\xE7ados que desejam configurar modelos manualmente.",
|
|
300231
|
+
"Please configure your models in settings.json:": "Por favor, configure seus modelos em settings.json:",
|
|
300232
|
+
"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)",
|
|
300233
|
+
"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)",
|
|
300234
|
+
"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",
|
|
300235
|
+
"Use /model command to select your preferred model from the configured list": "Use o comando /model para selecionar seu modelo preferido da lista configurada",
|
|
300236
|
+
"Supported auth types: openai, anthropic, gemini, vertex-ai, etc.": "Tipos de autentica\xE7\xE3o suportados: openai, anthropic, gemini, vertex-ai, etc.",
|
|
300237
|
+
// ============================================================================
|
|
300238
|
+
// Auth Dialog - View Titles and Labels
|
|
300239
|
+
// ============================================================================
|
|
300240
|
+
"Coding Plan": "Coding Plan",
|
|
300241
|
+
"Paste your api key of Bailian Coding Plan and you're all set!": "Cole sua chave de API do Bailian Coding Plan e pronto!",
|
|
300242
|
+
Custom: "Personalizado",
|
|
300243
|
+
"More instructions about configuring `modelProviders` manually.": "Mais instru\xE7\xF5es sobre como configurar `modelProviders` manualmente.",
|
|
300244
|
+
"Select API-KEY configuration mode:": "Selecione o modo de configura\xE7\xE3o da API-KEY:",
|
|
300245
|
+
"(Press Escape to go back)": "(Pressione Escape para voltar)",
|
|
300246
|
+
"(Press Enter to submit, Escape to cancel)": "(Pressione Enter para enviar, Escape para cancelar)",
|
|
300247
|
+
"More instructions please check:": "Mais instru\xE7\xF5es, consulte:"
|
|
300008
300248
|
};
|
|
300009
300249
|
}
|
|
300010
300250
|
});
|
|
@@ -300695,6 +300935,9 @@ var init_ru = __esm({
|
|
|
300695
300935
|
"(Use Enter to Set Auth)": "(Enter \u0434\u043B\u044F \u0443\u0441\u0442\u0430\u043D\u043E\u0432\u043A\u0438 \u0430\u0432\u0442\u043E\u0440\u0438\u0437\u0430\u0446\u0438\u0438)",
|
|
300696
300936
|
"Terms of Services and Privacy Notice for Qwen Code": "\u0423\u0441\u043B\u043E\u0432\u0438\u044F \u043E\u0431\u0441\u043B\u0443\u0436\u0438\u0432\u0430\u043D\u0438\u044F \u0438 \u0443\u0432\u0435\u0434\u043E\u043C\u043B\u0435\u043D\u0438\u0435 \u043E \u043A\u043E\u043D\u0444\u0438\u0434\u0435\u043D\u0446\u0438\u0430\u043B\u044C\u043D\u043E\u0441\u0442\u0438 \u0434\u043B\u044F Qwen Code",
|
|
300697
300937
|
"Qwen OAuth": "Qwen OAuth",
|
|
300938
|
+
"Login with QwenChat account to use daily free quota.": "\u0412\u043E\u0439\u0434\u0438\u0442\u0435 \u0441 \u043F\u043E\u043C\u043E\u0449\u044C\u044E \u0430\u043A\u043A\u0430\u0443\u043D\u0442\u0430 QwenChat, \u0447\u0442\u043E\u0431\u044B \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u0435\u0436\u0435\u0434\u043D\u0435\u0432\u043D\u0443\u044E \u0431\u0435\u0441\u043F\u043B\u0430\u0442\u043D\u0443\u044E \u043A\u0432\u043E\u0442\u0443.",
|
|
300939
|
+
"API-KEY": "API-KEY",
|
|
300940
|
+
"Use coding plan credentials or your own api-keys/providers.": "\u0418\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0439\u0442\u0435 \u0443\u0447\u0435\u0442\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435 Coding Plan \u0438\u043B\u0438 \u0441\u0432\u043E\u0438 \u0441\u043E\u0431\u0441\u0442\u0432\u0435\u043D\u043D\u044B\u0435 API-\u043A\u043B\u044E\u0447\u0438/\u043F\u0440\u043E\u0432\u0430\u0439\u0434\u0435\u0440\u044B.",
|
|
300698
300941
|
OpenAI: "OpenAI",
|
|
300699
300942
|
"Failed to login. Message: {{message}}": "\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0432\u043E\u0439\u0442\u0438. \u0421\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435: {{message}}",
|
|
300700
300943
|
"Authentication is enforced to be {{enforcedType}}, but you are currently using {{currentType}}.": "\u0410\u0432\u0442\u043E\u0440\u0438\u0437\u0430\u0446\u0438\u044F \u0434\u043E\u043B\u0436\u043D\u0430 \u0431\u044B\u0442\u044C {{enforcedType}}, \u043D\u043E \u0432\u044B \u0441\u0435\u0439\u0447\u0430\u0441 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0435\u0442\u0435 {{currentType}}.",
|
|
@@ -301040,7 +301283,28 @@ var init_ru = __esm({
|
|
|
301040
301283
|
"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}}",
|
|
301041
301284
|
"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}}",
|
|
301042
301285
|
"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.",
|
|
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."
|
|
301286
|
+
"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.",
|
|
301287
|
+
// ============================================================================
|
|
301288
|
+
// Custom API-KEY Configuration
|
|
301289
|
+
// ============================================================================
|
|
301290
|
+
"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.",
|
|
301291
|
+
"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:",
|
|
301292
|
+
"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)",
|
|
301293
|
+
"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)",
|
|
301294
|
+
"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",
|
|
301295
|
+
"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",
|
|
301296
|
+
"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.",
|
|
301297
|
+
// ============================================================================
|
|
301298
|
+
// Auth Dialog - View Titles and Labels
|
|
301299
|
+
// ============================================================================
|
|
301300
|
+
"Coding Plan": "Coding Plan",
|
|
301301
|
+
"Paste your api key of Bailian Coding Plan and you're all set!": "\u0412\u0441\u0442\u0430\u0432\u044C\u0442\u0435 \u0432\u0430\u0448 API-\u043A\u043B\u044E\u0447 Bailian Coding Plan \u0438 \u0432\u0441\u0451 \u0433\u043E\u0442\u043E\u0432\u043E!",
|
|
301302
|
+
Custom: "\u041F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044C\u0441\u043A\u0438\u0439",
|
|
301303
|
+
"More instructions about configuring `modelProviders` manually.": "\u0414\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u0435 \u0438\u043D\u0441\u0442\u0440\u0443\u043A\u0446\u0438\u0438 \u043F\u043E \u0440\u0443\u0447\u043D\u043E\u0439 \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0435 `modelProviders`.",
|
|
301304
|
+
"Select API-KEY configuration mode:": "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0440\u0435\u0436\u0438\u043C \u043A\u043E\u043D\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 API-KEY:",
|
|
301305
|
+
"(Press Escape to go back)": "(\u041D\u0430\u0436\u043C\u0438\u0442\u0435 Escape \u0434\u043B\u044F \u0432\u043E\u0437\u0432\u0440\u0430\u0442\u0430)",
|
|
301306
|
+
"(Press Enter to submit, Escape to cancel)": "(\u041D\u0430\u0436\u043C\u0438\u0442\u0435 Enter \u0434\u043B\u044F \u043E\u0442\u043F\u0440\u0430\u0432\u043A\u0438, Escape \u0434\u043B\u044F \u043E\u0442\u043C\u0435\u043D\u044B)",
|
|
301307
|
+
"More instructions please check:": "\u0414\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u0435 \u0438\u043D\u0441\u0442\u0440\u0443\u043A\u0446\u0438\u0438 \u0441\u043C.:"
|
|
301044
301308
|
};
|
|
301045
301309
|
}
|
|
301046
301310
|
});
|
|
@@ -301731,6 +301995,8 @@ var init_zh = __esm({
|
|
|
301731
301995
|
"(Use Enter to Set Auth)": "\uFF08\u4F7F\u7528 Enter \u8BBE\u7F6E\u8BA4\u8BC1\uFF09",
|
|
301732
301996
|
"Terms of Services and Privacy Notice for Qwen Code": "Qwen Code \u7684\u670D\u52A1\u6761\u6B3E\u548C\u9690\u79C1\u58F0\u660E",
|
|
301733
301997
|
"Qwen OAuth": "Qwen OAuth (\u514D\u8D39)",
|
|
301998
|
+
"Login with QwenChat account to use daily free quota.": "\u4F7F\u7528 QwenChat \u8D26\u53F7\u767B\u5F55\uFF0C\u4EAB\u53D7\u6BCF\u65E5\u514D\u8D39\u989D\u5EA6\u3002",
|
|
301999
|
+
"Use coding plan credentials or your own api-keys/providers.": "\u4F7F\u7528 Coding Plan \u51ED\u8BC1\u6216\u60A8\u81EA\u5DF1\u7684 API \u5BC6\u94A5/\u63D0\u4F9B\u5546\u3002",
|
|
301734
302000
|
OpenAI: "OpenAI",
|
|
301735
302001
|
"Failed to login. Message: {{message}}": "\u767B\u5F55\u5931\u8D25\u3002\u6D88\u606F\uFF1A{{message}}",
|
|
301736
302002
|
"Authentication is enforced to be {{enforcedType}}, but you are currently using {{currentType}}.": "\u8BA4\u8BC1\u65B9\u5F0F\u88AB\u5F3A\u5236\u8BBE\u7F6E\u4E3A {{enforcedType}}\uFF0C\u4F46\u60A8\u5F53\u524D\u4F7F\u7528\u7684\u662F {{currentType}}",
|
|
@@ -301977,7 +302243,35 @@ var init_zh = __esm({
|
|
|
301977
302243
|
"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",
|
|
301978
302244
|
"View available extensions at {{url}}": "\u5728 {{url}} \u67E5\u770B\u53EF\u7528\u6269\u5C55",
|
|
301979
302245
|
"Opening extensions page in your browser: {{url}}": "\u6B63\u5728\u6D4F\u89C8\u5668\u4E2D\u6253\u5F00\u6269\u5C55\u9875\u9762\uFF1A{{url}}",
|
|
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}}"
|
|
302246
|
+
"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}}",
|
|
302247
|
+
// ============================================================================
|
|
302248
|
+
// Coding Plan Authentication
|
|
302249
|
+
// ============================================================================
|
|
302250
|
+
"Please enter your API key:": "\u8BF7\u8F93\u5165\u60A8\u7684 API Key\uFF1A",
|
|
302251
|
+
"API key cannot be empty.": "API Key \u4E0D\u80FD\u4E3A\u7A7A\u3002",
|
|
302252
|
+
"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",
|
|
302253
|
+
// ============================================================================
|
|
302254
|
+
// Custom API-KEY Configuration
|
|
302255
|
+
// ============================================================================
|
|
302256
|
+
"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",
|
|
302257
|
+
"Please configure your models in settings.json:": "\u8BF7\u5728 settings.json \u4E2D\u914D\u7F6E\u60A8\u7684\u6A21\u578B\uFF1A",
|
|
302258
|
+
"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",
|
|
302259
|
+
"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",
|
|
302260
|
+
"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",
|
|
302261
|
+
"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",
|
|
302262
|
+
"Supported auth types: openai, anthropic, gemini, vertex-ai, etc.": "\u652F\u6301\u7684\u8BA4\u8BC1\u7C7B\u578B\uFF1Aopenai\u3001anthropic\u3001gemini\u3001vertex-ai \u7B49",
|
|
302263
|
+
"More instructions please check:": "\u66F4\u591A\u8BF4\u660E\u8BF7\u67E5\u770B\uFF1A",
|
|
302264
|
+
// ============================================================================
|
|
302265
|
+
// Auth Dialog - View Titles and Labels
|
|
302266
|
+
// ============================================================================
|
|
302267
|
+
"API-KEY": "API-KEY",
|
|
302268
|
+
"Coding Plan": "Coding Plan",
|
|
302269
|
+
"Paste your api key of Bailian Coding Plan and you're all set!": "\u7C98\u8D34\u60A8\u7684\u767E\u70BC Coding Plan API Key\uFF0C\u5373\u53EF\u5B8C\u6210\u8BBE\u7F6E\uFF01",
|
|
302270
|
+
Custom: "\u81EA\u5B9A\u4E49",
|
|
302271
|
+
"More instructions about configuring `modelProviders` manually.": "\u5173\u4E8E\u624B\u52A8\u914D\u7F6E `modelProviders` \u7684\u66F4\u591A\u8BF4\u660E\u3002",
|
|
302272
|
+
"Select API-KEY configuration mode:": "\u9009\u62E9 API-KEY \u914D\u7F6E\u6A21\u5F0F\uFF1A",
|
|
302273
|
+
"(Press Escape to go back)": "(\u6309 Escape \u952E\u8FD4\u56DE)",
|
|
302274
|
+
"(Press Enter to submit, Escape to cancel)": "(\u6309 Enter \u63D0\u4EA4\uFF0CEscape \u53D6\u6D88)"
|
|
301981
302275
|
};
|
|
301982
302276
|
}
|
|
301983
302277
|
});
|
|
@@ -337485,7 +337779,7 @@ var require_react_is_development = __commonJS({
|
|
|
337485
337779
|
var ContextProvider = REACT_PROVIDER_TYPE;
|
|
337486
337780
|
var Element2 = REACT_ELEMENT_TYPE;
|
|
337487
337781
|
var ForwardRef = REACT_FORWARD_REF_TYPE;
|
|
337488
|
-
var
|
|
337782
|
+
var Fragment16 = REACT_FRAGMENT_TYPE;
|
|
337489
337783
|
var Lazy = REACT_LAZY_TYPE;
|
|
337490
337784
|
var Memo = REACT_MEMO_TYPE;
|
|
337491
337785
|
var Portal = REACT_PORTAL_TYPE;
|
|
@@ -337557,7 +337851,7 @@ var require_react_is_development = __commonJS({
|
|
|
337557
337851
|
exports2.ContextProvider = ContextProvider;
|
|
337558
337852
|
exports2.Element = Element2;
|
|
337559
337853
|
exports2.ForwardRef = ForwardRef;
|
|
337560
|
-
exports2.Fragment =
|
|
337854
|
+
exports2.Fragment = Fragment16;
|
|
337561
337855
|
exports2.Lazy = Lazy;
|
|
337562
337856
|
exports2.Memo = Memo;
|
|
337563
337857
|
exports2.Portal = Portal;
|
|
@@ -373024,7 +373318,7 @@ __name(getPackageJson, "getPackageJson");
|
|
|
373024
373318
|
// packages/cli/src/utils/version.ts
|
|
373025
373319
|
async function getCliVersion() {
|
|
373026
373320
|
const pkgJson = await getPackageJson();
|
|
373027
|
-
return "0.10.0-preview.
|
|
373321
|
+
return "0.10.0-preview.6";
|
|
373028
373322
|
}
|
|
373029
373323
|
__name(getCliVersion, "getCliVersion");
|
|
373030
373324
|
|
|
@@ -380547,7 +380841,7 @@ var formatDuration = /* @__PURE__ */ __name((milliseconds) => {
|
|
|
380547
380841
|
|
|
380548
380842
|
// packages/cli/src/generated/git-commit.ts
|
|
380549
380843
|
init_esbuild_shims();
|
|
380550
|
-
var GIT_COMMIT_INFO = "
|
|
380844
|
+
var GIT_COMMIT_INFO = "71f320b6";
|
|
380551
380845
|
|
|
380552
380846
|
// packages/cli/src/utils/systemInfo.ts
|
|
380553
380847
|
async function getNpmVersion() {
|
|
@@ -387264,6 +387558,19 @@ async function buildSystemMessage(config2, sessionId, permissionMode, allowedBui
|
|
|
387264
387558
|
return systemMessage;
|
|
387265
387559
|
}
|
|
387266
387560
|
__name(buildSystemMessage, "buildSystemMessage");
|
|
387561
|
+
function isMcpToolProgressData(output) {
|
|
387562
|
+
return typeof output === "object" && output !== null && "type" in output && output.type === "mcp_tool_progress";
|
|
387563
|
+
}
|
|
387564
|
+
__name(isMcpToolProgressData, "isMcpToolProgressData");
|
|
387565
|
+
function createToolProgressHandler(request4, adapter) {
|
|
387566
|
+
const handler = /* @__PURE__ */ __name((_callId, output) => {
|
|
387567
|
+
if (isMcpToolProgressData(output)) {
|
|
387568
|
+
adapter.emitToolProgress(request4, output);
|
|
387569
|
+
}
|
|
387570
|
+
}, "handler");
|
|
387571
|
+
return { handler };
|
|
387572
|
+
}
|
|
387573
|
+
__name(createToolProgressHandler, "createToolProgressHandler");
|
|
387267
387574
|
function createTaskToolProgressHandler(config2, taskToolCallId, adapter) {
|
|
387268
387575
|
const previousTaskStates = /* @__PURE__ */ new Map();
|
|
387269
387576
|
const emittedToolUseIds = /* @__PURE__ */ new Set();
|
|
@@ -388096,6 +388403,16 @@ ${event.value}`, null);
|
|
|
388096
388403
|
};
|
|
388097
388404
|
this.emitMessageImpl(systemMessage);
|
|
388098
388405
|
}
|
|
388406
|
+
/**
|
|
388407
|
+
* Emits a tool progress stream event.
|
|
388408
|
+
* Default implementation is a no-op. StreamJsonOutputAdapter overrides this
|
|
388409
|
+
* to emit stream events when includePartialMessages is enabled.
|
|
388410
|
+
*
|
|
388411
|
+
* @param _request - Tool call request info
|
|
388412
|
+
* @param _progress - Structured MCP progress data
|
|
388413
|
+
*/
|
|
388414
|
+
emitToolProgress(_request, _progress) {
|
|
388415
|
+
}
|
|
388099
388416
|
/**
|
|
388100
388417
|
* Builds a result message from options.
|
|
388101
388418
|
* Helper method used by both emitResult implementations.
|
|
@@ -388475,6 +388792,27 @@ var StreamJsonOutputAdapter = class extends BaseJsonOutputAdapter {
|
|
|
388475
388792
|
);
|
|
388476
388793
|
}
|
|
388477
388794
|
}
|
|
388795
|
+
/**
|
|
388796
|
+
* Emits a tool progress stream event when partial messages are enabled.
|
|
388797
|
+
* This overrides the no-op in BaseJsonOutputAdapter.
|
|
388798
|
+
*/
|
|
388799
|
+
emitToolProgress(request4, progress) {
|
|
388800
|
+
if (!this.includePartialMessages) {
|
|
388801
|
+
return;
|
|
388802
|
+
}
|
|
388803
|
+
const partial2 = {
|
|
388804
|
+
type: "stream_event",
|
|
388805
|
+
uuid: randomUUID8(),
|
|
388806
|
+
session_id: this.getSessionId(),
|
|
388807
|
+
parent_tool_use_id: null,
|
|
388808
|
+
event: {
|
|
388809
|
+
type: "tool_progress",
|
|
388810
|
+
tool_use_id: request4.callId,
|
|
388811
|
+
content: progress
|
|
388812
|
+
}
|
|
388813
|
+
};
|
|
388814
|
+
this.emitMessageImpl(partial2);
|
|
388815
|
+
}
|
|
388478
388816
|
/**
|
|
388479
388817
|
* Emits stream events when partial messages are enabled.
|
|
388480
388818
|
* This is a private method specific to StreamJsonOutputAdapter.
|
|
@@ -388964,24 +389302,21 @@ async function runNonInteractive(config2, settings, input, prompt_id, options2 =
|
|
|
388964
389302
|
const inputFormat = typeof config2.getInputFormat === "function" ? config2.getInputFormat() : InputFormat.TEXT;
|
|
388965
389303
|
const toolCallUpdateCallback = inputFormat === InputFormat.STREAM_JSON && options2.controlService ? options2.controlService.permission.getToolCallUpdateCallback() : void 0;
|
|
388966
389304
|
const isTaskTool = finalRequestInfo.name === "task";
|
|
388967
|
-
const
|
|
389305
|
+
const { handler: outputUpdateHandler } = isTaskTool ? createTaskToolProgressHandler(
|
|
388968
389306
|
config2,
|
|
388969
389307
|
finalRequestInfo.callId,
|
|
388970
389308
|
adapter
|
|
388971
|
-
) :
|
|
388972
|
-
const taskToolProgressHandler = taskToolProgress?.handler;
|
|
389309
|
+
) : createToolProgressHandler(finalRequestInfo, adapter);
|
|
388973
389310
|
const toolResponse = await executeToolCall(
|
|
388974
389311
|
config2,
|
|
388975
389312
|
finalRequestInfo,
|
|
388976
389313
|
abortController.signal,
|
|
388977
|
-
|
|
388978
|
-
|
|
388979
|
-
outputUpdateHandler: taskToolProgressHandler
|
|
388980
|
-
},
|
|
389314
|
+
{
|
|
389315
|
+
outputUpdateHandler,
|
|
388981
389316
|
...toolCallUpdateCallback && {
|
|
388982
389317
|
onToolCallsUpdate: toolCallUpdateCallback
|
|
388983
389318
|
}
|
|
388984
|
-
}
|
|
389319
|
+
}
|
|
388985
389320
|
);
|
|
388986
389321
|
if (toolResponse.error) {
|
|
388987
389322
|
handleToolError(
|
|
@@ -412801,6 +413136,15 @@ var useResultDisplayRenderer = /* @__PURE__ */ __name((resultDisplay) => import_
|
|
|
412801
413136
|
data: resultDisplay
|
|
412802
413137
|
};
|
|
412803
413138
|
}
|
|
413139
|
+
if (typeof resultDisplay === "object" && resultDisplay !== null && "type" in resultDisplay && resultDisplay.type === "mcp_tool_progress") {
|
|
413140
|
+
const progress = resultDisplay;
|
|
413141
|
+
const msg = progress.message ?? `Progress: ${progress.progress}`;
|
|
413142
|
+
const totalStr = progress.total != null ? `/${progress.total}` : "";
|
|
413143
|
+
return {
|
|
413144
|
+
type: "string",
|
|
413145
|
+
data: `\u23F3 [${progress.progress}${totalStr}] ${msg}`
|
|
413146
|
+
};
|
|
413147
|
+
}
|
|
412804
413148
|
if (typeof resultDisplay === "object" && resultDisplay !== null && "ansiOutput" in resultDisplay) {
|
|
412805
413149
|
return { type: "ansi", data: resultDisplay.ansiOutput };
|
|
412806
413150
|
}
|
|
@@ -417332,13 +417676,47 @@ __name(QwenOAuthProgress, "QwenOAuthProgress");
|
|
|
417332
417676
|
init_esbuild_shims();
|
|
417333
417677
|
var import_react81 = __toESM(require_react(), 1);
|
|
417334
417678
|
|
|
417679
|
+
// packages/cli/src/ui/components/ApiKeyInput.tsx
|
|
417680
|
+
init_esbuild_shims();
|
|
417681
|
+
var import_react79 = __toESM(require_react(), 1);
|
|
417682
|
+
var import_jsx_runtime79 = __toESM(require_jsx_runtime(), 1);
|
|
417683
|
+
function ApiKeyInput({
|
|
417684
|
+
onSubmit,
|
|
417685
|
+
onCancel
|
|
417686
|
+
}) {
|
|
417687
|
+
const [apiKey, setApiKey] = (0, import_react79.useState)("");
|
|
417688
|
+
const [error2, setError] = (0, import_react79.useState)(null);
|
|
417689
|
+
useKeypress(
|
|
417690
|
+
(key) => {
|
|
417691
|
+
if (key.name === "escape") {
|
|
417692
|
+
onCancel();
|
|
417693
|
+
} else if (key.name === "return") {
|
|
417694
|
+
const trimmedKey = apiKey.trim();
|
|
417695
|
+
if (!trimmedKey) {
|
|
417696
|
+
setError(t4("API key cannot be empty."));
|
|
417697
|
+
return;
|
|
417698
|
+
}
|
|
417699
|
+
onSubmit(trimmedKey);
|
|
417700
|
+
}
|
|
417701
|
+
},
|
|
417702
|
+
{ isActive: true }
|
|
417703
|
+
);
|
|
417704
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
417705
|
+
/* @__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:") }) }),
|
|
417706
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(TextInput, { value: apiKey, onChange: setApiKey, placeholder: "sk-sp-..." }),
|
|
417707
|
+
error2 && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(Text3, { color: Colors.AccentRed, children: error2 }) }),
|
|
417708
|
+
/* @__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)") }) })
|
|
417709
|
+
] });
|
|
417710
|
+
}
|
|
417711
|
+
__name(ApiKeyInput, "ApiKeyInput");
|
|
417712
|
+
|
|
417335
417713
|
// packages/cli/src/ui/contexts/UIActionsContext.tsx
|
|
417336
417714
|
init_esbuild_shims();
|
|
417337
417715
|
var import_react80 = __toESM(require_react(), 1);
|
|
417338
417716
|
|
|
417339
417717
|
// packages/cli/src/ui/components/ModelSwitchDialog.tsx
|
|
417340
417718
|
init_esbuild_shims();
|
|
417341
|
-
var
|
|
417719
|
+
var import_jsx_runtime80 = __toESM(require_jsx_runtime(), 1);
|
|
417342
417720
|
var ModelSwitchDialog = /* @__PURE__ */ __name(({
|
|
417343
417721
|
onSelect
|
|
417344
417722
|
}) => {
|
|
@@ -417370,7 +417748,7 @@ var ModelSwitchDialog = /* @__PURE__ */ __name(({
|
|
|
417370
417748
|
const handleSelect = /* @__PURE__ */ __name((outcome) => {
|
|
417371
417749
|
onSelect(outcome);
|
|
417372
417750
|
}, "handleSelect");
|
|
417373
|
-
return /* @__PURE__ */ (0,
|
|
417751
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(
|
|
417374
417752
|
Box_default,
|
|
417375
417753
|
{
|
|
417376
417754
|
flexDirection: "column",
|
|
@@ -417380,12 +417758,12 @@ var ModelSwitchDialog = /* @__PURE__ */ __name(({
|
|
|
417380
417758
|
width: "100%",
|
|
417381
417759
|
marginLeft: 1,
|
|
417382
417760
|
children: [
|
|
417383
|
-
/* @__PURE__ */ (0,
|
|
417384
|
-
/* @__PURE__ */ (0,
|
|
417385
|
-
/* @__PURE__ */ (0,
|
|
417386
|
-
/* @__PURE__ */ (0,
|
|
417761
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(Box_default, { flexDirection: "column", marginBottom: 1, children: [
|
|
417762
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(Text3, { bold: true, children: "Vision Model Switch Required" }),
|
|
417763
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(Text3, { children: "Your message contains an image, but the current model doesn't support vision." }),
|
|
417764
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(Text3, { children: "How would you like to proceed?" })
|
|
417387
417765
|
] }),
|
|
417388
|
-
/* @__PURE__ */ (0,
|
|
417766
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(Box_default, { marginBottom: 1, children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
417389
417767
|
RadioButtonSelect,
|
|
417390
417768
|
{
|
|
417391
417769
|
items: options2,
|
|
@@ -417394,209 +417772,12 @@ var ModelSwitchDialog = /* @__PURE__ */ __name(({
|
|
|
417394
417772
|
isFocused: true
|
|
417395
417773
|
}
|
|
417396
417774
|
) }),
|
|
417397
|
-
/* @__PURE__ */ (0,
|
|
417775
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(Text3, { color: Colors.Gray, children: "Press Enter to select, Esc to cancel" }) })
|
|
417398
417776
|
]
|
|
417399
417777
|
}
|
|
417400
417778
|
);
|
|
417401
417779
|
}, "ModelSwitchDialog");
|
|
417402
417780
|
|
|
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
|
-
|
|
417600
417781
|
// packages/cli/src/ui/contexts/UIActionsContext.tsx
|
|
417601
417782
|
var UIActionsContext = (0, import_react80.createContext)(null);
|
|
417602
417783
|
var useUIActions = /* @__PURE__ */ __name(() => {
|
|
@@ -417609,6 +417790,7 @@ var useUIActions = /* @__PURE__ */ __name(() => {
|
|
|
417609
417790
|
|
|
417610
417791
|
// packages/cli/src/ui/auth/AuthDialog.tsx
|
|
417611
417792
|
var import_jsx_runtime81 = __toESM(require_jsx_runtime(), 1);
|
|
417793
|
+
var MODEL_PROVIDERS_DOCUMENTATION_URL = "https://qwenlm.github.io/qwen-code-docs/en/users/configuration/settings/#modelproviders";
|
|
417612
417794
|
function parseDefaultAuthType(defaultAuthType) {
|
|
417613
417795
|
if (defaultAuthType && Object.values(AuthType2).includes(defaultAuthType)) {
|
|
417614
417796
|
return defaultAuthType;
|
|
@@ -417618,25 +417800,39 @@ function parseDefaultAuthType(defaultAuthType) {
|
|
|
417618
417800
|
__name(parseDefaultAuthType, "parseDefaultAuthType");
|
|
417619
417801
|
function AuthDialog() {
|
|
417620
417802
|
const { pendingAuthType, authError } = useUIState();
|
|
417621
|
-
const { handleAuthSelect: onAuthSelect } = useUIActions();
|
|
417803
|
+
const { handleAuthSelect: onAuthSelect, handleCodingPlanSubmit } = useUIActions();
|
|
417622
417804
|
const config2 = useConfig();
|
|
417623
417805
|
const [errorMessage, setErrorMessage] = (0, import_react81.useState)(null);
|
|
417624
417806
|
const [selectedIndex, setSelectedIndex] = (0, import_react81.useState)(null);
|
|
417625
|
-
const
|
|
417807
|
+
const [viewLevel, setViewLevel] = (0, import_react81.useState)("main");
|
|
417808
|
+
const [apiKeySubModeIndex, setApiKeySubModeIndex] = (0, import_react81.useState)(0);
|
|
417809
|
+
const mainItems = [
|
|
417626
417810
|
{
|
|
417627
417811
|
key: AuthType2.QWEN_OAUTH,
|
|
417628
417812
|
label: t4("Qwen OAuth"),
|
|
417629
417813
|
value: AuthType2.QWEN_OAUTH
|
|
417630
417814
|
},
|
|
417631
417815
|
{
|
|
417632
|
-
key:
|
|
417633
|
-
label: t4("
|
|
417634
|
-
value:
|
|
417816
|
+
key: "API-KEY",
|
|
417817
|
+
label: t4("API-KEY"),
|
|
417818
|
+
value: "API-KEY"
|
|
417819
|
+
}
|
|
417820
|
+
];
|
|
417821
|
+
const apiKeySubItems = [
|
|
417822
|
+
{
|
|
417823
|
+
key: "coding-plan",
|
|
417824
|
+
label: t4("Coding Plan"),
|
|
417825
|
+
value: "coding-plan"
|
|
417826
|
+
},
|
|
417827
|
+
{
|
|
417828
|
+
key: "custom",
|
|
417829
|
+
label: t4("Custom"),
|
|
417830
|
+
value: "custom"
|
|
417635
417831
|
}
|
|
417636
417832
|
];
|
|
417637
417833
|
const initialAuthIndex = Math.max(
|
|
417638
417834
|
0,
|
|
417639
|
-
|
|
417835
|
+
mainItems.findIndex((item) => {
|
|
417640
417836
|
if (pendingAuthType) {
|
|
417641
417837
|
return item.value === pendingAuthType;
|
|
417642
417838
|
}
|
|
@@ -417654,18 +417850,50 @@ function AuthDialog() {
|
|
|
417654
417850
|
})
|
|
417655
417851
|
);
|
|
417656
417852
|
const hasApiKey = Boolean(config2.getContentGeneratorConfig()?.apiKey);
|
|
417657
|
-
const currentSelectedAuthType = selectedIndex !== null ?
|
|
417658
|
-
const
|
|
417853
|
+
const currentSelectedAuthType = selectedIndex !== null ? mainItems[selectedIndex]?.value : mainItems[initialAuthIndex]?.value;
|
|
417854
|
+
const handleMainSelect = /* @__PURE__ */ __name(async (value) => {
|
|
417659
417855
|
setErrorMessage(null);
|
|
417660
|
-
|
|
417661
|
-
|
|
417662
|
-
|
|
417663
|
-
|
|
417664
|
-
|
|
417665
|
-
}, "
|
|
417856
|
+
if (value === "API-KEY") {
|
|
417857
|
+
setViewLevel("api-key-sub");
|
|
417858
|
+
return;
|
|
417859
|
+
}
|
|
417860
|
+
await onAuthSelect(value);
|
|
417861
|
+
}, "handleMainSelect");
|
|
417862
|
+
const handleApiKeySubSelect = /* @__PURE__ */ __name(async (subMode) => {
|
|
417863
|
+
setErrorMessage(null);
|
|
417864
|
+
if (subMode === "coding-plan") {
|
|
417865
|
+
setViewLevel("api-key-input");
|
|
417866
|
+
} else {
|
|
417867
|
+
setViewLevel("custom-info");
|
|
417868
|
+
}
|
|
417869
|
+
}, "handleApiKeySubSelect");
|
|
417870
|
+
const handleApiKeyInputSubmit = /* @__PURE__ */ __name(async (apiKey) => {
|
|
417871
|
+
setErrorMessage(null);
|
|
417872
|
+
if (!apiKey.trim()) {
|
|
417873
|
+
setErrorMessage(t4("API key cannot be empty."));
|
|
417874
|
+
return;
|
|
417875
|
+
}
|
|
417876
|
+
await handleCodingPlanSubmit(apiKey);
|
|
417877
|
+
}, "handleApiKeyInputSubmit");
|
|
417878
|
+
const handleGoBack = /* @__PURE__ */ __name(() => {
|
|
417879
|
+
setErrorMessage(null);
|
|
417880
|
+
if (viewLevel === "api-key-sub") {
|
|
417881
|
+
setViewLevel("main");
|
|
417882
|
+
} else if (viewLevel === "api-key-input" || viewLevel === "custom-info") {
|
|
417883
|
+
setViewLevel("api-key-sub");
|
|
417884
|
+
}
|
|
417885
|
+
}, "handleGoBack");
|
|
417666
417886
|
useKeypress(
|
|
417667
417887
|
(key) => {
|
|
417668
417888
|
if (key.name === "escape") {
|
|
417889
|
+
if (viewLevel === "api-key-sub") {
|
|
417890
|
+
handleGoBack();
|
|
417891
|
+
return;
|
|
417892
|
+
}
|
|
417893
|
+
if (viewLevel === "api-key-input" || viewLevel === "custom-info") {
|
|
417894
|
+
handleGoBack();
|
|
417895
|
+
return;
|
|
417896
|
+
}
|
|
417669
417897
|
if (errorMessage) {
|
|
417670
417898
|
return;
|
|
417671
417899
|
}
|
|
@@ -417682,33 +417910,117 @@ function AuthDialog() {
|
|
|
417682
417910
|
},
|
|
417683
417911
|
{ isActive: true }
|
|
417684
417912
|
);
|
|
417913
|
+
const renderMainView = /* @__PURE__ */ __name(() => /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(import_jsx_runtime81.Fragment, { children: [
|
|
417914
|
+
/* @__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?") }) }),
|
|
417915
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
417916
|
+
RadioButtonSelect,
|
|
417917
|
+
{
|
|
417918
|
+
items: mainItems,
|
|
417919
|
+
initialIndex: initialAuthIndex,
|
|
417920
|
+
onSelect: handleMainSelect,
|
|
417921
|
+
onHighlight: (value) => {
|
|
417922
|
+
const index = mainItems.findIndex((item) => item.value === value);
|
|
417923
|
+
setSelectedIndex(index);
|
|
417924
|
+
}
|
|
417925
|
+
}
|
|
417926
|
+
) }),
|
|
417927
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Box_default, { marginTop: 1, paddingLeft: 2, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Text3, { color: Colors.Gray, children: currentSelectedAuthType === AuthType2.QWEN_OAUTH ? t4("Login with QwenChat account to use daily free quota.") : t4("Use coding plan credentials or your own api-keys/providers.") }) })
|
|
417928
|
+
] }), "renderMainView");
|
|
417929
|
+
const renderApiKeySubView = /* @__PURE__ */ __name(() => /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(import_jsx_runtime81.Fragment, { children: [
|
|
417930
|
+
/* @__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:") }) }),
|
|
417931
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
417932
|
+
RadioButtonSelect,
|
|
417933
|
+
{
|
|
417934
|
+
items: apiKeySubItems,
|
|
417935
|
+
initialIndex: apiKeySubModeIndex,
|
|
417936
|
+
onSelect: handleApiKeySubSelect,
|
|
417937
|
+
onHighlight: (value) => {
|
|
417938
|
+
const index = apiKeySubItems.findIndex(
|
|
417939
|
+
(item) => item.value === value
|
|
417940
|
+
);
|
|
417941
|
+
setApiKeySubModeIndex(index);
|
|
417942
|
+
}
|
|
417943
|
+
}
|
|
417944
|
+
) }),
|
|
417945
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Box_default, { marginTop: 1, paddingLeft: 2, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Text3, { color: Colors.Gray, children: apiKeySubItems[apiKeySubModeIndex]?.value === "coding-plan" ? t4("Paste your api key of Bailian Coding Plan and you're all set!") : t4(
|
|
417946
|
+
"More instructions about configuring `modelProviders` manually."
|
|
417947
|
+
) }) }),
|
|
417948
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Text3, { color: theme?.text?.secondary, children: t4("(Press Escape to go back)") }) })
|
|
417949
|
+
] }), "renderApiKeySubView");
|
|
417950
|
+
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");
|
|
417951
|
+
const renderCustomInfoView = /* @__PURE__ */ __name(() => /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(import_jsx_runtime81.Fragment, { children: [
|
|
417952
|
+
/* @__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") }) }),
|
|
417953
|
+
/* @__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.") }) }),
|
|
417954
|
+
/* @__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:") }) }),
|
|
417955
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Box_default, { marginTop: 1, paddingLeft: 2, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(Text3, { color: Colors.AccentYellow, children: [
|
|
417956
|
+
"1. ",
|
|
417957
|
+
t4("Set API key via environment variable (e.g., OPENAI_API_KEY)")
|
|
417958
|
+
] }) }),
|
|
417959
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Box_default, { marginTop: 0, paddingLeft: 2, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(Text3, { color: Colors.AccentYellow, children: [
|
|
417960
|
+
"2.",
|
|
417961
|
+
" ",
|
|
417962
|
+
t4(
|
|
417963
|
+
"Add model configuration to modelProviders['openai'] (or other auth types)"
|
|
417964
|
+
)
|
|
417965
|
+
] }) }),
|
|
417966
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Box_default, { marginTop: 0, paddingLeft: 2, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(Text3, { color: Colors.AccentYellow, children: [
|
|
417967
|
+
"3.",
|
|
417968
|
+
" ",
|
|
417969
|
+
t4(
|
|
417970
|
+
"Each provider needs: id, envKey (required), plus optional baseUrl, generationConfig"
|
|
417971
|
+
)
|
|
417972
|
+
] }) }),
|
|
417973
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Box_default, { marginTop: 0, paddingLeft: 2, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(Text3, { color: Colors.AccentYellow, children: [
|
|
417974
|
+
"4.",
|
|
417975
|
+
" ",
|
|
417976
|
+
t4(
|
|
417977
|
+
"Use /model command to select your preferred model from the configured list"
|
|
417978
|
+
)
|
|
417979
|
+
] }) }),
|
|
417980
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Text3, { color: theme?.text?.secondary, children: t4(
|
|
417981
|
+
"Supported auth types: openai, anthropic, gemini, vertex-ai, etc."
|
|
417982
|
+
) }) }),
|
|
417983
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Text3, { color: theme?.text?.secondary, underline: true, children: t4("More instructions please check:") }) }),
|
|
417984
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Box_default, { marginTop: 0, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(dist_default6, { url: MODEL_PROVIDERS_DOCUMENTATION_URL, fallback: false, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Text3, { color: Colors.AccentGreen, underline: true, children: MODEL_PROVIDERS_DOCUMENTATION_URL }) }) }),
|
|
417985
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Text3, { color: theme?.text?.secondary, children: t4("(Press Escape to go back)") }) })
|
|
417986
|
+
] }), "renderCustomInfoView");
|
|
417987
|
+
const getViewTitle = /* @__PURE__ */ __name(() => {
|
|
417988
|
+
switch (viewLevel) {
|
|
417989
|
+
case "main":
|
|
417990
|
+
return t4("Get started");
|
|
417991
|
+
case "api-key-sub":
|
|
417992
|
+
return t4("API-KEY Configuration");
|
|
417993
|
+
case "api-key-input":
|
|
417994
|
+
return t4("Coding Plan Setup");
|
|
417995
|
+
case "custom-info":
|
|
417996
|
+
return t4("Custom Configuration");
|
|
417997
|
+
default:
|
|
417998
|
+
return t4("Get started");
|
|
417999
|
+
}
|
|
418000
|
+
}, "getViewTitle");
|
|
417685
418001
|
return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(
|
|
417686
418002
|
Box_default,
|
|
417687
418003
|
{
|
|
417688
418004
|
borderStyle: "round",
|
|
417689
|
-
borderColor:
|
|
418005
|
+
borderColor: theme?.border?.default,
|
|
417690
418006
|
flexDirection: "column",
|
|
417691
418007
|
padding: 1,
|
|
417692
418008
|
width: "100%",
|
|
417693
418009
|
children: [
|
|
417694
|
-
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Text3, { bold: true, children:
|
|
417695
|
-
|
|
417696
|
-
|
|
417697
|
-
|
|
417698
|
-
|
|
417699
|
-
items,
|
|
417700
|
-
initialIndex: initialAuthIndex,
|
|
417701
|
-
onSelect: handleAuthSelect,
|
|
417702
|
-
onHighlight: handleHighlight
|
|
417703
|
-
}
|
|
417704
|
-
) }),
|
|
418010
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Text3, { bold: true, children: getViewTitle() }),
|
|
418011
|
+
viewLevel === "main" && renderMainView(),
|
|
418012
|
+
viewLevel === "api-key-sub" && renderApiKeySubView(),
|
|
418013
|
+
viewLevel === "api-key-input" && renderApiKeyInputView(),
|
|
418014
|
+
viewLevel === "custom-info" && renderCustomInfoView(),
|
|
417705
418015
|
(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 }) }),
|
|
417706
|
-
|
|
417707
|
-
|
|
417708
|
-
|
|
417709
|
-
|
|
417710
|
-
|
|
417711
|
-
|
|
418016
|
+
viewLevel === "main" && /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(import_jsx_runtime81.Fragment, { children: [
|
|
418017
|
+
/* @__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)") }) }),
|
|
418018
|
+
hasApiKey && currentSelectedAuthType === AuthType2.QWEN_OAUTH && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Text3, { color: theme?.text?.secondary, children: t4(
|
|
418019
|
+
"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."
|
|
418020
|
+
) }) }),
|
|
418021
|
+
/* @__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") }) }),
|
|
418022
|
+
/* @__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" }) })
|
|
418023
|
+
] })
|
|
417712
418024
|
]
|
|
417713
418025
|
}
|
|
417714
418026
|
);
|
|
@@ -419118,15 +419430,6 @@ var DialogManager = /* @__PURE__ */ __name(({
|
|
|
419118
419430
|
const uiState = useUIState();
|
|
419119
419431
|
const uiActions = useUIActions();
|
|
419120
419432
|
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");
|
|
419130
419433
|
if (uiState.showWelcomeBackDialog && uiState.welcomeBackInfo?.hasHistory) {
|
|
419131
419434
|
return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
419132
419435
|
WelcomeBackDialog,
|
|
@@ -419300,28 +419603,6 @@ var DialogManager = /* @__PURE__ */ __name(({
|
|
|
419300
419603
|
return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(Box_default, { flexDirection: "column", children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(AuthDialog, {}) });
|
|
419301
419604
|
}
|
|
419302
419605
|
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
|
-
}
|
|
419325
419606
|
if (uiState.pendingAuthType === AuthType2.QWEN_OAUTH) {
|
|
419326
419607
|
return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
419327
419608
|
QwenOAuthProgress,
|
|
@@ -422708,6 +422989,31 @@ var useQwenAuth = /* @__PURE__ */ __name((pendingAuthType, isAuthenticating) =>
|
|
|
422708
422989
|
};
|
|
422709
422990
|
}, "useQwenAuth");
|
|
422710
422991
|
|
|
422992
|
+
// packages/cli/src/constants/codingPlanTemplates.ts
|
|
422993
|
+
init_esbuild_shims();
|
|
422994
|
+
var CODING_PLAN_ENV_KEY = "BAILIAN_CODING_PLAN_API_KEY";
|
|
422995
|
+
var CODING_PLAN_TEMPLATE = [
|
|
422996
|
+
{
|
|
422997
|
+
id: "qwen3-coder-plus",
|
|
422998
|
+
name: "qwen3-coder-plus",
|
|
422999
|
+
baseUrl: "https://coding.dashscope.aliyuncs.com/v1",
|
|
423000
|
+
description: "qwen3-coder-plus model from Bailian Coding Plan",
|
|
423001
|
+
envKey: CODING_PLAN_ENV_KEY
|
|
423002
|
+
},
|
|
423003
|
+
{
|
|
423004
|
+
id: "qwen3-max-2026-01-23",
|
|
423005
|
+
name: "qwen3-max-2026-01-23",
|
|
423006
|
+
description: "qwen3 max model from Bailian Coding Plan with thinking enabled",
|
|
423007
|
+
baseUrl: "https://coding.dashscope.aliyuncs.com/v1",
|
|
423008
|
+
envKey: CODING_PLAN_ENV_KEY,
|
|
423009
|
+
generationConfig: {
|
|
423010
|
+
extra_body: {
|
|
423011
|
+
enable_thinking: true
|
|
423012
|
+
}
|
|
423013
|
+
}
|
|
423014
|
+
}
|
|
423015
|
+
];
|
|
423016
|
+
|
|
422711
423017
|
// packages/cli/src/ui/auth/useAuth.ts
|
|
422712
423018
|
var useAuthCommand = /* @__PURE__ */ __name((settings, config2, addItem, onAuthChange) => {
|
|
422713
423019
|
const unAuthenticated = config2.getAuthType() === void 0;
|
|
@@ -422900,6 +423206,74 @@ var useAuthCommand = /* @__PURE__ */ __name((settings, config2, addItem, onAuthC
|
|
|
422900
423206
|
setIsAuthDialogOpen(true);
|
|
422901
423207
|
setAuthError(null);
|
|
422902
423208
|
}, [isAuthenticating, pendingAuthType, cancelQwenAuth, config2]);
|
|
423209
|
+
const handleCodingPlanSubmit = (0, import_react103.useCallback)(
|
|
423210
|
+
async (apiKey) => {
|
|
423211
|
+
try {
|
|
423212
|
+
setIsAuthenticating(true);
|
|
423213
|
+
setAuthError(null);
|
|
423214
|
+
const envKeyName = CODING_PLAN_ENV_KEY;
|
|
423215
|
+
const persistScope = getPersistScopeForModelSelection(settings);
|
|
423216
|
+
settings.setValue(persistScope, `env.${envKeyName}`, apiKey);
|
|
423217
|
+
process.env[envKeyName] = apiKey;
|
|
423218
|
+
const newConfigs = CODING_PLAN_TEMPLATE.map(
|
|
423219
|
+
(templateConfig) => ({
|
|
423220
|
+
...templateConfig,
|
|
423221
|
+
envKey: envKeyName
|
|
423222
|
+
})
|
|
423223
|
+
);
|
|
423224
|
+
const existingConfigs = settings.merged.modelProviders?.[AuthType2.USE_OPENAI] || [];
|
|
423225
|
+
const isDuplicate = /* @__PURE__ */ __name((config3) => existingConfigs.some(
|
|
423226
|
+
(existing) => existing.id === config3.id && existing.baseUrl === config3.baseUrl && existing.envKey === config3.envKey
|
|
423227
|
+
), "isDuplicate");
|
|
423228
|
+
const uniqueNewConfigs = newConfigs.filter(
|
|
423229
|
+
(config3) => !isDuplicate(config3)
|
|
423230
|
+
);
|
|
423231
|
+
const updatedConfigs = [...uniqueNewConfigs, ...existingConfigs];
|
|
423232
|
+
settings.setValue(
|
|
423233
|
+
persistScope,
|
|
423234
|
+
`modelProviders.${AuthType2.USE_OPENAI}`,
|
|
423235
|
+
updatedConfigs
|
|
423236
|
+
);
|
|
423237
|
+
settings.setValue(
|
|
423238
|
+
persistScope,
|
|
423239
|
+
"security.auth.selectedType",
|
|
423240
|
+
AuthType2.USE_OPENAI
|
|
423241
|
+
);
|
|
423242
|
+
if (updatedConfigs.length > 0 && updatedConfigs[0]?.id) {
|
|
423243
|
+
settings.setValue(persistScope, "model.name", updatedConfigs[0].id);
|
|
423244
|
+
}
|
|
423245
|
+
const updatedModelProviders = {
|
|
423246
|
+
...settings.merged.modelProviders,
|
|
423247
|
+
[AuthType2.USE_OPENAI]: updatedConfigs
|
|
423248
|
+
};
|
|
423249
|
+
config2.reloadModelProvidersConfig(updatedModelProviders);
|
|
423250
|
+
await config2.refreshAuth(AuthType2.USE_OPENAI);
|
|
423251
|
+
setAuthError(null);
|
|
423252
|
+
setAuthState("authenticated" /* Authenticated */);
|
|
423253
|
+
setIsAuthDialogOpen(false);
|
|
423254
|
+
setIsAuthenticating(false);
|
|
423255
|
+
onAuthChange?.();
|
|
423256
|
+
addItem(
|
|
423257
|
+
{
|
|
423258
|
+
type: "info" /* INFO */,
|
|
423259
|
+
text: t4(
|
|
423260
|
+
"Authenticated successfully with Coding Plan. API key is stored in settings.env."
|
|
423261
|
+
)
|
|
423262
|
+
},
|
|
423263
|
+
Date.now()
|
|
423264
|
+
);
|
|
423265
|
+
const authEvent = new AuthEvent(
|
|
423266
|
+
AuthType2.USE_OPENAI,
|
|
423267
|
+
"coding-plan",
|
|
423268
|
+
"success"
|
|
423269
|
+
);
|
|
423270
|
+
logAuth(config2, authEvent);
|
|
423271
|
+
} catch (error2) {
|
|
423272
|
+
handleAuthFailure(error2);
|
|
423273
|
+
}
|
|
423274
|
+
},
|
|
423275
|
+
[settings, config2, handleAuthFailure, addItem, onAuthChange]
|
|
423276
|
+
);
|
|
422903
423277
|
(0, import_react103.useEffect)(() => {
|
|
422904
423278
|
const defaultAuthType = process.env["QWEN_DEFAULT_AUTH_TYPE"];
|
|
422905
423279
|
if (defaultAuthType && ![
|
|
@@ -422936,6 +423310,7 @@ var useAuthCommand = /* @__PURE__ */ __name((settings, config2, addItem, onAuthC
|
|
|
422936
423310
|
pendingAuthType,
|
|
422937
423311
|
qwenAuthState,
|
|
422938
423312
|
handleAuthSelect,
|
|
423313
|
+
handleCodingPlanSubmit,
|
|
422939
423314
|
openAuthDialog,
|
|
422940
423315
|
cancelAuthentication
|
|
422941
423316
|
};
|
|
@@ -430857,6 +431232,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
430857
431232
|
pendingAuthType,
|
|
430858
431233
|
qwenAuthState,
|
|
430859
431234
|
handleAuthSelect,
|
|
431235
|
+
handleCodingPlanSubmit,
|
|
430860
431236
|
openAuthDialog,
|
|
430861
431237
|
cancelAuthentication
|
|
430862
431238
|
} = useAuthCommand(settings, config2, historyManager.addItem, refreshStatic);
|
|
@@ -431722,6 +432098,7 @@ ${migrationResult.failedFiles.map((f5) => ` \u2022 ${f5.file}: ${f5.error}`).jo
|
|
|
431722
432098
|
setAuthState,
|
|
431723
432099
|
onAuthError,
|
|
431724
432100
|
cancelAuthentication,
|
|
432101
|
+
handleCodingPlanSubmit,
|
|
431725
432102
|
handleEditorSelect,
|
|
431726
432103
|
exitEditorDialog,
|
|
431727
432104
|
closeSettingsDialog,
|
|
@@ -431766,6 +432143,7 @@ ${migrationResult.failedFiles.map((f5) => ` \u2022 ${f5.file}: ${f5.error}`).jo
|
|
|
431766
432143
|
setAuthState,
|
|
431767
432144
|
onAuthError,
|
|
431768
432145
|
cancelAuthentication,
|
|
432146
|
+
handleCodingPlanSubmit,
|
|
431769
432147
|
handleEditorSelect,
|
|
431770
432148
|
exitEditorDialog,
|
|
431771
432149
|
closeSettingsDialog,
|
|
@@ -434816,7 +435194,7 @@ var GeminiAgent = class {
|
|
|
434816
435194
|
name: APPROVAL_MODE_INFO[mode].name,
|
|
434817
435195
|
description: APPROVAL_MODE_INFO[mode].description
|
|
434818
435196
|
}));
|
|
434819
|
-
const version2 = "0.10.0-preview.
|
|
435197
|
+
const version2 = "0.10.0-preview.6";
|
|
434820
435198
|
return {
|
|
434821
435199
|
protocolVersion: PROTOCOL_VERSION,
|
|
434822
435200
|
agentInfo: {
|