diff options
Diffstat (limited to 'app/backends/__init__.py')
| -rw-r--r-- | app/backends/__init__.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/backends/__init__.py b/app/backends/__init__.py index e59c464..8c9f045 100644 --- a/app/backends/__init__.py +++ b/app/backends/__init__.py @@ -160,6 +160,10 @@ class BackendInfo: removes the backend (stops its servers, pip-uninstalls, deletes its files); the hub runs it inside the task view, calling it with optional ``emit``/``cancel`` keywords (cancel honored between phases only). + UPDATE refreshes the installed backend to the latest upstream version + (pip -U / git fetch+reset, rebuilding where a binary must match the + sources); same calling convention as UNINSTALL. Without UPDATE a + backend is skipped by the hub's "Update backends" action. CONFIGURE_SCREEN, when given, is what the hub's "Configure <label>" menu entry runs instead of SETUP_SCREEN once the backend exists — a @@ -173,6 +177,7 @@ class BackendInfo: detect: Callable[[], BackendStatus] setup_screen: Callable[[object], int] uninstall: Callable[..., int] = lambda *args, **kwargs: 0 + update: Optional[Callable[..., int]] = None configure_screen: Optional[Callable[[object], int]] = None @@ -192,6 +197,7 @@ def _build_registry() -> None: detect=audiocpp.detect, setup_screen=audiocpp.setup_screen, uninstall=audiocpp.uninstall, + update=audiocpp.update, )) REGISTRY.append(BackendInfo( key="qwen", @@ -199,6 +205,7 @@ def _build_registry() -> None: detect=qwen.detect, setup_screen=qwen.setup_screen, uninstall=qwen.uninstall, + update=qwen.update, configure_screen=qwen.models_screen, )) REGISTRY.append(BackendInfo( @@ -207,6 +214,7 @@ def _build_registry() -> None: detect=faster.detect, setup_screen=faster.setup_screen, uninstall=faster.uninstall, + update=faster.update, )) for info in REGISTRY: _BY_KEY[info.key] = info |
