fix: stop chat hang after misrouted themed article requests

Route themed page/article prompts to agent orchestration, reject them
from portal direct chat, and finalize regular sessions to idle when a
direct chat turn already completed.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
john
2026-07-05 07:30:37 +08:00
parent a29158d589
commit 4781bbc156
5 changed files with 79 additions and 1 deletions
+2
View File
@@ -20,6 +20,8 @@ const TASK_EXECUTION_REQUIRED_PATTERNS = [
/\b(file|page|html|docx|word|asset)\b.{0,40}\b(write|create|generate|publish|download|export|save|edit)\b/i,
/(?:生成|创建|制作|做|写|设计|发布|导出|下载|保存|修改|编辑).{0,24}(?:页面|网页|HTML|html|H5|h5|文件|文档|Word|word|docx|下载页|公开页|分享页|落地页|活动页)/u,
/(?:页面|网页|HTML|html|H5|h5|文件|文档|Word|word|docx|下载页|公开页|分享页|落地页|活动页).{0,24}(?:生成|创建|制作|做|写|设计|发布|导出|下载|保存|修改|编辑)/u,
/(?:写|做|生成|制作|设计).{0,16}主题(?:页面|文章)/u,
/主题(?:页面|文章).{0,16}(?:写|做|生成|制作|设计)/u,
/MindSpace\/[^/\s]+\/public\/[^\s"'<>]+\.html/i,
];