@@ -265,7 +265,7 @@ export class A2UILayoutEditor extends SignalWatcher(LitElement) {
265265 #processor = new v0_9 . MessageProcessor (
266266 [ basicCatalog ] ,
267267 async ( action : v0_9 . A2uiClientAction ) : Promise < any > => {
268- console . log ( "Action ", action ) ;
268+ console . debug ( "Handling action ", action ) ;
269269
270270 const context : Record < string , any > = { ...action . context } ;
271271
@@ -385,14 +385,14 @@ export class A2UILayoutEditor extends SignalWatcher(LitElement) {
385385
386386 #startLoadingAnimation( ) {
387387 if (
388- Array . isArray ( this . config . loadingText ) &&
388+ this . config . loadingText &&
389389 this . config . loadingText . length > 1
390390 ) {
391391 this . #loadingTextIndex = 0 ;
392392 this . #loadingInterval = window . setInterval ( ( ) => {
393393 this . #loadingTextIndex =
394394 ( this . #loadingTextIndex + 1 ) %
395- ( this . config . loadingText as string [ ] ) . length ;
395+ this . config . loadingText ! . length ;
396396 } , 2000 ) ;
397397 }
398398 }
@@ -426,14 +426,9 @@ export class A2UILayoutEditor extends SignalWatcher(LitElement) {
426426
427427 #maybeRenderData( ) {
428428 if ( this . #requesting) {
429- let text = "Awaiting an answer..." ;
430- if ( this . config . loadingText ) {
431- if ( Array . isArray ( this . config . loadingText ) ) {
432- text = this . config . loadingText [ this . #loadingTextIndex] ;
433- } else {
434- text = this . config . loadingText ;
435- }
436- }
429+ const text = this . config . loadingText
430+ ? this . config . loadingText [ this . #loadingTextIndex]
431+ : "Awaiting an answer..." ;
437432
438433 return html ` < div class ="pending ">
439434 < div class ="spinner "> </ div >
@@ -442,18 +437,16 @@ export class A2UILayoutEditor extends SignalWatcher(LitElement) {
442437 }
443438
444439 const surfaces = Array . from ( this . #processor. model . surfacesMap . entries ( ) ) ;
445- console . log ( "Surfaces" , surfaces ) ;
446-
447440 if ( surfaces . length === 0 ) {
448441 return nothing ;
449442 }
443+ console . debug ( "Rendering surfaces" , surfaces ) ;
450444
451445 return html `< section id ="surfaces ">
452446 ${ repeat (
453447 surfaces ,
454448 ( [ surfaceId ] ) => surfaceId ,
455- ( [ surfaceId , surface ] ) => {
456- console . log ( 'Rendering' , surfaceId ) ;
449+ ( [ _ , surface ] ) => {
457450 return html `< a2ui-surface
458451 .surface =${ surface }
459452 > </ a2ui-surface > ` ;
@@ -464,8 +457,7 @@ export class A2UILayoutEditor extends SignalWatcher(LitElement) {
464457
465458 async #sendAndProcessMessage( request ) {
466459 const messages = await this . #sendMessage( request ) ;
467-
468- console . log ( "Received" , messages ) ;
460+ console . debug ( "Received messages" , messages ) ;
469461
470462 this . #lastMessages = messages ;
471463
0 commit comments