Mercurial
view mrjunejune/conversation_store.h @ 263:ee04e4e69fed
Add functional JRPG frame and tools
Add full-screen background_2 apertures, functional frame chrome, card-driven details, dual-window tools, live conversion workflows, and bounded cleanup for generated downloads.
Co-authored-by: Copilot <[email protected]>
| author | MrJuneJune <mrjunejune@users.noreply.github.com> |
|---|---|
| date | Thu, 06 Aug 2026 11:31:30 -0700 |
| parents | 1f9877b637e9 |
| children | 04fee26ecce0 |
line wrap: on
line source
#ifndef MRJUNEJUNE_CONVERSATION_STORE_H #define MRJUNEJUNE_CONVERSATION_STORE_H #include "dowa/dowa.h" typedef struct Conversation_Store Conversation_Store; typedef enum { CONVERSATION_STORE_ERROR = -1, CONVERSATION_STORE_OK = 0, CONVERSATION_STORE_NOT_FOUND = 1, CONVERSATION_STORE_CONFLICT = 2, } Conversation_Store_Result; typedef struct { int64 id; int64 sequence; char *role; char *content; char *status; char *request_id; char *error_message; int64 input_tokens; int64 output_tokens; int64 created_at; int64 completed_at; } Conversation_Turn; typedef struct { char *id; char *copilot_session_id; char *title; char *status; int64 created_at; int64 updated_at; Conversation_Turn *turns; } Conversation_Record; Conversation_Store *Conversation_Store_Create(const char *database_path); void Conversation_Store_Destroy(Conversation_Store *p_store); boolean Conversation_Store_Generate_UUID(char output[37]); Conversation_Store_Result Conversation_Store_Create_Conversation( Conversation_Store *p_store, const char *title, char output_id[37]); Conversation_Store_Result Conversation_Store_Get( Conversation_Store *p_store, const char *conversation_id, Conversation_Record *p_record, Dowa_Arena *p_arena); Conversation_Store_Result Conversation_Store_Update_Title( Conversation_Store *p_store, const char *conversation_id, const char *title); Conversation_Store_Result Conversation_Store_Delete( Conversation_Store *p_store, const char *conversation_id); Conversation_Store_Result Conversation_Store_Begin_Turn( Conversation_Store *p_store, const char *conversation_id, const char *request_id, const char *prompt); Conversation_Store_Result Conversation_Store_Complete_Turn( Conversation_Store *p_store, const char *conversation_id, const char *request_id, const char *content, int64 input_tokens, int64 output_tokens); Conversation_Store_Result Conversation_Store_Fail_Turn( Conversation_Store *p_store, const char *conversation_id, const char *request_id, const char *error_message, boolean aborted); #endif