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:
john
2026-06-26 15:19:03 +08:00
parent 9ed4fd48d7
commit 9b4a25799f
162 changed files with 17276 additions and 2054 deletions
+14
View File
@@ -50,6 +50,14 @@ export const CHAT_SKILL_DEFINITIONS = [
prefillOnly: true,
promptKey: 'table-viewer',
},
{
id: 'product-campaign-page',
label: '商品页',
icon: 'page',
skillName: 'product-campaign-page',
requiresSkill: 'product-campaign-page',
promptKey: 'product-campaign-page',
},
{
id: 'summarize',
label: '总结内容',
@@ -84,6 +92,12 @@ export function buildChatSkillPrompt(promptKey, skillName) {
return `请使用 ${skillName ?? 'form-builder'} 技能:请用交互式表单收集以下场景所需的结构化字段(字段不超过 8 个):`;
case 'table-viewer':
return `请使用 ${skillName ?? 'table-viewer'} 技能:请把以下数据整理成可排序、可筛选的交互式表格:`;
case 'product-campaign-page':
return (
`请使用 ${skillName ?? 'product-campaign-page'} 技能:帮我制作一个商品宣传 / 活动页。` +
'请先询问商品链接、页面主题、是否有商品图片或品牌素材;信息足够后,生成包含购买跳转按钮的页面方案。' +
'如果我确认要发布成 H5 页面,请继续使用 static-page-publish 技能生成可访问链接。'
);
case 'summarize':
return '请总结以下内容,提炼核心结论、重点信息和可执行建议(条理清晰、中文输出):';
case 'analyze':