@rdmind/rdmind 0.0.15 → 0.0.16-alpha.2
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 +73 -42
- 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.2";
|
|
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 = "3d237311";
|
|
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.2";
|
|
340717
340748
|
}
|
|
340718
340749
|
__name(getCliVersion, "getCliVersion");
|
|
340719
340750
|
|
|
@@ -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.2",
|
|
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.2"
|
|
22
22
|
},
|
|
23
23
|
"publishConfig": {
|
|
24
24
|
"access": "public"
|