mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-09-25 02:46:34 +08:00
feat(plugins): show installed state in marketplace and search installed extensions
Marketplace cards now reflect whether an extension is already installed in the current workspace, and the installed-extension list gains a search box. Backend (stream install progress): - _read_httpx_response_limited gains an optional task_context: it publishes download_total from Content-Length before the first chunk and updates download_current / download_speed per chunk. The marketplace download path previously had no progress reporting; it now matches the GitHub path. - _marketplace_get forwards task_context to that helper. - install_plugin resets the per-install counters so re-installing the same plugin cannot inherit stale metadata, and reports human-readable stages: preparing -> downloading -> inspecting -> storing -> installing dependencies -> launching -> waiting for plugin to become ready. Frontend (installed state): - New marketplace-installed helper normalises the sidebar identities (plugin: author/name, mcp: author__name, skill: bare name) into one type:author/name index and resolves a card's installed state from it. useMarketplaceInstalledIndex memoises on the sidebar lists, so a finished install (which refreshes the sidebar) re-evaluates the cards automatically. - PluginMarketCardVO carries installed / hasUpdate. An installed extension turns its download affordance into a hollow green ring with a green check in place, instead of adding a separate badge; the count slot switches to the installed label. Cards with an available update use amber. - PluginMarketComponent derives the annotated list and shares the index with RecommendationLists. Frontend (install task UI): - mapActionToStage matches the new connector stage strings. The pre-download stages are checked before the generic "install" match, because "preparing plugin install" also contains "install". - Stage progress ranges are non-overlapping; overall progress interpolates on real byte counts while downloading and drifts monotonically elsewhere, capped at 99%. - The progress dialog and task queue expose the launching stage. Frontend (installed list search): - The installed list had no search at all. A query box in the page header filters by label / name / author / description, case-insensitively, applied before grouping so grouped and flat views both honour it. - Search misses and an empty list now show distinct empty states, with a clear action on a search miss. - AsyncTask entity gains the optional created_at field. i18n: new marketplace / install / search strings across all 8 locales. Verified: ruff format + check, tsc --noEmit, prettier --check, eslint (0 errors), and 89/89 frontend unit tests.
This commit is contained in:
@@ -44,6 +44,7 @@ const ruRU = {
|
||||
delete: 'Удалить',
|
||||
add: 'Добавить',
|
||||
select: 'Выбрать',
|
||||
clear: 'Очистить',
|
||||
skill: 'Навык',
|
||||
cancel: 'Отмена',
|
||||
submit: 'Отправить',
|
||||
@@ -563,6 +564,8 @@ const ruRU = {
|
||||
getPluginListError: 'Не удалось получить список плагинов:',
|
||||
noPluginInstalled: 'Плагины не установлены',
|
||||
noExtensionInstalled: 'Расширения не установлены',
|
||||
searchInstalled: 'Поиск установленных расширений',
|
||||
noMatchingExtensions: 'Нет расширений, соответствующих «{{query}}»',
|
||||
loadingExtensions: 'Загрузка расширений...',
|
||||
groupByType: 'Группировать по формату',
|
||||
pluginConfig: 'Настройка плагина',
|
||||
@@ -836,6 +839,9 @@ const ruRU = {
|
||||
noTags: 'Нет доступных тегов',
|
||||
},
|
||||
installCard: 'Установить {{name}}',
|
||||
installedCard: '{{name}} установлен',
|
||||
installed: 'Установлено',
|
||||
updateAvailable: 'Доступно обновление',
|
||||
},
|
||||
mcp: {
|
||||
title: 'MCP',
|
||||
|
||||
Reference in New Issue
Block a user