Compose reusable configuration rules at the PromptKit path
This commit is contained in:
@@ -48,12 +48,17 @@ func Diff(left, right Inspection) ([]configkit.Difference, error) {
|
||||
return configkit.Diff(leftResult, rightResult)
|
||||
}
|
||||
|
||||
func secretProviderPath(path configkit.Path) bool {
|
||||
// Sensitive marks credential-shaped provider values beneath PromptKit settings.
|
||||
func Sensitive(path configkit.Path) bool {
|
||||
pointer := path.String()
|
||||
if pointer == "" {
|
||||
return false
|
||||
}
|
||||
parts := strings.Split(strings.TrimPrefix(pointer, "/"), "/")
|
||||
if len(parts) == 0 || parts[0] != "promptkit" {
|
||||
return false
|
||||
}
|
||||
parts = parts[1:]
|
||||
if !providerExtraParamsPath(parts) {
|
||||
return false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user