feat: projects → workspaces → tabs
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user