fix(core): do not show AI avatar during generating (#11363)

> CLOSE BS-2989
This commit is contained in:
yoyoyohamapi
2025-04-01 12:11:28 +00:00
parent cad4dde4b1
commit bd30a73db8

View File

@@ -70,10 +70,6 @@ export class ChatMessageAssistant extends WithDisposable(ShadowlessElement) {
renderContent() { renderContent() {
const { host, item, isLast, status, error } = this; const { host, item, isLast, status, error } = this;
if (isLast && status === 'loading') {
return html`<ai-loading></ai-loading>`;
}
const state = isLast const state = isLast
? status !== 'loading' && status !== 'transmitting' ? status !== 'loading' && status !== 'transmitting'
? 'finished' ? 'finished'
@@ -143,6 +139,12 @@ export class ChatMessageAssistant extends WithDisposable(ShadowlessElement) {
} }
protected override render() { protected override render() {
const { isLast, status } = this;
if (isLast && status === 'loading') {
return html`<ai-loading></ai-loading>`;
}
return html` return html`
${this.renderHeader()} ${this.renderHeader()}
<div class="item-wrapper">${this.renderContent()}</div> <div class="item-wrapper">${this.renderContent()}</div>