feat: Add torch system for multi-browser MCP control

- Add TorchButton component to header (replaces dropdowns)
- Add torch store for managing torch state
- Add torch service for requesting/releasing torch
- Add torch event handlers in WebMCP service
- Remove ComponentsDropdown and ToolsDropdown from header

The torch system allows controlling which browser receives
MCP tool calls when multiple browsers are connected.
Requires WebMCP library update to fully function.
This commit is contained in:
2026-02-14 16:25:43 -06:00
parent 50f670f66c
commit 647fb03516
5 changed files with 332 additions and 5 deletions

View File

@@ -3,9 +3,7 @@ import { ref, onMounted, onUnmounted, watch } from 'vue'
import { RouterView, useRoute, useRouter } from 'vue-router'
import StatusBar from './components/StatusBar.vue'
import Toolbar from './components/Toolbar.vue'
import ComponentsDropdown from './components/ComponentsDropdown.vue'
import ToolsDropdown from './components/ToolsDropdown.vue'
// ConnectionDropdown removed - replaced with debug console
import TorchButton from './components/TorchButton.vue'
import FloatingTerminal from './components/FloatingTerminal.vue'
import FloatingResponse from './components/FloatingResponse.vue'
import FloatingVoice from './components/FloatingVoice.vue'
@@ -366,14 +364,13 @@ watch(() => route.name, (newPage) => {
<header class="app-header">
<div class="header-left">
<h1 class="logo">Agent UI</h1>
<TorchButton />
<button class="debug-btn" :class="{ active: showDebugConsole }" @click="showDebugConsole = !showDebugConsole" title="Debug Console">
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M12 20h9"/><path d="M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z"/>
</svg>
<span v-if="debugLogs.length" class="log-count">{{ debugLogs.length }}</span>
</button>
<ComponentsDropdown />
<ToolsDropdown />
<PwaInstallBanner />
</div>
<button class="refresh-btn" @click="hardRefresh" title="Hard refresh (Ctrl+F5)">