feat: unify workspace routing through tab-based URLs and remove legacy per-type routes
This commit is contained in:
@@ -9,7 +9,7 @@ describe("keyboard-shortcut-routing", () => {
|
||||
it("allows the shortcut on selected-agent routes", () => {
|
||||
const canToggle = canToggleFileExplorerShortcut({
|
||||
selectedAgentId: "server-1:agent-1",
|
||||
pathname: "/h/server-1/workspace/workspace-1/agent/agent-1",
|
||||
pathname: "/h/server-1/workspace/workspace-1/tab/agent_agent-1",
|
||||
toggleFileExplorer,
|
||||
});
|
||||
|
||||
@@ -27,7 +27,7 @@ describe("keyboard-shortcut-routing", () => {
|
||||
|
||||
it("allows the shortcut on workspace terminal routes", () => {
|
||||
const canToggle = canToggleFileExplorerShortcut({
|
||||
pathname: "/h/server-1/workspace/workspace-1/terminal/terminal-1",
|
||||
pathname: "/h/server-1/workspace/workspace-1/tab/terminal_terminal-1",
|
||||
toggleFileExplorer,
|
||||
});
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import {
|
||||
parseHostAgentDraftRouteFromPathname,
|
||||
parseHostAgentRouteFromPathname,
|
||||
parseHostWorkspaceAgentRouteFromPathname,
|
||||
parseHostWorkspaceRouteFromPathname,
|
||||
parseHostWorkspaceTabRouteFromPathname,
|
||||
} from "@/utils/host-routes";
|
||||
@@ -28,9 +27,7 @@ export function resolveSelectedOrRouteAgentKey(input: {
|
||||
}
|
||||
}
|
||||
|
||||
const route =
|
||||
parseHostWorkspaceAgentRouteFromPathname(input.pathname) ??
|
||||
parseHostAgentRouteFromPathname(input.pathname);
|
||||
const route = parseHostAgentRouteFromPathname(input.pathname);
|
||||
if (!route) {
|
||||
const draftRoute = parseHostAgentDraftRouteFromPathname(input.pathname);
|
||||
if (!draftRoute) {
|
||||
|
||||
Reference in New Issue
Block a user