fix(chat): 澄清问题卡片 UX 优化 — 去悬空引用 + 默认展开
Some checks failed
CI / Lint & TypeCheck (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Build Frontend (push) Has been cancelled
CI / Rust Check (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled
Some checks failed
CI / Lint & TypeCheck (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Build Frontend (push) Has been cancelled
CI / Rust Check (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled
- 提示词增加 ask_clarification 引用规则,避免 LLM 在文本中生成 "以下信息"/"比如:"等悬空引用短语 - 新增 stripDanglingClarificationRef 前端安全网,当消息包含 ask_clarification 工具调用时自动移除末尾悬空引用 - 澄清卡片默认展开,让用户直接看到选项无需额外点击
This commit is contained in:
@@ -426,6 +426,7 @@ impl Kernel {
|
||||
prompt.push_str("- Provide clear options when possible\n");
|
||||
prompt.push_str("- Include brief context about why you're asking\n");
|
||||
prompt.push_str("- After receiving clarification, proceed immediately\n");
|
||||
prompt.push_str("- CRITICAL: When calling ask_clarification, do NOT repeat the options in your text response. The options will be shown in a dedicated card above your reply. Simply greet the user and briefly explain why you need clarification — avoid phrases like \"以下信息\" or \"the following options\" that imply a list follows in your text\n");
|
||||
|
||||
prompt
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user