Skip to content

Commit cbe424d

Browse files
author
lxfight
committed
feat(plugin): add pages field to plugin list API response
Include discovered page names for each plugin in the /api/plugin/get response, so the frontend can determine whether a plugin has a WebUI without an extra detail request.
1 parent 284c408 commit cbe424d

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

astrbot/dashboard/routes/plugin.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1268,6 +1268,7 @@ async def get_plugins(self):
12681268
logo_url = None
12691269
if plugin.logo_path:
12701270
logo_url = await self.get_plugin_logo_token(plugin.logo_path)
1271+
pages = await self._discover_plugin_pages(plugin)
12711272
_t = {
12721273
"name": plugin.name,
12731274
"repo": "" if plugin.repo is None else plugin.repo,
@@ -1283,6 +1284,7 @@ async def get_plugins(self):
12831284
"astrbot_version": plugin.astrbot_version,
12841285
"installed_at": self._get_plugin_installed_at(plugin),
12851286
"i18n": plugin.i18n,
1287+
"pages": [p.name for p in pages],
12861288
}
12871289
# 检查是否为全空的幽灵插件
12881290
if not any(

0 commit comments

Comments
 (0)