Skip to content

Conversation

@jif-oai
Copy link
Collaborator

@jif-oai jif-oai commented Jan 8, 2026

No description provided.

#[ts(export_to = "v2/")]
pub struct ThreadLoadedListResponse {
/// Thread ids for sessions currently loaded in memory.
pub data: Vec<String>,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this return Vec<Thread>? i.e. would the metadata on Thread be useful?

We don't have to populate all the turns & items since we only do that for specific APIs (we've already documented the behavior on the Thread object)

Copy link
Collaborator Author

@jif-oai jif-oai Jan 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No because sometimes we don't have them and don't need them

Copy link
Collaborator

@owenlin0 owenlin0 Jan 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, would be nice to support pagination for consistency with our other list APIs, even though in practice you'd probably want to return everything always. Mainly because adding pagination later is a breaking change

pub struct ThreadLoadedListRequest {
    /// Opaque pagination cursor returned by a previous call.
    pub cursor: Option<String>,
    /// Optional page size; defaults to no limit
    pub limit: Option<u32>,
}

pub struct ThreadLoadedListResponse {
    pub data: Vec<String>,
    /// Opaque cursor to pass to the next call to continue after the last item.
    /// if None, there are no more items to return.
    pub next_cursor: Option<String>,
}

@jif-oai jif-oai merged commit 5b7707d into main Jan 8, 2026
26 checks passed
@jif-oai jif-oai deleted the jif/list-loaded branch January 8, 2026 17:48
@github-actions github-actions bot locked and limited conversation to collaborators Jan 8, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants