feat(knowledge): add channel support to knowledge entries and related components
- Introduced a new `channel` field in the Knowledge struct and associated request types to track the source channel (e.g., "web", "api", "browser_extension"). - Updated various frontend components to display channel information and enhance user experience with channel labels. - Enhanced localization files to support channel labels in English and Chinese. - Modified backend services and database migrations to accommodate the new channel feature, ensuring consistent tracking across knowledge entries. - Refactored related functions to integrate channel handling, improving overall knowledge management and context.
This commit is contained in:
@@ -28,6 +28,7 @@ export default function (knowledgeBaseId?: string) {
|
||||
total: 0,
|
||||
type: "",
|
||||
source: "",
|
||||
channel: "",
|
||||
file_type: "",
|
||||
chunkLoading: false,
|
||||
chunkLoadError: "",
|
||||
@@ -151,6 +152,7 @@ export default function (knowledgeBaseId?: string) {
|
||||
id: "",
|
||||
type: "",
|
||||
source: "",
|
||||
channel: "",
|
||||
file_type: "",
|
||||
chunkLoadError: "",
|
||||
});
|
||||
@@ -164,6 +166,7 @@ export default function (knowledgeBaseId?: string) {
|
||||
id: data.id,
|
||||
type: data.type || 'file',
|
||||
source: data.source || '',
|
||||
channel: data.channel || '',
|
||||
file_type: data.file_type || ''
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user