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:
@@ -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(() => {
|
||||
|
||||
Reference in New Issue
Block a user