feat: init 创建空配置文件,内置策略走代码默认值

This commit is contained in:
2026-06-08 18:40:29 +08:00
parent 4ea60f7679
commit bbf77ae2b1
2 changed files with 3 additions and 9 deletions

View File

@@ -1,8 +1,6 @@
import { existsSync } from "node:fs";
import { mkdir, writeFile } from "node:fs/promises";
import { join } from "node:path";
import { stringify as stringifyYaml } from "yaml";
import { defaultConfig } from "../defaults/config.ts";
import { CHANGES_DIR, ARCHIVE_DIR, RUNE_DIR, CONFIG_FILE } from "../types.ts";
import { injectOpenCode } from "../adapters/opencode.ts";
import { injectClaudeCode } from "../adapters/claude-code.ts";
@@ -29,8 +27,7 @@ export async function runInit(
const configPath = join(runeDir, CONFIG_FILE);
if (!existsSync(configPath)) {
const yaml = stringifyYaml(defaultConfig);
await writeFile(configPath, yaml, "utf-8");
await writeFile(configPath, "stages: {}\n", "utf-8");
}
for (const tool of tools) {