FIX: Topic summary UI fixes. (#23085)

Hide summary wasn't working because it called the wrong action, and we must disabled the summarize button until streaming finishes.
This commit is contained in:
Roman Rizzi
2023-08-14 12:33:12 -03:00
committed by GitHub
parent ea6a89397a
commit 5bb2316756
2 changed files with 3 additions and 3 deletions
@@ -11,7 +11,7 @@
{{#if this.canCollapseSummary}}
<DButton
@class="btn-primary topic-strategy-summarization"
@action={{this.toggleSummary}}
@action={{this.collapseSummary}}
@title="summary.buttons.hide"
@label="summary.buttons.hide"
@icon="chevron-up"
@@ -41,7 +41,7 @@
{{#if this.showSummaryBox}}
<article class="summary-box">
{{#if this.loadingSummary}}
{{#if (and this.loadingSummary (not this.summary))}}
<AiSummarySkeleton />
{{else}}
<div class="generated-summary">{{this.summary}}</div>
@@ -45,7 +45,6 @@ export default class SummaryBox extends Component {
if (topicSummary.summarized_text) {
cookAsync(topicSummary.summarized_text).then((cooked) => {
this.summary = cooked;
this.loadingSummary = false;
});
}
@@ -58,6 +57,7 @@ export default class SummaryBox extends Component {
this.canRegenerate = topicSummary.outdated && topicSummary.can_regenerate;
this.canCollapseSummary = !this.canRegenerate;
this.loadingSummary = false;
}
}