重构会话消息处理和显示逻辑

This commit is contained in:
xintaofei
2026-03-10 19:32:44 +08:00
parent aa1ff9a6df
commit 91636ada7f
13 changed files with 1429 additions and 1629 deletions

View File

@@ -1,18 +0,0 @@
const pendingPromptTextByContextKey = new Map<string, string>()
export function setPendingPromptText(contextKey: string, text: string): void {
const normalized = text.trim()
if (!normalized) {
pendingPromptTextByContextKey.delete(contextKey)
return
}
pendingPromptTextByContextKey.set(contextKey, normalized)
}
export function getPendingPromptText(contextKey: string): string | null {
return pendingPromptTextByContextKey.get(contextKey) ?? null
}
export function clearPendingPromptText(contextKey: string): void {
pendingPromptTextByContextKey.delete(contextKey)
}