chore: rename platform to channel

This commit is contained in:
Acbox
2026-02-06 20:01:04 +08:00
parent 208dda8956
commit 3bee018d45
8 changed files with 42 additions and 34 deletions
+8 -8
View File
@@ -95,8 +95,8 @@ type gatewayIdentity struct {
type agentGatewayRequest struct {
Model gatewayModelConfig `json:"model"`
ActiveContextTime int `json:"activeContextTime"`
Platforms []string `json:"platforms"`
CurrentPlatform string `json:"currentPlatform"`
Channels []string `json:"channels"`
CurrentChannel string `json:"currentChannel"`
AllowedActions []string `json:"allowedActions,omitempty"`
Messages []GatewayMessage `json:"messages"`
Skills []string `json:"skills"`
@@ -177,8 +177,8 @@ func (r *Resolver) Chat(ctx context.Context, req ChatRequest) (ChatResponse, err
BaseURL: provider.BaseUrl,
},
ActiveContextTime: normalizeMaxContextLoad(maxContextLoadTime),
Platforms: req.Platforms,
CurrentPlatform: req.CurrentPlatform,
Channels: req.Channels,
CurrentChannel: req.CurrentChannel,
AllowedActions: req.AllowedActions,
Messages: messages,
Skills: skills,
@@ -191,7 +191,7 @@ func (r *Resolver) Chat(ctx context.Context, req ChatRequest) (ChatResponse, err
ContactName: defaultString(req.ContactName, "User"),
ContactAlias: req.ContactAlias,
UserID: req.UserID,
CurrentPlatform: req.CurrentPlatform,
CurrentPlatform: req.CurrentChannel,
ReplyTarget: req.ReplyTarget,
SessionToken: req.SessionToken,
},
@@ -381,8 +381,8 @@ func (r *Resolver) StreamChat(ctx context.Context, req ChatRequest) (<-chan Stre
BaseURL: provider.BaseUrl,
},
ActiveContextTime: normalizeMaxContextLoad(maxContextLoadTime),
Platforms: req.Platforms,
CurrentPlatform: req.CurrentPlatform,
Channels: req.Channels,
CurrentChannel: req.CurrentChannel,
AllowedActions: req.AllowedActions,
Messages: messages,
Skills: skills,
@@ -395,7 +395,7 @@ func (r *Resolver) StreamChat(ctx context.Context, req ChatRequest) (<-chan Stre
ContactName: defaultString(req.ContactName, "User"),
ContactAlias: req.ContactAlias,
UserID: req.UserID,
CurrentPlatform: req.CurrentPlatform,
CurrentPlatform: req.CurrentChannel,
ReplyTarget: req.ReplyTarget,
SessionToken: req.SessionToken,
},
+2 -2
View File
@@ -25,8 +25,8 @@ type ChatRequest struct {
Provider string `json:"provider,omitempty"`
MaxContextLoadTime int `json:"max_context_load_time,omitempty"`
Language string `json:"language,omitempty"`
Platforms []string `json:"platforms,omitempty"`
CurrentPlatform string `json:"current_platform,omitempty"`
Channels []string `json:"channels,omitempty"`
CurrentChannel string `json:"current_channel,omitempty"`
Messages []GatewayMessage `json:"messages,omitempty"`
Skills []string `json:"skills,omitempty"`
AllowedActions []string `json:"allowed_actions,omitempty"`