diff --git a/.gitignore b/.gitignore
index 8e0d9db3..a9120e7b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -37,3 +37,4 @@ yarn.lock
!.vscode/snippets.code-snippets
.docs
+.playwright-mcp/
diff --git a/src/components/analysis/SessionIndexModal.vue b/src/components/analysis/SessionIndexModal.vue
index a5d350ce..4bfcca5f 100644
--- a/src/components/analysis/SessionIndexModal.vue
+++ b/src/components/analysis/SessionIndexModal.vue
@@ -13,6 +13,8 @@ const props = defineProps<{
sessionId: string
/** 弹窗打开状态(v-model) */
modelValue?: boolean
+ /** 会话消息总数,为 0 时不自动弹出 */
+ messageCount?: number
}>()
const emit = defineEmits<{
@@ -47,6 +49,8 @@ const canClose = computed(() => {
// 检查会话索引状态并自动弹出
async function checkAndAutoOpen() {
if (!props.sessionId) return
+ // 没有消息的会话无需索引,跳过自动弹出
+ if (props.messageCount === 0) return
isLoading.value = true
try {
@@ -93,14 +97,12 @@ async function generateSessionIndex() {
hasIndex.value = true
sessionCount.value = count
emit('generated', count)
-
- // 生成完成后自动关闭
- forceMode.value = false
- isOpen.value = false
} catch (error) {
console.error('生成会话索引失败:', error)
} finally {
isGenerating.value = false
+ forceMode.value = false
+ isOpen.value = false
}
}
diff --git a/src/pages/group-chat/index.vue b/src/pages/group-chat/index.vue
index 3ec341cb..34a979aa 100644
--- a/src/pages/group-chat/index.vue
+++ b/src/pages/group-chat/index.vue
@@ -255,7 +255,12 @@ const { headerDescription } = useSessionHeaderDescription({
-
+
{
-
+