feat(webui): debug panel — action tester + live stream (Wave A3)

New Settings → 调试 tab (DebugPanel): an action tester (account picker +
schema-driven form from /api/debug/actions, with a raw-JSON escape hatch for
legacy actions, real-side-effect warning) and a live merged SSE view of OneBot
events + action calls (pause / clear / kind filter, expandable JSON, drop
marker). Typed debug API client domain (actions/invoke/stream over EventSource
with ?token=). View layer — verified by tsc + vite build.
This commit is contained in:
DrSmoothl committed 2026-06-18 15:25:34 +08:00
1 parent 39864f6e48
commit fae2f75525
6 files changed
+324 -2

No files matched your search

@@ -43,6 +43,7 @@ import { cn } from '@/lib/utils';
import { settingsRoute, type SettingsTab } from '@/router';
import { NotificationsPanel } from '@/components/settings/notifications-panel';
import { SystemPanel } from '@/components/settings/system-panel';
import { DebugPanel } from '@/components/settings/debug-panel';
const TABS: { key: SettingsTab; label: string; icon: typeof Sun }[] = [
{ key: 'appearance', label: '外观', icon: Palette },
@@ -50,6 +51,7 @@ const TABS: { key: SettingsTab; label: string; icon: typeof Sun }[] = [
{ key: 'advanced', label: '高级', icon: Code2 },
{ key: 'account', label: '账号安全', icon: ShieldCheck },
{ key: 'system', label: '服务', icon: Server },
{ key: 'debug', label: '调试', icon: Bug },
{ key: 'notifications', label: '通知', icon: Bell },
{ key: 'about', label: '关于', icon: Info },
];
@@ -82,6 +84,7 @@ export function SettingsPage() {
{tab === 'advanced' && <AdvancedPanel />}
{tab === 'account' && <AccountPanel />}
{tab === 'system' && <SystemPanel />}
{tab === 'debug' && <DebugPanel />}
{tab === 'notifications' && <NotificationsPanel />}
{tab === 'about' && <AboutPanel />}
</motion.div>