feat(channel): add channel support across various components and locales
- Introduced a new `channel` field in multiple request and message structures to track the source channel (e.g., "web", "api", "im"). - Updated frontend API calls and chat components to include the `channel` parameter, ensuring consistent channel tracking in user messages. - Enhanced localization files to support channel labels in English, Korean, Russian, and Chinese. - Added database migration scripts to incorporate the `channel` column in the messages table, facilitating the storage of channel information. - Refactored related functions and components to accommodate the new channel feature, improving overall message context and tracking.
This commit is contained in:
@@ -33,6 +33,7 @@ type AgentQARequest struct {
|
||||
DisableTitle bool `json:"disable_title,omitempty"` // Whether to disable auto title generation
|
||||
MCPServiceIDs []string `json:"mcp_service_ids,omitempty"` // Optional MCP service allow list (deprecated)
|
||||
Images []ImageAttachment `json:"images,omitempty"` // Attached images for multimodal chat
|
||||
Channel string `json:"channel,omitempty"` // Source channel: "web", "api", "im", etc.
|
||||
}
|
||||
|
||||
// AgentResponseType defines the type of agent response
|
||||
|
||||
@@ -49,6 +49,7 @@ type Message struct {
|
||||
KnowledgeReferences []*SearchResult `json:"knowledge_references"`
|
||||
AgentSteps []AgentStep `json:"agent_steps,omitempty"` // Agent execution steps (only for assistant messages)
|
||||
IsCompleted bool `json:"is_completed"`
|
||||
Channel string `json:"channel,omitempty"` // Source channel: "web", "api", "im", etc.
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
}
|
||||
|
||||
@@ -218,6 +218,7 @@ type KnowledgeQARequest struct {
|
||||
SummaryModelID string `json:"summary_model_id"` // Optional summary model ID (overrides session default)
|
||||
DisableTitle bool `json:"disable_title"` // Whether to disable auto title generation
|
||||
Images []ImageAttachment `json:"images,omitempty"` // Attached images for multimodal chat
|
||||
Channel string `json:"channel,omitempty"` // Source channel: "web", "api", "im", etc.
|
||||
}
|
||||
|
||||
// LLMToolCall represents a function/tool call from the LLM
|
||||
|
||||
Reference in New Issue
Block a user