mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-15 12:55:51 +00:00
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:
6
build.ts
6
build.ts
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user