fix: improve History search and prevent duplicate-key crashes (#1186)

This commit is contained in:
M57 authored and GitHub committed 2026-09-17 23:00:53 +03:00
1 parent 7951acc6eb
commit 9690ce8dc6
9 files changed
+458 -48

No files matched your search

@@ -5,7 +5,11 @@ import kotlinx.serialization.Serializable
@Serializable
data class SessionSearchResponse(
val results: List<SessionSearchResult> = emptyList(),
)
val has_more: Boolean? = null,
val next_offset: Int? = null,
) {
val hasMore: Boolean get() = has_more == true
}
@Serializable
data class SessionSearchResult(
@@ -15,4 +19,9 @@ data class SessionSearchResult(
val source: String? = null,
val model: String? = null,
val session_started: Double? = null,
val title: String? = null,
val last_active: Double? = null,
val message_count: Int? = null,
val archived: Boolean? = null,
val lineage_root: String? = null,
)
@@ -189,6 +189,8 @@ interface HermesApiService : KanbanApiService {
@Query("profile") profile: String? = null,
@Query("source") source: String? = null,
@Query("exclude_sources") excludeSources: String? = null,
@Query("limit") limit: Int = 20,
@Query("offset") offset: Int = 0,
): Response<SessionSearchResponse>
@GET("api/sessions/{id}/messages")