diff --git a/wwwroot/index.ui b/wwwroot/index.ui index f9c22a9..3cdf46f 100644 --- a/wwwroot/index.ui +++ b/wwwroot/index.ui @@ -81,7 +81,7 @@ "event": "changed", "actiontype": "script", "target": "self", - "script": "var v=this.getValue();var pid=(v||{}).project_id||'';if(!pid)return;fetch('/pipeline-sdlc/api/cockpit_context_update.dspy',{method:'POST',headers:{'Content-Type':'application/x-www-form-urlencoded'},body:'project_id='+encodeURIComponent(pid)}).then(function(r){return r.json()}).then(function(r){if(r.success){var pl=bricks.getWidgetById('task_btn',bricks.app);if(pl&&pl.text_w)pl.text_w.set_text('任务');}})" + "script": "if(!bricks.HttpResponseStream._patched){\nbricks.HttpResponseStream._patched=true;\nvar orig=bricks.HttpResponseStream.prototype.handle_chunk;\nbricks.HttpResponseStream.prototype.handle_chunk=function(resp,handler){\nconsole.log('PATCHED handle_chunk');\nconst reader=resp.body.getReader();\nconst decoder=new TextDecoder('utf-8');\nlet result=await reader.read();\nvar buff_='';\nwhile(!result.done){\nconst text=decoder.decode(result.value);\nbuff_+=text;\nconst lines=buff_.split(String.fromCharCode(10));\nfor(var i=0;i