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:
@@ -142,6 +142,7 @@ CREATE TABLE IF NOT EXISTS messages (
|
||||
agent_steps TEXT DEFAULT NULL,
|
||||
mentioned_items TEXT DEFAULT '[]',
|
||||
is_completed BOOLEAN NOT NULL DEFAULT 0,
|
||||
is_fallback BOOLEAN NOT NULL DEFAULT 0,
|
||||
created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
|
||||
updated_at DATETIME DEFAULT CURRENT_TIMESTAMP,
|
||||
deleted_at DATETIME
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
-- Remove is_fallback column from messages table
|
||||
ALTER TABLE messages DROP COLUMN IF EXISTS is_fallback;
|
||||
@@ -0,0 +1,3 @@
|
||||
-- Add is_fallback column to messages table
|
||||
-- Tracks whether a response was generated using fallback logic (no knowledge base match found)
|
||||
ALTER TABLE messages ADD COLUMN IF NOT EXISTS is_fallback BOOLEAN DEFAULT FALSE;
|
||||
Reference in New Issue
Block a user