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: |
|
||||||
输出要求:
|
输出要求:
|
||||||
|
|||||||
@@ -21,39 +21,38 @@ type promptsConfig struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type runtimePromptsConfig struct {
|
type runtimePromptsConfig struct {
|
||||||
DefaultGenerationBasePromptTemplate string `yaml:"default_generation_base_prompt_template"`
|
DefaultGenerationBasePromptTemplate string `yaml:"default_generation_base_prompt_template"`
|
||||||
PromptContextHeading string `yaml:"prompt_context_heading"`
|
PromptContextHeading string `yaml:"prompt_context_heading"`
|
||||||
GenerationWritingRequirementsSection string `yaml:"generation_writing_requirements_section"`
|
GenerationWritingRequirementsSection string `yaml:"generation_writing_requirements_section"`
|
||||||
GenerationTemplateSpecificRulesHeading string `yaml:"generation_template_specific_rules_heading"`
|
GenerationTemplateSpecificRulesHeading string `yaml:"generation_template_specific_rules_heading"`
|
||||||
GenerationLengthGuidanceHeading string `yaml:"generation_length_guidance_heading"`
|
GenerationLengthGuidanceHeading string `yaml:"generation_length_guidance_heading"`
|
||||||
TopXBrandPriorityRulesTemplate string `yaml:"top_x_brand_priority_rules_template"`
|
TopXBrandPriorityRulesTemplate string `yaml:"top_x_brand_priority_rules_template"`
|
||||||
EnglishLengthGuidanceTemplate string `yaml:"english_length_guidance_template"`
|
EnglishLengthGuidanceTemplate string `yaml:"english_length_guidance_template"`
|
||||||
ChineseLengthGuidanceTemplate string `yaml:"chinese_length_guidance_template"`
|
ChineseLengthGuidanceTemplate string `yaml:"chinese_length_guidance_template"`
|
||||||
ContextLabels map[string]string `yaml:"context_labels"`
|
ContextLabels map[string]string `yaml:"context_labels"`
|
||||||
TemplateContextWithJSONExampleTemplate string `yaml:"template_context_with_json_example_template"`
|
TemplateContextWithJSONExampleTemplate string `yaml:"template_context_with_json_example_template"`
|
||||||
JSONOutputExampleHeading string `yaml:"json_output_example_heading"`
|
JSONOutputExampleHeading string `yaml:"json_output_example_heading"`
|
||||||
AnalyzeOutputExample string `yaml:"analyze_output_example"`
|
AnalyzeOutputExample string `yaml:"analyze_output_example"`
|
||||||
AnalyzeFallbackPromptTemplate string `yaml:"analyze_fallback_prompt_template"`
|
AnalyzeFallbackPromptTemplate string `yaml:"analyze_fallback_prompt_template"`
|
||||||
TitleCustomOutputRequirementsSection string `yaml:"title_custom_output_requirements_section"`
|
TitleCustomOutputRequirementsSection string `yaml:"title_custom_output_requirements_section"`
|
||||||
TitleOutputExample string `yaml:"title_output_example"`
|
TitleOutputExample string `yaml:"title_output_example"`
|
||||||
TitleFallbackPromptTemplate string `yaml:"title_fallback_prompt_template"`
|
TitleFallbackPromptTemplate string `yaml:"title_fallback_prompt_template"`
|
||||||
OutlineOutputExample string `yaml:"outline_output_example"`
|
OutlineOutputExample string `yaml:"outline_output_example"`
|
||||||
OutlineCustomOutputRequirementsSection string `yaml:"outline_custom_output_requirements_section"`
|
OutlineCustomOutputRequirementsSection string `yaml:"outline_custom_output_requirements_section"`
|
||||||
OutlineFallbackPromptTemplate string `yaml:"outline_fallback_prompt_template"`
|
OutlineFallbackPromptTemplate string `yaml:"outline_fallback_prompt_template"`
|
||||||
OutlineResponseFormatDescription string `yaml:"outline_response_format_description"`
|
OutlineResponseFormatDescription string `yaml:"outline_response_format_description"`
|
||||||
PromptRuleTaskNameSupplementFormat string `yaml:"prompt_rule_task_name_supplement_format"`
|
PromptRuleTaskNameSupplementFormat string `yaml:"prompt_rule_task_name_supplement_format"`
|
||||||
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"`
|
ArticleImitationLocaleInstructions map[string]string `yaml:"article_imitation_locale_instructions"`
|
||||||
ArticleImitationLocaleInstructions map[string]string `yaml:"article_imitation_locale_instructions"`
|
ArticleImitationSettingLabels map[string]string `yaml:"article_imitation_setting_labels"`
|
||||||
ArticleImitationSettingLabels map[string]string `yaml:"article_imitation_setting_labels"`
|
KnowledgePromptIntroLines []string `yaml:"knowledge_prompt_intro_lines"`
|
||||||
KnowledgePromptIntroLines []string `yaml:"knowledge_prompt_intro_lines"`
|
KnowledgeSnippetLabelFormat string `yaml:"knowledge_snippet_label_format"`
|
||||||
KnowledgeSnippetLabelFormat string `yaml:"knowledge_snippet_label_format"`
|
KnowledgeWebsiteMarkdown knowledgeWebsiteMarkdownConfig `yaml:"knowledge_website_markdown"`
|
||||||
KnowledgeWebsiteMarkdown knowledgeWebsiteMarkdownConfig `yaml:"knowledge_website_markdown"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type knowledgeWebsiteMarkdownConfig struct {
|
type knowledgeWebsiteMarkdownConfig struct {
|
||||||
|
|||||||
@@ -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