Preserve defaulted prompt input inspection metadata

This commit is contained in:
2026-11-21 17:52:56 +00:00
parent 63e2968038
commit 79e23ecdba
4 changed files with 101 additions and 4 deletions

View File

@@ -171,12 +171,11 @@ func (state *loaded) capturePromptInputs(id string, rawInputs []promptInputConfi
inputs = append(inputs, domain.PromptInput{
Name: input.Name, Required: input.Required, ContentType: contentType, Description: description,
})
presence := state.promptMetadata[id][index]
item := prompt.InputMetadata{Name: input.Name, Required: input.Required}
if presence.contentType == fieldValue {
if input.ContentType != nil {
item.ContentType = stringPointer(contentType)
}
if presence.description == fieldValue {
if input.Description != nil {
item.Description = stringPointer(description)
}
metadata = append(metadata, item)