chore(prompts): drop unused target_platform supplement
The target-platform supplement only fed legacy prompt builders that read the now-removed wizard_state platforms field. Drop the YAML entry, loader struct field, and runtime helper. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -210,7 +210,6 @@ runtime:
|
|||||||
prompt_rule_scene_supplement_format: "适用场景:%s"
|
prompt_rule_scene_supplement_format: "适用场景:%s"
|
||||||
prompt_rule_tone_supplement_format: "默认语气:%s"
|
prompt_rule_tone_supplement_format: "默认语气:%s"
|
||||||
prompt_rule_word_count_supplement_format: "建议字数:%d 字左右"
|
prompt_rule_word_count_supplement_format: "建议字数:%d 字左右"
|
||||||
prompt_rule_target_platform_supplement_format: "目标发布平台:%s"
|
|
||||||
prompt_rule_supplement_heading: "补充要求:"
|
prompt_rule_supplement_heading: "补充要求:"
|
||||||
prompt_rule_output_requirements_section: |
|
prompt_rule_output_requirements_section: |
|
||||||
输出要求:
|
输出要求:
|
||||||
|
|||||||
@@ -210,7 +210,6 @@ runtime:
|
|||||||
prompt_rule_scene_supplement_format: "适用场景:%s"
|
prompt_rule_scene_supplement_format: "适用场景:%s"
|
||||||
prompt_rule_tone_supplement_format: "默认语气:%s"
|
prompt_rule_tone_supplement_format: "默认语气:%s"
|
||||||
prompt_rule_word_count_supplement_format: "建议字数:%d 字左右"
|
prompt_rule_word_count_supplement_format: "建议字数:%d 字左右"
|
||||||
prompt_rule_target_platform_supplement_format: "目标发布平台:%s"
|
|
||||||
prompt_rule_supplement_heading: "补充要求:"
|
prompt_rule_supplement_heading: "补充要求:"
|
||||||
prompt_rule_output_requirements_section: |
|
prompt_rule_output_requirements_section: |
|
||||||
输出要求:
|
输出要求:
|
||||||
|
|||||||
@@ -210,7 +210,6 @@ runtime:
|
|||||||
prompt_rule_scene_supplement_format: "适用场景:%s"
|
prompt_rule_scene_supplement_format: "适用场景:%s"
|
||||||
prompt_rule_tone_supplement_format: "默认语气:%s"
|
prompt_rule_tone_supplement_format: "默认语气:%s"
|
||||||
prompt_rule_word_count_supplement_format: "建议字数:%d 字左右"
|
prompt_rule_word_count_supplement_format: "建议字数:%d 字左右"
|
||||||
prompt_rule_target_platform_supplement_format: "目标发布平台:%s"
|
|
||||||
prompt_rule_supplement_heading: "补充要求:"
|
prompt_rule_supplement_heading: "补充要求:"
|
||||||
prompt_rule_output_requirements_section: |
|
prompt_rule_output_requirements_section: |
|
||||||
输出要求:
|
输出要求:
|
||||||
|
|||||||
@@ -45,7 +45,6 @@ type runtimePromptsConfig struct {
|
|||||||
PromptRuleSceneSupplementFormat string `yaml:"prompt_rule_scene_supplement_format"`
|
PromptRuleSceneSupplementFormat string `yaml:"prompt_rule_scene_supplement_format"`
|
||||||
PromptRuleToneSupplementFormat string `yaml:"prompt_rule_tone_supplement_format"`
|
PromptRuleToneSupplementFormat string `yaml:"prompt_rule_tone_supplement_format"`
|
||||||
PromptRuleWordCountSupplementFormat string `yaml:"prompt_rule_word_count_supplement_format"`
|
PromptRuleWordCountSupplementFormat string `yaml:"prompt_rule_word_count_supplement_format"`
|
||||||
PromptRuleTargetPlatformSupplementFormat string `yaml:"prompt_rule_target_platform_supplement_format"`
|
|
||||||
PromptRuleSupplementHeading string `yaml:"prompt_rule_supplement_heading"`
|
PromptRuleSupplementHeading string `yaml:"prompt_rule_supplement_heading"`
|
||||||
PromptRuleOutputRequirementsSection string `yaml:"prompt_rule_output_requirements_section"`
|
PromptRuleOutputRequirementsSection string `yaml:"prompt_rule_output_requirements_section"`
|
||||||
ArticleImitationPromptTemplate string `yaml:"article_imitation_prompt_template"`
|
ArticleImitationPromptTemplate string `yaml:"article_imitation_prompt_template"`
|
||||||
|
|||||||
@@ -121,13 +121,6 @@ func PromptRuleWordCountSupplement(wordCount int) string {
|
|||||||
return fmt.Sprintf(trimPrompt(loadRuntimePrompts().PromptRuleWordCountSupplementFormat), wordCount)
|
return fmt.Sprintf(trimPrompt(loadRuntimePrompts().PromptRuleWordCountSupplementFormat), wordCount)
|
||||||
}
|
}
|
||||||
|
|
||||||
func PromptRuleTargetPlatformSupplement(target string) string {
|
|
||||||
return fmt.Sprintf(
|
|
||||||
trimPrompt(loadRuntimePrompts().PromptRuleTargetPlatformSupplementFormat),
|
|
||||||
strings.ReplaceAll(target, ",", "、"),
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
func PromptRuleSupplementSection(items []string) string {
|
func PromptRuleSupplementSection(items []string) string {
|
||||||
return trimPrompt(loadRuntimePrompts().PromptRuleSupplementHeading) + "\n- " + strings.Join(items, "\n- ")
|
return trimPrompt(loadRuntimePrompts().PromptRuleSupplementHeading) + "\n- " + strings.Join(items, "\n- ")
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user