refactor: remove ExternalSource and ExternalID from Conversation model and related services, update references to use ChannelID instead

This commit is contained in:
mlogclub
2026-04-27 19:04:10 +08:00
parent 24105781d9
commit b3ef55b04e
21 changed files with 183 additions and 136 deletions
@@ -339,8 +339,8 @@ export function ConversationDetailDialog({
value={currentConversation.currentAssigneeName || "-"}
/>
<InfoItem
label="渠道类型"
value={currentConversation.externalSource || "-"}
label="渠道ID"
value={`${currentConversation.channelId || "-"}`}
/>
<InfoItem
label="客服未读"
@@ -726,7 +726,7 @@ export default function DashboardConversationsPage() {
<div className="min-w-0">
<div className="font-medium">{item.subject || `会话 #${item.id}`}</div>
<div className="mt-1 text-sm text-muted-foreground">
{item.externalSource || "-"}
ID{item.channelId || "-"}
</div>
<div className="mt-1 line-clamp-2 text-sm text-muted-foreground">
{item.lastMessageSummary || "暂无最新消息摘要"}
@@ -168,10 +168,10 @@ function MissingCustomerEmpty({ conversation }: { conversation: AgentConversatio
</Button>
</div>
<div className="space-y-2">
<SectionHeading>访</SectionHeading>
<SectionHeading></SectionHeading>
<div className="space-y-2">
<DetailRow label="外部来源" value={conversation.externalSource} />
<DetailRow label="外部标识" value={conversation.externalId} />
<DetailRow label="渠道ID" value={conversation.channelId ? `${conversation.channelId}` : "-"} />
<DetailRow label="客户ID" value={conversation.customerId ? `${conversation.customerId}` : "-"} />
</div>
</div>
<CustomerLinkOrCreateDialog
@@ -101,12 +101,6 @@ export function ConversationList({ onAfterSelect }: ConversationListProps) {
>
{getEnumLabel(IMConversationStatusLabels, conversation.status)}
</span>
{conversation.externalSource ? (
<>
<span className="opacity-40">·</span>
<span className="truncate">{conversation.externalSource}</span>
</>
) : null}
</div>
</div>
</div>
+1 -3
View File
@@ -292,9 +292,7 @@ export default function ConversationsPage() {
</span>
</div>
<p className="mt-0.5 truncate text-xs text-muted-foreground sm:text-sm">
<span>{conversation.externalSource}</span>
<span className="text-muted-foreground/60"> / </span>
<span>{conversation.externalId}</span>
<span> #{conversation.channelId || "-"}</span>
{conversation.customerId ? (
<>
<span className="text-muted-foreground/60"> / </span>