Patch folder realtime threads locally

This commit is contained in:
kris
2026-04-10 22:01:21 +08:00
parent 0781a56aad
commit a084688e35
7 changed files with 145 additions and 0 deletions

View File

@@ -22,6 +22,7 @@ export interface BossEventPayload {
status?: string;
note?: string;
conversationItem?: unknown;
threadConversationItem?: unknown;
}
type BossEventListener = (event: BossEventName, payload: BossEventPayload) => void;

View File

@@ -671,6 +671,14 @@ export function getConversationHomeItemForProject(state: BossState, projectId: s
);
}
export function getConversationThreadItemForProject(state: BossState, projectId: string): ConversationItem | null {
const normalizedProjectId = projectId.trim();
if (!normalizedProjectId) {
return null;
}
return getConversationItems(state).find((item) => item.projectId === normalizedProjectId) ?? null;
}
export function getConversationFolderView(
state: BossState,
folderKey: string,