MCPcopy Create free account
hub / github.com/compozy/agh / trimAgentTaskCapabilities

Function trimAgentTaskCapabilities

internal/cli/task.go:2971–2987  ·  view source on GitHub ↗
(values []string)

Source from the content-addressed store, hash-verified

2969}
2970
2971func trimAgentTaskCapabilities(values []string) []string {
2972 if len(values) == 0 {
2973 return nil
2974 }
2975 trimmed := make([]string, 0, len(values))
2976 for _, value := range values {
2977 value = strings.TrimSpace(value)
2978 if value == "" {
2979 continue
2980 }
2981 trimmed = append(trimmed, value)
2982 }
2983 if len(trimmed) == 0 {
2984 return nil
2985 }
2986 return trimmed
2987}
2988
2989func buildTaskCreateRequest(cmd *cobra.Command, input taskCreateInput) (CreateTaskRequest, error) {
2990 scope, workspace, err := resolveTaskScopeWorkspace(input.ScopeRaw, input.WorkspaceRef, true)

Callers 1

newTaskNextCommandFunction · 0.85

Calls 1

appendFunction · 0.85

Tested by

no test coverage detected