()
| 258 | } |
| 259 | |
| 260 | export function parseAllConversationsSync(): ConversationItem[] { |
| 261 | const metas = collectMeta(); |
| 262 | const small = metas.filter((m) => m.fileSize <= MAX_FILE_SIZE); |
| 263 | small.sort((a, b) => b.fileSize - a.fileSize); |
| 264 | |
| 265 | const conversations: ConversationItem[] = []; |
| 266 | for (const meta of small) { |
| 267 | const item = parseFileSync(meta); |
| 268 | if (item) conversations.push(item); |
| 269 | } |
| 270 | |
| 271 | conversations.sort((a, b) => (b.lastTimestamp || "").localeCompare(a.lastTimestamp || "")); |
| 272 | return conversations; |
| 273 | } |
| 274 | |
| 275 | export async function parseAllConversationsAsync(): Promise<ConversationItem[]> { |
| 276 | const metas = collectMeta(); |
nothing calls this directly
no test coverage detected