feat: add element inspector with chat integration
- Implement element inspector tool for preview iframe with hover/click detection - Add inspector panel UI to display element details and styles - Integrate selected elements into chat messages for reference - Style improvements for chat messages and scroll behavior - Add inspector script injection to preview iframe - Support element selection and context in chat prompts -Redesign Messgaes, Workbench and Header for a more refined look allowing more workspace in view
This commit is contained in:
@@ -34,6 +34,10 @@ if (!import.meta.env.SSR) {
|
||||
|
||||
const { workbenchStore } = await import('~/lib/stores/workbench');
|
||||
|
||||
const response = await fetch('/inspector-script.js');
|
||||
const inspectorScript = await response.text();
|
||||
await webcontainer.setPreviewScript(inspectorScript);
|
||||
|
||||
// Listen for preview errors
|
||||
webcontainer.on('preview-message', (message) => {
|
||||
console.log('WebContainer preview message:', message);
|
||||
|
||||
Reference in New Issue
Block a user