perf: Optimize Assistant Session Creation Interaction

This commit is contained in:
fit2cloud-chenyw
2026-02-04 15:15:09 +08:00
committed by fit2cloud-chenyw
parent 22bd467c04
commit eeae468dbd
2 changed files with 11 additions and 3 deletions
+10 -2
View File
@@ -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>
+1 -1
View File
@@ -1149,7 +1149,7 @@ onMounted(() => {
}
}
.hidden-sidebar-btn {
z-index: 1;
z-index: 11;
position: absolute;
padding: 16px;
top: 0;