mirror of
https://github.com/luckyyzh/pi-agent-integrated.git
synced 2026-10-03 02:59:35 +00:00
feat: integrate Pi backend and Pi Web
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import { NextResponse } from "next/server";
|
||||
import { listAllSessions } from "@/lib/session-reader";
|
||||
import { getRunningRpcSessionIds } from "@/lib/rpc-manager";
|
||||
|
||||
export async function GET() {
|
||||
try {
|
||||
const sessions = await listAllSessions();
|
||||
return NextResponse.json({ sessions, runningSessionIds: getRunningRpcSessionIds() });
|
||||
} catch (error) {
|
||||
return NextResponse.json(
|
||||
{ error: String(error) },
|
||||
{ status: 500 }
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user