feat(tui): support session deletion

This commit is contained in:
Dax Raad 2026-07-06 19:19:22 -04:00
commit c0ea1a43f9
18 changed files with 563 additions and 273 deletions

View file

@ -111,6 +111,22 @@ export const SessionHandler = HttpApiBuilder.group(Api, "server.session", (handl
}
}),
)
.handle(
"session.remove",
Effect.fn(function* (ctx) {
yield* session.remove(ctx.params.sessionID).pipe(
Effect.catchTag(
"Session.NotFoundError",
(error) =>
new SessionNotFoundError({
sessionID: error.sessionID,
message: `Session not found: ${error.sessionID}`,
}),
),
)
return HttpApiSchema.NoContent.make()
}),
)
.handle(
"session.fork",
Effect.fn(function* (ctx) {