M-CHAT-A7 P2 | loadSession 问候语未区分 scope #61

Closed
opened 2026-06-06 17:52:50 +08:00 by wangdl · 1 comment
Owner

发现

loadSession 对空会话的默认问候语固定为:

"你好!我是你的 AI 学习助手,基于你的知识库回答问题。"

但对于 global/material/knowledge_item scope 应该有不同的提示语:

  • global: "你好!我是你的 AI 学习助手。"
  • material: "你好!我是你的 AI 学习助手,基于「xxx.pdf」的内容回答问题。"
  • knowledge_item: "你好!我是你的 AI 学习助手,基于「xxx」的内容回答问题。"

修复

根据 entryContext.scopeType 和 scopeName 生成对应问候语。

涉及文件

文件 变更
AIChatViewModel.swift loadSession 问候语逻辑
## 发现 loadSession 对空会话的默认问候语固定为: ```swift "你好!我是你的 AI 学习助手,基于你的知识库回答问题。" ``` 但对于 global/material/knowledge_item scope 应该有不同的提示语: - global: "你好!我是你的 AI 学习助手。" - material: "你好!我是你的 AI 学习助手,基于「xxx.pdf」的内容回答问题。" - knowledge_item: "你好!我是你的 AI 学习助手,基于「xxx」的内容回答问题。" ### 修复 根据 entryContext.scopeType 和 scopeName 生成对应问候语。 ### 涉及文件 | 文件 | 变更 | |------|------| | AIChatViewModel.swift | loadSession 问候语逻辑 |
wangdl added this to the M-CHAT:AI 会话 Scope 系统重构(iOS 侧) milestone 2026-06-06 17:52:50 +08:00
Author
Owner

修复

loadSession 根据 entryContext.scopeType 和 scopeName 生成对应问候语。
global: 无范围限定。material/knowledgeItem: 显示具体名称。

已作为 #58 的一部分修复。

涉及: AIChatViewModel.swift

## 修复 loadSession 根据 entryContext.scopeType 和 scopeName 生成对应问候语。 global: 无范围限定。material/knowledgeItem: 显示具体名称。 已作为 #58 的一部分修复。 涉及: AIChatViewModel.swift
Sign in to join this conversation.
No description provided.