From b4c9e5dd4ce85c0f36c1a2b0f1bbe964f2612e0a Mon Sep 17 00:00:00 2001 From: ymq Date: Sat, 8 Aug 2026 23:23:10 +0800 Subject: [PATCH] =?UTF-8?q?agent=5Finput.js=20=E2=86=92=20bricks,=20AgentI?= =?UTF-8?q?O=20uses=20AgentInput=20internally,=20index.ui=20clean=20AgentI?= =?UTF-8?q?O?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wwwroot/index.ui | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/wwwroot/index.ui b/wwwroot/index.ui index f9c22a9..eebdc86 100644 --- a/wwwroot/index.ui +++ b/wwwroot/index.ui @@ -116,7 +116,7 @@ }, "subwidgets": [ { - "widgettype": "VScrollPanel", + "widgettype": "AgentIO", "id": "chat_scroll", "options": { "css": "filler", @@ -157,15 +157,7 @@ ] } ], - "binds": [ - { - "wid": "self", - "event": "inputed", - "actiontype": "script", - "target": "self", - "script": "console.log('AGENTIO inputed bind fired',JSON.stringify(params));var ai=this;if(ai.inputw&&!ai._done){ai._done=true;var orig=ai.user_inputed.bind(ai);ai.inputw.unbind('inputed');ai.inputw.bind('inputed',function(e){console.log('HOOKED:',e.params.prompt);orig(e);var p=e.params.prompt||'';var mid=e.params.model_id||'';var xhr=new XMLHttpRequest();xhr.open('POST',ai.opts.url);xhr.setRequestHeader('Content-Type','application/x-www-form-urlencoded');var lastLen=0;xhr.onprogress=function(){var t=xhr.responseText;var d=t.substring(lastLen);lastLen=t.length;d.split(String.fromCharCode(10)).forEach(function(line){line=line.trim();if(!line)return;try{var obj=JSON.parse(line);console.log('STREAM:',line.substring(0,40))}catch(e){}})};xhr.onload=function(){console.log('DONE')};xhr.send('action=send_message&message_text='+encodeURIComponent(p)+'&model_id='+encodeURIComponent(mid))})}" - } - ] + "binds": [] }, { "widgettype": "VBox",