refactor: remove draft agent routes and consolidate terminal output into session model
This commit is contained in:
@@ -9,14 +9,16 @@ import {
|
||||
} from "./new-agent-routing";
|
||||
|
||||
describe("buildNewAgentRoute", () => {
|
||||
it("falls back to host-scoped draft route when no working directory is provided", () => {
|
||||
expect(buildNewAgentRoute("srv-1", undefined)).toBe("/h/srv-1/new");
|
||||
expect(buildNewAgentRoute("srv-1", " ")).toBe("/h/srv-1/new");
|
||||
it("falls back to server workspace route with dot workspace when no working directory is provided", () => {
|
||||
expect(buildNewAgentRoute("srv-1", undefined)).toBe(
|
||||
"/h/srv-1/workspace/Lg"
|
||||
);
|
||||
expect(buildNewAgentRoute("srv-1", " ")).toBe("/h/srv-1/workspace/Lg");
|
||||
});
|
||||
|
||||
it("encodes the working directory query parameter", () => {
|
||||
it("encodes the working directory as a workspace path segment", () => {
|
||||
expect(buildNewAgentRoute("srv-1", "/Users/me/dev/paseo")).toBe(
|
||||
"/h/srv-1/new?workingDir=%2FUsers%2Fme%2Fdev%2Fpaseo"
|
||||
"/h/srv-1/workspace/L1VzZXJzL21lL2Rldi9wYXNlbw"
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user