feat: Add torch client identity, early connection and auto-request

- Named clients persisted in localStorage, editable from dropdown
- Auto-request: clients can auto-receive torch when no holder exists
- Early torch init in App.vue (fires before WebMCP, awaited later)
- Deferred torch connection in toolRegistry for race condition safety
- TorchButton rewritten as dropdown with name editor, toggle, client list
- Server broadcasts client names, supports update-name message
- MCP tool handlers display client names
This commit is contained in:
2026-02-14 23:30:56 -06:00
parent 3f15aa590b
commit 2a80b7751b
8 changed files with 597 additions and 135 deletions

View File

@@ -244,6 +244,9 @@ onMounted(async () => {
// Connect to WebSocket for Claude status updates
connectStatusWs()
// Fire torch connection early (don't await yet)
const torchReady = initTorch()
// Initialize WebMCP connection
await initWebMCP()
@@ -320,8 +323,8 @@ onMounted(async () => {
})
}
// Initialize torch system (handles MCP connection based on torch state)
await initTorch()
// Ensure torch connection is established
await torchReady
})
onUnmounted(() => {