优化: workflow记录补project_id+前端审批/交互打磨
This commit is contained in:
@@ -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 项)。
|
||||
|
||||
Reference in New Issue
Block a user