Skip to main content

Documentation Index

Fetch the complete documentation index at: https://tech.illasoft.com/llms.txt

Use this file to discover all available pages before exploring further.

路径

GET /thread/timelines

认证

Bearer JWT

Query 参数

名称类型默认说明
cursorstring上一页最后一条的 created_at

响应

{
  timelines: Array<{
    id: string,                // thread ID
    resourceId: string,
    threadId: string,
    title: string | null,
    createdAt: string,
    mediaItems: Array<{
      type: "image" | "video" | "audio",
      data: ResponseImageSchema | ResponseVideoSchema | ResponseAudioSchema
    }>,
    images: ResponseImageSchema[],   // 展平所有图片
    videos: ResponseVideoSchema[],
    audios: ResponseAudioSchema[]
  }>,
  hasMore: boolean
}

聚合算法

  1. 分页:5 thread/页,按 threads.created_at DESC
  2. 每个 thread 取全部 thread_version(按 created_at DESC
  3. 合并 images / videos / audios 到统一 mediaItems
  4. 去重:使用 seenImageIds / seenVideoTaskIds / seenAudioTaskIds Set,同资源只取最早出现的位置
  5. 只包含 status === "completed" 且有有效文件 ID 的项
  6. 所有签名 URL 现场生成(batch)
mediaItems 是核心 —— 前端可按原始出现顺序展示 mixed-media feed。images/videos/audios 为各自独立的展平数组,用于分类筛选。

src/hono/thread/index.ts:306-515

相关