update aiChatQuestions.ts from api
This commit is contained in:
@@ -5,7 +5,8 @@
|
||||
:messages="messages"
|
||||
:is-generating="isGenerating"
|
||||
:quick-question-list="aiQuickQuestionList"
|
||||
@select-question="selectQuestion"
|
||||
@select-question="submitMessage"
|
||||
@refresh-questions="refreshQuickQuestions"
|
||||
/>
|
||||
<div class="bottom-area">
|
||||
<div v-if="activeToolStatus" class="tool-status">
|
||||
@@ -39,7 +40,7 @@ import type { GaoAiConversation } from "@/api/GaoAiAPI";
|
||||
import AiChatComposer from "@/pages/ai/components/AiChatComposer.vue";
|
||||
import AiConversationList from "@/pages/ai/components/AiConversationList.vue";
|
||||
import AiChatMessageList from "@/pages/ai/components/AiChatMessageList.vue";
|
||||
import { aiQuickQuestionList } from "@/pages/ai/aiChatQuestions";
|
||||
import { aiQuickQuestionList, loadAiQuickQuestions, refreshAiQuickQuestions } from "@/pages/ai/aiChatQuestions";
|
||||
import { useNavBarStore } from "@/store/navBarStore";
|
||||
import { getErrorMessage } from "@/utils/error";
|
||||
import { Message } from "@/utils/message";
|
||||
@@ -110,17 +111,18 @@ function handleConversationDelete(deletedConversationId: string): void {
|
||||
}
|
||||
}
|
||||
|
||||
function selectQuestion(question: string): void {
|
||||
draft.value = question;
|
||||
function refreshQuickQuestions(): void {
|
||||
refreshAiQuickQuestions();
|
||||
}
|
||||
|
||||
async function scrollToBottom(): Promise<void> {
|
||||
await messageListRef.value?.scrollToBottom();
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
onMounted(async () => {
|
||||
navBarStore.clearRight();
|
||||
navBarStore.setRightText("历史", "var(--td-brand-color)", openConversationList);
|
||||
await loadAiQuickQuestions();
|
||||
});
|
||||
|
||||
watch(isBusy, value => navBarStore.setRightDisabled(value));
|
||||
|
||||
Reference in New Issue
Block a user