Skip to content

Commit 2363055

Browse files
committed
fix(ui): initialize DocumentImportSystem so file attachments work
documentImportSystem was declared as @State but never initialized, so the guard in sendMessage() always failed and silently discarded attached files. Now initialized in performMainChatViewAppear().
1 parent 6228b16 commit 2363055

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Sources/UserInterface/Chat/ChatWidget.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2401,6 +2401,11 @@ public struct ChatWidget: View {
24012401
// Initialize ModelListManager with dependencies
24022402
modelListManager.initialize(endpointManager: endpointManager)
24032403

2404+
// Initialize DocumentImportSystem for file attachments
2405+
if documentImportSystem == nil {
2406+
documentImportSystem = DocumentImportSystem(conversationManager: conversationManager)
2407+
}
2408+
24042409
// ModelListManager handles model loading automatically
24052410
loadSystemPrompts()
24062411
loadRecentChatSession()

0 commit comments

Comments
 (0)