Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions src/renderer/src/components/ThreadsView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@
>
<!-- 固定在顶部的"新会话"按钮 -->
<div class="flex-none flex flex-row gap-2">
<Button
v-if="windowSize.width.value < 1024"
variant="outline"
size="icon"
class="flex-shrink-0 text-xs justify-center h-7 w-7"
@click="chatStore.isSidebarOpen = false"
>
<Icon icon="lucide:panel-left-close" class="h-4 w-4" />
</Button>
<Button
variant="outline"
size="sm"
Expand All @@ -13,15 +22,6 @@
<Icon icon="lucide:pen-line" class="h-4 w-4" />
<span>{{ t('common.newChat') }}</span>
</Button>
<Button
v-if="windowSize.width.value < 1024"
variant="outline"
size="icon"
class="flex-shrink-0 text-xs justify-center h-7 w-7"
@click="chatStore.isSidebarOpen = false"
>
<Icon icon="lucide:x" class="h-4 w-4" />
</Button>
</div>

<!-- 可滚动的会话列表 - 使用动态虚拟滚动 -->
Expand Down Expand Up @@ -214,6 +214,7 @@ const flattenedThreads = computed<VirtualScrollItem[]>(() => {
const createNewThread = async () => {
try {
await chatStore.createNewEmptyThread()
chatStore.isSidebarOpen = false
} catch (error) {
console.error(t('common.error.createChatFailed'), error)
}
Expand Down