feat: add fallback response handling and UI indicators
- Introduced a new `is_fallback` property to track when responses are generated without knowledge base matches. - Updated the chat components to display fallback hints and indicators in the UI, enhancing user awareness of fallback responses. - Added translations for fallback hints in multiple languages, improving accessibility for diverse users. - Modified backend logic to emit fallback status in response events, ensuring consistent handling across the application. These changes improve the user experience by providing clear feedback on fallback responses, enhancing the overall interaction with the chat system.
This commit is contained in:
@@ -78,6 +78,8 @@ type Message struct {
|
||||
MentionedItems MentionedItems `json:"mentioned_items,omitempty" gorm:"type:jsonb,column:mentioned_items"`
|
||||
// Whether message generation is complete
|
||||
IsCompleted bool `json:"is_completed"`
|
||||
// Whether this response is a fallback (no knowledge base match found)
|
||||
IsFallback bool `json:"is_fallback,omitempty"`
|
||||
// Message creation timestamp
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
// Last update timestamp
|
||||
|
||||
Reference in New Issue
Block a user