docs(ctx-menu): 修正「替代入口」表述——工具栏也隐藏了 promptlib/style-source
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 3m27s
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 3m27s
我上一版文档写「提示词模板/样式节点需要时走工具栏插件菜单」,这是错的:
工具栏⊕菜单由 app.js 的 PLUGIN_TOOLBAR_HIDE = { promptlib: true, 'style-source': true } 按插件整体隐藏,
实际只剩 相册 / 网页 / 便利贴(与用户实测截图一致)。
- docs/standards/ctx-menu.md:新增 §3「两条独立的隐藏机制(别混)」表格(工具栏按插件、右键按入口),
并修正排除名单里的替代入口说明
- scripts/ctx-menu-audit.js:补三条断言——PLUGIN_TOOLBAR_HIDE 存在且含 promptlib / style-source,
防止工具栏那一侧被悄悄删掉
This commit is contained in:
1 parent
af86fa503e
commit
375a3b2c0d
2 files changed
+17
-1
No files matched your search
@@ -24,5 +24,11 @@ const commands = (/const CTX_SKIP_COMMANDS = \[([^\]]*)\]/.exec(app) || [])[1] |
|
||||
for (const id of ['ptpl', 'style']) check('变体名单含 ' + id, variants.indexOf("'" + id + "'") >= 0)
|
||||
for (const id of ['image-annotate', 'image-vectorize', 'collect-selected']) check('命令名单含 ' + id, commands.indexOf("'" + id + "'") >= 0)
|
||||
|
||||
// 工具栏侧:整个插件不进 ⊕ 菜单(PROMPTLIB / style-source)。两侧机制独立,都要守住。
|
||||
const toolbarHide = (/const PLUGIN_TOOLBAR_HIDE = \{([^}]*)\}/.exec(app) || [])[1] || ''
|
||||
check('PLUGIN_TOOLBAR_HIDE 存在', toolbarHide.length > 0, '工具栏插件菜单的隐藏名单')
|
||||
check('工具栏隐藏 promptlib', toolbarHide.indexOf('promptlib') >= 0)
|
||||
check('工具栏隐藏 style-source', toolbarHide.indexOf('style-source') >= 0)
|
||||
|
||||
if (fail) { console.error('ctx-menu-audit: ' + fail + ' 项失败'); process.exit(1) }
|
||||
console.log('ctx-menu-audit: 通过')
|
||||
Reference in new issue
Block a user