Tap-to-edit session titles, PATCH proxy, model display on replay

This commit is contained in:
Hermes
2026-04-09 21:31:23 -05:00
parent 47e9a8ee5c
commit cc8b4a0940
2 changed files with 53 additions and 3 deletions
+19
View File
@@ -16,6 +16,25 @@ export async function GET(_req: NextRequest, { params }: { params: Promise<{ id:
}
}
export async function PATCH(req: NextRequest, { params }: { params: Promise<{ id: string }> }) {
const { id } = await params;
const body = await req.text();
try {
const res = await fetch(BACKEND + "/api/sessions/" + id, {
method: "PATCH",
headers: { "Content-Type": "application/json" },
body,
});
const data = await res.text();
return new NextResponse(data, {
status: res.status,
headers: { "content-type": "application/json" },
});
} catch {
return NextResponse.json({ error: "backend unreachable" }, { status: 502 });
}
}
export async function DELETE(_req: NextRequest, { params }: { params: Promise<{ id: string }> }) {
const { id } = await params;
try {