openclaw-plugin-yuanbao 2.7.0 → 2.7.1-beta.eeab6f2e
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.
Potentially problematic release.
This version of openclaw-plugin-yuanbao might be problematic. Click here for more details.
|
@@ -23,7 +23,7 @@ export type MessageHandlerContext = {
|
|
|
23
23
|
};
|
|
24
24
|
export declare const YUANBAO_FINAL_TEXT_CHUNK_LIMIT = 3000;
|
|
25
25
|
export declare const YUANBAO_OVERFLOW_NOTICE_TEXT = "\u5185\u5BB9\u8F83\u957F\uFF0C\u5DF2\u505C\u6B62\u53D1\u9001\u5269\u4F59\u5185\u5BB9\u3002";
|
|
26
|
-
export declare const YUANBAO_MARKDOWN_HINT
|
|
26
|
+
export declare const YUANBAO_MARKDOWN_HINT = "\u26A0\uFE0F \u683C\u5F0F\u89C4\u8303\uFF08\u5F3A\u5236\uFF09\uFF1A\u5F53\u56DE\u590D\u5185\u5BB9\u5305\u542B Markdown \u8868\u683C\u65F6\uFF0C\u7981\u6B62\u7528 ```markdown \u4EE3\u7801\u5757\u5305\u88F9\uFF0C\u76F4\u63A5\u8F93\u51FA\u8868\u683C\u5185\u5BB9\u5373\u53EF\uFF0C\u4E0D\u9700\u8981\u5916\u5C42 fence\u3002";
|
|
27
27
|
export declare function stripOuterMarkdownFence(text: string): string;
|
|
28
28
|
export declare const REPLY_TIMEOUT_MS: number;
|
|
29
29
|
export declare function resolveOutboundSenderAccount(account: ResolvedYuanbaoAccount): string | undefined;
|
|
@@ -1,14 +1,9 @@
|
|
|
1
1
|
export const YUANBAO_FINAL_TEXT_CHUNK_LIMIT = 3000;
|
|
2
2
|
export const YUANBAO_OVERFLOW_NOTICE_TEXT = '内容较长,已停止发送剩余内容。';
|
|
3
|
-
export const YUANBAO_MARKDOWN_HINT =
|
|
4
|
-
'⚠️ 格式规范(强制):',
|
|
5
|
-
'1. 绝对禁止用 ```markdown 或 ```md 代码块包裹回复内容,无论回复中是否包含表格、标题、列表等 Markdown 元素。',
|
|
6
|
-
'2. 直接输出 Markdown 内容本身,不需要任何外层 fence。',
|
|
7
|
-
'3. 只有在展示"代码"时才使用代码块(如 ```python、```json 等),纯 Markdown 排版内容永远不要用代码块包裹。',
|
|
8
|
-
].join('\n');
|
|
3
|
+
export const YUANBAO_MARKDOWN_HINT = '⚠️ 格式规范(强制):当回复内容包含 Markdown 表格时,禁止用 ```markdown 代码块包裹,直接输出表格内容即可,不需要外层 fence。';
|
|
9
4
|
export function stripOuterMarkdownFence(text) {
|
|
10
|
-
const HAS_TABLE = /^\s
|
|
11
|
-
return text.replace(/```(?:markdown|md)
|
|
5
|
+
const HAS_TABLE = /^\s*\|[-:| ]+\|/m;
|
|
6
|
+
return text.replace(/```(?:markdown|md)?\s*\n([\s\S]*?)\n```\s*$/gm, (fullMatch, inner) => (HAS_TABLE.test(inner) ? inner : fullMatch));
|
|
12
7
|
}
|
|
13
8
|
export const REPLY_TIMEOUT_MS = 5 * 60 * 1000;
|
|
14
9
|
export function resolveOutboundSenderAccount(account) {
|
package/openclaw.plugin.json
CHANGED