From faf4f4b1dcbaf6a319fb092f5dc5742437bd2c38 Mon Sep 17 00:00:00 2001 From: Youzini-afk <13153778771cx@gmail.com> Date: Tue, 7 Apr 2026 18:41:27 +0800 Subject: [PATCH 1/6] =?UTF-8?q?refactor(panel):=20=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E5=8C=BA=E8=83=BD=E5=8A=9B=E5=8D=A1=E7=89=87=E3=80=81Stripe=20?= =?UTF-8?q?=E5=88=86=E6=A0=8F=E4=B8=8E=E4=BB=BB=E5=8A=A1=E9=A2=84=E8=AE=BE?= =?UTF-8?q?=E4=B8=BB=E4=BB=8E=E5=B8=83=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Made-with: Cursor --- panel.html | 2045 +++++++++++++++++++++++++--------------------------- panel.js | 184 ++--- style.css | 384 +++++++++- 3 files changed, 1475 insertions(+), 1138 deletions(-) diff --git a/panel.html b/panel.html index 3819e64..08352c3 100644 --- a/panel.html +++ b/panel.html @@ -877,73 +877,98 @@

-
-
-
-
-
核心能力
-
- 决定主记忆链路是否运行,以及常用的强化能力是否开启。 -
-
+
+ + + + + + + + + + +
+
@@ -981,124 +1006,6 @@
-
-
-
-
增强能力
-
- 用于补充召回链路、压缩维护和长期叙事观察的可选模块。 -
-
-
-
- - - - - - - -
-
-
@@ -1249,495 +1156,702 @@

-
-
-
-
-
提取
-
- 控制自动提取的频率和按轮计的上下文窗口。默认 2 - 轮,通常约等于向前补 4 层普通消息。 -
+
+
+
+
提取
+
+ 控制自动提取的频率和按轮计的上下文窗口。默认 2 + 轮,通常约等于向前补 4 层普通消息。
-
- - -
-
- - -
-
- -
-
-
-
召回与注入
-
- 控制最终注入层级。当前注入走 - IN_CHAT@Depth,数值越大越靠前。 -
-
-
- 在“功能开关”中启用后生效。 -
-
-
- - -
-
- -
-
-
-
向量预筛
-
- 控制是否启用向量候选检索,以及向量阶段输出的 Top-K - 宽度。 -
-
-
- 在“功能开关”中启用后生效。 -
-
- -
- - -
-
- -
-
-
-
图扩散
-
- 控制是否沿图结构继续扩散候选,以及扩散阶段保留的候选上限。 -
-
-
- 在“功能开关”中启用后生效。 -
-
- -
- - -
-
- -
-
-
-
召回增强
-
- 先调多意图、扩散回拉和时间链;更后面的候选整理与弱信号补抓收进折叠里。 -
-
-
- 在“功能开关”中启用后生效。 -
-
- -
- - -
-
- - -
- -
- - -
-
- -
-
更多高级项
-
- 收纳上下文混合查询、文字补分,以及 DPP、共现补强和弱信号残差召回。 -
-
- -
-
-
作用域记忆
-
- 让召回优先理解“谁怎么记得这件事”和“当前地区的客观事实”,避免所有记忆都用上帝视角混在一起。 -
- - - +
+
- 每 N 条回复提取 -
-
- - -
-
- - -
-
- - -
-
- - -
- - -
-
-
查询纠偏
-
- 让召回在“那后来呢”“他为什么这么做”这类追问里,也能借最近上下文稳一点。 -
- -
- - -
-
- - -
- -
- - -
-
-
-
DPP 与共现补强
-
- 用来减少重复候选,并在需要时轻推经常一起出现的相关节点。 -
- -
- -
- 提取上下文轮数 +
+
+
+
+ +
+
+
召回与注入
+
+ 控制最终注入层级。当前注入走 + IN_CHAT@Depth,数值越大越靠前。 +
+
+
+
+
+ 在“功能开关”中启用后生效。 +
+
+ + +
+
+
+
+ +
+
+
向量预筛
+
+ 控制是否启用向量候选检索,以及向量阶段输出的 Top-K + 宽度。 +
+
+
+
+
+ 在“功能开关”中启用后生效。 +
+ +
+ + +
+
+
+
+ +
+
+
图扩散
+
+ 控制是否沿图结构继续扩散候选,以及扩散阶段保留的候选上限。 +
+
+
+
+
+ 在“功能开关”中启用后生效。 +
+ +
+ + +
+
+
+
+ +
+
+
召回增强
+
+ 先调多意图、扩散回拉和时间链;更后面的候选整理与弱信号补抓收进折叠里。 +
+
+
+
+
+ 在“功能开关”中启用后生效。 +
+ +
+ + +
+
+ +
- 时间链强度
+
+ +
+
更多高级项
+
+ 收纳上下文混合查询、文字补分,以及 DPP、共现补强和弱信号残差召回。 +
+
+ +
+
+
作用域记忆
+
+ 让召回优先理解“谁怎么记得这件事”和“当前地区的客观事实”,避免所有记忆都用上帝视角混在一起。 +
+ + + +
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+ + +
+
+
查询纠偏
+
+ 让召回在“那后来呢”“他为什么这么做”这类追问里,也能借最近上下文稳一点。 +
+ +
+ + +
+
+ + +
+ +
+ + +
+
+
+
DPP 与共现补强
+
+ 用来减少重复候选,并在需要时轻推经常一起出现的相关节点。 +
+ +
+ + +
+
+ + +
+ +
+ + +
+
+ + +
+
+
+
弱信号召回
+
+ 仅在直连 embedding 且本地有足够向量时使用,用于补抓被主主题压住的弱线索。 +
+ +
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+
+
+
+ +
+
+
混合评分
+
+ 评分层始终运行;下面 3 + 个权重共同决定图扩散、向量相似和重要度在召回中的占比。 +
+
+
+
+
+ 在“功能开关”中启用后生效。 +
- 图扩散权重 + +
+
+ + +
+
+ +
+
+
+
+ +
+
+
LLM 精确召回
+
+ 控制是否启用 LLM 精排,以及传给 LLM + 的上下文消息数、候选池大小与最终保留上限。 +
+
+
+
+
+ 在“功能开关”中启用后生效。 +
+ +
+ + +
+
+ + +
+
+ +
-
-
弱信号召回
-
- 仅在直连 embedding 且本地有足够向量时使用,用于补抓被主主题压住的弱线索。 -
- -
- - +
+
+ +
+
+
记忆整合
+
+ 控制近邻搜索规模和冲突判定阈值。 +
+
+
+
+
+ 在“功能开关”中启用后生效。
- 近邻数量 -
-
- - -
-
- - -
-
- -
-
-
-
- -
-
-
-
混合评分
-
- 评分层始终运行;下面 3 - 个权重共同决定图扩散、向量相似和重要度在召回中的占比。 -
-
-
- 在“功能开关”中启用后生效。 -
-
-
- - -
-
- - -
-
- - -
-
- -
-
-
-
LLM 精确召回
-
- 控制是否启用 LLM 精排,以及传给 LLM - 的上下文消息数、候选池大小与最终保留上限。 -
-
-
- 在“功能开关”中启用后生效。 -
-
- -
- - -
-
- - -
-
- - -
-
- -
-
-
-
记忆整合
-
- 控制近邻搜索规模和冲突判定阈值。 -
-
-
- 在“功能开关”中启用后生效。 -
-
-
- - -
-
- - -
-
- -
-
-
-
概要
-
- 控制全局概要节点的生成周期。 -
-
-
- 在“功能开关”中启用后生效。 -
-
-
- - -
-
- -
-
-
-
惊奇触发
-
- 高信息量触发规则和阈值。 -
-
-
- 在“功能开关”中启用后生效。 -
-
-
- - -
-
- - -
-
- -
-
-
-
睡眠遗忘
-
- 配置遗忘阈值和执行周期。 -
-
-
- 在“功能开关”中启用后生效。 -
-
-
- - -
-
- - -
-
- -
-
-
-
自动整合触发
-
- 本批新增节点不足时,仍会检查是否与旧记忆高度重复;命中后照样自动整合。 +
+ +
-
- + +
+
+
概要
+
+ 控制全局概要节点的生成周期。 +
+
+
+
- +
+ 在“功能开关”中启用后生效。 +
+
+ + +
+
-
-
-
-
自动压缩周期
-
- 按提取次数计数;只有到周期点时才会尝试自动压缩。 -
-
-
- 在“功能开关”中启用后生效。 +
+
+
惊奇触发
+
+ 高信息量触发规则和阈值。
-
- +
- +
+ 在“功能开关”中启用后生效。 +
+
+ + +
+
+ + +
+
-
-
-
-
概率召回
-
- 调整弱相关记忆被纳入召回的概率。 -
-
-
- 在“功能开关”中启用后生效。 +
+
+
睡眠遗忘
+
+ 配置遗忘阈值和执行周期。
-
- - +
+
+
+ 在“功能开关”中启用后生效。 +
+
+ + +
+
+ + +
+
-
-
-
-
反思
-
- 控制叙事反思节点的生成间隔。 -
-
-
- 在“功能开关”中启用后生效。 +
+
+
自动整合触发
+
+ 本批新增节点不足时,仍会检查是否与旧记忆高度重复;命中后照样自动整合。
-
- +
+
+ + +
+
+
+
+ +
+
+
自动压缩周期
+
+ 按提取次数计数;只有到周期点时才会尝试自动压缩。 +
+
+
+
- +
+ 在“功能开关”中启用后生效。 +
+
+ + +
+
+
+
+ +
+
+
概率召回
+
+ 调整弱相关记忆被纳入召回的概率。 +
+
+
+
+
+ 在“功能开关”中启用后生效。 +
+
+ + +
+
+
+
+ +
+
+
反思
+
+ 控制叙事反思节点的生成间隔。 +
+
+
+
+
+ 在“功能开关”中启用后生效。 +
+
+ + +
+
diff --git a/panel.js b/panel.js index e924b56..492cce3 100644 --- a/panel.js +++ b/panel.js @@ -3489,6 +3489,21 @@ async function _handleTaskProfileWorkspaceClick(event) { actionEl.dataset.taskTab || currentTaskProfileTabId; _refreshTaskProfileWorkspace(); return; + case "select-profile": { + const profileId = actionEl.dataset.profileId; + if (profileId) { + const settings = _getSettings?.() || {}; + const nextTaskProfiles = setActiveTaskProfileId( + settings.taskProfiles || {}, + currentTaskProfileTaskType, + profileId, + ); + currentTaskProfileBlockId = ""; + currentTaskProfileRuleId = ""; + _patchTaskProfiles(nextTaskProfiles); + } + return; + } case "refresh-task-debug": if (typeof _getRuntimeDebugSnapshot === "function") { _getRuntimeDebugSnapshot({ refreshHost: true }); @@ -3683,8 +3698,8 @@ function _renderTaskProfileWorkspace(state) { return `
-
-
+
+
${state.taskTypeOptions .map( (item) => ` @@ -3693,111 +3708,116 @@ function _renderTaskProfileWorkspace(state) { data-task-action="switch-task-type" data-task-type="${_escAttr(item.id)}" type="button" - > - ${_escHtml(item.label)} - + >${_escHtml(item.label)} `, ) .join("")} - +
+
+
-
-
-
-
- ${_escHtml(taskMeta?.label || state.taskType)} 任务预设 -
-
- ${_escHtml(taskMeta?.description || "")} -
-
-
- - ${state.profile.builtin ? "内置" : "自定义"} - - 更新于 ${_escHtml(profileUpdatedAt)} -
+
+
+
+ ${_escHtml(taskMeta?.label || state.taskType)}
+ +
+ ${state.bucket.profiles + .map( + (profile) => ` +
+
${_escHtml(profile.name)}
+ ${profile.builtin ? '内置' : ""} +
+ `, + ) + .join("")} +
+
-
-
- - -
-
- +
+
+
+
+ + ${state.profile.builtin ? "内置" : "自定义"} + + 更新于 ${_escHtml(profileUpdatedAt)} +
+
+
+ + + + + +
-
- - - - - - - - +
+ ${TASK_PROFILE_TABS.map( + (tab) => ` + + `, + ).join("")} +
+ +
+ ${ + state.taskTabId === "generation" + ? _renderTaskGenerationTab(state) + : state.taskTabId === "regex" + ? _renderTaskRegexTab(state) + : state.taskTabId === "debug" + ? _renderTaskDebugTab(state) + : _renderTaskPromptTab(state) + }
- -
- ${TASK_PROFILE_TABS.map( - (tab) => ` - - `, - ).join("")} -
- -
- ${ - state.taskTabId === "generation" - ? _renderTaskGenerationTab(state) - : state.taskTabId === "regex" - ? _renderTaskRegexTab(state) - : state.taskTabId === "debug" - ? _renderTaskDebugTab(state) - : _renderTaskPromptTab(state) - } -
`; } diff --git a/style.css b/style.css index 109873c..5c18c12 100644 --- a/style.css +++ b/style.css @@ -1311,7 +1311,8 @@ #st-bme-panel textarea.bme-config-textarea, #st-bme-panel input.bme-search-input, #st-bme-panel .bme-node-detail-input, -#st-bme-panel .bme-node-detail-textarea { +#st-bme-panel .bme-node-detail-textarea, +#st-bme-panel .bme-task-editor-name-input { background-color: var(--bme-surface-high) !important; color: var(--bme-on-surface) !important; } @@ -1676,6 +1677,148 @@ background: #fff; } +/* --- CAPABILITY CARD GRID (Feature Toggles) --- */ + +.bme-capability-grid { + display: grid; + grid-template-columns: repeat(3, 1fr); + gap: 14px; +} + +.bme-capability-card { + display: flex; + flex-direction: column; + background: var(--bme-surface-container); + border: 1px solid var(--bme-border); + border-radius: 12px; + padding: 16px; + cursor: pointer; + transition: border-color 0.2s, box-shadow 0.2s, background 0.2s; + position: relative; +} + +.bme-capability-card:hover { + border-color: var(--bme-primary); + box-shadow: 0 0 0 1px var(--bme-primary), 0 4px 12px rgba(0, 0, 0, 0.15); +} + +.bme-cap-header { + display: flex; + align-items: center; + justify-content: space-between; + margin-bottom: 10px; +} + +.bme-cap-icon { + width: 34px; + height: 34px; + border-radius: 8px; + display: flex; + align-items: center; + justify-content: center; + background: var(--bme-primary); + color: #fff; + font-size: 15px; + flex-shrink: 0; +} + +.bme-cap-title { + font-size: 13px; + font-weight: 600; + color: var(--bme-on-surface); + margin-bottom: 4px; + line-height: 1.3; +} + +.bme-cap-desc { + font-size: 11.5px; + color: var(--bme-on-surface-dim); + line-height: 1.45; +} + +.bme-capability-card input[type="checkbox"] { + -webkit-appearance: none; + appearance: none; + width: 40px; + height: 22px; + background: var(--bme-surface-high); + border-radius: 11px; + position: relative; + cursor: pointer; + transition: background 0.2s; + flex-shrink: 0; + border: 1px solid var(--bme-border); +} + +.bme-capability-card input[type="checkbox"]::after { + content: ""; + position: absolute; + width: 16px; + height: 16px; + border-radius: 50%; + background: var(--bme-on-surface-dim); + top: 2px; + left: 3px; + transition: transform 0.2s, background 0.2s; +} + +.bme-capability-card input[type="checkbox"]:checked { + background: var(--bme-primary); + border-color: var(--bme-primary); +} + +.bme-capability-card input[type="checkbox"]:checked::after { + transform: translateX(18px); + background: #fff; +} + +/* --- STRIPE ROW LAYOUT (Advanced Settings) --- */ + +.bme-stripe-section { + display: flex; + flex-direction: column; +} + +.bme-stripe-row { + display: flex; + gap: 32px; + padding: 20px 0; + border-bottom: 1px solid var(--bme-border); +} + +.bme-stripe-row:last-child { + border-bottom: none; +} + +.bme-stripe-label { + flex: 0 0 28%; + max-width: 28%; + padding-top: 4px; +} + +.bme-stripe-label-title { + font-size: 14px; + font-weight: 600; + color: var(--bme-on-surface); + margin-bottom: 6px; + line-height: 1.3; +} + +.bme-stripe-label-desc { + font-size: 12px; + color: var(--bme-on-surface-dim); + line-height: 1.55; +} + +.bme-stripe-content { + flex: 1; + min-width: 0; +} + +.bme-stripe-content > .bme-config-card { + margin-bottom: 0; +} + .bme-prompt-card-actions { display: flex; align-items: center; @@ -1715,7 +1858,193 @@ .bme-task-shell { display: flex; flex-direction: column; - gap: 16px; + gap: 12px; +} + +.bme-task-action-bar { + display: flex; + align-items: center; + gap: 12px; + flex-wrap: wrap; +} + +.bme-task-action-bar-right { + margin-left: auto; + display: flex; + align-items: center; + gap: 6px; +} + +.bme-task-segmented-control { + display: inline-flex; + background: var(--bme-surface-container); + border-radius: 10px; + padding: 3px; + gap: 2px; + border: 1px solid var(--bme-border); +} + +.bme-task-segmented-control .bme-task-type-btn { + border: none; + border-radius: 8px; + min-height: 32px; + padding: 0 14px; + font-size: 12.5px; + background: transparent; + color: var(--bme-on-surface-dim); + transition: background 0.15s, color 0.15s; +} + +.bme-task-segmented-control .bme-task-type-btn:hover { + background: rgba(255, 255, 255, 0.06); + color: var(--bme-on-surface); +} + +.bme-task-segmented-control .bme-task-type-btn.active { + background: var(--bme-primary); + color: #fff; + box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25); +} + +.bme-task-master-detail { + display: flex; + gap: 0; + border: 1px solid var(--bme-border); + border-radius: 12px; + overflow: hidden; + min-height: 480px; + background: var(--bme-surface-container); +} + +.bme-task-profile-list { + width: 220px; + flex-shrink: 0; + border-right: 1px solid var(--bme-border); + display: flex; + flex-direction: column; + background: var(--bme-surface); +} + +.bme-task-profile-list-header { + padding: 14px 16px 10px; + font-size: 11px; + font-weight: 700; + text-transform: uppercase; + letter-spacing: 0.06em; + color: var(--bme-on-surface-dim); + border-bottom: 1px solid var(--bme-border); +} + +.bme-task-profile-items { + flex: 1; + overflow-y: auto; + padding: 6px; +} + +.bme-task-profile-list-item { + display: flex; + align-items: center; + gap: 8px; + padding: 10px 12px; + border-radius: 8px; + cursor: pointer; + transition: background 0.15s; + font-size: 13px; + color: var(--bme-on-surface-dim); +} + +.bme-task-profile-list-item:hover { + background: var(--bme-surface-high); +} + +.bme-task-profile-list-item.active { + background: var(--bme-primary-dim); + color: var(--bme-primary); + border-left: 3px solid var(--bme-primary); + font-weight: 600; +} + +.bme-task-profile-list-item-name { + flex: 1; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.bme-task-profile-list-item .bme-task-pill { + font-size: 10px; + padding: 2px 6px; +} + +.bme-task-profile-editor { + flex: 1; + min-width: 0; + display: flex; + flex-direction: column; + overflow-y: auto; +} + +.bme-task-editor-header { + padding: 16px 20px; + border-bottom: 1px solid var(--bme-border); + display: flex; + flex-direction: column; + gap: 10px; +} + +.bme-task-editor-title-row { + display: flex; + align-items: center; + gap: 12px; + flex-wrap: wrap; +} + +.bme-task-editor-name-input { + flex: 1; + min-width: 200px; + font-size: 16px; + font-weight: 600; + padding: 6px 10px; + border-radius: 8px; + border: 1px solid transparent; + background: transparent; + color: var(--bme-on-surface); + transition: border-color 0.15s, background 0.15s; +} + +.bme-task-editor-name-input:hover { + border-color: var(--bme-border); + background: var(--bme-surface-high); +} + +.bme-task-editor-name-input:focus { + outline: none; + border-color: var(--bme-primary); + background: var(--bme-surface-high); +} + +.bme-task-editor-actions { + display: flex; + gap: 6px; + flex-wrap: wrap; +} + +.bme-task-editor-actions .bme-config-secondary-btn { + font-size: 12px; + min-height: 28px; + padding: 0 10px; + gap: 4px; +} + +.bme-task-profile-editor > .bme-task-subtabs { + padding: 0 20px; + border-bottom: 1px solid var(--bme-border); +} + +.bme-task-profile-editor > .bme-task-tab-body { + flex: 1; + padding: 16px 20px; + overflow-y: auto; } .bme-task-header { @@ -3734,3 +4063,54 @@ font-size: 10px; } } + +/* --- RESPONSIVE: New Layout Components --- */ + +@media (max-width: 768px) { + .bme-capability-grid { + grid-template-columns: repeat(2, 1fr); + gap: 10px; + } + + .bme-stripe-row { + flex-direction: column; + gap: 12px; + } + + .bme-stripe-label { + flex: none; + max-width: 100%; + } + + .bme-task-master-detail { + flex-direction: column; + min-height: auto; + } + + .bme-task-profile-list { + width: 100%; + border-right: none; + border-bottom: 1px solid var(--bme-border); + max-height: 200px; + } + + .bme-task-segmented-control { + flex-wrap: wrap; + } + + .bme-task-action-bar { + flex-direction: column; + align-items: stretch; + } + + .bme-task-action-bar-right { + margin-left: 0; + justify-content: flex-end; + } +} + +@media (max-width: 520px) { + .bme-capability-grid { + grid-template-columns: 1fr; + } +} From dd4eff4fc9f09900a2966fa4c24b533cfc4d8dfe Mon Sep 17 00:00:00 2001 From: Youzini-afk <13153778771cx@gmail.com> Date: Tue, 7 Apr 2026 18:58:21 +0800 Subject: [PATCH 2/6] =?UTF-8?q?refactor(task-preset):=20=E5=B7=A6=E6=A0=8F?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=E7=B4=A7=E5=87=91=E4=B8=8B=E6=8B=89=E5=88=87?= =?UTF-8?q?=E6=8D=A2=E9=A2=84=E8=AE=BE=EF=BC=8C=E9=87=8A=E6=94=BE=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E5=8C=BA=E7=A9=BA=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Made-with: Cursor --- panel.js | 42 +++-------------------- style.css | 101 ++++++++++++++++++++++++++---------------------------- 2 files changed, 54 insertions(+), 89 deletions(-) diff --git a/panel.js b/panel.js index 492cce3..bf787ad 100644 --- a/panel.js +++ b/panel.js @@ -3489,21 +3489,6 @@ async function _handleTaskProfileWorkspaceClick(event) { actionEl.dataset.taskTab || currentTaskProfileTabId; _refreshTaskProfileWorkspace(); return; - case "select-profile": { - const profileId = actionEl.dataset.profileId; - if (profileId) { - const settings = _getSettings?.() || {}; - const nextTaskProfiles = setActiveTaskProfileId( - settings.taskProfiles || {}, - currentTaskProfileTaskType, - profileId, - ); - currentTaskProfileBlockId = ""; - currentTaskProfileRuleId = ""; - _patchTaskProfiles(nextTaskProfiles); - } - return; - } case "refresh-task-debug": if (typeof _getRuntimeDebugSnapshot === "function") { _getRuntimeDebugSnapshot({ refreshHost: true }); @@ -3727,11 +3712,10 @@ function _renderTaskProfileWorkspace(state) {
-
-
- ${_escHtml(taskMeta?.label || state.taskType)} -
- ${state.bucket.profiles .map( (profile) => ` @@ -3739,28 +3723,12 @@ function _renderTaskProfileWorkspace(state) { value="${_escAttr(profile.id)}" ${profile.id === state.profile.id ? "selected" : ""} > - ${_escHtml(profile.name)}${profile.builtin ? " · 内置" : ""} + ${_escHtml(profile.name)}${profile.builtin ? "(内置)" : ""} `, ) .join("")} -
- ${state.bucket.profiles - .map( - (profile) => ` -
-
${_escHtml(profile.name)}
- ${profile.builtin ? '内置' : ""} -
- `, - ) - .join("")} -
diff --git a/style.css b/style.css index 5c18c12..7164aee 100644 --- a/style.css +++ b/style.css @@ -1916,64 +1916,41 @@ background: var(--bme-surface-container); } -.bme-task-profile-list { - width: 220px; +/* 左栏:紧凑「任务 + 下拉」切换预设,避免大块列表卡片占宽 */ +.bme-task-profile-nav { + width: 168px; flex-shrink: 0; border-right: 1px solid var(--bme-border); display: flex; flex-direction: column; + gap: 6px; + padding: 10px 10px 12px; background: var(--bme-surface); } -.bme-task-profile-list-header { - padding: 14px 16px 10px; - font-size: 11px; - font-weight: 700; - text-transform: uppercase; - letter-spacing: 0.06em; - color: var(--bme-on-surface-dim); - border-bottom: 1px solid var(--bme-border); -} - -.bme-task-profile-items { - flex: 1; - overflow-y: auto; - padding: 6px; -} - -.bme-task-profile-list-item { - display: flex; - align-items: center; - gap: 8px; - padding: 10px 12px; - border-radius: 8px; - cursor: pointer; - transition: background 0.15s; - font-size: 13px; - color: var(--bme-on-surface-dim); -} - -.bme-task-profile-list-item:hover { - background: var(--bme-surface-high); -} - -.bme-task-profile-list-item.active { - background: var(--bme-primary-dim); - color: var(--bme-primary); - border-left: 3px solid var(--bme-primary); - font-weight: 600; -} - -.bme-task-profile-list-item-name { - flex: 1; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; -} - -.bme-task-profile-list-item .bme-task-pill { +.bme-task-profile-nav-kicker { font-size: 10px; - padding: 2px 6px; + font-weight: 700; + letter-spacing: 0.04em; + text-transform: uppercase; + color: var(--bme-on-surface-dim); + line-height: 1.2; + word-break: break-all; +} + +.bme-task-profile-nav-label { + font-size: 11px; + font-weight: 600; + color: var(--bme-on-surface-dim); + margin: 2px 0 0; +} + +.bme-task-profile-nav-select { + width: 100%; + min-height: 32px; + font-size: 12px; + padding: 4px 28px 4px 8px; + line-height: 1.35; } .bme-task-profile-editor { @@ -4087,11 +4064,31 @@ min-height: auto; } - .bme-task-profile-list { + .bme-task-profile-nav { width: 100%; border-right: none; border-bottom: 1px solid var(--bme-border); - max-height: 200px; + flex-direction: row; + flex-wrap: wrap; + align-items: flex-end; + gap: 8px 12px; + padding: 10px 12px; + } + + .bme-task-profile-nav-kicker { + width: 100%; + flex-basis: 100%; + } + + .bme-task-profile-nav-label { + flex: 0 0 auto; + margin: 0; + align-self: center; + } + + .bme-task-profile-nav-select { + flex: 1; + min-width: 140px; } .bme-task-segmented-control { From 9c6c4698cfbe766c267a68ff2e3828f05f190678 Mon Sep 17 00:00:00 2001 From: Youzini-afk <13153778771cx@gmail.com> Date: Tue, 7 Apr 2026 19:03:57 +0800 Subject: [PATCH 3/6] =?UTF-8?q?refactor(task-preset):=20=E7=A7=BB=E9=99=A4?= =?UTF-8?q?=E5=B7=A6=E6=A0=8F=EF=BC=8C=E9=A2=84=E8=AE=BE=E5=88=87=E6=8D=A2?= =?UTF-8?q?=E5=B9=B6=E5=85=A5=E4=B8=BB=E5=8C=BA=E6=A0=87=E9=A2=98=E4=B8=8B?= =?UTF-8?q?=E6=8B=89=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Made-with: Cursor --- panel.js | 54 +++++++++++-------------------- style.css | 97 ++++++++++++++++++------------------------------------- 2 files changed, 50 insertions(+), 101 deletions(-) diff --git a/panel.js b/panel.js index bf787ad..90c92ad 100644 --- a/panel.js +++ b/panel.js @@ -3068,16 +3068,6 @@ function _handleTaskProfileWorkspaceInput(event) { const target = event.target; if (!(target instanceof HTMLElement)) return; - if (target.id === "bme-task-profile-name") { - _updateCurrentTaskProfile( - (draft) => { - draft.name = String(target.value || "").trim() || draft.name; - }, - { refresh: false }, - ); - return; - } - if (target.matches("[data-block-field]")) { _persistSelectedBlockField(target, false); return; @@ -3556,14 +3546,16 @@ async function _handleTaskProfileWorkspaceClick(event) { toastr.success("当前预设已保存", "ST-BME"); return; case "rename-profile": { - const nameInput = document.getElementById("bme-task-profile-name"); - const nextName = String(nameInput?.value || "").trim(); - if (!nextName) { + const current = String(selectedProfile?.name || "").trim(); + const nextName = window.prompt("请输入预设名称", current); + if (nextName == null) return; + const trimmed = String(nextName).trim(); + if (!trimmed) { toastr.info("预设名称不能为空", "ST-BME"); return; } _updateCurrentTaskProfile((draft) => { - draft.name = nextName; + draft.name = trimmed; }); toastr.success("预设名称已更新", "ST-BME"); return; @@ -3712,13 +3704,15 @@ function _renderTaskProfileWorkspace(state) {
-
-
${_escHtml(taskMeta?.label || state.taskType)}
- - + ${state.bucket.profiles + .map( + (profile) => `
- -
-
-
- + ) + .join("")} +
${state.profile.builtin ? "内置" : "自定义"} diff --git a/style.css b/style.css index 7164aee..cfe673d 100644 --- a/style.css +++ b/style.css @@ -1312,7 +1312,7 @@ #st-bme-panel input.bme-search-input, #st-bme-panel .bme-node-detail-input, #st-bme-panel .bme-node-detail-textarea, -#st-bme-panel .bme-task-editor-name-input { +#st-bme-panel .bme-task-editor-preset-select { background-color: var(--bme-surface-high) !important; color: var(--bme-on-surface) !important; } @@ -1916,41 +1916,38 @@ background: var(--bme-surface-container); } -/* 左栏:紧凑「任务 + 下拉」切换预设,避免大块列表卡片占宽 */ -.bme-task-profile-nav { - width: 168px; - flex-shrink: 0; - border-right: 1px solid var(--bme-border); - display: flex; - flex-direction: column; - gap: 6px; - padding: 10px 10px 12px; - background: var(--bme-surface); +.bme-visually-hidden { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border: 0; } -.bme-task-profile-nav-kicker { +.bme-task-editor-kicker { font-size: 10px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--bme-on-surface-dim); line-height: 1.2; - word-break: break-all; } -.bme-task-profile-nav-label { - font-size: 11px; +.bme-task-editor-preset-select { + flex: 1; + min-width: 200px; + min-height: 40px; + font-size: 16px; font-weight: 600; - color: var(--bme-on-surface-dim); - margin: 2px 0 0; -} - -.bme-task-profile-nav-select { - width: 100%; - min-height: 32px; - font-size: 12px; - padding: 4px 28px 4px 8px; + padding: 6px 32px 6px 12px; line-height: 1.35; + border-radius: 8px; + border: 1px solid var(--bme-border); + cursor: pointer; } .bme-task-profile-editor { @@ -1976,28 +1973,10 @@ flex-wrap: wrap; } -.bme-task-editor-name-input { - flex: 1; - min-width: 200px; - font-size: 16px; - font-weight: 600; - padding: 6px 10px; - border-radius: 8px; - border: 1px solid transparent; - background: transparent; - color: var(--bme-on-surface); - transition: border-color 0.15s, background 0.15s; -} - -.bme-task-editor-name-input:hover { - border-color: var(--bme-border); - background: var(--bme-surface-high); -} - -.bme-task-editor-name-input:focus { - outline: none; +.bme-task-editor-preset-select:hover, +.bme-task-editor-preset-select:focus { border-color: var(--bme-primary); - background: var(--bme-surface-high); + outline: none; } .bme-task-editor-actions { @@ -4064,31 +4043,19 @@ min-height: auto; } - .bme-task-profile-nav { + .bme-task-editor-preset-select { + min-width: 0; width: 100%; - border-right: none; - border-bottom: 1px solid var(--bme-border); - flex-direction: row; - flex-wrap: wrap; - align-items: flex-end; - gap: 8px 12px; - padding: 10px 12px; + flex: 1 1 100%; } - .bme-task-profile-nav-kicker { - width: 100%; - flex-basis: 100%; + .bme-task-editor-title-row { + flex-direction: column; + align-items: stretch; } - .bme-task-profile-nav-label { - flex: 0 0 auto; - margin: 0; - align-self: center; - } - - .bme-task-profile-nav-select { - flex: 1; - min-width: 140px; + .bme-task-profile-badges { + justify-content: flex-start; } .bme-task-segmented-control { From 92dc0310830eb78e207d25ccfa8db98be07dffda Mon Sep 17 00:00:00 2001 From: Youzini-afk <13153778771cx@gmail.com> Date: Tue, 7 Apr 2026 19:30:19 +0800 Subject: [PATCH 4/6] =?UTF-8?q?style(toggle):=20=E9=99=8D=E4=BD=8E?= =?UTF-8?q?=E8=83=BD=E5=8A=9B=E5=8D=A1=E7=89=87=20toggle=20=E5=BC=80?= =?UTF-8?q?=E5=85=B3=E4=BA=AE=E5=BA=A6=EF=BC=8C=E4=BD=BF=E7=94=A8=20color-?= =?UTF-8?q?mix=20=E6=9F=94=E5=8C=96=E8=BD=A8=E9=81=93=E4=B8=8E=E5=9C=86?= =?UTF-8?q?=E7=82=B9=E9=85=8D=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- style.css | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/style.css b/style.css index cfe673d..da78cc5 100644 --- a/style.css +++ b/style.css @@ -1763,13 +1763,13 @@ } .bme-capability-card input[type="checkbox"]:checked { - background: var(--bme-primary); - border-color: var(--bme-primary); + background: color-mix(in srgb, var(--bme-primary) 45%, var(--bme-surface-high)); + border-color: color-mix(in srgb, var(--bme-primary) 55%, transparent); } .bme-capability-card input[type="checkbox"]:checked::after { transform: translateX(18px); - background: #fff; + background: var(--bme-primary-text, #ffb2b7); } /* --- STRIPE ROW LAYOUT (Advanced Settings) --- */ From e4badc4ebddb7682450dc1113db1ed663497ce56 Mon Sep 17 00:00:00 2001 From: Youzini-afk <13153778771cx@gmail.com> Date: Tue, 7 Apr 2026 19:38:49 +0800 Subject: [PATCH 5/6] =?UTF-8?q?style(toggle):=20=E7=A7=BB=E9=99=A4?= =?UTF-8?q?=E8=83=BD=E5=8A=9B=E5=8D=A1=E7=89=87=20toggle=20=E5=9C=86?= =?UTF-8?q?=E7=82=B9=E5=86=85=E7=9A=84=E6=B5=8F=E8=A7=88=E5=99=A8=E5=8E=9F?= =?UTF-8?q?=E7=94=9F=E5=AF=B9=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- style.css | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/style.css b/style.css index da78cc5..76416dd 100644 --- a/style.css +++ b/style.css @@ -1738,6 +1738,7 @@ .bme-capability-card input[type="checkbox"] { -webkit-appearance: none; + -moz-appearance: none; appearance: none; width: 40px; height: 22px; @@ -1748,6 +1749,15 @@ transition: background 0.2s; flex-shrink: 0; border: 1px solid var(--bme-border); + color: transparent; + overflow: hidden; +} + +.bme-capability-card input[type="checkbox"]::before { + content: ""; + display: block; + position: absolute; + inset: 0; } .bme-capability-card input[type="checkbox"]::after { From 96ecd6e42adb2f4f796e66309680795659ffd004 Mon Sep 17 00:00:00 2001 From: Youzini-afk <13153778771cx@gmail.com> Date: Tue, 7 Apr 2026 19:46:02 +0800 Subject: [PATCH 6/6] =?UTF-8?q?style(toggle):=20=E7=BB=9F=E4=B8=80?= =?UTF-8?q?=E5=8E=8B=E5=88=B6=E5=AE=BF=E4=B8=BB=E5=AF=B9=E5=8F=B7=20+=20?= =?UTF-8?q?=E9=99=8D=E4=BA=AE=E6=89=80=E6=9C=89=20toggle=20=E5=BC=80?= =?UTF-8?q?=E5=85=B3=E7=9A=84=20checked=20=E9=85=8D=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- style.css | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/style.css b/style.css index 76416dd..7f983d1 100644 --- a/style.css +++ b/style.css @@ -1382,6 +1382,20 @@ color: #f4f4f5 !important; } +/* --- 压制宿主注入的原生对号 (SillyTavern 全局 checkbox::before) --- */ +#st-bme-panel input[type="checkbox"]::before, +#st-bme-panel-overlay input[type="checkbox"]::before { + content: "" !important; + display: none !important; + background: none !important; + background-image: none !important; + -webkit-mask-image: none !important; + mask-image: none !important; + width: 0 !important; + height: 0 !important; + visibility: hidden !important; +} + #st-bme-panel input.bme-config-input:-webkit-autofill, #st-bme-panel input.bme-config-input:-webkit-autofill:hover, #st-bme-panel input.bme-config-input:-webkit-autofill:focus, @@ -1641,6 +1655,7 @@ .bme-toggle-item input[type="checkbox"] { -webkit-appearance: none; + -moz-appearance: none; appearance: none; width: 40px; height: 22px; @@ -1653,6 +1668,8 @@ position: relative; cursor: pointer; transition: background 0.2s ease, border-color 0.2s ease; + color: transparent; + overflow: hidden; } .bme-toggle-item input[type="checkbox"]::after { @@ -1668,13 +1685,13 @@ } .bme-toggle-item input[type="checkbox"]:checked { - background: var(--bme-primary, #a078ff); - border-color: var(--bme-primary, #a078ff); + background: color-mix(in srgb, var(--bme-primary) 45%, var(--bme-surface-high, #2a2a2d)); + border-color: color-mix(in srgb, var(--bme-primary) 55%, transparent); } .bme-toggle-item input[type="checkbox"]:checked::after { transform: translateX(18px); - background: #fff; + background: var(--bme-primary-text, #ffb2b7); } /* --- CAPABILITY CARD GRID (Feature Toggles) --- */ @@ -1753,13 +1770,6 @@ overflow: hidden; } -.bme-capability-card input[type="checkbox"]::before { - content: ""; - display: block; - position: absolute; - inset: 0; -} - .bme-capability-card input[type="checkbox"]::after { content: ""; position: absolute;