bugfix
This commit is contained in:
parent
53265bfa1d
commit
e22cb005a8
@ -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);
|
||||
|
||||
@ -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
BIN
docs/.DS_Store
vendored
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user