Capture keyed prompts and source-backed content at load time

This commit is contained in:
2026-09-30 02:19:52 +00:00
parent 2b847ac2ae
commit b158a8ec2d
12 changed files with 722 additions and 17 deletions

View File

@@ -5,7 +5,6 @@ import (
"crypto/sha256"
"encoding/binary"
"encoding/hex"
"encoding/json"
"errors"
"fmt"
"hash"
@@ -809,10 +808,5 @@ func buildOutputArtifact(content string, format domain.OutputFormat) domain.Arti
}
func hashPromptDefinition(def *domain.PromptDefinition) (string, error) {
b, err := json.Marshal(def)
if err != nil {
return "", err
}
sum := sha256.Sum256(b)
return hex.EncodeToString(sum[:]), nil
return promptdef.HashDefinition(def)
}