mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-28 06:05:24 +00:00
feat: add a permission-gated UI action registry and action slots for plugins
Moves the terminal toolbar's hardwired AI button into a slot the ssh-terminal plugin offers and the ai plugin fills, gated on ai.services.use.
This commit is contained in:
1 parent
225f618337
commit
2d6c1cdecb
29 files changed
+1971
-40
No files matched your search
@@ -0,0 +1,37 @@
|
||||
{
|
||||
"id": "sample-bad-action",
|
||||
"name": "Sample Bad Action",
|
||||
"version": "1.0.0",
|
||||
"description": "An action gated by a permission the plugin never declares.",
|
||||
"author": {
|
||||
"name": "Jane Doe"
|
||||
},
|
||||
"license": "MIT",
|
||||
"category": "Productivity",
|
||||
"engine": {
|
||||
"termix": ">=2.9.0",
|
||||
"api": "1"
|
||||
},
|
||||
"capabilities": {
|
||||
"backend": false,
|
||||
"frontend": true,
|
||||
"electron": false,
|
||||
"platforms": ["linux", "win32", "darwin"]
|
||||
},
|
||||
"permissions": ["ui.tab"],
|
||||
"contributes": {
|
||||
"permissionGroup": {
|
||||
"group": "samplebadaction",
|
||||
"permissions": ["samplebadaction.use"]
|
||||
},
|
||||
"actions": [
|
||||
{
|
||||
"id": "samplebadaction.open",
|
||||
"titleKey": "sampleBadAction.open",
|
||||
"handler": "open",
|
||||
"permission": "samplebadaction.never_declared"
|
||||
}
|
||||
]
|
||||
},
|
||||
"sidecars": []
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
{
|
||||
"id": "sample-actions",
|
||||
"name": "Sample Actions",
|
||||
"version": "1.0.0",
|
||||
"description": "A plugin that contributes a UI action and offers a slot of its own.",
|
||||
"author": {
|
||||
"name": "Jane Doe"
|
||||
},
|
||||
"license": "MIT",
|
||||
"category": "Productivity",
|
||||
"engine": {
|
||||
"termix": ">=2.9.0",
|
||||
"api": "1"
|
||||
},
|
||||
"capabilities": {
|
||||
"backend": false,
|
||||
"frontend": true,
|
||||
"electron": false,
|
||||
"platforms": ["linux", "win32", "darwin"]
|
||||
},
|
||||
"permissions": ["ui.tab"],
|
||||
"contributes": {
|
||||
"permissionGroup": {
|
||||
"group": "sampleactions",
|
||||
"permissions": ["sampleactions.use"]
|
||||
},
|
||||
"actions": [
|
||||
{
|
||||
"id": "sampleactions.openWithContext",
|
||||
"titleKey": "sampleActions.open",
|
||||
"handler": "openWithContext",
|
||||
"icon": "Sparkles",
|
||||
"permission": "sampleactions.use",
|
||||
"slot": "terminal.toolbar",
|
||||
"kind": "button"
|
||||
},
|
||||
{
|
||||
"id": "sampleactions.ungated",
|
||||
"titleKey": "sampleActions.ungated",
|
||||
"handler": "ungated"
|
||||
}
|
||||
],
|
||||
"actionSlots": [
|
||||
{
|
||||
"id": "sampleactions.panel",
|
||||
"accepts": ["button"],
|
||||
"descriptionKey": "sampleActions.panelDescription"
|
||||
}
|
||||
]
|
||||
},
|
||||
"sidecars": []
|
||||
}
|
||||
Reference in new issue
Block a user