fix: allow quick menu actions and stabilize blank welcome
This commit is contained in:
parent
099de1e922
commit
15e1f3c40f
@ -151,6 +151,7 @@ const appOptions = {
|
|||||||
blankHeroActive: false,
|
blankHeroActive: false,
|
||||||
blankHeroExiting: false,
|
blankHeroExiting: false,
|
||||||
blankWelcomeText: '',
|
blankWelcomeText: '',
|
||||||
|
lastBlankConversationId: null,
|
||||||
blankWelcomePool: [
|
blankWelcomePool: [
|
||||||
'有什么可以帮忙的?',
|
'有什么可以帮忙的?',
|
||||||
'想了解些热点吗?',
|
'想了解些热点吗?',
|
||||||
@ -2427,14 +2428,21 @@ const appOptions = {
|
|||||||
|
|
||||||
refreshBlankHeroState() {
|
refreshBlankHeroState() {
|
||||||
const isBlank = this.isConversationBlank();
|
const isBlank = this.isConversationBlank();
|
||||||
|
const currentConv = this.currentConversationId || 'temp';
|
||||||
|
const needNewWelcome =
|
||||||
|
!this.blankHeroActive ||
|
||||||
|
this.lastBlankConversationId !== currentConv;
|
||||||
|
|
||||||
if (isBlank) {
|
if (isBlank) {
|
||||||
if (!this.blankHeroExiting) {
|
if (needNewWelcome && !this.blankHeroExiting) {
|
||||||
this.pickWelcomeText();
|
this.pickWelcomeText();
|
||||||
}
|
}
|
||||||
this.blankHeroActive = true;
|
this.blankHeroActive = true;
|
||||||
|
this.lastBlankConversationId = currentConv;
|
||||||
} else {
|
} else {
|
||||||
this.blankHeroActive = false;
|
this.blankHeroActive = false;
|
||||||
this.blankHeroExiting = false;
|
this.blankHeroExiting = false;
|
||||||
|
this.lastBlankConversationId = null;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@ -15,7 +15,7 @@
|
|||||||
type="button"
|
type="button"
|
||||||
class="stadium-btn add-btn"
|
class="stadium-btn add-btn"
|
||||||
@click.stop="$emit('toggle-quick-menu')"
|
@click.stop="$emit('toggle-quick-menu')"
|
||||||
:disabled="!isConnected || streamingMessage || inputLocked"
|
:disabled="!isConnected"
|
||||||
>
|
>
|
||||||
+
|
+
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user