refactor: enhance parameter handling and improve code clarity

- Updated GetListParams to set a default sort option for better query handling.
- Enhanced PostSpiderRunParams to include a default mode and improved error handling for missing spider.
- Added parameters field to ChatMessageContent for more flexible message content management.
- Refactored getNodeIds method to simplify mode handling and removed unnecessary error checks.
- Improved ChatMessageAction component to display parameters and response sections more effectively, enhancing user experience.
This commit is contained in:
Marvin Zhang
2025-04-17 18:03:15 +08:00
parent 36c7d5e3a3
commit 34509b8d4c
12 changed files with 172 additions and 31 deletions

View File

@@ -29,6 +29,7 @@ type ChatMessageContent struct {
BaseModel `bson:",inline"`
MessageId primitive.ObjectID `json:"message_id" bson:"message_id" description:"Message ID"`
Key string `json:"key" bson:"key" description:"Message content key"`
Parameters map[string]interface{} `json:"parameters" bson:"parameters" description:"Message content parameters"`
Content string `json:"content" bson:"content" description:"Message content"`
Type string `json:"type" bson:"type" description:"Message type (text/action)"`
Action string `json:"action,omitempty" bson:"action,omitempty" description:"Action name"`