From 155d91b9099c2e823f0a7ac251131ff660a7ca3b Mon Sep 17 00:00:00 2001 From: ssw Date: Fri, 26 Jun 2026 16:17:33 +0800 Subject: [PATCH] auto(09213057c521): session end @ 2026-06-26T16:17:31 (+3f) --- src/commands/_blindspot_guards.ts | 18 ++++++++++-------- src/commands/dm/create.ts | 2 +- src/commands/form/create.ts | 2 +- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/src/commands/_blindspot_guards.ts b/src/commands/_blindspot_guards.ts index 1ec7c81..e1a1920 100644 --- a/src/commands/_blindspot_guards.ts +++ b/src/commands/_blindspot_guards.ts @@ -18,8 +18,8 @@ export interface BlindspotGuard { id: string /** 触发场景 (人类可读) */ trigger: string - /** 严重度: ERROR=阻塞执行, WARN=警告但放行 */ - level: 'ERROR' | 'WARN' + /** 严重度: ERROR=阻塞执行, WARN=警告但放行, INFO=仅提示 (不阻断不警告) */ + level: 'ERROR' | 'WARN' | 'INFO' /** 检测函数 (ctx=AppContext, opts=命令选项) */ check: (ctx: AppContext | null, opts?: Record) => boolean /** 失败提示 (含 ${enCode}/${table} 等占位符) */ @@ -30,7 +30,7 @@ export interface BlindspotGuard { export interface BlindspotIssue { id: string - level: 'ERROR' | 'WARN' + level: 'ERROR' | 'WARN' | 'INFO' trigger: string message: string fix: string @@ -496,17 +496,19 @@ export const BLINDSPOT_GUARDS: BlindspotGuard[] = [ fix: '升级 dacli v0.7+, form/release.ts 已切到 POST /Actions/Release', }, - // 盲点 44: type=1/2 不传 --tables → dacli 自动 fallback (2026-06-26 v0.11d 验证可跑通) + // 盲点 44: type=1/2 不传 --tables 走 legacy path (非 --ai-json 推荐路径) 时才提示 (2026-06-26 v0.11d) + // ★ 默认禁用: --ai-json 推荐路径不触发, 因为走 web 端 buildFormData schema 自动完整 { id: 'BS-44', - trigger: 'type=1/2 不传 --tables → dacli 自动 fallback schema', + trigger: 'type=1/2 不传 --tables 且没用 --ai-json (legacy path, 提示)', level: 'INFO', check: (_ctx, opts) => { const t = Number(opts?.type) - return (t === 1 || t === 2) && !opts?.tables + // 仅在 legacy 路径 (无 --ai-json + 无 --tables) 时提示 + return (t === 1 || t === 2) && !opts?.tables && !opts?.aiJson }, - message: 'type=1/2 不传 --tables, dacli 自动 fallback 生成完整 schema (用户字段 + 9 系统列 + 2 PK), 后端可接收 (2026-06-26 tdd10 验证). 但 AI 快速建表无物理表, 数据不会持久化', - fix: 'AI 快速验证: 不传 --tables 走 form 单步, 自动 fallback schema (推荐); 生产持久化: 先 dacli dm create 再 form create --tables=...', + message: 'type=1/2 不传 --tables 走 legacy path, dacli 会自动 fallback 生成 schema (用户字段 + 9 系统列 + 2 PK). ★ 推荐改走 --ai-json 路径: dacli form create --ai-json --autoRelease (一条命令完整)', + fix: '★ 默认: dacli form create --ai-json --autoRelease (走 web 端 buildFormData, schema 自动完整); 高级: 物理表已存在时 --tables=... 显式引用', }, // 盲点 45: ai 优化: JNPF List 端点返 0 条 (实际有数据, 盲点 31) diff --git a/src/commands/dm/create.ts b/src/commands/dm/create.ts index cea0b7b..12306ce 100644 --- a/src/commands/dm/create.ts +++ b/src/commands/dm/create.ts @@ -27,7 +27,7 @@ interface CreateOpts { export function buildDmCreateCommand(): Command { const cmd = new Command('create') - .description('在指定业务库建物理表 (fields 必传 JSON)') + .description('★ 建物理表 (高级: 独立物理表管理工具, 不是 form create 的前置; AI 快速建表单不需要先跑这个; 9 系统列自动补)') .requiredOption('--table ', '表名 (snake_case)') .requiredOption('--tableName ', '表中文名') .requiredOption('--fields ', '字段定义 JSON 数组') diff --git a/src/commands/form/create.ts b/src/commands/form/create.ts index 803aee5..2433d48 100644 --- a/src/commands/form/create.ts +++ b/src/commands/form/create.ts @@ -69,7 +69,7 @@ interface CreateOpts { export function buildFormCreateCommand(): Command { const cmd = new Command('create') - .description('创建表单 (默认 type=1 自定义 走 formDesign 列表, webType=1 仅表单, 推荐先 dm create 建表)') + .description('★ AI 快速建表单 (默认 --ai-json --autoRelease 一条命令完整: 不建物理表, dacli 自动 fallback schema, 走 formDesign Web 设计器调字段). 高级模式: --tables=... 显式引用已存在物理表') .option('--fullName ', '中文名 (--ai 自动填, 否则必填)') .option('--enCode ', '英文编码 (--ai 自动填, 否则必填)') .option('--type ', '1=自定义(formDesign) 2=系统(sysForm) 3=接口 4=视图', '1')