feat: 补全 auto mode 分类器 prompt 模板,支持 FEATURE_* 环境变量注入

- 重建 yolo-classifier-prompts/ 三个缺失的 prompt 文件
- dev.ts/build.ts 扫描 FEATURE_* 环境变量注入 Bun --feature
- AUTO_MODE_ENABLED_DEFAULT 由 feature flag 决定,开 feature 即开 auto mode
- 补充 docs/safety/auto-mode.mdx prompt 模板章节

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
claude-code-best
2026-04-02 21:18:39 +08:00
parent 88b45e0e6c
commit be82b71c3e
5 changed files with 46 additions and 2 deletions

View File

@@ -8,6 +8,11 @@ const outdir = "dist";
const { rmSync } = await import("fs");
rmSync(outdir, { recursive: true, force: true });
// Collect FEATURE_* env vars → Bun.build features
const features = Object.keys(process.env)
.filter(k => k.startsWith("FEATURE_"))
.map(k => k.replace("FEATURE_", ""));
// Step 2: Bundle with splitting
const result = await Bun.build({
entrypoints: ["src/entrypoints/cli.tsx"],
@@ -15,6 +20,7 @@ const result = await Bun.build({
target: "bun",
splitting: true,
define: getMacroDefines(),
features,
});
if (!result.success) {