From 920a4150a7d9c7f7dc381032246305db7ec401bb Mon Sep 17 00:00:00 2001 From: yumoqing Date: Fri, 18 Sep 2026 15:37:28 +0800 Subject: [PATCH] =?UTF-8?q?feat(agent=5Finput):=20secret=5Fdefaults?= =?UTF-8?q?=E5=AE=BF=E4=B8=BB=E7=BA=A7=E9=BB=98=E8=AE=A4=E5=90=88=E5=B9=B6?= =?UTF-8?q?(=E6=98=BE=E5=BC=8Fopts=E4=BC=98=E5=85=88)=E2=80=94=E2=80=94?= =?UTF-8?q?=E5=85=A8=E7=AB=99AgentIO=E8=87=AA=E5=8A=A8=E8=8E=B7=E5=BE=97?= =?UTF-8?q?=E9=92=A5=E5=8C=99,=E4=B8=8D=E5=86=8D=E9=80=90=E4=BA=A7?= =?UTF-8?q?=E7=BA=BF=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bricks/agent_input.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/bricks/agent_input.js b/bricks/agent_input.js index 6ca9580..6a7455b 100644 --- a/bricks/agent_input.js +++ b/bricks/agent_input.js @@ -8,6 +8,14 @@ bricks.AgentInput = class extends bricks.VBox { opts.width = '100%'; // 默认内边距,避免子控件(输入框/模型选择器/按钮)贴边;可用 opts.padding 覆盖 if (opts.padding === undefined) opts.padding = '8px 12px'; + // 宿主级 secret 默认(2026-09-18 统一化):bricks.app.secret_defaults 由宿主 + // shell 启动时设一次({secret_dataurl, secret_format, secret_title, secret_tip}), + // 全站所有 AgentIO 自动获得钥匙图标——不再要求每个产线 .ui 逐个复制粘贴 + // (实测漏配:bidding/opportunity/platform 三入口无钥匙)。显式 opts 优先。 + var _sd = (bricks.app && bricks.app.secret_defaults) || window.__SECRET_DEFAULTS || {}; + for (var _k in _sd) { + if (opts[_k] === undefined) opts[_k] = _sd[_k]; + } super(opts); // file upload