mirror of
https://github.com/kennethnym/freya
synced 2026-07-06 07:51:13 +01:00
feat: add conversation storage (#140)
This commit is contained in:
@@ -35,6 +35,7 @@ interface AgentDebugHttpHandlersDeps {
|
||||
const AgentAskRequestBody = type({
|
||||
"+": "reject",
|
||||
message: "string",
|
||||
"conversationId?": "string",
|
||||
})
|
||||
|
||||
export function registerAgentHttpHandlers(
|
||||
@@ -82,6 +83,7 @@ async function handleAgentAsk(c: Context<Env>) {
|
||||
const session = await sessionManager.getOrCreate(user.id)
|
||||
const response = await collectQueryAgentResponse(session.agent, {
|
||||
message: parsed.message,
|
||||
conversationId: parsed.conversationId,
|
||||
})
|
||||
return c.json(response)
|
||||
} catch (err) {
|
||||
|
||||
Reference in New Issue
Block a user