Fix chat experience (#171)

Co-authored-by: AceDataCloud <office@acedata.cloud>
This commit is contained in:
GermeyandAceDataCloud authored and GitHub committed 2025-02-10 02:12:09 +08:00
1 parent 56d2571a5c
commit 93f6aac165
3 files changed
+44 -36

No files matched your search

+8 -4
View File
@@ -27,9 +27,13 @@
<span v-else-if="conversation?.editing">
<el-input v-model="conversation.title" @keydown.enter="onConfirm(conversation)" />
</span>
<span v-else-if="conversation?.title || conversation?.messages">{{
conversation?.title || conversation?.messages[conversation?.messages.length - 1]?.content
}}</span>
<span v-else-if="conversation?.title || conversation?.messages">
{{
conversation?.title ||
conversation?.messages?.[conversation?.messages.length - 1]?.content ||
conversation?.messages?.[0]?.content
}}
</span>
</div>
<div class="operations">
<font-awesome-icon
@@ -152,7 +156,7 @@ export default defineComponent({
console.error('Token is not found');
return;
}
if (conversation?.deleting) {
if (conversation?.deleting && conversation.id) {
await chatOperator.deleteConversation(conversation.id, {
token
});