<template>
  <Dialog
    v-model:show="sessionManager.renameVisible.value"
    title="重命名会话"
    showCancel
    :onConfirm="() => sessionManager.submitRename()"
    :onCancel="() => { sessionManager.renameVisible.value = false }"
  >
    <template #content>
      <Field
        v-model="sessionManager.renameTitle.value" 
        placeholder="会话标题"
        allowClear 
        showWordLimit
        :maxlength="100"
      />
    </template>
  </Dialog>
</template>

<script setup lang="ts">
import Dialog from '@/components/dialog/Dialog.vue';
import type { ChatSessionManager } from '../../composables/useChatSession';
import Field from '@/components/form/Field.vue';

defineProps<{
  sessionManager: ChatSessionManager;
}>();
</script>
