@rdmind/rdmind 0.2.3-alpha.1 → 0.2.3-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 +292 -27
- package/package.json +2 -2
package/cli.js
CHANGED
|
@@ -157557,7 +157557,7 @@ __export(geminiContentGenerator_exports2, {
|
|
|
157557
157557
|
createGeminiContentGenerator: () => createGeminiContentGenerator
|
|
157558
157558
|
});
|
|
157559
157559
|
function createGeminiContentGenerator(config2, gcConfig) {
|
|
157560
|
-
const version2 = "0.2.3-alpha.
|
|
157560
|
+
const version2 = "0.2.3-alpha.2";
|
|
157561
157561
|
const userAgent2 = config2.userAgent || `QwenCode/${version2} (${process.platform}; ${process.arch})`;
|
|
157562
157562
|
const baseHeaders = {
|
|
157563
157563
|
"User-Agent": userAgent2
|
|
@@ -222219,7 +222219,7 @@ Usage notes:
|
|
|
222219
222219
|
});
|
|
222220
222220
|
|
|
222221
222221
|
// packages/core/src/tools/redoc-fetch.ts
|
|
222222
|
-
var REDOC_API_TIMEOUT_MS, REDOC_API_URL, REDOC_URL_PATTERN, RedocFetchToolInvocation, RedocFetchTool;
|
|
222222
|
+
var REDOC_API_TIMEOUT_MS, REDOC_API_URL, REDOC_URL_PATTERN, IMAGE_DOWNLOAD_TIMEOUT_MS, MAX_IMAGE_SIZE_MB, RedocFetchToolInvocation, RedocFetchTool;
|
|
222223
222223
|
var init_redoc_fetch = __esm({
|
|
222224
222224
|
"packages/core/src/tools/redoc-fetch.ts"() {
|
|
222225
222225
|
"use strict";
|
|
@@ -222228,9 +222228,12 @@ var init_redoc_fetch = __esm({
|
|
|
222228
222228
|
init_core5();
|
|
222229
222229
|
init_partUtils();
|
|
222230
222230
|
init_models();
|
|
222231
|
+
init_index_lite();
|
|
222231
222232
|
REDOC_API_TIMEOUT_MS = 1e4;
|
|
222232
222233
|
REDOC_API_URL = "https://athena-next.devops.xiaohongshu.com/api/media/query/redoc";
|
|
222233
222234
|
REDOC_URL_PATTERN = /^https:\/\/docs\.xiaohongshu\.com\/doc\/([a-f0-9]+)$/;
|
|
222235
|
+
IMAGE_DOWNLOAD_TIMEOUT_MS = 3e4;
|
|
222236
|
+
MAX_IMAGE_SIZE_MB = 20;
|
|
222234
222237
|
RedocFetchToolInvocation = class extends BaseToolInvocation {
|
|
222235
222238
|
constructor(config2, params) {
|
|
222236
222239
|
super(params);
|
|
@@ -222316,6 +222319,265 @@ var init_redoc_fetch = __esm({
|
|
|
222316
222319
|
clearTimeout(timeoutId);
|
|
222317
222320
|
}
|
|
222318
222321
|
}
|
|
222322
|
+
/**
|
|
222323
|
+
* 解析文档内容并构建包含文本和图片(按原始顺序)的结构
|
|
222324
|
+
*/
|
|
222325
|
+
async buildContentWithImages(content, signal) {
|
|
222326
|
+
try {
|
|
222327
|
+
const contentObj = JSON.parse(content);
|
|
222328
|
+
if (!contentObj.children || !Array.isArray(contentObj.children)) {
|
|
222329
|
+
return {
|
|
222330
|
+
parts: [{ text: content }],
|
|
222331
|
+
textContent: content,
|
|
222332
|
+
imageCount: 0,
|
|
222333
|
+
successCount: 0
|
|
222334
|
+
};
|
|
222335
|
+
}
|
|
222336
|
+
const parts = [];
|
|
222337
|
+
let textBuffer = [];
|
|
222338
|
+
let imageCount = 0;
|
|
222339
|
+
let successCount = 0;
|
|
222340
|
+
const processNode = /* @__PURE__ */ __name(async (node, depth = 0) => {
|
|
222341
|
+
if (!node) return;
|
|
222342
|
+
if (node.type === "image" && node.url) {
|
|
222343
|
+
imageCount++;
|
|
222344
|
+
if (textBuffer.length > 0) {
|
|
222345
|
+
parts.push({ text: textBuffer.join("\n") });
|
|
222346
|
+
textBuffer = [];
|
|
222347
|
+
}
|
|
222348
|
+
console.debug(
|
|
222349
|
+
`[RedocFetchTool] Downloading image ${imageCount} (depth ${depth}): ${node.url}`
|
|
222350
|
+
);
|
|
222351
|
+
const imageData = await this.downloadImageAsBase64(node.url, signal);
|
|
222352
|
+
if (imageData) {
|
|
222353
|
+
const imageCaption = `
|
|
222354
|
+
[\u56FE\u7247 ${imageCount}${node.width && node.height ? ` (${node.width}x${node.height})` : ""}]
|
|
222355
|
+
`;
|
|
222356
|
+
parts.push({ text: imageCaption });
|
|
222357
|
+
parts.push({
|
|
222358
|
+
inlineData: {
|
|
222359
|
+
data: imageData.data,
|
|
222360
|
+
mimeType: imageData.mimeType
|
|
222361
|
+
}
|
|
222362
|
+
});
|
|
222363
|
+
successCount++;
|
|
222364
|
+
console.debug(
|
|
222365
|
+
`[RedocFetchTool] Image ${imageCount} downloaded successfully`
|
|
222366
|
+
);
|
|
222367
|
+
} else {
|
|
222368
|
+
const placeholder = `
|
|
222369
|
+
[\u56FE\u7247 ${imageCount} - \u4E0B\u8F7D\u5931\u8D25: ${node.url}]
|
|
222370
|
+
`;
|
|
222371
|
+
parts.push({ text: placeholder });
|
|
222372
|
+
console.warn(
|
|
222373
|
+
`[RedocFetchTool] Failed to download image ${imageCount}: ${node.url}`
|
|
222374
|
+
);
|
|
222375
|
+
}
|
|
222376
|
+
return;
|
|
222377
|
+
}
|
|
222378
|
+
if (node.children && Array.isArray(node.children)) {
|
|
222379
|
+
if (node.type === "columns") {
|
|
222380
|
+
textBuffer.push("\n[\u591A\u680F\u5E03\u5C40]");
|
|
222381
|
+
} else if (node.type === "column") {
|
|
222382
|
+
textBuffer.push("\n[\u680F\u76EE]");
|
|
222383
|
+
}
|
|
222384
|
+
for (const child of node.children) {
|
|
222385
|
+
await processNode(child, depth + 1);
|
|
222386
|
+
}
|
|
222387
|
+
return;
|
|
222388
|
+
}
|
|
222389
|
+
const textContent3 = this.extractTextFromNode(node);
|
|
222390
|
+
if (textContent3) {
|
|
222391
|
+
textBuffer.push(textContent3);
|
|
222392
|
+
}
|
|
222393
|
+
}, "processNode");
|
|
222394
|
+
for (const child of contentObj.children) {
|
|
222395
|
+
await processNode(child, 0);
|
|
222396
|
+
}
|
|
222397
|
+
if (textBuffer.length > 0) {
|
|
222398
|
+
parts.push({ text: textBuffer.join("\n") });
|
|
222399
|
+
}
|
|
222400
|
+
const extractAllText = /* @__PURE__ */ __name((node) => {
|
|
222401
|
+
if (!node) return "";
|
|
222402
|
+
if (node.type === "image") return "";
|
|
222403
|
+
const nodeText = this.extractTextFromNode(node);
|
|
222404
|
+
let childrenText = "";
|
|
222405
|
+
if (node.children && Array.isArray(node.children)) {
|
|
222406
|
+
childrenText = node.children.map((child) => extractAllText(child)).filter((text) => text).join("\n");
|
|
222407
|
+
}
|
|
222408
|
+
return [nodeText, childrenText].filter(Boolean).join("\n");
|
|
222409
|
+
}, "extractAllText");
|
|
222410
|
+
const textContent2 = contentObj.children.map((child) => extractAllText(child)).filter((text) => text).join("\n");
|
|
222411
|
+
return {
|
|
222412
|
+
parts,
|
|
222413
|
+
textContent: textContent2,
|
|
222414
|
+
imageCount,
|
|
222415
|
+
successCount
|
|
222416
|
+
};
|
|
222417
|
+
} catch {
|
|
222418
|
+
return {
|
|
222419
|
+
parts: [{ text: content }],
|
|
222420
|
+
textContent: content,
|
|
222421
|
+
imageCount: 0,
|
|
222422
|
+
successCount: 0
|
|
222423
|
+
};
|
|
222424
|
+
}
|
|
222425
|
+
}
|
|
222426
|
+
/**
|
|
222427
|
+
* 从文档节点中提取文本内容(支持递归)
|
|
222428
|
+
*/
|
|
222429
|
+
extractTextFromNode(node) {
|
|
222430
|
+
if (!node) return "";
|
|
222431
|
+
if (node.type === "image") return "";
|
|
222432
|
+
switch (node.type) {
|
|
222433
|
+
case "title":
|
|
222434
|
+
return this.extractTextFromChildren(node.children, "# ");
|
|
222435
|
+
case "h1":
|
|
222436
|
+
return this.extractTextFromChildren(node.children, "## ");
|
|
222437
|
+
case "h2":
|
|
222438
|
+
return this.extractTextFromChildren(node.children, "### ");
|
|
222439
|
+
case "h3":
|
|
222440
|
+
return this.extractTextFromChildren(node.children, "#### ");
|
|
222441
|
+
case "paragraph":
|
|
222442
|
+
return this.extractTextFromChildren(node.children);
|
|
222443
|
+
case "code":
|
|
222444
|
+
return `\`\`\`
|
|
222445
|
+
${this.extractTextFromChildren(node.children)}
|
|
222446
|
+
\`\`\``;
|
|
222447
|
+
case "numbered-list":
|
|
222448
|
+
case "list":
|
|
222449
|
+
return this.extractTextFromChildren(node.children, "- ");
|
|
222450
|
+
case "block-quote":
|
|
222451
|
+
return `> ${this.extractTextFromChildren(node.children)}`;
|
|
222452
|
+
case "table":
|
|
222453
|
+
return this.extractTableContent(node);
|
|
222454
|
+
case "columns":
|
|
222455
|
+
case "column":
|
|
222456
|
+
case "table-cell-block":
|
|
222457
|
+
if (node.children && Array.isArray(node.children)) {
|
|
222458
|
+
return node.children.map((child) => this.extractTextFromNode(child)).filter((text) => text).join("\n");
|
|
222459
|
+
}
|
|
222460
|
+
return "";
|
|
222461
|
+
default:
|
|
222462
|
+
if (node.children) {
|
|
222463
|
+
return this.extractTextFromChildren(node.children);
|
|
222464
|
+
}
|
|
222465
|
+
if (node.text) {
|
|
222466
|
+
return node.text;
|
|
222467
|
+
}
|
|
222468
|
+
return "";
|
|
222469
|
+
}
|
|
222470
|
+
}
|
|
222471
|
+
/**
|
|
222472
|
+
* 从表格节点中提取文本内容
|
|
222473
|
+
*/
|
|
222474
|
+
extractTableContent(tableNode) {
|
|
222475
|
+
if (!tableNode.children || !Array.isArray(tableNode.children)) {
|
|
222476
|
+
return "";
|
|
222477
|
+
}
|
|
222478
|
+
const rows = [];
|
|
222479
|
+
for (const row of tableNode.children) {
|
|
222480
|
+
if (row.type === "tr" && row.children) {
|
|
222481
|
+
const cells = row.children.map((cell) => {
|
|
222482
|
+
if (cell.type === "td") {
|
|
222483
|
+
return this.extractTextFromNode(cell);
|
|
222484
|
+
}
|
|
222485
|
+
return "";
|
|
222486
|
+
}).filter((text) => text);
|
|
222487
|
+
if (cells.length > 0) {
|
|
222488
|
+
rows.push("| " + cells.join(" | ") + " |");
|
|
222489
|
+
}
|
|
222490
|
+
}
|
|
222491
|
+
}
|
|
222492
|
+
return rows.join("\n");
|
|
222493
|
+
}
|
|
222494
|
+
/**
|
|
222495
|
+
* 从子节点数组中提取文本
|
|
222496
|
+
*/
|
|
222497
|
+
extractTextFromChildren(children, prefix = "") {
|
|
222498
|
+
if (!children || !Array.isArray(children)) return "";
|
|
222499
|
+
return children.map((child) => {
|
|
222500
|
+
if (typeof child === "string") return child;
|
|
222501
|
+
if (child.text) return prefix + child.text;
|
|
222502
|
+
return this.extractTextFromNode(child);
|
|
222503
|
+
}).join("");
|
|
222504
|
+
}
|
|
222505
|
+
/**
|
|
222506
|
+
* 下载图片并转换为 Base64
|
|
222507
|
+
*/
|
|
222508
|
+
async downloadImageAsBase64(url2, signal) {
|
|
222509
|
+
const controller = new AbortController();
|
|
222510
|
+
const timeoutId = setTimeout(
|
|
222511
|
+
() => controller.abort(),
|
|
222512
|
+
IMAGE_DOWNLOAD_TIMEOUT_MS
|
|
222513
|
+
);
|
|
222514
|
+
try {
|
|
222515
|
+
console.debug(`[RedocFetchTool] Downloading image from: ${url2}`);
|
|
222516
|
+
const response = await fetch(url2, {
|
|
222517
|
+
signal: controller.signal,
|
|
222518
|
+
headers: {
|
|
222519
|
+
"User-Agent": "Mozilla/5.0 (compatible; RDMind/1.0)"
|
|
222520
|
+
}
|
|
222521
|
+
});
|
|
222522
|
+
if (!response.ok) {
|
|
222523
|
+
console.warn(
|
|
222524
|
+
`[RedocFetchTool] Failed to download image: ${response.status} ${response.statusText}`
|
|
222525
|
+
);
|
|
222526
|
+
return null;
|
|
222527
|
+
}
|
|
222528
|
+
const contentType = response.headers.get("content-type") || "";
|
|
222529
|
+
const contentLength = response.headers.get("content-length");
|
|
222530
|
+
if (contentLength) {
|
|
222531
|
+
const sizeMB = parseInt(contentLength) / (1024 * 1024);
|
|
222532
|
+
if (sizeMB > MAX_IMAGE_SIZE_MB) {
|
|
222533
|
+
console.warn(
|
|
222534
|
+
`[RedocFetchTool] Image too large: ${sizeMB.toFixed(2)}MB (max: ${MAX_IMAGE_SIZE_MB}MB)`
|
|
222535
|
+
);
|
|
222536
|
+
return null;
|
|
222537
|
+
}
|
|
222538
|
+
}
|
|
222539
|
+
if (!contentType.startsWith("image/")) {
|
|
222540
|
+
console.warn(
|
|
222541
|
+
`[RedocFetchTool] URL does not return an image: ${contentType}`
|
|
222542
|
+
);
|
|
222543
|
+
return null;
|
|
222544
|
+
}
|
|
222545
|
+
const arrayBuffer = await response.arrayBuffer();
|
|
222546
|
+
const buffer = Buffer.from(arrayBuffer);
|
|
222547
|
+
const actualSizeMB = buffer.length / (1024 * 1024);
|
|
222548
|
+
if (actualSizeMB > MAX_IMAGE_SIZE_MB) {
|
|
222549
|
+
console.warn(
|
|
222550
|
+
`[RedocFetchTool] Downloaded image too large: ${actualSizeMB.toFixed(2)}MB`
|
|
222551
|
+
);
|
|
222552
|
+
return null;
|
|
222553
|
+
}
|
|
222554
|
+
const base64Data = buffer.toString("base64");
|
|
222555
|
+
let mimeType = contentType;
|
|
222556
|
+
if (!mimeType || mimeType === "application/octet-stream") {
|
|
222557
|
+
const urlPath = new URL(url2).pathname;
|
|
222558
|
+
const detectedMime = index_lite_default.getType(urlPath);
|
|
222559
|
+
if (detectedMime) {
|
|
222560
|
+
mimeType = detectedMime;
|
|
222561
|
+
}
|
|
222562
|
+
}
|
|
222563
|
+
console.debug(
|
|
222564
|
+
`[RedocFetchTool] Successfully downloaded image: ${actualSizeMB.toFixed(2)}MB, type: ${mimeType}`
|
|
222565
|
+
);
|
|
222566
|
+
return {
|
|
222567
|
+
data: base64Data,
|
|
222568
|
+
mimeType
|
|
222569
|
+
};
|
|
222570
|
+
} catch (error2) {
|
|
222571
|
+
if (error2 instanceof Error) {
|
|
222572
|
+
console.warn(
|
|
222573
|
+
`[RedocFetchTool] Error downloading image from ${url2}: ${error2.message}`
|
|
222574
|
+
);
|
|
222575
|
+
}
|
|
222576
|
+
return null;
|
|
222577
|
+
} finally {
|
|
222578
|
+
clearTimeout(timeoutId);
|
|
222579
|
+
}
|
|
222580
|
+
}
|
|
222319
222581
|
getDescription() {
|
|
222320
222582
|
const displayPrompt = this.params.prompt.length > 100 ? this.params.prompt.substring(0, 97) + "..." : this.params.prompt;
|
|
222321
222583
|
return `\u83B7\u53D6 Redoc \u6587\u6863\u5E76\u5206\u6790\uFF1A${displayPrompt}`;
|
|
@@ -222353,31 +222615,33 @@ var init_redoc_fetch = __esm({
|
|
|
222353
222615
|
console.debug(
|
|
222354
222616
|
`[RedocFetchTool] Processing content with prompt: "${this.params.prompt}"`
|
|
222355
222617
|
);
|
|
222618
|
+
const { parts, imageCount, successCount } = await this.buildContentWithImages(content, signal);
|
|
222619
|
+
console.debug(
|
|
222620
|
+
`[RedocFetchTool] Content parsed: ${imageCount} images found, ${successCount} downloaded successfully`
|
|
222621
|
+
);
|
|
222356
222622
|
const geminiClient = this.config.getGeminiClient();
|
|
222357
|
-
|
|
222358
|
-
|
|
222359
|
-
|
|
222360
|
-
|
|
222361
|
-
|
|
222362
|
-
${content}`;
|
|
222363
|
-
}
|
|
222364
|
-
} catch (_e2) {
|
|
222365
|
-
processedContent = content;
|
|
222366
|
-
}
|
|
222367
|
-
const fallbackPrompt = `\u8BF7\u6839\u636E\u7528\u6237\u7684\u95EE\u9898\u5206\u6790\u4EE5\u4E0B\u6587\u6863\u5185\u5BB9\uFF1A
|
|
222623
|
+
const imageInfo = imageCount > 0 ? `
|
|
222624
|
+
|
|
222625
|
+
\u6CE8\u610F\uFF1A\u6587\u6863\u4E2D\u5305\u542B ${imageCount} \u5F20\u56FE\u7247\uFF08\u6210\u529F\u52A0\u8F7D ${successCount} \u5F20\uFF09\uFF0C\u56FE\u7247\u5DF2\u6309\u539F\u59CB\u4F4D\u7F6E\u63D2\u5165\u5230\u6587\u6863\u5185\u5BB9\u4E2D\uFF0C\u8BF7\u7ED3\u5408\u4E0A\u4E0B\u6587\u548C\u56FE\u7247\u5185\u5BB9\u8FDB\u884C\u5206\u6790\u3002` : "";
|
|
222626
|
+
const promptPart = {
|
|
222627
|
+
text: `\u8BF7\u6839\u636E\u7528\u6237\u7684\u95EE\u9898\u5206\u6790\u4EE5\u4E0B\u6587\u6863\u5185\u5BB9\uFF1A
|
|
222368
222628
|
|
|
222369
222629
|
\u7528\u6237\u95EE\u9898\uFF1A${this.params.prompt}
|
|
222370
222630
|
|
|
222371
222631
|
\u6587\u6863\u6765\u6E90\uFF1A${this.params.url}
|
|
222632
|
+
${imageInfo}
|
|
222372
222633
|
|
|
222373
|
-
\u6587\u6863\u5185\u5BB9\uFF1A
|
|
222374
|
-
|
|
222375
|
-
|
|
222376
|
-
|
|
222634
|
+
\u6587\u6863\u5185\u5BB9\u5982\u4E0B\uFF08\u6587\u672C\u548C\u56FE\u7247\u6309\u539F\u59CB\u987A\u5E8F\u6392\u5217\uFF09\uFF1A
|
|
222635
|
+
---`
|
|
222636
|
+
};
|
|
222637
|
+
const endPart = {
|
|
222638
|
+
text: `---
|
|
222377
222639
|
|
|
222378
|
-
\u8BF7\u6839\u636E\u4E0A\u8FF0\u6587\u6863\u5185\u5BB9\u56DE\u7B54\u7528\u6237\u7684\u95EE\u9898\u3002
|
|
222640
|
+
\u8BF7\u6839\u636E\u4E0A\u8FF0\u6587\u6863\u5185\u5BB9\uFF08\u5305\u62EC\u6587\u672C\u548C\u56FE\u7247\uFF09\u56DE\u7B54\u7528\u6237\u7684\u95EE\u9898\u3002`
|
|
222641
|
+
};
|
|
222642
|
+
const allParts = [promptPart, ...parts, endPart];
|
|
222379
222643
|
const result = await geminiClient.generateContent(
|
|
222380
|
-
[{ role: "user", parts:
|
|
222644
|
+
[{ role: "user", parts: allParts }],
|
|
222381
222645
|
{},
|
|
222382
222646
|
signal,
|
|
222383
222647
|
this.config.getModel() || DEFAULT_QWEN_MODEL
|
|
@@ -222386,9 +222650,10 @@ ${processedContent}
|
|
|
222386
222650
|
console.debug(
|
|
222387
222651
|
`[RedocFetchTool] Successfully processed Redoc content from ${this.params.url}`
|
|
222388
222652
|
);
|
|
222653
|
+
const displayMessage = imageCount > 0 ? `Redoc document from ${this.params.url} processed successfully (${successCount}/${imageCount} images loaded).` : `Redoc document from ${this.params.url} processed successfully.`;
|
|
222389
222654
|
return {
|
|
222390
222655
|
llmContent: resultText,
|
|
222391
|
-
returnDisplay:
|
|
222656
|
+
returnDisplay: displayMessage
|
|
222392
222657
|
};
|
|
222393
222658
|
} catch (e4) {
|
|
222394
222659
|
const error2 = e4;
|
|
@@ -222406,7 +222671,7 @@ ${processedContent}
|
|
|
222406
222671
|
super(
|
|
222407
222672
|
_RedocFetchTool.Name,
|
|
222408
222673
|
"RedocFetch",
|
|
222409
|
-
"\u4ECE\u5C0F\u7EA2\u4E66 Redoc \u6587\u6863\u83B7\u53D6\u5185\u5BB9\u5E76\u4F7F\u7528 AI \u6A21\u578B\u5904\u7406\n- \u63A5\u53D7 Redoc \u6587\u6863 URL \u548C\u63D0\u793A\u8BCD\u4F5C\u4E3A\u8F93\u5165\n- \u4ECE URL \u4E2D\u63D0\u53D6\u6587\u6863 ID \u5E76\u901A\u8FC7 Redoc API \u83B7\u53D6\u5185\u5BB9\n- \u4F7F\u7528 AI \u6A21\u578B\u5904\u7406\u6587\u6863\u5185\u5BB9\u5E76\u56DE\u7B54\u7528\u6237\u95EE\u9898\n- \u8FD4\u56DE\u6A21\u578B\u5BF9\u5185\u5BB9\u7684\u54CD\u5E94\n- \u9002\u7528\u4E8E\u5404\u79CD\u7C7B\u578B\u7684\u5C0F\u7EA2\u4E66 Redoc \u6587\u6863\uFF08\u6280\u672F\u6587\u6863\u3001\u4EA7\u54C1\u6587\u6863\u3001\u8BBE\u8BA1\u6587\u6863\u7B49\uFF09\n\n\u4F7F\u7528\u8BF4\u660E:\n - \u6B64\u5DE5\u5177\u4E13\u95E8\u9488\u5BF9\u683C\u5F0F\u4E3A https://docs.xiaohongshu.com/doc/{doc_id} \u7684 URL\n - URL \u5FC5\u987B\u5305\u542B\u6709\u6548\u7684\u6587\u6863 ID\uFF0832 \u4F4D\u5341\u516D\u8FDB\u5236\u5B57\u7B26\u4E32\uFF09\n - \u63D0\u793A\u8BCD\u5E94\u8BE5\u6E05\u6670\u63CF\u8FF0\u7528\u6237\u60F3\u4E86\u89E3\u6587\u6863\u7684\u54EA\u4E9B\u65B9\u9762\n - \u6B64\u5DE5\u5177\u4E3A\u53EA\u8BFB\u5DE5\u5177\uFF0C\u4E0D\u4F1A\u4FEE\u6539\u4EFB\u4F55\u6587\u4EF6\n - \u5982\u679C\
|
|
222674
|
+
"\u4ECE\u5C0F\u7EA2\u4E66 Redoc \u6587\u6863\u83B7\u53D6\u5185\u5BB9\u5E76\u4F7F\u7528 AI \u6A21\u578B\u5904\u7406\n- \u63A5\u53D7 Redoc \u6587\u6863 URL \u548C\u63D0\u793A\u8BCD\u4F5C\u4E3A\u8F93\u5165\n- \u4ECE URL \u4E2D\u63D0\u53D6\u6587\u6863 ID \u5E76\u901A\u8FC7 Redoc API \u83B7\u53D6\u5185\u5BB9\n- \u81EA\u52A8\u63D0\u53D6\u6587\u6863\u4E2D\u7684\u56FE\u7247\u5E76\u4E0B\u8F7D\uFF0C\u652F\u6301\u56FE\u7247\u7406\u89E3\n- \u4F7F\u7528 AI \u6A21\u578B\u5904\u7406\u6587\u6863\u5185\u5BB9\uFF08\u5305\u542B\u6587\u672C\u548C\u56FE\u7247\uFF09\u5E76\u56DE\u7B54\u7528\u6237\u95EE\u9898\n- \u8FD4\u56DE\u6A21\u578B\u5BF9\u5185\u5BB9\u7684\u54CD\u5E94\n- \u9002\u7528\u4E8E\u5404\u79CD\u7C7B\u578B\u7684\u5C0F\u7EA2\u4E66 Redoc \u6587\u6863\uFF08\u6280\u672F\u6587\u6863\u3001\u4EA7\u54C1\u6587\u6863\u3001\u8BBE\u8BA1\u6587\u6863\u7B49\uFF09\n\n\u4F7F\u7528\u8BF4\u660E:\n - \u6B64\u5DE5\u5177\u4E13\u95E8\u9488\u5BF9\u683C\u5F0F\u4E3A https://docs.xiaohongshu.com/doc/{doc_id} \u7684 URL\n - URL \u5FC5\u987B\u5305\u542B\u6709\u6548\u7684\u6587\u6863 ID\uFF0832 \u4F4D\u5341\u516D\u8FDB\u5236\u5B57\u7B26\u4E32\uFF09\n - \u63D0\u793A\u8BCD\u5E94\u8BE5\u6E05\u6670\u63CF\u8FF0\u7528\u6237\u60F3\u4E86\u89E3\u6587\u6863\u7684\u54EA\u4E9B\u65B9\u9762\n - \u6B64\u5DE5\u5177\u4E3A\u53EA\u8BFB\u5DE5\u5177\uFF0C\u4E0D\u4F1A\u4FEE\u6539\u4EFB\u4F55\u6587\u4EF6\n - \u5982\u679C\u6587\u6863\u5305\u542B\u56FE\u7247\uFF0C\u4F1A\u81EA\u52A8\u4E0B\u8F7D\u5E76\u53D1\u9001\u7ED9\u6A21\u578B\u8FDB\u884C\u7406\u89E3\n - \u652F\u6301\u7684\u56FE\u7247\u683C\u5F0F\uFF1APNG\u3001JPEG\u3001GIF\u3001WEBP \u7B49\n - \u5355\u5F20\u56FE\u7247\u6700\u5927 20MB",
|
|
222410
222675
|
"fetch" /* Fetch */,
|
|
222411
222676
|
{
|
|
222412
222677
|
properties: {
|
|
@@ -258845,8 +259110,8 @@ var init_git_commit = __esm({
|
|
|
258845
259110
|
"packages/core/src/generated/git-commit.ts"() {
|
|
258846
259111
|
"use strict";
|
|
258847
259112
|
init_esbuild_shims();
|
|
258848
|
-
GIT_COMMIT_INFO = "
|
|
258849
|
-
CLI_VERSION = "0.2.3-alpha.
|
|
259113
|
+
GIT_COMMIT_INFO = "6bc19dab8";
|
|
259114
|
+
CLI_VERSION = "0.2.3-alpha.2";
|
|
258850
259115
|
}
|
|
258851
259116
|
});
|
|
258852
259117
|
|
|
@@ -359640,7 +359905,7 @@ __name(getPackageJson, "getPackageJson");
|
|
|
359640
359905
|
// packages/cli/src/utils/version.ts
|
|
359641
359906
|
async function getCliVersion() {
|
|
359642
359907
|
const pkgJson = await getPackageJson();
|
|
359643
|
-
return "0.2.3-alpha.
|
|
359908
|
+
return "0.2.3-alpha.2";
|
|
359644
359909
|
}
|
|
359645
359910
|
__name(getCliVersion, "getCliVersion");
|
|
359646
359911
|
|
|
@@ -367370,7 +367635,7 @@ var formatDuration = /* @__PURE__ */ __name((milliseconds) => {
|
|
|
367370
367635
|
|
|
367371
367636
|
// packages/cli/src/generated/git-commit.ts
|
|
367372
367637
|
init_esbuild_shims();
|
|
367373
|
-
var GIT_COMMIT_INFO2 = "
|
|
367638
|
+
var GIT_COMMIT_INFO2 = "6bc19dab8";
|
|
367374
367639
|
|
|
367375
367640
|
// packages/cli/src/utils/systemInfo.ts
|
|
367376
367641
|
async function getNpmVersion() {
|
|
@@ -375839,7 +376104,7 @@ async function buildSystemMessage(config2, sessionId, permissionMode, allowedBui
|
|
|
375839
376104
|
model: config2.getModel(),
|
|
375840
376105
|
permission_mode: permissionMode,
|
|
375841
376106
|
slash_commands: slashCommands,
|
|
375842
|
-
|
|
376107
|
+
rdmind_version: config2.getCliVersion() || "unknown",
|
|
375843
376108
|
agents: agentNames
|
|
375844
376109
|
};
|
|
375845
376110
|
return systemMessage;
|
|
@@ -425800,7 +426065,7 @@ var GeminiAgent = class {
|
|
|
425800
426065
|
name: APPROVAL_MODE_INFO[mode].name,
|
|
425801
426066
|
description: APPROVAL_MODE_INFO[mode].description
|
|
425802
426067
|
}));
|
|
425803
|
-
const version2 = "0.2.3-alpha.
|
|
426068
|
+
const version2 = "0.2.3-alpha.2";
|
|
425804
426069
|
return {
|
|
425805
426070
|
protocolVersion: PROTOCOL_VERSION,
|
|
425806
426071
|
agentInfo: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rdmind/rdmind",
|
|
3
|
-
"version": "0.2.3-alpha.
|
|
3
|
+
"version": "0.2.3-alpha.2",
|
|
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.2.3-alpha.
|
|
23
|
+
"sandboxImageUri": "ghcr.io/qwenlm/qwen-code:0.2.3-alpha.2"
|
|
24
24
|
},
|
|
25
25
|
"publishConfig": {
|
|
26
26
|
"access": "public"
|