+ {conversations.map(conv => (
+
activeId !== conv.id && switchConversation(conv.id)}
+ style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', padding: '8px 10px', marginBottom: 2, borderRadius: 8, cursor: 'pointer', background: activeId === conv.id ? token.colorFillSecondary : 'transparent' }}>
+
+ {editingId === conv.id ? (
+ setEditTitle(e.target.value)}
+ onBlur={() => saveTitle(conv.id)} onPressEnter={() => saveTitle(conv.id)}
+ onClick={e => e.stopPropagation()} style={{ flex: 1, fontSize: 13 }} />
+ ) : (
+ { e.stopPropagation(); startEdit(conv) }}>{conv.title}
+ )}
+ } disabled={deleting}
+ onClick={e => { e.stopPropagation(); handleDelete(conv.id) }} style={{ marginLeft: 4, flexShrink: 0 }} />
+
+ ))}
+ {conversations.length === 0 &&
暂无对话
}
+