424afa060c
feat: Improve WebMCP connection handling and tools management
...
WebMCP service:
- Add headless mode configuration
- Implement proper event handlers with unsubscribe support
- Add connection info tracking (channel, server, status, tools)
- Add destroyWebMCP for cleanup
- Improve connectWithToken to pass token directly
Canvas store:
- Add connection state (reconnecting, status, error, info)
- Add computed statusColor for UI feedback
Components:
- Add ConnectionDropdown for connection status display
- Add ToolsDropdown for tools management UI
Tool registry:
- Improve tool activation/deactivation logic
- Better error handling and logging
2026-02-13 18:06:45 -06:00
acde6b37d6
feat: Add dynamic MCP tool registration per page
...
- webmcp.ts: Add tool tracking, unregisterTool(), clearAllTools()
- tools/canvasTools.ts: render_html, render_vue_component
- tools/componentTools.ts: save/load/list/delete_vue_component
- tools/themeTools.ts: get_design_tokens, get_active_theme, set_theme_variable, save_theme
- tools/globalTools.ts: get_current_page, navigate_to, list_available_tools
- toolRegistry.ts: Orchestrates tool registration per page
- App.vue: Initializes WebMCP once, watches route for tool changes
- Canvas.vue: Removed tool registration (now handled by registry)
Tools are now registered when entering a page and unregistered when leaving.
Refresh initializes tools correctly for the current page.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-02-13 05:42:17 -06:00