Compare commits

...

2 Commits

Author SHA1 Message Date
1459033c88 bugfix 2025-09-16 11:07:18 +08:00
7ce60cf23d bugfix 2025-09-16 11:01:13 +08:00
3 changed files with 12 additions and 3 deletions

View File

@ -584,3 +584,10 @@ hr {
.fullscreen {
margin-left: auto;
}
.thinking-content {
background-color: #f0d0d0;
}
.resp-content {
background-color: #f0d0f0;
}

View File

@ -71,7 +71,7 @@ bricks.ModelOutput = class extends bricks.VBox {
this.logid = null;
this.run = new bricks.BaseRunning({target:this});
this.content.add_widget(this.run);
this.filler = new bricks.LlmOut({width: '100%'});
this.filler = new bricks.LlmOut({width: '100%', css: 'card'});
this.filler.set_css('filler');
this.content.add_widget(new bricks.BlankIcon({rate:2, flexShrink:0}));
this.content.add_widget(this.filler);

View File

@ -62,9 +62,11 @@ bricks.LlmOut = class extends bricks.VBox {
}
this.clear_widgets();
if (this.reasoning_content.length) {
var txt = bricks.escapeSpecialChars('<think>\n\n' + this.reasoning_content + '\n\n</think>');
var txt = bricks.escapeSpecialChars(this.reasoning_content);
this.rc_w = new bricks.MdWidget({
mdtext: txt,
css: 'thinking-content',
bgcolor: '#f0d0d0',
width: '100%'
});
this.add_widget(this.rc_w);
@ -73,6 +75,7 @@ bricks.LlmOut = class extends bricks.VBox {
var txt = bricks.escapeSpecialChars(this.content);
this.c_w = new bricks.MdWidget({
mdtext: txt,
css: 'resp-content';
width: '100%'
});
this.add_widget(this.c_w);
@ -95,4 +98,3 @@ bricks.LlmOut = class extends bricks.VBox {
}
}
bricks.Factory.register('LlmOut', bricks.LlmOut);