From 820aa4432eef28329fa509bf16496f7097b7e93f Mon Sep 17 00:00:00 2001 From: weichen Date: Sun, 11 Oct 2026 15:44:33 +0000 Subject: [PATCH] Guide the model to present pages for page-like deliverables Why: Field evidence from the dev instance - the present tool was projected and enabled but never called, because every resident prompt module steers 'make me a report' toward file artifacts; the tool description carried only the component catalog, not when to use it. Evidence: genui suite green (catalog assertion extended implicitly by existing shape test); end-to-end model behavior verified post-deploy in the Dev task. Impact: Tool description text only (self-gating: description appears only when the activation gate projects the tool). Refs: Dev task fix/genui-page-visibility EOF ) --- internal/genui/genui.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/genui/genui.go b/internal/genui/genui.go index 476eab1..b9ab6f3 100644 --- a/internal/genui/genui.go +++ b/internal/genui/genui.go @@ -27,7 +27,9 @@ const ( // Catalog 是组件目录与纪律(U1 试验 CATALOG_PROMPT 的 Go 权威版;工具描述携带, // 模型与校验器看到同一份规则)。修改需同步 core.ValidateSurfaceSpec 与目录版本。 -const Catalog = `可用节点类型(16 种;字段必须严格匹配,禁止目录外类型/字段): +const Catalog = `何时用本工具:用户要求"整理成一页 / 做个对比 / 出一页报告 / 看板 / 时间线"这类**页面化交付**时,优先调用本工具提交声明式页面,而不是写文件工件——页面会在用户预览区直接打开并可继续修订。纯文本问答、简短列表、代码交付保持原方式,不强行出页。 + +可用节点类型(16 种;字段必须严格匹配,禁止目录外类型/字段): section{title?,children?};list{items:string[]};kv{kv:[[k,v]]}; form{fields:[{key,label,type:text|textarea|number|boolean|select,options?(select必填),required?,placeholder?,help?,default?}]}; markdown{markdown};doc-ref{docId}(须为会话内存在的工件ID); -- 2.54.0