@rdmind/rdmind 0.0.15 → 0.0.16-alpha.3
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 +83 -52
- package/package.json +2 -2
package/cli.js
CHANGED
|
@@ -181372,7 +181372,7 @@ var init_converter2 = __esm({
|
|
|
181372
181372
|
messages.push({
|
|
181373
181373
|
role: "tool",
|
|
181374
181374
|
tool_call_id: funcResponse.id || "",
|
|
181375
|
-
content:
|
|
181375
|
+
content: this.extractFunctionResponseContent(funcResponse.response)
|
|
181376
181376
|
});
|
|
181377
181377
|
}
|
|
181378
181378
|
return;
|
|
@@ -181437,6 +181437,31 @@ var init_converter2 = __esm({
|
|
|
181437
181437
|
}
|
|
181438
181438
|
return { textParts, functionCalls, functionResponses, mediaParts };
|
|
181439
181439
|
}
|
|
181440
|
+
extractFunctionResponseContent(response) {
|
|
181441
|
+
if (response === null || response === void 0) {
|
|
181442
|
+
return "";
|
|
181443
|
+
}
|
|
181444
|
+
if (typeof response === "string") {
|
|
181445
|
+
return response;
|
|
181446
|
+
}
|
|
181447
|
+
if (typeof response === "object") {
|
|
181448
|
+
const responseObject = response;
|
|
181449
|
+
const output = responseObject["output"];
|
|
181450
|
+
if (typeof output === "string") {
|
|
181451
|
+
return output;
|
|
181452
|
+
}
|
|
181453
|
+
const error = responseObject["error"];
|
|
181454
|
+
if (typeof error === "string") {
|
|
181455
|
+
return error;
|
|
181456
|
+
}
|
|
181457
|
+
}
|
|
181458
|
+
try {
|
|
181459
|
+
const serialized = JSON.stringify(response);
|
|
181460
|
+
return serialized ?? String(response);
|
|
181461
|
+
} catch {
|
|
181462
|
+
return String(response);
|
|
181463
|
+
}
|
|
181464
|
+
}
|
|
181440
181465
|
/**
|
|
181441
181466
|
* Determine media type from MIME type
|
|
181442
181467
|
*/
|
|
@@ -183623,7 +183648,7 @@ function createContentGeneratorConfig(config, authType, generationConfig) {
|
|
|
183623
183648
|
return newContentGeneratorConfig;
|
|
183624
183649
|
}
|
|
183625
183650
|
async function createContentGenerator(config, gcConfig, sessionId2) {
|
|
183626
|
-
const version2 = "0.0.
|
|
183651
|
+
const version2 = "0.0.16-alpha.3";
|
|
183627
183652
|
const userAgent2 = `QwenCode/${version2} (${process.platform}; ${process.arch})`;
|
|
183628
183653
|
const baseHeaders = {
|
|
183629
183654
|
"User-Agent": userAgent2
|
|
@@ -244221,7 +244246,7 @@ ${newContent2}`,
|
|
|
244221
244246
|
if (!fact || typeof fact !== "string" || fact.trim() === "") {
|
|
244222
244247
|
const errorMessage = 'Parameter "fact" must be a non-empty string.';
|
|
244223
244248
|
return {
|
|
244224
|
-
llmContent:
|
|
244249
|
+
llmContent: `Error: ${errorMessage}`,
|
|
244225
244250
|
returnDisplay: `Error: ${errorMessage}`
|
|
244226
244251
|
};
|
|
244227
244252
|
}
|
|
@@ -244233,10 +244258,7 @@ ${newContent2}`,
|
|
|
244233
244258
|
Global: ${globalPath} (shared across all projects)
|
|
244234
244259
|
Project: ${projectPath} (current project only)`;
|
|
244235
244260
|
return {
|
|
244236
|
-
llmContent:
|
|
244237
|
-
success: false,
|
|
244238
|
-
error: "Please specify where to save this memory"
|
|
244239
|
-
}),
|
|
244261
|
+
llmContent: errorMessage,
|
|
244240
244262
|
returnDisplay: errorMessage
|
|
244241
244263
|
};
|
|
244242
244264
|
}
|
|
@@ -244250,10 +244272,7 @@ Project: ${projectPath} (current project only)`;
|
|
|
244250
244272
|
await fs19.writeFile(memoryFilePath, modified_content, "utf-8");
|
|
244251
244273
|
const successMessage = `Okay, I've updated the ${scope} memory file with your modifications.`;
|
|
244252
244274
|
return {
|
|
244253
|
-
llmContent:
|
|
244254
|
-
success: true,
|
|
244255
|
-
message: successMessage
|
|
244256
|
-
}),
|
|
244275
|
+
llmContent: successMessage,
|
|
244257
244276
|
returnDisplay: successMessage
|
|
244258
244277
|
};
|
|
244259
244278
|
} else {
|
|
@@ -244264,10 +244283,7 @@ Project: ${projectPath} (current project only)`;
|
|
|
244264
244283
|
});
|
|
244265
244284
|
const successMessage = `Okay, I've remembered that in ${scope} memory: "${fact}"`;
|
|
244266
244285
|
return {
|
|
244267
|
-
llmContent:
|
|
244268
|
-
success: true,
|
|
244269
|
-
message: successMessage
|
|
244270
|
-
}),
|
|
244286
|
+
llmContent: successMessage,
|
|
244271
244287
|
returnDisplay: successMessage
|
|
244272
244288
|
};
|
|
244273
244289
|
}
|
|
@@ -244277,10 +244293,7 @@ Project: ${projectPath} (current project only)`;
|
|
|
244277
244293
|
`[MemoryTool] Error executing save_memory for fact "${fact}" in ${scope}: ${errorMessage}`
|
|
244278
244294
|
);
|
|
244279
244295
|
return {
|
|
244280
|
-
llmContent:
|
|
244281
|
-
success: false,
|
|
244282
|
-
error: `Failed to save memory. Detail: ${errorMessage}`
|
|
244283
|
-
}),
|
|
244296
|
+
llmContent: `Error saving memory: ${errorMessage}`,
|
|
244284
244297
|
returnDisplay: `Error saving memory: ${errorMessage}`,
|
|
244285
244298
|
error: {
|
|
244286
244299
|
message: errorMessage,
|
|
@@ -244478,7 +244491,9 @@ __name(getCustomSystemPrompt, "getCustomSystemPrompt");
|
|
|
244478
244491
|
function getCoreSystemPrompt(userMemory, model) {
|
|
244479
244492
|
let systemMdEnabled = false;
|
|
244480
244493
|
let systemMdPath = path17.resolve(path17.join(QWEN_CONFIG_DIR, "system.md"));
|
|
244481
|
-
const systemMdResolution = resolvePathFromEnv(
|
|
244494
|
+
const systemMdResolution = resolvePathFromEnv(
|
|
244495
|
+
process18.env["RDMind_SYSTEM_MD"]
|
|
244496
|
+
);
|
|
244482
244497
|
if (systemMdResolution.value && !systemMdResolution.isDisabled) {
|
|
244483
244498
|
systemMdEnabled = true;
|
|
244484
244499
|
if (!systemMdResolution.isSwitch) {
|
|
@@ -272994,15 +273009,11 @@ var ExitPlanModeToolInvocation = class extends BaseToolInvocation {
|
|
|
272994
273009
|
if (!this.wasApproved) {
|
|
272995
273010
|
const rejectionMessage = "Plan execution was not approved. Remaining in plan mode.";
|
|
272996
273011
|
return {
|
|
272997
|
-
llmContent:
|
|
272998
|
-
success: false,
|
|
272999
|
-
plan,
|
|
273000
|
-
error: rejectionMessage
|
|
273001
|
-
}),
|
|
273012
|
+
llmContent: rejectionMessage,
|
|
273002
273013
|
returnDisplay: rejectionMessage
|
|
273003
273014
|
};
|
|
273004
273015
|
}
|
|
273005
|
-
const llmMessage =
|
|
273016
|
+
const llmMessage = `User has approved your plan. You can now start coding. Start with updating your todo list if applicable.`;
|
|
273006
273017
|
const displayMessage = "User approved the plan.";
|
|
273007
273018
|
return {
|
|
273008
273019
|
llmContent: llmMessage,
|
|
@@ -273017,11 +273028,9 @@ var ExitPlanModeToolInvocation = class extends BaseToolInvocation {
|
|
|
273017
273028
|
console.error(
|
|
273018
273029
|
`[ExitPlanModeTool] Error executing exit_plan_mode: ${errorMessage}`
|
|
273019
273030
|
);
|
|
273031
|
+
const errorLlmContent = `Failed to present plan: ${errorMessage}`;
|
|
273020
273032
|
return {
|
|
273021
|
-
llmContent:
|
|
273022
|
-
success: false,
|
|
273023
|
-
error: `Failed to present plan. Detail: ${errorMessage}`
|
|
273024
|
-
}),
|
|
273033
|
+
llmContent: errorLlmContent,
|
|
273025
273034
|
returnDisplay: `Error presenting plan: ${errorMessage}`
|
|
273026
273035
|
};
|
|
273027
273036
|
}
|
|
@@ -276056,12 +276065,32 @@ var TodoWriteToolInvocation = class extends BaseToolInvocation {
|
|
|
276056
276065
|
todos: finalTodos,
|
|
276057
276066
|
title: title || "\u6D41\u7A0BTodo"
|
|
276058
276067
|
};
|
|
276068
|
+
const todosData = {
|
|
276069
|
+
title: title || "\u6D41\u7A0BTodo",
|
|
276070
|
+
todos: finalTodos
|
|
276071
|
+
};
|
|
276072
|
+
const todosJson = JSON.stringify(todosData);
|
|
276073
|
+
let llmContent;
|
|
276074
|
+
if (finalTodos.length === 0) {
|
|
276075
|
+
llmContent = `Todo list has been cleared.
|
|
276076
|
+
|
|
276077
|
+
<system-reminder>
|
|
276078
|
+
Your todo list is now empty. DO NOT mention this explicitly to the user. You have no pending tasks in your todo list.
|
|
276079
|
+
Title: ${title || "\u6D41\u7A0BTodo"}
|
|
276080
|
+
</system-reminder>`;
|
|
276081
|
+
} else {
|
|
276082
|
+
llmContent = `Todos have been modified successfully. Ensure that you continue to use the todo list to track your progress. Please proceed with the current tasks if applicable
|
|
276083
|
+
|
|
276084
|
+
<system-reminder>
|
|
276085
|
+
Your todo list has changed. DO NOT mention this explicitly to the user. Here are the latest contents of your todo list:
|
|
276086
|
+
|
|
276087
|
+
${todosJson}
|
|
276088
|
+
|
|
276089
|
+
Continue on with the tasks at hand if applicable.
|
|
276090
|
+
</system-reminder>`;
|
|
276091
|
+
}
|
|
276059
276092
|
return {
|
|
276060
|
-
llmContent
|
|
276061
|
-
success: true,
|
|
276062
|
-
todos: finalTodos,
|
|
276063
|
-
title: title || "\u6D41\u7A0BTodo"
|
|
276064
|
-
}),
|
|
276093
|
+
llmContent,
|
|
276065
276094
|
returnDisplay: todoResultDisplay
|
|
276066
276095
|
};
|
|
276067
276096
|
} catch (error) {
|
|
@@ -276069,11 +276098,13 @@ var TodoWriteToolInvocation = class extends BaseToolInvocation {
|
|
|
276069
276098
|
console.error(
|
|
276070
276099
|
`[TodoWriteTool] Error executing todo_write: ${errorMessage}`
|
|
276071
276100
|
);
|
|
276101
|
+
const errorLlmContent = `Failed to modify todos. An error occurred during the operation.
|
|
276102
|
+
|
|
276103
|
+
<system-reminder>
|
|
276104
|
+
Todo list modification failed with error: ${errorMessage}. You may need to retry or handle this error appropriately.
|
|
276105
|
+
</system-reminder>`;
|
|
276072
276106
|
return {
|
|
276073
|
-
llmContent:
|
|
276074
|
-
success: false,
|
|
276075
|
-
error: `Failed to write todos. Detail: ${errorMessage}`
|
|
276076
|
-
}),
|
|
276107
|
+
llmContent: errorLlmContent,
|
|
276077
276108
|
returnDisplay: `Error writing todos: ${errorMessage}`
|
|
276078
276109
|
};
|
|
276079
276110
|
}
|
|
@@ -318655,7 +318686,7 @@ init_esbuild_shims();
|
|
|
318655
318686
|
|
|
318656
318687
|
// packages/cli/src/generated/git-commit.ts
|
|
318657
318688
|
init_esbuild_shims();
|
|
318658
|
-
var GIT_COMMIT_INFO2 = "
|
|
318689
|
+
var GIT_COMMIT_INFO2 = "feddc548";
|
|
318659
318690
|
|
|
318660
318691
|
// packages/cli/src/ui/components/AboutBox.tsx
|
|
318661
318692
|
var import_jsx_runtime43 = __toESM(require_jsx_runtime(), 1);
|
|
@@ -340713,7 +340744,7 @@ __name(getPackageJson, "getPackageJson");
|
|
|
340713
340744
|
// packages/cli/src/utils/version.ts
|
|
340714
340745
|
async function getCliVersion() {
|
|
340715
340746
|
const pkgJson = await getPackageJson();
|
|
340716
|
-
return "0.0.
|
|
340747
|
+
return "0.0.16-alpha.3";
|
|
340717
340748
|
}
|
|
340718
340749
|
__name(getCliVersion, "getCliVersion");
|
|
340719
340750
|
|
|
@@ -343118,7 +343149,7 @@ var listCommand3 = {
|
|
|
343118
343149
|
};
|
|
343119
343150
|
var saveCommand = {
|
|
343120
343151
|
name: "save",
|
|
343121
|
-
description: "\u5C06\u5F53\u524D\u5BF9\u8BDD\u4FDD\u5B58\u4E3A\u68C0\u67E5\u70B9\uFF0C\u7528\u6CD5
|
|
343152
|
+
description: "\u5C06\u5F53\u524D\u5BF9\u8BDD\u4FDD\u5B58\u4E3A\u68C0\u67E5\u70B9\uFF0C\u7528\u6CD5\uFF1A/chat save <tag>",
|
|
343122
343153
|
kind: "built-in" /* BUILT_IN */,
|
|
343123
343154
|
action: /* @__PURE__ */ __name(async (context2, args) => {
|
|
343124
343155
|
const tag2 = args.trim();
|
|
@@ -343177,7 +343208,7 @@ var saveCommand = {
|
|
|
343177
343208
|
var resumeCommand = {
|
|
343178
343209
|
name: "resume",
|
|
343179
343210
|
altNames: ["load"],
|
|
343180
|
-
description: "\u4ECE\u68C0\u67E5\u70B9\u6062\u590D\u5BF9\u8BDD\uFF0C\u7528\u6CD5
|
|
343211
|
+
description: "\u4ECE\u68C0\u67E5\u70B9\u6062\u590D\u5BF9\u8BDD\uFF0C\u7528\u6CD5\uFF1A/chat resume <tag>",
|
|
343181
343212
|
kind: "built-in" /* BUILT_IN */,
|
|
343182
343213
|
action: /* @__PURE__ */ __name(async (context2, args) => {
|
|
343183
343214
|
const tag2 = args.trim();
|
|
@@ -343234,7 +343265,7 @@ var resumeCommand = {
|
|
|
343234
343265
|
};
|
|
343235
343266
|
var deleteCommand = {
|
|
343236
343267
|
name: "delete",
|
|
343237
|
-
description: "\u5220\u9664\u5BF9\u8BDD\u68C0\u67E5\u70B9\uFF0C\u7528\u6CD5
|
|
343268
|
+
description: "\u5220\u9664\u5BF9\u8BDD\u68C0\u67E5\u70B9\uFF0C\u7528\u6CD5\uFF1A/chat delete <tag>",
|
|
343238
343269
|
kind: "built-in" /* BUILT_IN */,
|
|
343239
343270
|
action: /* @__PURE__ */ __name(async (context2, args) => {
|
|
343240
343271
|
const tag2 = args.trim();
|
|
@@ -343304,7 +343335,7 @@ ${text}`;
|
|
|
343304
343335
|
__name(serializeHistoryToMarkdown, "serializeHistoryToMarkdown");
|
|
343305
343336
|
var shareCommand = {
|
|
343306
343337
|
name: "share",
|
|
343307
|
-
description: "
|
|
343338
|
+
description: "\u5C06\u5F53\u524D\u5BF9\u8BDD\u5206\u4EAB\u5230 markdown \u6216 json \u6587\u4EF6\u3002\u7528\u6CD5\uFF1A/chat share <\u6587\u4EF6>",
|
|
343308
343339
|
kind: "built-in" /* BUILT_IN */,
|
|
343309
343340
|
action: /* @__PURE__ */ __name(async (context2, args) => {
|
|
343310
343341
|
let filePathArg = args.trim();
|
|
@@ -343812,7 +343843,7 @@ async function createJavaFlsProject(context2, projectName) {
|
|
|
343812
343843
|
__name(createJavaFlsProject, "createJavaFlsProject");
|
|
343813
343844
|
var javaSnsCommand = {
|
|
343814
343845
|
name: "sns",
|
|
343815
|
-
description: "\
|
|
343846
|
+
description: "\u793E\u533A",
|
|
343816
343847
|
kind: "built-in" /* BUILT_IN */,
|
|
343817
343848
|
action: /* @__PURE__ */ __name(async (context2, args) => {
|
|
343818
343849
|
const projectName = args.trim();
|
|
@@ -343831,7 +343862,7 @@ var javaSnsCommand = {
|
|
|
343831
343862
|
};
|
|
343832
343863
|
var javaFlsCommand = {
|
|
343833
343864
|
name: "fls",
|
|
343834
|
-
description: "\
|
|
343865
|
+
description: "\u7535\u5546",
|
|
343835
343866
|
kind: "built-in" /* BUILT_IN */,
|
|
343836
343867
|
action: /* @__PURE__ */ __name(async (context2, args) => {
|
|
343837
343868
|
const projectName = args.trim();
|
|
@@ -343859,7 +343890,7 @@ var javaCommand = {
|
|
|
343859
343890
|
context2.ui.addItem(
|
|
343860
343891
|
{
|
|
343861
343892
|
type: "error" /* ERROR */,
|
|
343862
|
-
text: "\u274C \u8BF7\u9009\u62E9\u4E1A\u52A1\u6A21\u5757\u7C7B\u578B\u3002\n\n\u53EF\u7528\u7684\u4E1A\u52A1\u6A21\u5757\uFF1A\n\u2022 sns - SNS\u793E\
|
|
343893
|
+
text: "\u274C \u8BF7\u9009\u62E9\u4E1A\u52A1\u6A21\u5757\u7C7B\u578B\u3002\n\n\u53EF\u7528\u7684\u4E1A\u52A1\u6A21\u5757\uFF1A\n\u2022 sns - SNS\u793E\u533A\u4E1A\u52A1\u6A21\u5757\n\u2022 fls - FLS\u4E1A\u52A1\u6A21\u5757\n\n\u4F7F\u7528\u683C\u5F0F\uFF1A\n\u2022 /create java sns <\u9879\u76EE\u540D>\n\u2022 /create java fls <\u9879\u76EE\u540D>"
|
|
343863
343894
|
},
|
|
343864
343895
|
Date.now()
|
|
343865
343896
|
);
|
|
@@ -343888,7 +343919,7 @@ var javaCommand = {
|
|
|
343888
343919
|
};
|
|
343889
343920
|
var createCommand = {
|
|
343890
343921
|
name: "create",
|
|
343891
|
-
description: "\u521B\u5EFA\u9879\u76EE\u811A\u624B\u67B6",
|
|
343922
|
+
description: "\u521B\u5EFA\u9879\u76EE\u811A\u624B\u67B6\uFF0C\u7528\u6CD5\uFF1A/create java sns <\u9879\u76EE\u540D>",
|
|
343892
343923
|
kind: "built-in" /* BUILT_IN */,
|
|
343893
343924
|
subCommands: [javaCommand],
|
|
343894
343925
|
action: /* @__PURE__ */ __name(async (context2, args) => {
|
|
@@ -343897,7 +343928,7 @@ var createCommand = {
|
|
|
343897
343928
|
context2.ui.addItem(
|
|
343898
343929
|
{
|
|
343899
343930
|
type: "error" /* ERROR */,
|
|
343900
|
-
text: "\u274C \u8BF7\u9009\u62E9\u4E1A\u52A1\u6A21\u5757\u7C7B\u578B\u3002\n\n\u53EF\u7528\u7684\u4E1A\u52A1\u6A21\u5757\uFF1A\n\u2022 sns - SNS\u793E\
|
|
343931
|
+
text: "\u274C \u8BF7\u9009\u62E9\u4E1A\u52A1\u6A21\u5757\u7C7B\u578B\u3002\n\n\u53EF\u7528\u7684\u4E1A\u52A1\u6A21\u5757\uFF1A\n\u2022 sns - SNS\u793E\u533A\u4E1A\u52A1\u6A21\u5757\n\u2022 fls - FLS\u4E1A\u52A1\u6A21\u5757\n\n\u4F7F\u7528\u683C\u5F0F\uFF1A\n\u2022 /create java sns <\u9879\u76EE\u540D>\n\u2022 /create java fls <\u9879\u76EE\u540D>"
|
|
343901
343932
|
},
|
|
343902
343933
|
Date.now()
|
|
343903
343934
|
);
|
|
@@ -344398,7 +344429,7 @@ var listExtensionsCommand = {
|
|
|
344398
344429
|
};
|
|
344399
344430
|
var updateExtensionsCommand = {
|
|
344400
344431
|
name: "update",
|
|
344401
|
-
description: "\u66F4\u65B0\u6269\u5C55\u3002\u7528\u6CD5
|
|
344432
|
+
description: "\u66F4\u65B0\u6269\u5C55\u3002\u7528\u6CD5\uFF1Aupdate <extension-names>|--all",
|
|
344402
344433
|
kind: "built-in" /* BUILT_IN */,
|
|
344403
344434
|
action: updateAction,
|
|
344404
344435
|
completion: /* @__PURE__ */ __name(async (context2, partialArg) => {
|
|
@@ -356082,7 +356113,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
356082
356113
|
historyManager.addItem(
|
|
356083
356114
|
{
|
|
356084
356115
|
type: "info" /* INFO */,
|
|
356085
|
-
text: "Refreshing hierarchical memory (
|
|
356116
|
+
text: "Refreshing hierarchical memory (QWEN.md or other context files)..."
|
|
356086
356117
|
},
|
|
356087
356118
|
Date.now()
|
|
356088
356119
|
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rdmind/rdmind",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.16-alpha.3",
|
|
4
4
|
"description": "RDMind - AI-powered coding assistant",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "cli.js",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"LICENSE"
|
|
19
19
|
],
|
|
20
20
|
"config": {
|
|
21
|
-
"sandboxImageUri": "ghcr.io/qwenlm/qwen-code:0.0.
|
|
21
|
+
"sandboxImageUri": "ghcr.io/qwenlm/qwen-code:0.0.16-alpha.3"
|
|
22
22
|
},
|
|
23
23
|
"publishConfig": {
|
|
24
24
|
"access": "public"
|