新增 TEMPLATES_USE 配置選項,支持自定義提示詞模板,並更新 README 和中文文檔以反映此變更,提升用戶自定義能力與靈活性。

This commit is contained in:
siage 2025-04-27 00:02:07 +08:00
parent ffd6349d3a
commit 76315fe061
2 changed files with 6 additions and 2 deletions

View File

@ -259,7 +259,8 @@ Shrimp Task Manager supports customizing prompt behavior through environment var
"DATA_DIR": "/path/to/project/data",
"MCP_PROMPT_PLAN_TASK": "Custom planning guidance...",
"MCP_PROMPT_EXECUTE_TASK_APPEND": "Additional execution instructions...",
"ENABLE_THOUGHT_CHAIN": "true"
"ENABLE_THOUGHT_CHAIN": "true",
"TEMPLATES_USE": "en"
}
}
}
@ -275,6 +276,7 @@ Additionally, there are other system configuration variables:
- **DATA_DIR**: Specifies the directory where task data is stored
- **ENABLE_THOUGHT_CHAIN**: Controls the thinking model in task planning workflow. When set to `true` (default), the system guides users to use the `process_thought` tool for step-by-step reasoning. When set to `false`, the system directly uses `analyze_task` to submit analysis results, skipping the detailed thinking process.
- **TEMPLATES_USE**: Specifies the template set to use for prompts. Defaults to `en`. Currently available options are `en` and `zh`. To use custom templates, copy the `src/prompts/templates_en` directory to the location specified by `DATA_DIR`, rename the copied directory (e.g., to `my_templates`), and set `TEMPLATES_USE` to the new directory name (e.g., `my_templates`).
For detailed instructions on customizing prompts, including supported parameters and examples, see the [Prompt Customization Guide](docs/en/prompt-customization.md).

View File

@ -253,7 +253,8 @@ or
"DATA_DIR": "/path/to/project/data",
"MCP_PROMPT_PLAN_TASK": "自定義規劃指導...",
"MCP_PROMPT_EXECUTE_TASK_APPEND": "附加執行說明...",
"ENABLE_THOUGHT_CHAIN": "true"
"ENABLE_THOUGHT_CHAIN": "true",
"TEMPLATES_USE": "en"
}
}
}
@ -269,6 +270,7 @@ or
- **DATA_DIR**:指定任務數據存儲的目錄
- **ENABLE_THOUGHT_CHAIN**:控制任務規劃工作流中的思考模式。當設置為 `true`(預設值)時,系統引導用戶使用 `process_thought` 工具進行逐步推理。當設置為 `false` 時,系統直接使用 `analyze_task` 提交分析結果,跳過詳細的思考過程。
- **TEMPLATES_USE**:指定提示詞使用的模板集。預設為 `en`。目前可用的選項有 `en``zh`。若要使用自定義模板,請將 `src/prompts/templates_en` 目錄複製到 `DATA_DIR` 指定的位置,重新命名複製的目錄(例如,`my_templates`),並將 `TEMPLATES_USE` 設置為新的目錄名稱(例如,`my_templates`)。
有關自定義提示詞的詳細說明,包括支援的參數和範例,請參閱[提示詞自定義指南](prompt-customization.md)。