fix: 修复对话会话管理问题
- 添加 serviceTier 调试日志 - abortCurrentSession 时清空会话引用,确保下次创建新会话
This commit is contained in:
@ -369,6 +369,8 @@ export class DialogSession {
|
|||||||
const knowledgeData = await this.loadKnowledgeData();
|
const knowledgeData = await this.loadKnowledgeData();
|
||||||
console.log('[DialogSession] knowledgeData 加载结果:', knowledgeData ? `${knowledgeData.length} 字符` : 'null');
|
console.log('[DialogSession] knowledgeData 加载结果:', knowledgeData ? `${knowledgeData.length} 字符` : 'null');
|
||||||
|
|
||||||
|
console.log('[DialogSession] serviceTier 参数:', serviceTier, '-> 使用:', serviceTier || config.serviceTier);
|
||||||
|
|
||||||
const request: DialogRequest = {
|
const request: DialogRequest = {
|
||||||
taskId: this.taskId,
|
taskId: this.taskId,
|
||||||
message,
|
message,
|
||||||
@ -908,6 +910,7 @@ class DialogManager {
|
|||||||
*/
|
*/
|
||||||
abortCurrentSession(): void {
|
abortCurrentSession(): void {
|
||||||
this.currentSession?.abort();
|
this.currentSession?.abort();
|
||||||
|
this.currentSession = null; // 清空会话,确保下次创建新会话
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user