mirror of
https://github.com/alkimake/paperclip.git
synced 2026-06-14 01:50:39 +09:00
fix(ui): external adapter UI parser can now override builtin parsers
Builtin adapter types (hermes_local, openclaw_gateway, etc.) could not be overridden by external adapters on the UI side. The registry always returned the built-in parser, ignoring the external ui-parser.js shipped by packages like hermes-paperclip-adapter. Changes: - registry.ts: full override lifecycle with generation guard for stale loads - disabled-overrides-store.ts: client-side override pause state with useSyncExternalStore reactivity (persisted to localStorage) - use-disabled-adapters.ts: subscribe to override store changes - AdapterManager.tsx: separate controls for override pause (client-side) vs menu visibility (server-side), virtual builtin rows with badges - adapters.ts: allow reload/reinstall of builtin types when overridden
This commit is contained in:
parent
0651f48f6c
commit
4efe018a8f
6 changed files with 336 additions and 40 deletions
|
|
@ -437,8 +437,8 @@ export function adapterRoutes() {
|
|||
|
||||
const type = req.params.type;
|
||||
|
||||
// Built-in adapters cannot be reloaded
|
||||
if (BUILTIN_ADAPTER_TYPES.has(type)) {
|
||||
// Built-in adapters cannot be reloaded unless overridden by an external one
|
||||
if (BUILTIN_ADAPTER_TYPES.has(type) && !getAdapterPluginByType(type)) {
|
||||
res.status(400).json({ error: "Cannot reload built-in adapter." });
|
||||
return;
|
||||
}
|
||||
|
|
@ -489,7 +489,7 @@ export function adapterRoutes() {
|
|||
|
||||
const type = req.params.type;
|
||||
|
||||
if (BUILTIN_ADAPTER_TYPES.has(type)) {
|
||||
if (BUILTIN_ADAPTER_TYPES.has(type) && !getAdapterPluginByType(type)) {
|
||||
res.status(400).json({ error: "Cannot reinstall built-in adapter." });
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue