Compact imported single-thread conversation copy

This commit is contained in:
kris
2026-04-07 12:49:53 +08:00
parent c5223c7c16
commit a43bb92f3c
4 changed files with 122 additions and 8 deletions

View File

@@ -355,11 +355,12 @@ function buildConversationItem(state: BossState, project: Project): Conversation
const devices = state.devices.filter((device) => project.deviceIds.includes(device.id));
const threadViews = threadViewsForProject(state, project.id);
const topThread = threadViews[0]?.snapshot;
const threadTitle = project.threadMeta?.threadDisplayName ?? project.name;
const threadTitle = trimLocalWorkspacePrefix(project.threadMeta?.threadDisplayName ?? project.name);
const folderLabel = project.threadMeta?.folderName ?? "";
const activityIconCount = deriveConversationActivityIconCount(state, project);
const topPinnedLabel = isTopPinnedConversation(project) ? "置顶" : undefined;
const latestConversationActivityAt = deriveLatestConversationActivityAt(project);
const compactPreview = compactImportedThreadPreview(project.preview);
const groupMembers = project.isGroup
? project.groupMembers.map((member) => ({
threadId: member.threadId,
@@ -379,8 +380,8 @@ function buildConversationItem(state: BossState, project: Project): Conversation
threadTitle,
folderLabel,
folderKey: buildFolderKey(project),
preview: project.preview,
lastMessagePreview: project.preview,
preview: compactPreview,
lastMessagePreview: compactPreview,
activityIconCount,
topPinnedLabel,
manualPinned: Boolean(project.pinned && !project.systemPinned),