feat: init 创建空配置文件,内置策略走代码默认值
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user