This commit is contained in:
yumoqing 2025-10-13 15:02:02 +08:00
parent 53265bfa1d
commit e22cb005a8
3 changed files with 3 additions and 5 deletions

View File

@ -133,13 +133,11 @@ bricks.LlmOut = class extends bricks.VBox {
if (this.error.length) {
var txt = bricks.escapeSpecialChars(this.error);
this.c_w = new bricks.MdWidget({
mdtext: this.content,
mdtext: this.error,
css: 'resp-error',
width: '100%'
});
this.add_widget(this.c_w);
this.content = '';
this.reasoning_content = '';
}
if (this.reasoning_content.length) {
var txt = bricks.escapeSpecialChars(this.reasoning_content);

View File

@ -37,13 +37,13 @@ bricks.dom_on_off_observer=new MutationObserver((mutations)=>{
function handleRemoved(node) {
if (node.nodeType !== 1) return; // 只处理元素节点
if (node.bricks_widget) {
console.log('**** widget removed', node.bricks_widget);
// console.log('**** widget removed', node.bricks_widget);
node.bricks_widget.dispatch('domoff');
}
// 遍历后代
for (let child of node.querySelectorAll('*')) {
if (child.bricks_widget) {
console.log('**** widget removed (descendant)', child.bricks_widget);
// console.log('**** widget removed (descendant)', child.bricks_widget);
child.bricks_widget.dispatch('domoff');
}
}

BIN
docs/.DS_Store vendored

Binary file not shown.