(path []string)
| 1581 | } |
| 1582 | |
| 1583 | func classifyConfigMutationPath(path []string) (configSetValueKind, bool, error) { |
| 1584 | joined := strings.Join(path, ".") |
| 1585 | if kind, ok := configScalarMutationKinds[joined]; ok { |
| 1586 | return kind, false, nil |
| 1587 | } |
| 1588 | if len(path) == 3 && path[0] == configProvidersKey && path[2] == configSessionMCPKey { |
| 1589 | return configSetBool, false, nil |
| 1590 | } |
| 1591 | if len(path) == 5 && |
| 1592 | path[0] == configProvidersKey && |
| 1593 | path[2] == configModelsKey && |
| 1594 | path[3] == configDiscoveryKey && |
| 1595 | path[4] == configEnabledKey { |
| 1596 | return configSetBool, false, nil |
| 1597 | } |
| 1598 | if isProviderMutationPath(path) { |
| 1599 | return configSetString, false, nil |
| 1600 | } |
| 1601 | if kind, redacted, ok := classifySandboxMutationPath(path); ok { |
| 1602 | return kind, redacted, nil |
| 1603 | } |
| 1604 | |
| 1605 | return configSetString, false, fmt.Errorf("cli: config path %q is not supported by config set", joined) |
| 1606 | } |
| 1607 | |
| 1608 | func classifyConfigSetLifecycle(path []string) (configMutationLifecycle, error) { |
| 1609 | field := strings.Join(path, ".") |
no test coverage detected