Add smart ACK provider for WeChat MP replies
Replace fixed ackText with a rule-based AckProvider that picks response templates by message type and intent (translate, summary, rewrite, poster, ppt, mindmap, code, search, schedule). Pure sync, zero I/O, auto-falls back to config.ackText on any error. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+4
-4
@@ -99,10 +99,10 @@ ${zoneLines.join('\n')}
|
||||
## 生成页面
|
||||
|
||||
- 用户要网页 / HTML / 报告 / 分享链接时:**你必须亲自完成**,不要推给用户手动操作
|
||||
- 先 \`load_skill\` → \`static-page-publish\`,再使用 \`write\` 创建 \`public/页面名.html\`(或工作区根目录下的 \`.html\`)
|
||||
- 先 \`load_skill\` → \`static-page-publish\`,再使用 \`write_file\` 创建 \`public/页面名.html\`(需要调整已有页面时用 \`edit_file\`)
|
||||
- 写入 \`<head>\` 的 **mindspace-cover** 元数据(详见 \`.agents/skills/static-page-publish/SKILL.md\`)
|
||||
- 保存后立即给出 Markdown 可点击公网链接 \`[标题](URL)\`;写入 \`public/页面.html\` 时 URL 为 \`.../MindSpace/<用户ID>/public/页面.html\`
|
||||
- **禁止**回复「请手动保存到 public 目录」「我无法生成页面」——除非 \`write\` 工具调用已失败并说明具体错误
|
||||
- **禁止**回复「请手动保存到 public 目录」「我无法生成页面」——除非 \`write_file\` / \`edit_file\` 调用已失败并说明具体错误
|
||||
|
||||
## 工作区文件与 OA 界面
|
||||
|
||||
@@ -125,7 +125,7 @@ export function buildUserSpaceConstraints({ username, workspaceRoot, publicBaseU
|
||||
'- **查找文件**:只在上述工作区内搜索(如 `oa/2025-12-06T13-34_export.csv`)',
|
||||
'- **禁止**:访问其它用户目录、MindSpace 根目录、data/mindspace 内部路径、主机绝对路径',
|
||||
'- **禁止**用公网 URL 列目录或读 CSV;生成 HTML 写入 `public/` 并给出公网链接',
|
||||
'- **生成页面**:先 `load_skill` → `static-page-publish`,再用 `write` 写入 `public/*.html`;**禁止**让用户手动保存文件',
|
||||
'- **生成页面**:先 `load_skill` → `static-page-publish`,再用 `write_file` / `edit_file` 写入 `public/*.html`;**禁止**让用户手动保存文件',
|
||||
publicBaseUrl && slug
|
||||
? `- 公网 HTML 前缀(公开区):\`${publicBaseUrl}/${PUBLISH_ROOT_DIR}/${slug}/public/\`(写入 \`public/页面.html\` 时分享链接必须含 \`public/\`)`
|
||||
: null,
|
||||
@@ -197,4 +197,4 @@ export async function ensureUserSpaceLayout({
|
||||
constraints: buildUserSpaceConstraints(context),
|
||||
...context,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user