fix
This commit is contained in:
1 parent
8b540d22bc
commit
c92ee93482
24 files changed
+1495
-327
No files matched your search
@@ -411,7 +411,11 @@ func computeRepairedEnhancePrompt(current company.LangPromptMap, seedLegacy stri
|
||||
return "", false, false
|
||||
}
|
||||
if aiprompts.IsLegacyCombinedEnhancePrompt(raw) {
|
||||
return aiprompts.SplitLegacyCombinedEnhancePrompt(raw), true, false
|
||||
split := aiprompts.SplitLegacyCombinedEnhancePrompt(raw)
|
||||
if fixed, ok := aiprompts.NormalizeA1MetaRole(split, "sl"); ok {
|
||||
split = fixed
|
||||
}
|
||||
return split, true, false
|
||||
}
|
||||
if aiprompts.CategoryEnhanceHasRoleSections(raw) && !aiprompts.CategoryEnhancePromptNeedsRepair(raw) {
|
||||
return security.SanitizePrompt(raw, MaxCategoryPromptRunes), false, false
|
||||
@@ -425,12 +429,24 @@ func computeRepairedEnhancePrompt(current company.LangPromptMap, seedLegacy stri
|
||||
}
|
||||
for _, lang := range []string{"sl", company.LangPromptAny} {
|
||||
if cur := strings.TrimSpace(current[lang]); aiprompts.IsLegacyCombinedEnhancePrompt(cur) {
|
||||
return aiprompts.SplitLegacyCombinedEnhancePrompt(cur), false, true, false
|
||||
return func() string {
|
||||
split := aiprompts.SplitLegacyCombinedEnhancePrompt(cur)
|
||||
if fixed, ok := aiprompts.NormalizeA1MetaRole(split, "sl"); ok {
|
||||
return fixed
|
||||
}
|
||||
return split
|
||||
}(), false, true, false
|
||||
}
|
||||
}
|
||||
for _, cur := range current {
|
||||
if aiprompts.IsLegacyCombinedEnhancePrompt(cur) {
|
||||
return aiprompts.SplitLegacyCombinedEnhancePrompt(cur), false, true, false
|
||||
return func() string {
|
||||
split := aiprompts.SplitLegacyCombinedEnhancePrompt(cur)
|
||||
if fixed, ok := aiprompts.NormalizeA1MetaRole(split, "sl"); ok {
|
||||
return fixed
|
||||
}
|
||||
return split
|
||||
}(), false, true, false
|
||||
}
|
||||
}
|
||||
if seedLegacy != "" {
|
||||
|
||||
Reference in new issue
Block a user