This commit is contained in:
greeneclipse committed 2026-10-14 20:54:29 +02:00
1 parent c92ee93482
commit af670e79f0
9 files changed
+667 -104

No files matched your search

@@ -27,6 +27,26 @@ func PreviousOfflineDefaultPromptV6(lang string) (string, error) {
"\n--- End Description ---\n\n--- Meta ---\n" + rule.Meta + "\n--- End Meta ---", nil
}
// The v3 bundle is kept ONLY as exact-match migration evidence. The v3
// descriptions were plain text with five 100-word sections and must NEVER be
// served as defaults or shown as the new editor examples.
//
//go:embed defaults/prompt-rules-v3.json
var previousOfflinePromptRulesV3JSON []byte
func PreviousOfflineDefaultPromptV3(lang string) (string, error) {
var rules map[string]offlineRules
if err := json.Unmarshal(previousOfflinePromptRulesV3JSON, &rules); err != nil {
return "", err
}
rule, ok := rules[lang]
if !ok || rule.Title == "" || rule.Description == "" || rule.Meta == "" {
return "", fmt.Errorf("missing historical v3 language %q", lang)
}
return "--- Title ---\n" + rule.Title + "\n--- End Title ---\n\n--- Description ---\n" + rule.Description +
"\n--- End Description ---\n\n--- Meta ---\n" + rule.Meta + "\n--- End Meta ---", nil
}
// Shipped, human-readable platform instructions for every supported content
// language. This is offline reference data, not a request to an LLM.
//