feat: types 和 defaultConfig 增加 create 阶段
This commit is contained in:
@@ -91,7 +91,7 @@ export function validateConfig(config: RuneConfig): void {
|
||||
|
||||
function mergeConfig(userConfig: Partial<RuneConfig>): RuneConfig {
|
||||
const result: RuneConfig = { stages: {} };
|
||||
const stageKeys = ["discuss", "plan", "build", "archive"] as const;
|
||||
const stageKeys = ["discuss", "create", "plan", "build", "archive"] as const;
|
||||
|
||||
for (const stage of stageKeys) {
|
||||
if (userConfig.stages?.[stage]) {
|
||||
|
||||
@@ -232,6 +232,14 @@ rune status
|
||||
|
||||
除非……有同步组件?
|
||||
\`\`\``,
|
||||
},
|
||||
create: {
|
||||
prompt: `请根据讨论内容,拟定一个简短、有意义的变更名称,然后执行 create 命令创建变更目录。
|
||||
|
||||
要求:
|
||||
- 变更名称应简洁明了,能概括变更的核心内容
|
||||
- 仅支持中文、英文和短横线(-)
|
||||
- 创建成功后,引导用户使用 /rune-plan <变更名> <文档名> 进入规划阶段`,
|
||||
},
|
||||
plan: {
|
||||
documents: [
|
||||
|
||||
@@ -15,6 +15,10 @@ export interface DiscussStage {
|
||||
prompt: string;
|
||||
}
|
||||
|
||||
export interface CreateStage {
|
||||
prompt: string;
|
||||
}
|
||||
|
||||
export interface PlanStage {
|
||||
documents: DocumentConfig[];
|
||||
}
|
||||
@@ -29,6 +33,7 @@ export interface ArchiveStage {
|
||||
|
||||
export interface StagesConfig {
|
||||
discuss?: DiscussStage;
|
||||
create?: CreateStage;
|
||||
plan?: PlanStage;
|
||||
build?: BuildStage;
|
||||
archive?: ArchiveStage;
|
||||
@@ -55,7 +60,7 @@ export interface ChangeStatus {
|
||||
taskProgress: { completed: number; total: number } | null;
|
||||
}
|
||||
|
||||
export const STAGES = ["discuss", "plan", "build", "archive"] as const;
|
||||
export const STAGES = ["discuss", "create", "plan", "build", "archive"] as const;
|
||||
export type Stage = (typeof STAGES)[number];
|
||||
|
||||
export const RUNE_DIR = ".rune";
|
||||
|
||||
Reference in New Issue
Block a user