@@ -64,7 +64,7 @@ export class LivematePanel extends ReactDevToolsViewBase {
6464 pickComponentButton . textContent = 'Pick component' ;
6565 pickComponentButton . setAttribute ( 'style' , 'padding: 4px 12px; cursor: pointer;' ) ;
6666 pickComponentButton . addEventListener ( 'click' , ( ) => {
67- ( bridge as unknown as { send : ( event : string ) => void } ) . send ( 'startInspector ' ) ;
67+ ( bridge as unknown as { send : ( event : string ) => void } ) . send ( 'startInspectingHost ' ) ;
6868 } ) ;
6969 topRow . appendChild ( pickComponentButton ) ;
7070
@@ -73,9 +73,9 @@ export class LivematePanel extends ReactDevToolsViewBase {
7373 breadcrumb . setAttribute ( 'style' , 'flex: 1; font-family: monospace; font-size: 12px; color: var(--sys-color-on-surface); display: flex; align-items: center; gap: 4px; flex-wrap: wrap;' ) ;
7474
7575 // Selected component box
76- const selectedComponentBox = document . createElement ( 'div' ) ;
77- selectedComponentBox . setAttribute ( 'style' , 'padding: 4px 8px; border: 1px solid var(--sys-color-divider); border-radius: 4px; background: var(--sys-color-surface-variant); font-family: monospace; font-size: 12px; color: var(--sys-color-on-surface);' ) ;
78- selectedComponentBox . textContent = '' ;
76+ // const selectedComponentBox = document.createElement('div');
77+ // selectedComponentBox.setAttribute('style', 'padding: 4px 8px; border: 1px solid var(--sys-color-divider); border-radius: 4px; background: var(--sys-color-surface-variant); font-family: monospace; font-size: 12px; color: var(--sys-color-on-surface);');
78+ // selectedComponentBox.textContent = '';
7979
8080 // Track the current hierarchy for prompt context
8181 let currentHierarchy : Array < { name : string } > = [ ] ;
@@ -98,9 +98,6 @@ export class LivematePanel extends ReactDevToolsViewBase {
9898 const componentSpan = document . createElement ( 'span' ) ;
9999 componentSpan . textContent = component . name ;
100100 componentSpan . setAttribute ( 'style' , 'cursor: pointer; color: var(--sys-color-primary); text-decoration: underline;' ) ;
101- componentSpan . addEventListener ( 'click' , ( ) => {
102- selectedComponentBox . textContent = component . name ;
103- } ) ;
104101 componentSpan . addEventListener ( 'mouseenter' , ( ) => {
105102 componentSpan . style . opacity = '0.7' ;
106103 } ) ;
@@ -126,7 +123,6 @@ export class LivematePanel extends ReactDevToolsViewBase {
126123 } ) ;
127124
128125 topRow . appendChild ( breadcrumb ) ;
129- topRow . appendChild ( selectedComponentBox ) ;
130126
131127 // Second row: AI query input and send button
132128 const bottomRow = document . createElement ( 'div' ) ;
@@ -154,7 +150,25 @@ export class LivematePanel extends ReactDevToolsViewBase {
154150 sendToDevmate : ( prompt : string ) => void ,
155151 }
156152 ) . sendToDevmate ( prompt ) ;
157- queryInput . value = '' ;
153+
154+ // Disable input and button with grayed out appearance
155+ queryInput . disabled = true ;
156+ queryInput . style . opacity = '0.5' ;
157+ queryInput . style . cursor = 'not-allowed' ;
158+ sendButton . disabled = true ;
159+ sendButton . style . opacity = '0.5' ;
160+ sendButton . style . cursor = 'not-allowed' ;
161+
162+ // Re-enable and clear after 3 seconds
163+ setTimeout ( ( ) => {
164+ queryInput . value = '' ;
165+ queryInput . disabled = false ;
166+ queryInput . style . opacity = '1' ;
167+ queryInput . style . cursor = 'text' ;
168+ sendButton . disabled = false ;
169+ sendButton . style . opacity = '1' ;
170+ sendButton . style . cursor = 'pointer' ;
171+ } , 3000 ) ;
158172 }
159173 } ;
160174
0 commit comments