mirror of
https://gh-proxy.org/https://github.com/klinsmaya/SQLBot.git
synced 2026-11-08 01:06:59 +08:00
perf: Optimize Assistant Session Creation Interaction
This commit is contained in:
committed by
fit2cloud-chenyw
parent
22bd467c04
commit
eeae468dbd
@@ -47,6 +47,10 @@ const emits = defineEmits([
|
||||
const assistantStore = useAssistantStore()
|
||||
const isCompletePage = computed(() => !assistantStore.getAssistant || assistantStore.getEmbedded)
|
||||
|
||||
const selectAssistantDs = computed(() => {
|
||||
return assistantStore.getAssistant && !assistantStore.getAutoDs
|
||||
})
|
||||
|
||||
const search = ref<string>()
|
||||
|
||||
const _currentChatId = computed({
|
||||
@@ -147,7 +151,7 @@ const createNewChat = async () => {
|
||||
}
|
||||
|
||||
async function doCreateNewChat() {
|
||||
if (!isCompletePage.value) {
|
||||
if (!isCompletePage.value && !selectAssistantDs.value) {
|
||||
return
|
||||
}
|
||||
chatCreatorRef.value?.showDs()
|
||||
@@ -255,7 +259,11 @@ function onChatRenamed(chat: Chat) {
|
||||
/>
|
||||
</el-main>
|
||||
|
||||
<ChatCreator v-if="isCompletePage" ref="chatCreatorRef" @on-chat-created="onChatCreated" />
|
||||
<ChatCreator
|
||||
v-if="isCompletePage || selectAssistantDs"
|
||||
ref="chatCreatorRef"
|
||||
@on-chat-created="onChatCreated"
|
||||
/>
|
||||
</el-container>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -1149,7 +1149,7 @@ onMounted(() => {
|
||||
}
|
||||
}
|
||||
.hidden-sidebar-btn {
|
||||
z-index: 1;
|
||||
z-index: 11;
|
||||
position: absolute;
|
||||
padding: 16px;
|
||||
top: 0;
|
||||
|
||||
Reference in New Issue
Block a user