历史回复

This commit is contained in:
2026-03-18 20:33:28 +08:00
parent fad174824a
commit 1a45638f32

View File

@@ -167,14 +167,14 @@
<div v-else>
<div v-for="(session, index) in repliedSessions" :key="index"
class="px-3 py-1.5 text-xs text-gray-700 hover:bg-gray-50 border-b border-gray-50 last:border-0 flex items-center justify-between">
<div class="truncate" :title="session.name">
<div class="truncate w-16" :title="session.name">
{{ session.name }}
</div>
<div class="flex items-center gap-2">
<!-- <span class="text-gray-400 text-[10px]">
ID: {{ session.id }}
</span> -->
<button @click="copyAnchorId(session.id)"
<span class="text-gray-400 text-[10px]">
视图: {{ session.viewId }}
</span>
<button @click="copyAnchorId(session.anchorId)"
class="text-blue-500 hover:text-blue-600 p-1 rounded hover:bg-blue-50 transition-colors"
title="复制 ID">
<svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24">
@@ -222,8 +222,9 @@ const showReplyList = async () => {
if (replyListVisible.value && window.electronAPI?.getRepliedSessions) {
try {
const result = await window.electronAPI.getRepliedSessions()
// 最新的在最后,前端展示时保持原顺序(最下边是最新的)
repliedSessions.value = result || []
console.log("回复列表里是", result)
// 按倒序展示,最新的在最前面
repliedSessions.value = (result || []).reverse()
} catch (e) {
console.error('获取回复列表失败:', e)
repliedSessions.value = []