resource settings page

This commit is contained in:
2026-02-19 19:13:23 +00:00
parent 4733a972dd
commit 521ac24463
9 changed files with 462 additions and 61 deletions
+3 -1
View File
@@ -20,6 +20,7 @@ type WSData = {
sandboxed: boolean;
sessionId?: string;
cwd?: string;
command?: string;
};
const handlers: Record<string, typeof claudeWebsocket> = {
@@ -47,8 +48,9 @@ async function upgradeWs(req: Request, server: any, provider: 'claude' | 'openco
const sessionId = url.searchParams.get('sessionId') ?? undefined;
const sandboxed = url.searchParams.get('sandboxed') !== 'false';
const cwd = url.searchParams.get('cwd') ?? undefined;
const command = url.searchParams.get('command') ?? undefined;
const ok = server.upgrade(req, {
data: { userId: user.id, email: user.email, role: user.role, provider, sandboxed, sessionId, cwd },
data: { userId: user.id, email: user.email, role: user.role, provider, sandboxed, sessionId, cwd, command },
});
if (!ok) return new Response('Upgrade failed', { status: 500 });
} catch {