Skip to content

Commit eeae468

Browse files
perf: Optimize Assistant Session Creation Interaction
1 parent 22bd467 commit eeae468

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

frontend/src/views/chat/ChatListContainer.vue

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ const emits = defineEmits([
4747
const assistantStore = useAssistantStore()
4848
const isCompletePage = computed(() => !assistantStore.getAssistant || assistantStore.getEmbedded)
4949
50+
const selectAssistantDs = computed(() => {
51+
return assistantStore.getAssistant && !assistantStore.getAutoDs
52+
})
53+
5054
const search = ref<string>()
5155
5256
const _currentChatId = computed({
@@ -147,7 +151,7 @@ const createNewChat = async () => {
147151
}
148152
149153
async function doCreateNewChat() {
150-
if (!isCompletePage.value) {
154+
if (!isCompletePage.value && !selectAssistantDs.value) {
151155
return
152156
}
153157
chatCreatorRef.value?.showDs()
@@ -255,7 +259,11 @@ function onChatRenamed(chat: Chat) {
255259
/>
256260
</el-main>
257261

258-
<ChatCreator v-if="isCompletePage" ref="chatCreatorRef" @on-chat-created="onChatCreated" />
262+
<ChatCreator
263+
v-if="isCompletePage || selectAssistantDs"
264+
ref="chatCreatorRef"
265+
@on-chat-created="onChatCreated"
266+
/>
259267
</el-container>
260268
</template>
261269

frontend/src/views/chat/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1149,7 +1149,7 @@ onMounted(() => {
11491149
}
11501150
}
11511151
.hidden-sidebar-btn {
1152-
z-index: 1;
1152+
z-index: 11;
11531153
position: absolute;
11541154
padding: 16px;
11551155
top: 0;

0 commit comments

Comments
 (0)