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

@@ -78,7 +78,7 @@ export function startSyncServer() {
const data = JSON.parse(message.toString())
// Route to appropriate handler based on message type
if (data.type?.startsWith('torch-') || ['register', 'request', 'release', 'transfer'].includes(data.type)) {
if (data.type?.startsWith('torch-') || ['register', 'request', 'release', 'transfer', 'update-name'].includes(data.type)) {
handleTorchMessage(ws, data, broadcast)
}
// Git doesn't expect messages from client