mirror of
https://github.com/getpaseo/paseo.git
synced 2026-08-15 04:42:45 +00:00
refactor: centralize host route builders and add dedicated new-agent route
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import {
|
||||
buildHostNewAgentRoute,
|
||||
buildHostRootRoute,
|
||||
buildHostWorkspaceAgentTabRoute,
|
||||
buildHostWorkspaceFileTabRoute,
|
||||
buildHostWorkspaceRoute,
|
||||
@@ -70,6 +72,14 @@ describe("workspace route parsing", () => {
|
||||
expect(buildHostWorkspaceRoute("local", "/tmp/repo")).toBe("/h/local/workspace/L3RtcC9yZXBv");
|
||||
});
|
||||
|
||||
it("builds host root routes", () => {
|
||||
expect(buildHostRootRoute("local")).toBe("/h/local");
|
||||
});
|
||||
|
||||
it("builds host new-agent routes", () => {
|
||||
expect(buildHostNewAgentRoute("local")).toBe("/h/local/new-agent");
|
||||
});
|
||||
|
||||
it("builds workspace agent tab routes", () => {
|
||||
expect(buildHostWorkspaceAgentTabRoute("local", "/tmp/repo", "agent-1")).toBe(
|
||||
"/h/local/workspace/L3RtcC9yZXBv/tab/agent_agent-1"
|
||||
|
||||
Reference in New Issue
Block a user