feat: Phase 2 - LLM Integration for Canvas

- Add canvas.ts MCP tool with validate_canvas_intent, execute_canvas_intent, interpret_canvas_intent
- Add useCanvasChat.ts bridge hook connecting canvas to chat system
- Update context_builder.py with canvas tool instructions
- Add ExecuteDialog for study name input
- Add ChatPanel for canvas-integrated Claude responses
- Connect AtomizerCanvas to Claude via useCanvasChat

Canvas workflow now:
1. Build graph visually
2. Click Validate/Analyze/Execute
3. Claude processes intent via MCP tools
4. Response shown in integrated chat panel

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-14 20:18:46 -05:00
parent 7919511bb2
commit 1ae35382da
8 changed files with 1051 additions and 11 deletions

View File

@@ -235,4 +235,12 @@ Available tools:
- `get_trial_data`, `analyze_convergence`, `compare_trials`, `get_best_design`
- `generate_report`, `export_data`
- `explain_physics`, `recommend_method`, `query_extractors`
**Canvas Tools (for visual workflow builder):**
- `validate_canvas_intent` - Validate a canvas-generated optimization intent
- `execute_canvas_intent` - Create a study from a canvas intent
- `interpret_canvas_intent` - Analyze intent and provide recommendations
When you receive a message containing "INTENT:" followed by JSON, this is from the Canvas UI.
Parse the intent and use the appropriate canvas tool to process it.
"""