Merge branch 'main' of git.opencomputing.cn:yumoqing/bricks

This commit is contained in:
yumoqing 2025-09-20 21:15:17 +08:00
commit ed17c2f8d7
3 changed files with 12 additions and 6 deletions

View File

@ -586,7 +586,7 @@ hr {
}
.thinking-content {
background-color: #fdf0e0;
background-color: #fdfcf5;
}
.resp-content {
background-color: #f0eed8;

View File

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

View File

@ -68,16 +68,22 @@ bricks.LlmOut = class extends bricks.VBox {
}
update(data){
if (data.audiao){
if (data.audio){
var url = data.audio;
if (! data.audio.startsWith('http')){
if (! data.audio.startsWith('data:audio/')){
url = 'data:audio/wav;base64,' + url;
}
}
if (!this.a_w) {
this.a_w = new bricks.AudioPlay({
this.a_w = new bricks.AudioPlayer({
width: '100%',
autoplay: true,
url: data.audio,
url: url,
cheight:2
});
} else {
this.a_w.add_url(data.audio);
this.a_w.add_url(url);
}
}
if (data.video){