重构会话消息处理和显示逻辑
This commit is contained in:
@@ -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)
|
||||
}
|
||||
Reference in New Issue
Block a user