You've already forked agentic-coding-workflow
修改
This commit is contained in:
@@ -37,10 +37,15 @@ func (s *agentKindService) Create(ctx context.Context, c Caller, in CreateAgentK
|
||||
if args == nil {
|
||||
args = []string{}
|
||||
}
|
||||
allowlist := in.ToolAllowlist
|
||||
if allowlist == nil {
|
||||
allowlist = []string{}
|
||||
}
|
||||
k := &AgentKind{
|
||||
ID: uuid.New(), Name: in.Name, DisplayName: in.DisplayName, Description: in.Description,
|
||||
BinaryPath: in.BinaryPath, Args: args, EncryptedEnv: encrypted, Enabled: in.Enabled,
|
||||
CreatedBy: c.UserID,
|
||||
ToolAllowlist: allowlist,
|
||||
CreatedBy: c.UserID,
|
||||
}
|
||||
out, err := s.repo.CreateAgentKind(ctx, k)
|
||||
if err != nil {
|
||||
@@ -105,6 +110,10 @@ func (s *agentKindService) Update(ctx context.Context, c Caller, id uuid.UUID, i
|
||||
cur.EncryptedEnv = encrypted
|
||||
changed["env"] = "<changed>"
|
||||
}
|
||||
if in.ToolAllowlist != nil {
|
||||
cur.ToolAllowlist = in.ToolAllowlist
|
||||
changed["tool_allowlist"] = "<changed>"
|
||||
}
|
||||
if in.Enabled != nil && *in.Enabled != cur.Enabled {
|
||||
cur.Enabled = *in.Enabled
|
||||
changed["enabled"] = *in.Enabled
|
||||
|
||||
Reference in New Issue
Block a user