feat: projects → workspaces → tabs

This commit is contained in:
Mohamed Boudra
2026-03-01 18:22:11 +07:00
parent 2e201cab09
commit 080fb74642
43 changed files with 4054 additions and 2654 deletions
@@ -2,6 +2,7 @@ import type { CheckoutStatusPayload } from "@/hooks/use-checkout-status-query";
import {
buildHostAgentDraftRoute,
parseHostAgentRouteFromPathname,
parseHostWorkspaceAgentRouteFromPathname,
} from "@/utils/host-routes";
export function parseAgentKey(
@@ -26,6 +27,10 @@ export function resolveSelectedAgentForNewAgent(input: {
pathname: string;
selectedAgentId?: string;
}): { serverId: string; agentId: string } | null {
const workspaceRoute = parseHostWorkspaceAgentRouteFromPathname(input.pathname);
if (workspaceRoute) {
return { serverId: workspaceRoute.serverId, agentId: workspaceRoute.agentId };
}
return (
parseHostAgentRouteFromPathname(input.pathname) ??
parseAgentKey(input.selectedAgentId)