mirror of
https://github.com/wu736139669/hapi.git
synced 2026-08-05 06:24:37 +00:00
feat(web,hub): export session conversation (#808)
* test: reproduce issue #793 * fix: add session conversation export (closes #793) * fix(hub): sort session export by display time for invoked scheduled messages Export now uses COALESCE(invoked_at, created_at) ordering so JSON/Markdown exports match the visible chat chronology after scheduled messages are invoked. Co-authored-by: Cursor <cursoragent@cursor.com> * fix(web): escape newlines in session export YAML front matter Prevent session metadata containing newlines or quotes from breaking Markdown export front matter. Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -19,6 +19,7 @@ import type {
|
||||
SkillsResponse,
|
||||
SpawnResponse,
|
||||
VisibilityPayload,
|
||||
HapiSessionExport,
|
||||
SessionResponse,
|
||||
SessionsResponse
|
||||
} from '@/types/api'
|
||||
@@ -241,6 +242,13 @@ export class ApiClient {
|
||||
return await this.request<SessionResponse>(`/api/sessions/${encodeURIComponent(sessionId)}`)
|
||||
}
|
||||
|
||||
async getSessionExport(sessionId: string, options?: { signal?: AbortSignal }): Promise<HapiSessionExport> {
|
||||
return await this.request<HapiSessionExport>(
|
||||
`/api/sessions/${encodeURIComponent(sessionId)}/export`,
|
||||
{ signal: options?.signal }
|
||||
)
|
||||
}
|
||||
|
||||
async getMessages(
|
||||
sessionId: string,
|
||||
options: {
|
||||
|
||||
Reference in New Issue
Block a user