fix: improve History search and prevent duplicate-key crashes (#1186)
This commit is contained in:
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")
|
||||
|
||||
Reference in new issue
Block a user