优化: workflow记录补project_id+前端审批/交互打磨

This commit is contained in:
lxy
2026-08-12 00:40:40 +08:00
parent d31a27512c
commit 7a1e80eac2
9 changed files with 83 additions and 32 deletions
+11 -1
View File
@@ -316,13 +316,23 @@ export function setConvStreaming(convId: string | null | undefined, value: boole
/**
* 写某 conv 的 currentText(空串时仅清字段,streaming 仍 true 则保留项)。
* FIX-17 P2-3:收敛对称——当 streaming=false 且 currentText 被清空时,删 Map 项。
*
* @param convId 目标会话 id
* @param value currentText 目标值(空串=清流式累积,但会话可能仍在 streaming)
*/
export function setConvCurrentText(convId: string | null | undefined, value: string): void {
if (!convId) return
ensureConvStreamState(convId).currentText = value
if (value) {
ensureConvStreamState(convId).currentText = value
} else {
// 空串收敛:若 streaming=false 则删项,否则仅清字段(保留项)
const cur = convStreamStates.get(convId)
if (cur) {
cur.currentText = ''
if (!cur.streaming) convStreamStates.delete(convId)
}
}
}
/** 清某 conv 的 stream state(会话删除/收尾彻底清,删整个 Map 项)。