From 261d342fa18e8c1955b8df9638670ad947a200ac Mon Sep 17 00:00:00 2001 From: Kiro Agent <244629292+kiro-agent@users.noreply.github.com> Date: Sat, 16 May 2026 08:41:43 +0000 Subject: [PATCH] feat(web): port AI Assistant, STRM management, and admin tools pages from Vue UI - AIAssistantPage (/ai): smart natural-language search showing parsed intent + matching media grid, plus history-based recommendations. - StrmPage (/strm, admin): import streaming-only entries from URLs and attach/detach STRM URL on existing media. - ToolsPage (/tools, admin): organize an entire library or single media item, send test notifications through configured channels. - Wire new routes in App.tsx and add sidebar links in Layout.tsx. Co-authored-by: Shuke <272197458+ShukeBta@users.noreply.github.com> --- web/src/App.tsx | 26 ++++ web/src/api/tools.ts | 21 +++ web/src/components/Layout.tsx | 6 + web/src/pages/AIAssistantPage.tsx | 242 +++++++++++++++++++++++++++++ web/src/pages/StrmPage.tsx | 248 ++++++++++++++++++++++++++++++ web/src/pages/ToolsPage.tsx | 244 +++++++++++++++++++++++++++++ 6 files changed, 787 insertions(+) create mode 100644 web/src/api/tools.ts create mode 100644 web/src/pages/AIAssistantPage.tsx create mode 100644 web/src/pages/StrmPage.tsx create mode 100644 web/src/pages/ToolsPage.tsx diff --git a/web/src/App.tsx b/web/src/App.tsx index 0dca9ac..b812c63 100644 --- a/web/src/App.tsx +++ b/web/src/App.tsx @@ -75,6 +75,15 @@ const SitesPage = lazy(() => const SiteSearchPage = lazy(() => import('./pages/SiteSearchPage').then((m) => ({ default: m.SiteSearchPage })), ) +const AIAssistantPage = lazy(() => + import('./pages/AIAssistantPage').then((m) => ({ default: m.AIAssistantPage })), +) +const StrmPage = lazy(() => + import('./pages/StrmPage').then((m) => ({ default: m.StrmPage })), +) +const ToolsPage = lazy(() => + import('./pages/ToolsPage').then((m) => ({ default: m.ToolsPage })), +) const Loading = () =>
加载中…
@@ -108,6 +117,7 @@ export default function App() {+ 自然语言搜索 · 基于观影历史的智能推荐 +
++ 推荐基于你的最近观看历史。点击标题在媒体库中查找。 +
+ + {recs && recs.length > 0 && ( ++ 还没有推荐结果 — 先去看几部片子,我再给你挑。 +
+ )} ++ 提示: 当前未配置外部 AI Provider,系统将使用本地规则引擎解析查询。 + 管理员可在 API 配置{' '} + 中接入 OpenAI / DeepSeek 等服务以获得更好效果。 +
+ )} ++ 将外部 HTTP / WebDAV / Alist 直链以"虚拟文件"形式纳入媒体库 +
++ 导入后会创建一条 container=strm 的媒体记录,播放时会 302 重定向到该 URL。 +
+未找到匹配的媒体。
+ )} +整理媒体文件 · 测试通知渠道
+
+ 将媒体文件按 媒体库/年份/标题 (年份)/标题.ext{' '}
+ 的规范布局移动并重命名,确保已先完成刮削。
+
未找到匹配的媒体。
+ )} ++ 会向所有已配置的通知渠道(Telegram / Bark / Webhook 等)发送一条测试消息。 +
+ +