Feature: Implement knowledge base saving for chat messages
Adds functionality to save selected chat messages into an external knowledge database, including new dialog components, state management in App.jsx, updated history syncing, and necessary UI/UX improvements.
This commit is contained in:
@@ -62,6 +62,7 @@ export function createChatGenerationHandlers({
|
||||
input,
|
||||
isSending,
|
||||
model,
|
||||
onMessagesPersisted,
|
||||
restoredForRef,
|
||||
scrollMessageToTop,
|
||||
scrollToBottom,
|
||||
@@ -270,6 +271,7 @@ export function createChatGenerationHandlers({
|
||||
setNewMsgTip(prev => ({ ...prev, [sessionId]: assistantMsgId }))
|
||||
}
|
||||
}
|
||||
if (onMessagesPersisted) void onMessagesPersisted(sessionId)
|
||||
} catch (error) {
|
||||
if (!isAbortError(error)) {
|
||||
console.error(error)
|
||||
@@ -542,6 +544,7 @@ export function createChatGenerationHandlers({
|
||||
if (activeSessionIdRef.current !== targetSessionId) {
|
||||
setUnreadSessions(prev => [...new Set([...prev, targetSessionId])])
|
||||
}
|
||||
if (onMessagesPersisted) void onMessagesPersisted(targetSessionId)
|
||||
|
||||
if (isNewChat) {
|
||||
requestGeneratedTitle({
|
||||
|
||||
Reference in New Issue
Block a user