feat(prompts): add prompts loader and configuration management
- Implemented a new prompts loader in `loader.go` to manage prompt templates and configurations. - Introduced caching mechanism for prompt configurations to optimize loading. - Added functions to apply platform-specific prompt template overrides. - Created unit tests in `loader_test.go` to validate prompt configuration loading and reloading behavior. - Ensured that the last valid configuration is retained in case of errors during reload.
This commit is contained in:
@@ -199,7 +199,7 @@ async function publishToutiaohao(context: AdapterContext): Promise<PlatformPubli
|
||||
trends_writing_tag: "0",
|
||||
claim_exclusive: "0",
|
||||
info_source: JSON.stringify({
|
||||
source_type: 3,
|
||||
source_type: 5,
|
||||
source_author_uid: "",
|
||||
time_format: "",
|
||||
position: {},
|
||||
|
||||
@@ -324,8 +324,8 @@ async function publishDraft(draftId: string): Promise<boolean> {
|
||||
comment_permission: "anyone",
|
||||
},
|
||||
creationStatement: {
|
||||
disclaimer_type: "ai_creation",
|
||||
disclaimer_status: "open",
|
||||
disclaimer_type: "",
|
||||
disclaimer_status: "",
|
||||
},
|
||||
contentsTables: {
|
||||
table_of_contents_enabled: false,
|
||||
|
||||
Reference in New Issue
Block a user