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

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

@@ -94,7 +94,8 @@ export function SidebarConversationList({
refreshConversations,
} = useFolderContext()
const { openTab, closeTab, openNewConversationTab } = useTabContext()
const { openTab, closeConversationTab, openNewConversationTab } =
useTabContext()
const { addTask, updateTask } = useTaskContext()
const [importing, setImporting] = useState(false)
@@ -206,10 +207,10 @@ export function SidebarConversationList({
const handleDelete = useCallback(
async (id: number, agentType: string) => {
await deleteConversation(id)
closeTab(`conv-${agentType}-${id}`)
closeConversationTab(id, agentType as Parameters<typeof openTab>[1])
refreshConversations()
},
[closeTab, refreshConversations]
[closeConversationTab, refreshConversations]
)
const handleStatusChange = useCallback(