chore: 添加 .oxfmtrc.json 并格式化全部代码

This commit is contained in:
2026-06-09 14:22:33 +08:00
parent ebd5bb4051
commit b82f1caf0b
23 changed files with 209 additions and 373 deletions

View File

@@ -8,7 +8,8 @@ import { parseTasks } from "./task-parser.ts";
export function assembleDiscussPrompt(config: RuneConfig): string {
const discuss = config.stages.discuss;
if (!discuss) throw new CommandError("讨论阶段未配置", {
if (!discuss)
throw new CommandError("讨论阶段未配置", {
hint: "请在 .rune/config.yaml 中配置 stages.discuss",
});
return discuss.prompt;
@@ -21,7 +22,8 @@ export async function assemblePlanPrompt(
documentName: string,
): Promise<string> {
const plan = config.stages.plan;
if (!plan) throw new CommandError("规划阶段未配置", {
if (!plan)
throw new CommandError("规划阶段未配置", {
hint: "请在 .rune/config.yaml 中配置 stages.plan",
});
@@ -110,9 +112,7 @@ export async function assembleBuildPrompt(
for (const task of pendingTasks) {
parts.push(`- [ ] ${task.text}`);
}
parts.push(
`\n请从第一个待执行任务开始。完成后更新 ${taskPath} 中的 checkbox。`,
);
parts.push(`\n请从第一个待执行任务开始。完成后更新 ${taskPath} 中的 checkbox。`);
return parts.join("\n");
}
@@ -123,7 +123,8 @@ export async function assembleArchivePrompt(
changeName: string,
): Promise<string> {
const archive = config.stages.archive;
if (!archive) throw new CommandError("归档阶段未配置", {
if (!archive)
throw new CommandError("归档阶段未配置", {
hint: "请在 .rune/config.yaml 中配置 stages.archive",
});