feat(agent_input): secret_defaults宿主级默认合并(显式opts优先)——全站AgentIO自动获得钥匙,不再逐产线配置

This commit is contained in:
yumoqing 2026-09-18 15:37:28 +08:00
parent 37c5e4ac29
commit 920a4150a7

View File

@ -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