@rdmind/rdmind 0.1.5-alpha.0 → 0.1.5-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli.js +126 -106
- package/locales/en.js +1 -0
- package/locales/zh.js +1 -0
- package/package.json +2 -2
package/cli.js
CHANGED
|
@@ -73844,14 +73844,6 @@ async function getQwenOAuthClient(config2, options2) {
|
|
|
73844
73844
|
console.warn("Token manager error:", error2.message);
|
|
73845
73845
|
}
|
|
73846
73846
|
}
|
|
73847
|
-
if (await loadCachedQwenCredentials(client)) {
|
|
73848
|
-
const result2 = await authWithQwenDeviceFlow(client, config2);
|
|
73849
|
-
if (!result2.success) {
|
|
73850
|
-
const errorMessage = result2.message || "Qwen OAuth authentication failed";
|
|
73851
|
-
throw new Error(errorMessage);
|
|
73852
|
-
}
|
|
73853
|
-
return client;
|
|
73854
|
-
}
|
|
73855
73847
|
if (options2?.requireCachedCredentials) {
|
|
73856
73848
|
throw new Error(
|
|
73857
73849
|
"No cached Qwen-OAuth credentials found. Please re-authenticate."
|
|
@@ -73966,6 +73958,10 @@ ${deviceAuth.verification_uri_complete}
|
|
|
73966
73958
|
};
|
|
73967
73959
|
client.setCredentials(credentials);
|
|
73968
73960
|
await cacheQwenCredentials(credentials);
|
|
73961
|
+
try {
|
|
73962
|
+
SharedTokenManager.getInstance().clearCache();
|
|
73963
|
+
} catch {
|
|
73964
|
+
}
|
|
73969
73965
|
qwenOAuth2Events.emit(
|
|
73970
73966
|
"auth-progress" /* AuthProgress */,
|
|
73971
73967
|
"success",
|
|
@@ -74079,21 +74075,6 @@ Server requested to slow down, increasing poll interval to ${pollInterval}ms'`
|
|
|
74079
74075
|
qwenOAuth2Events.off("auth-cancel" /* AuthCancel */, cancelHandler);
|
|
74080
74076
|
}
|
|
74081
74077
|
}
|
|
74082
|
-
async function loadCachedQwenCredentials(client) {
|
|
74083
|
-
try {
|
|
74084
|
-
const keyFile = getQwenCachedCredentialPath();
|
|
74085
|
-
const creds = await fs11.readFile(keyFile, "utf-8");
|
|
74086
|
-
const credentials = JSON.parse(creds);
|
|
74087
|
-
client.setCredentials(credentials);
|
|
74088
|
-
const { token: token2 } = await client.getAccessToken();
|
|
74089
|
-
if (!token2) {
|
|
74090
|
-
return false;
|
|
74091
|
-
}
|
|
74092
|
-
return true;
|
|
74093
|
-
} catch (_) {
|
|
74094
|
-
return false;
|
|
74095
|
-
}
|
|
74096
|
-
}
|
|
74097
74078
|
async function cacheQwenCredentials(credentials) {
|
|
74098
74079
|
const filePath = getQwenCachedCredentialPath();
|
|
74099
74080
|
try {
|
|
@@ -74123,6 +74104,11 @@ async function clearQwenCredentials() {
|
|
|
74123
74104
|
return;
|
|
74124
74105
|
}
|
|
74125
74106
|
console.warn("Warning: Failed to clear cached Qwen credentials:", error2);
|
|
74107
|
+
} finally {
|
|
74108
|
+
try {
|
|
74109
|
+
SharedTokenManager.getInstance().clearCache();
|
|
74110
|
+
} catch {
|
|
74111
|
+
}
|
|
74126
74112
|
}
|
|
74127
74113
|
}
|
|
74128
74114
|
function getQwenCachedCredentialPath() {
|
|
@@ -74321,7 +74307,6 @@ var init_qwenOAuth2 = __esm({
|
|
|
74321
74307
|
qwenOAuth2Events = new EventEmitter();
|
|
74322
74308
|
__name(getQwenOAuthClient, "getQwenOAuthClient");
|
|
74323
74309
|
__name(authWithQwenDeviceFlow, "authWithQwenDeviceFlow");
|
|
74324
|
-
__name(loadCachedQwenCredentials, "loadCachedQwenCredentials");
|
|
74325
74310
|
__name(cacheQwenCredentials, "cacheQwenCredentials");
|
|
74326
74311
|
__name(clearQwenCredentials, "clearQwenCredentials");
|
|
74327
74312
|
__name(getQwenCachedCredentialPath, "getQwenCachedCredentialPath");
|
|
@@ -158070,12 +158055,10 @@ var init_converter2 = __esm({
|
|
|
158070
158055
|
if (func.name && func.description) {
|
|
158071
158056
|
let parameters;
|
|
158072
158057
|
if (func.parametersJsonSchema) {
|
|
158073
|
-
|
|
158074
|
-
|
|
158075
|
-
|
|
158076
|
-
|
|
158077
|
-
parameters = paramsCopy;
|
|
158078
|
-
}
|
|
158058
|
+
const paramsCopy = {
|
|
158059
|
+
...func.parametersJsonSchema
|
|
158060
|
+
};
|
|
158061
|
+
parameters = paramsCopy;
|
|
158079
158062
|
} else if (func.parameters) {
|
|
158080
158063
|
parameters = this.convertGeminiToolParametersToOpenAI(
|
|
158081
158064
|
func.parameters
|
|
@@ -160813,7 +160796,7 @@ function createContentGeneratorConfig(config2, authType, generationConfig) {
|
|
|
160813
160796
|
};
|
|
160814
160797
|
}
|
|
160815
160798
|
async function createContentGenerator(config2, gcConfig, isInitialAuth) {
|
|
160816
|
-
const version3 = "0.1.5-alpha.
|
|
160799
|
+
const version3 = "0.1.5-alpha.1";
|
|
160817
160800
|
const userAgent2 = `QwenCode/${version3} (${process.platform}; ${process.arch})`;
|
|
160818
160801
|
const baseHeaders = {
|
|
160819
160802
|
"User-Agent": userAgent2
|
|
@@ -235983,8 +235966,8 @@ var init_git_commit = __esm({
|
|
|
235983
235966
|
"packages/core/src/generated/git-commit.ts"() {
|
|
235984
235967
|
"use strict";
|
|
235985
235968
|
init_esbuild_shims();
|
|
235986
|
-
GIT_COMMIT_INFO = "
|
|
235987
|
-
CLI_VERSION = "0.1.5-alpha.
|
|
235969
|
+
GIT_COMMIT_INFO = "cfdb6c3b";
|
|
235970
|
+
CLI_VERSION = "0.1.5-alpha.1";
|
|
235988
235971
|
}
|
|
235989
235972
|
});
|
|
235990
235973
|
|
|
@@ -267885,7 +267868,7 @@ var require_backend = __commonJS({
|
|
|
267885
267868
|
) : symbolOrNumber;
|
|
267886
267869
|
}
|
|
267887
267870
|
__name(getTypeSymbol, "getTypeSymbol");
|
|
267888
|
-
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,
|
|
267871
|
+
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, Fragment17 = _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;
|
|
267889
267872
|
function resolveFiberType(type) {
|
|
267890
267873
|
var typeSymbol = getTypeSymbol(type);
|
|
267891
267874
|
switch (typeSymbol) {
|
|
@@ -267931,7 +267914,7 @@ var require_backend = __commonJS({
|
|
|
267931
267914
|
case HostPortal:
|
|
267932
267915
|
case HostText:
|
|
267933
267916
|
return null;
|
|
267934
|
-
case
|
|
267917
|
+
case Fragment17:
|
|
267935
267918
|
return "Fragment";
|
|
267936
267919
|
case LazyComponent:
|
|
267937
267920
|
return "Lazy";
|
|
@@ -267997,7 +267980,7 @@ var require_backend = __commonJS({
|
|
|
267997
267980
|
function attach(hook2, rendererID, renderer2, global2) {
|
|
267998
267981
|
var version3 = renderer2.reconcilerVersion || renderer2.version;
|
|
267999
267982
|
var _getInternalReactCons = getInternalReactConstants(version3), getDisplayNameForFiber = _getInternalReactCons.getDisplayNameForFiber, getTypeSymbol = _getInternalReactCons.getTypeSymbol, ReactPriorityLevels = _getInternalReactCons.ReactPriorityLevels, ReactTypeOfWork = _getInternalReactCons.ReactTypeOfWork, StrictModeBits = _getInternalReactCons.StrictModeBits;
|
|
268000
|
-
var CacheComponent = ReactTypeOfWork.CacheComponent, ClassComponent = ReactTypeOfWork.ClassComponent, ContextConsumer = ReactTypeOfWork.ContextConsumer, DehydratedSuspenseComponent = ReactTypeOfWork.DehydratedSuspenseComponent, ForwardRef = ReactTypeOfWork.ForwardRef,
|
|
267983
|
+
var CacheComponent = ReactTypeOfWork.CacheComponent, ClassComponent = ReactTypeOfWork.ClassComponent, ContextConsumer = ReactTypeOfWork.ContextConsumer, DehydratedSuspenseComponent = ReactTypeOfWork.DehydratedSuspenseComponent, ForwardRef = ReactTypeOfWork.ForwardRef, Fragment17 = 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;
|
|
268001
267984
|
var ImmediatePriority = ReactPriorityLevels.ImmediatePriority, UserBlockingPriority = ReactPriorityLevels.UserBlockingPriority, NormalPriority = ReactPriorityLevels.NormalPriority, LowPriority = ReactPriorityLevels.LowPriority, IdlePriority = ReactPriorityLevels.IdlePriority, NoPriority = ReactPriorityLevels.NoPriority;
|
|
268002
267985
|
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;
|
|
268003
267986
|
var supportsTogglingError = typeof setErrorHandler === "function" && typeof scheduleUpdate === "function";
|
|
@@ -268212,7 +268195,7 @@ var require_backend = __commonJS({
|
|
|
268212
268195
|
return true;
|
|
268213
268196
|
case HostRoot:
|
|
268214
268197
|
return false;
|
|
268215
|
-
case
|
|
268198
|
+
case Fragment17:
|
|
268216
268199
|
return key === null;
|
|
268217
268200
|
default:
|
|
268218
268201
|
var typeSymbol = getTypeSymbol(type);
|
|
@@ -268287,7 +268270,7 @@ var require_backend = __commonJS({
|
|
|
268287
268270
|
return ElementTypeHostComponent;
|
|
268288
268271
|
case HostPortal:
|
|
268289
268272
|
case HostText:
|
|
268290
|
-
case
|
|
268273
|
+
case Fragment17:
|
|
268291
268274
|
return ElementTypeOtherOrUnknown;
|
|
268292
268275
|
case MemoComponent:
|
|
268293
268276
|
case SimpleMemoComponent:
|
|
@@ -275964,6 +275947,15 @@ var init_settingsSchema = __esm({
|
|
|
275964
275947
|
{ value: "en", label: "English" },
|
|
275965
275948
|
{ value: "zh", label: "\u4E2D\u6587 (Chinese)" }
|
|
275966
275949
|
]
|
|
275950
|
+
},
|
|
275951
|
+
terminalBell: {
|
|
275952
|
+
type: "boolean",
|
|
275953
|
+
label: "Terminal Bell",
|
|
275954
|
+
category: "General",
|
|
275955
|
+
requiresRestart: false,
|
|
275956
|
+
default: true,
|
|
275957
|
+
description: "Play terminal bell sound when response completes or needs approval.",
|
|
275958
|
+
showInDialog: true
|
|
275967
275959
|
}
|
|
275968
275960
|
}
|
|
275969
275961
|
},
|
|
@@ -307569,6 +307561,7 @@ var init_en3 = __esm({
|
|
|
307569
307561
|
// Exit Screen / Stats
|
|
307570
307562
|
// ============================================================================
|
|
307571
307563
|
"Agent powering down. Goodbye!": "Agent powering down. Goodbye!",
|
|
307564
|
+
"To continue this session, run": "To continue this session, run",
|
|
307572
307565
|
"Interaction Summary": "Interaction Summary",
|
|
307573
307566
|
"Session ID:": "Session ID:",
|
|
307574
307567
|
"Tool Calls:": "Tool Calls:",
|
|
@@ -308360,6 +308353,7 @@ var init_zh = __esm({
|
|
|
308360
308353
|
// Exit Screen / Stats
|
|
308361
308354
|
// ============================================================================
|
|
308362
308355
|
"Agent powering down. Goodbye!": "RDMind \u6B63\u5728\u5173\u95ED\uFF0C\u518D\u89C1\uFF01",
|
|
308356
|
+
"To continue this session, run": "\u8981\u7EE7\u7EED\u6B64\u4F1A\u8BDD\uFF0C\u8BF7\u8FD0\u884C",
|
|
308363
308357
|
"Interaction Summary": "\u4EA4\u4E92\u6458\u8981",
|
|
308364
308358
|
"Session ID:": "\u4F1A\u8BDD ID\uFF1A",
|
|
308365
308359
|
"Tool Calls:": "\u5DE5\u5177\u8C03\u7528\uFF1A",
|
|
@@ -314396,7 +314390,7 @@ var require_react_is_development = __commonJS({
|
|
|
314396
314390
|
var ContextProvider = REACT_PROVIDER_TYPE;
|
|
314397
314391
|
var Element2 = REACT_ELEMENT_TYPE;
|
|
314398
314392
|
var ForwardRef = REACT_FORWARD_REF_TYPE;
|
|
314399
|
-
var
|
|
314393
|
+
var Fragment17 = REACT_FRAGMENT_TYPE;
|
|
314400
314394
|
var Lazy = REACT_LAZY_TYPE;
|
|
314401
314395
|
var Memo = REACT_MEMO_TYPE;
|
|
314402
314396
|
var Portal = REACT_PORTAL_TYPE;
|
|
@@ -314468,7 +314462,7 @@ var require_react_is_development = __commonJS({
|
|
|
314468
314462
|
exports2.ContextProvider = ContextProvider;
|
|
314469
314463
|
exports2.Element = Element2;
|
|
314470
314464
|
exports2.ForwardRef = ForwardRef;
|
|
314471
|
-
exports2.Fragment =
|
|
314465
|
+
exports2.Fragment = Fragment17;
|
|
314472
314466
|
exports2.Lazy = Lazy;
|
|
314473
314467
|
exports2.Memo = Memo;
|
|
314474
314468
|
exports2.Portal = Portal;
|
|
@@ -346343,7 +346337,7 @@ __name(getPackageJson, "getPackageJson");
|
|
|
346343
346337
|
// packages/cli/src/utils/version.ts
|
|
346344
346338
|
async function getCliVersion() {
|
|
346345
346339
|
const pkgJson = await getPackageJson();
|
|
346346
|
-
return "0.1.5-alpha.
|
|
346340
|
+
return "0.1.5-alpha.1";
|
|
346347
346341
|
}
|
|
346348
346342
|
__name(getCliVersion, "getCliVersion");
|
|
346349
346343
|
|
|
@@ -352881,7 +352875,7 @@ var formatDuration = /* @__PURE__ */ __name((milliseconds) => {
|
|
|
352881
352875
|
|
|
352882
352876
|
// packages/cli/src/generated/git-commit.ts
|
|
352883
352877
|
init_esbuild_shims();
|
|
352884
|
-
var GIT_COMMIT_INFO2 = "
|
|
352878
|
+
var GIT_COMMIT_INFO2 = "cfdb6c3b";
|
|
352885
352879
|
|
|
352886
352880
|
// packages/cli/src/utils/systemInfo.ts
|
|
352887
352881
|
async function getNpmVersion() {
|
|
@@ -353404,18 +353398,6 @@ var copyCommand = {
|
|
|
353404
353398
|
}, "action")
|
|
353405
353399
|
};
|
|
353406
353400
|
|
|
353407
|
-
// packages/cli/src/ui/commands/corgiCommand.ts
|
|
353408
|
-
init_esbuild_shims();
|
|
353409
|
-
var corgiCommand = {
|
|
353410
|
-
name: "corgi",
|
|
353411
|
-
description: "\u5207\u6362 corgi \u6A21\u5F0F",
|
|
353412
|
-
hidden: true,
|
|
353413
|
-
kind: "built-in" /* BUILT_IN */,
|
|
353414
|
-
action: /* @__PURE__ */ __name((context2, _args) => {
|
|
353415
|
-
context2.ui.toggleCorgiMode();
|
|
353416
|
-
}, "action")
|
|
353417
|
-
};
|
|
353418
|
-
|
|
353419
353401
|
// packages/cli/src/ui/commands/createCommand.ts
|
|
353420
353402
|
init_esbuild_shims();
|
|
353421
353403
|
import * as fs80 from "fs";
|
|
@@ -355763,7 +355745,7 @@ function getCurrentLlmOutputLanguage() {
|
|
|
355763
355745
|
if (fs83.existsSync(filePath)) {
|
|
355764
355746
|
try {
|
|
355765
355747
|
const content = fs83.readFileSync(filePath, "utf-8");
|
|
355766
|
-
const match2 = content.match(
|
|
355748
|
+
const match2 = content.match(/^#.*?(\w+)\s+Output Language Rule/i);
|
|
355767
355749
|
if (match2) {
|
|
355768
355750
|
return match2[1];
|
|
355769
355751
|
}
|
|
@@ -355800,7 +355782,7 @@ async function setUiLanguage(context2, lang) {
|
|
|
355800
355782
|
type: "message",
|
|
355801
355783
|
messageType: "info",
|
|
355802
355784
|
content: t3("UI language changed to {{lang}}", {
|
|
355803
|
-
lang: langDisplayNames[lang]
|
|
355785
|
+
lang: langDisplayNames[lang] || lang
|
|
355804
355786
|
})
|
|
355805
355787
|
};
|
|
355806
355788
|
}
|
|
@@ -359375,7 +359357,6 @@ var BuiltinCommandLoader = class {
|
|
|
359375
359357
|
clearCommand,
|
|
359376
359358
|
compressCommand,
|
|
359377
359359
|
copyCommand,
|
|
359378
|
-
corgiCommand,
|
|
359379
359360
|
createCommand,
|
|
359380
359361
|
docsCommand,
|
|
359381
359362
|
directoryCommand,
|
|
@@ -361549,8 +361530,6 @@ function createNonInteractiveUI() {
|
|
|
361549
361530
|
pendingItem: null,
|
|
361550
361531
|
setPendingItem: /* @__PURE__ */ __name((_item) => {
|
|
361551
361532
|
}, "setPendingItem"),
|
|
361552
|
-
toggleCorgiMode: /* @__PURE__ */ __name(() => {
|
|
361553
|
-
}, "toggleCorgiMode"),
|
|
361554
361533
|
toggleVimEnabled: /* @__PURE__ */ __name(async () => false, "toggleVimEnabled"),
|
|
361555
361534
|
setGeminiMdFileCount: /* @__PURE__ */ __name((_count) => {
|
|
361556
361535
|
}, "setGeminiMdFileCount"),
|
|
@@ -387384,13 +387363,27 @@ init_esbuild_shims();
|
|
|
387384
387363
|
var import_jsx_runtime50 = __toESM(require_jsx_runtime(), 1);
|
|
387385
387364
|
var SessionSummaryDisplay = /* @__PURE__ */ __name(({
|
|
387386
387365
|
duration: duration3
|
|
387387
|
-
}) =>
|
|
387388
|
-
|
|
387389
|
-
|
|
387390
|
-
|
|
387391
|
-
|
|
387392
|
-
|
|
387393
|
-
|
|
387366
|
+
}) => {
|
|
387367
|
+
const { stats } = useSessionStats();
|
|
387368
|
+
const hasMessages = stats.promptCount > 0;
|
|
387369
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_jsx_runtime50.Fragment, { children: [
|
|
387370
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
387371
|
+
StatsDisplay,
|
|
387372
|
+
{
|
|
387373
|
+
title: t3("Agent powering down. Goodbye!"),
|
|
387374
|
+
duration: duration3
|
|
387375
|
+
}
|
|
387376
|
+
),
|
|
387377
|
+
hasMessages && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Text3, { color: theme.text.secondary, children: [
|
|
387378
|
+
t3("To continue this session, run"),
|
|
387379
|
+
" ",
|
|
387380
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Text3, { color: theme.text.accent, children: [
|
|
387381
|
+
"qwen --resume ",
|
|
387382
|
+
stats.sessionId
|
|
387383
|
+
] })
|
|
387384
|
+
] }) })
|
|
387385
|
+
] });
|
|
387386
|
+
}, "SessionSummaryDisplay");
|
|
387394
387387
|
|
|
387395
387388
|
// packages/cli/src/ui/components/Help.tsx
|
|
387396
387389
|
init_esbuild_shims();
|
|
@@ -394351,7 +394344,6 @@ var Footer = /* @__PURE__ */ __name(() => {
|
|
|
394351
394344
|
debugMode,
|
|
394352
394345
|
branchName,
|
|
394353
394346
|
debugMessage,
|
|
394354
|
-
corgiMode,
|
|
394355
394347
|
errorCount,
|
|
394356
394348
|
showErrorDetails,
|
|
394357
394349
|
promptTokenCount,
|
|
@@ -394363,7 +394355,6 @@ var Footer = /* @__PURE__ */ __name(() => {
|
|
|
394363
394355
|
debugMode: config2.getDebugMode(),
|
|
394364
394356
|
branchName: uiState.branchName,
|
|
394365
394357
|
debugMessage: uiState.debugMessage,
|
|
394366
|
-
corgiMode: uiState.corgiMode,
|
|
394367
394358
|
errorCount: uiState.errorCount,
|
|
394368
394359
|
showErrorDetails: uiState.showErrorDetails,
|
|
394369
394360
|
promptTokenCount: uiState.sessionStats.lastPromptTokenCount,
|
|
@@ -394448,20 +394439,10 @@ var Footer = /* @__PURE__ */ __name(() => {
|
|
|
394448
394439
|
] }),
|
|
394449
394440
|
showMemoryUsage && /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(MemoryUsageDisplay, {})
|
|
394450
394441
|
] }),
|
|
394451
|
-
/* @__PURE__ */ (0, import_jsx_runtime100.
|
|
394452
|
-
|
|
394453
|
-
|
|
394454
|
-
|
|
394455
|
-
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)(Text3, { color: theme.text.primary, children: "(\xB4" }),
|
|
394456
|
-
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)(Text3, { color: theme.status.error, children: "\u1D25" }),
|
|
394457
|
-
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)(Text3, { color: theme.text.primary, children: "`)" }),
|
|
394458
|
-
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)(Text3, { color: theme.status.error, children: "\u25BC " })
|
|
394459
|
-
] }),
|
|
394460
|
-
!showErrorDetails && errorCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)(Box_default, { children: [
|
|
394461
|
-
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)(Text3, { color: theme.ui.symbol, children: "| " }),
|
|
394462
|
-
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)(ConsoleSummaryDisplay, { errorCount })
|
|
394463
|
-
] })
|
|
394464
|
-
] })
|
|
394442
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)(Box_default, { alignItems: "center", paddingLeft: 2, children: !showErrorDetails && errorCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)(Box_default, { children: [
|
|
394443
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)(Text3, { color: theme.ui.symbol, children: "| " }),
|
|
394444
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)(ConsoleSummaryDisplay, { errorCount })
|
|
394445
|
+
] }) })
|
|
394465
394446
|
] })
|
|
394466
394447
|
]
|
|
394467
394448
|
}
|
|
@@ -396525,7 +396506,6 @@ var useSlashCommandProcessor = /* @__PURE__ */ __name((config2, settings, addIte
|
|
|
396525
396506
|
setDebugMessage: actions.setDebugMessage,
|
|
396526
396507
|
pendingItem,
|
|
396527
396508
|
setPendingItem,
|
|
396528
|
-
toggleCorgiMode: actions.toggleCorgiMode,
|
|
396529
396509
|
toggleVimEnabled,
|
|
396530
396510
|
setGeminiMdFileCount,
|
|
396531
396511
|
reloadCommands,
|
|
@@ -403163,6 +403143,9 @@ init_esbuild_shims();
|
|
|
403163
403143
|
import process49 from "node:process";
|
|
403164
403144
|
var TERMINAL_BELL = "\x07";
|
|
403165
403145
|
function notifyTerminalAttention(_reason, options2 = {}) {
|
|
403146
|
+
if (options2.enabled === false) {
|
|
403147
|
+
return false;
|
|
403148
|
+
}
|
|
403166
403149
|
const stream2 = options2.stream ?? process49.stdout;
|
|
403167
403150
|
if (!stream2?.write || stream2.isTTY === false) {
|
|
403168
403151
|
return false;
|
|
@@ -403182,19 +403165,23 @@ var LONG_TASK_NOTIFICATION_THRESHOLD_SECONDS = 20;
|
|
|
403182
403165
|
var useAttentionNotifications = /* @__PURE__ */ __name(({
|
|
403183
403166
|
isFocused,
|
|
403184
403167
|
streamingState,
|
|
403185
|
-
elapsedTime
|
|
403168
|
+
elapsedTime,
|
|
403169
|
+
settings
|
|
403186
403170
|
}) => {
|
|
403171
|
+
const terminalBellEnabled = settings?.merged?.general?.terminalBell ?? true;
|
|
403187
403172
|
const awaitingNotificationSentRef = (0, import_react131.useRef)(false);
|
|
403188
403173
|
const respondingElapsedRef = (0, import_react131.useRef)(0);
|
|
403189
403174
|
(0, import_react131.useEffect)(() => {
|
|
403190
403175
|
if (streamingState === "waiting_for_confirmation" /* WaitingForConfirmation */ && !isFocused && !awaitingNotificationSentRef.current) {
|
|
403191
|
-
notifyTerminalAttention("tool_approval" /* ToolApproval
|
|
403176
|
+
notifyTerminalAttention("tool_approval" /* ToolApproval */, {
|
|
403177
|
+
enabled: terminalBellEnabled
|
|
403178
|
+
});
|
|
403192
403179
|
awaitingNotificationSentRef.current = true;
|
|
403193
403180
|
}
|
|
403194
403181
|
if (streamingState !== "waiting_for_confirmation" /* WaitingForConfirmation */ || isFocused) {
|
|
403195
403182
|
awaitingNotificationSentRef.current = false;
|
|
403196
403183
|
}
|
|
403197
|
-
}, [isFocused, streamingState]);
|
|
403184
|
+
}, [isFocused, streamingState, terminalBellEnabled]);
|
|
403198
403185
|
(0, import_react131.useEffect)(() => {
|
|
403199
403186
|
if (streamingState === "responding" /* Responding */) {
|
|
403200
403187
|
respondingElapsedRef.current = elapsedTime;
|
|
@@ -403203,12 +403190,14 @@ var useAttentionNotifications = /* @__PURE__ */ __name(({
|
|
|
403203
403190
|
if (streamingState === "idle" /* Idle */) {
|
|
403204
403191
|
const wasLongTask = respondingElapsedRef.current >= LONG_TASK_NOTIFICATION_THRESHOLD_SECONDS;
|
|
403205
403192
|
if (wasLongTask && !isFocused) {
|
|
403206
|
-
notifyTerminalAttention("long_task_complete" /* LongTaskComplete
|
|
403193
|
+
notifyTerminalAttention("long_task_complete" /* LongTaskComplete */, {
|
|
403194
|
+
enabled: terminalBellEnabled
|
|
403195
|
+
});
|
|
403207
403196
|
}
|
|
403208
403197
|
respondingElapsedRef.current = 0;
|
|
403209
403198
|
return;
|
|
403210
403199
|
}
|
|
403211
|
-
}, [streamingState, elapsedTime, isFocused]);
|
|
403200
|
+
}, [streamingState, elapsedTime, isFocused, terminalBellEnabled]);
|
|
403212
403201
|
}, "useAttentionNotifications");
|
|
403213
403202
|
|
|
403214
403203
|
// packages/cli/src/ui/hooks/useWebSocket.ts
|
|
@@ -403879,7 +403868,6 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
403879
403868
|
const { settings, config: config2, initializationResult } = props;
|
|
403880
403869
|
const historyManager = useHistory();
|
|
403881
403870
|
useMemoryMonitor(historyManager);
|
|
403882
|
-
const [corgiMode, setCorgiMode] = (0, import_react133.useState)(false);
|
|
403883
403871
|
const [debugMessage, setDebugMessage] = (0, import_react133.useState)("");
|
|
403884
403872
|
const [quittingMessages, setQuittingMessages] = (0, import_react133.useState)(null);
|
|
403885
403873
|
const [themeError, setThemeError] = (0, import_react133.useState)(
|
|
@@ -404321,7 +404309,6 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
404321
404309
|
}, 100);
|
|
404322
404310
|
}, "quit"),
|
|
404323
404311
|
setDebugMessage,
|
|
404324
|
-
toggleCorgiMode: /* @__PURE__ */ __name(() => setCorgiMode((prev) => !prev), "toggleCorgiMode"),
|
|
404325
404312
|
dispatchExtensionStateUpdate,
|
|
404326
404313
|
addConfirmUpdateExtensionRequest,
|
|
404327
404314
|
openSubagentCreateDialog,
|
|
@@ -404334,7 +404321,6 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
404334
404321
|
openSettingsDialog,
|
|
404335
404322
|
openModelDialog,
|
|
404336
404323
|
setDebugMessage,
|
|
404337
|
-
setCorgiMode,
|
|
404338
404324
|
dispatchExtensionStateUpdate,
|
|
404339
404325
|
openPermissionsDialog,
|
|
404340
404326
|
openApprovalModeDialog,
|
|
@@ -404690,7 +404676,8 @@ ${queuedText}` : queuedText;
|
|
|
404690
404676
|
useAttentionNotifications({
|
|
404691
404677
|
isFocused,
|
|
404692
404678
|
streamingState,
|
|
404693
|
-
elapsedTime
|
|
404679
|
+
elapsedTime,
|
|
404680
|
+
settings
|
|
404694
404681
|
});
|
|
404695
404682
|
const { closeAnyOpenDialog } = useDialogClose({
|
|
404696
404683
|
isThemeDialogOpen,
|
|
@@ -404880,7 +404867,6 @@ ${queuedText}` : queuedText;
|
|
|
404880
404867
|
authMessage,
|
|
404881
404868
|
editorError,
|
|
404882
404869
|
isEditorDialogOpen,
|
|
404883
|
-
corgiMode,
|
|
404884
404870
|
debugMessage,
|
|
404885
404871
|
quittingMessages,
|
|
404886
404872
|
isSettingsDialogOpen,
|
|
@@ -404976,7 +404962,6 @@ ${queuedText}` : queuedText;
|
|
|
404976
404962
|
authMessage,
|
|
404977
404963
|
editorError,
|
|
404978
404964
|
isEditorDialogOpen,
|
|
404979
|
-
corgiMode,
|
|
404980
404965
|
debugMessage,
|
|
404981
404966
|
quittingMessages,
|
|
404982
404967
|
isSettingsDialogOpen,
|
|
@@ -406497,6 +406482,7 @@ var AGENT_METHODS = {
|
|
|
406497
406482
|
var CLIENT_METHODS = {
|
|
406498
406483
|
fs_read_text_file: "fs/read_text_file",
|
|
406499
406484
|
fs_write_text_file: "fs/write_text_file",
|
|
406485
|
+
authenticate_update: "authenticate/update",
|
|
406500
406486
|
session_request_permission: "session/request_permission",
|
|
406501
406487
|
session_update: "session/update"
|
|
406502
406488
|
};
|
|
@@ -406579,7 +406565,11 @@ var setModeResponseSchema = external_exports.object({
|
|
|
406579
406565
|
var authenticateRequestSchema = external_exports.object({
|
|
406580
406566
|
methodId: external_exports.string()
|
|
406581
406567
|
});
|
|
406582
|
-
var
|
|
406568
|
+
var authenticateUpdateSchema = external_exports.object({
|
|
406569
|
+
_meta: external_exports.object({
|
|
406570
|
+
authUri: external_exports.string()
|
|
406571
|
+
})
|
|
406572
|
+
});
|
|
406583
406573
|
var newSessionResponseSchema = external_exports.object({
|
|
406584
406574
|
sessionId: external_exports.string()
|
|
406585
406575
|
});
|
|
@@ -406840,7 +406830,6 @@ var sessionUpdateSchema = external_exports.union([
|
|
|
406840
406830
|
]);
|
|
406841
406831
|
var agentResponseSchema = external_exports.union([
|
|
406842
406832
|
initializeResponseSchema,
|
|
406843
|
-
authenticateResponseSchema,
|
|
406844
406833
|
newSessionResponseSchema,
|
|
406845
406834
|
loadSessionResponseSchema,
|
|
406846
406835
|
promptResponseSchema,
|
|
@@ -406941,6 +406930,15 @@ var AgentSideConnection = class {
|
|
|
406941
406930
|
params
|
|
406942
406931
|
);
|
|
406943
406932
|
}
|
|
406933
|
+
/**
|
|
406934
|
+
* Streams authentication updates (e.g. Qwen OAuth authUri) to the client.
|
|
406935
|
+
*/
|
|
406936
|
+
async authenticateUpdate(params) {
|
|
406937
|
+
return await this.#connection.sendNotification(
|
|
406938
|
+
CLIENT_METHODS.authenticate_update,
|
|
406939
|
+
params
|
|
406940
|
+
);
|
|
406941
|
+
}
|
|
406944
406942
|
/**
|
|
406945
406943
|
* Request permission before running a tool
|
|
406946
406944
|
*
|
|
@@ -407028,12 +407026,17 @@ var Connection = class {
|
|
|
407028
407026
|
JSON.stringify(error2.format(), void 0, 2)
|
|
407029
407027
|
).toResult();
|
|
407030
407028
|
}
|
|
407029
|
+
let errorName;
|
|
407031
407030
|
let details;
|
|
407032
407031
|
if (error2 instanceof Error) {
|
|
407032
|
+
errorName = error2.name;
|
|
407033
407033
|
details = error2.message;
|
|
407034
407034
|
} else if (typeof error2 === "object" && error2 != null && "message" in error2 && typeof error2.message === "string") {
|
|
407035
407035
|
details = error2.message;
|
|
407036
407036
|
}
|
|
407037
|
+
if (errorName === "TokenManagerError") {
|
|
407038
|
+
return RequestError.authRequired(details).toResult();
|
|
407039
|
+
}
|
|
407037
407040
|
return RequestError.internalError(details).toResult();
|
|
407038
407041
|
}
|
|
407039
407042
|
}
|
|
@@ -408687,7 +408690,7 @@ var GeminiAgent = class {
|
|
|
408687
408690
|
name: APPROVAL_MODE_INFO[mode].name,
|
|
408688
408691
|
description: APPROVAL_MODE_INFO[mode].description
|
|
408689
408692
|
}));
|
|
408690
|
-
const version3 = "0.1.5-alpha.
|
|
408693
|
+
const version3 = "0.1.5-alpha.1";
|
|
408691
408694
|
return {
|
|
408692
408695
|
protocolVersion: PROTOCOL_VERSION,
|
|
408693
408696
|
agentInfo: {
|
|
@@ -408712,13 +408715,28 @@ var GeminiAgent = class {
|
|
|
408712
408715
|
}
|
|
408713
408716
|
async authenticate({ methodId }) {
|
|
408714
408717
|
const method = external_exports.nativeEnum(AuthType2).parse(methodId);
|
|
408718
|
+
let authUri;
|
|
408719
|
+
const authUriHandler = /* @__PURE__ */ __name((deviceAuth) => {
|
|
408720
|
+
authUri = deviceAuth.verification_uri_complete;
|
|
408721
|
+
void this.client.authenticateUpdate({ _meta: { authUri } });
|
|
408722
|
+
}, "authUriHandler");
|
|
408723
|
+
if (method === "qwen-oauth" /* QWEN_OAUTH */) {
|
|
408724
|
+
qwenOAuth2Events.once("auth-uri" /* AuthUri */, authUriHandler);
|
|
408725
|
+
}
|
|
408715
408726
|
await clearCachedCredentialFile();
|
|
408716
|
-
|
|
408717
|
-
|
|
408718
|
-
|
|
408719
|
-
|
|
408720
|
-
|
|
408721
|
-
|
|
408727
|
+
try {
|
|
408728
|
+
await this.config.refreshAuth(method);
|
|
408729
|
+
this.settings.setValue(
|
|
408730
|
+
"User" /* User */,
|
|
408731
|
+
"security.auth.selectedType",
|
|
408732
|
+
method
|
|
408733
|
+
);
|
|
408734
|
+
} finally {
|
|
408735
|
+
if (method === "qwen-oauth" /* QWEN_OAUTH */) {
|
|
408736
|
+
qwenOAuth2Events.off("auth-uri" /* AuthUri */, authUriHandler);
|
|
408737
|
+
}
|
|
408738
|
+
}
|
|
408739
|
+
return;
|
|
408722
408740
|
}
|
|
408723
408741
|
async newSession({
|
|
408724
408742
|
cwd: cwd7,
|
|
@@ -408829,13 +408847,15 @@ var GeminiAgent = class {
|
|
|
408829
408847
|
async ensureAuthenticated(config2) {
|
|
408830
408848
|
const selectedType = this.settings.merged.security?.auth?.selectedType;
|
|
408831
408849
|
if (!selectedType) {
|
|
408832
|
-
throw RequestError.authRequired();
|
|
408850
|
+
throw RequestError.authRequired("No Selected Type");
|
|
408833
408851
|
}
|
|
408834
408852
|
try {
|
|
408835
|
-
await config2.refreshAuth(selectedType);
|
|
408853
|
+
await config2.refreshAuth(selectedType, true);
|
|
408836
408854
|
} catch (e3) {
|
|
408837
408855
|
console.error(`Authentication failed: ${e3}`);
|
|
408838
|
-
throw RequestError.authRequired(
|
|
408856
|
+
throw RequestError.authRequired(
|
|
408857
|
+
"Authentication failed: " + e3.message
|
|
408858
|
+
);
|
|
408839
408859
|
}
|
|
408840
408860
|
}
|
|
408841
408861
|
setupFileSystem(config2) {
|
package/locales/en.js
CHANGED
|
@@ -893,6 +893,7 @@ export default {
|
|
|
893
893
|
// Exit Screen / Stats
|
|
894
894
|
// ============================================================================
|
|
895
895
|
'Agent powering down. Goodbye!': 'Agent powering down. Goodbye!',
|
|
896
|
+
'To continue this session, run': 'To continue this session, run',
|
|
896
897
|
'Interaction Summary': 'Interaction Summary',
|
|
897
898
|
'Session ID:': 'Session ID:',
|
|
898
899
|
'Tool Calls:': 'Tool Calls:',
|
package/locales/zh.js
CHANGED
|
@@ -843,6 +843,7 @@ export default {
|
|
|
843
843
|
// Exit Screen / Stats
|
|
844
844
|
// ============================================================================
|
|
845
845
|
'Agent powering down. Goodbye!': 'RDMind 正在关闭,再见!',
|
|
846
|
+
'To continue this session, run': '要继续此会话,请运行',
|
|
846
847
|
'Interaction Summary': '交互摘要',
|
|
847
848
|
'Session ID:': '会话 ID:',
|
|
848
849
|
'Tool Calls:': '工具调用:',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rdmind/rdmind",
|
|
3
|
-
"version": "0.1.5-alpha.
|
|
3
|
+
"version": "0.1.5-alpha.1",
|
|
4
4
|
"description": "RDMind - AI-powered coding assistant",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "cli.js",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"locales"
|
|
21
21
|
],
|
|
22
22
|
"config": {
|
|
23
|
-
"sandboxImageUri": "ghcr.io/qwenlm/qwen-code:0.1.5-alpha.
|
|
23
|
+
"sandboxImageUri": "ghcr.io/qwenlm/qwen-code:0.1.5-alpha.1"
|
|
24
24
|
},
|
|
25
25
|
"publishConfig": {
|
|
26
26
|
"access": "public"
|