fix(cli): support mode when importing agents

This commit is contained in:
Keith Kowal
2026-09-11 14:57:01 -07:00
parent fa93c4290e
commit 89cb1bf34d
12 changed files with 82 additions and 6 deletions
+1
View File
@@ -1763,6 +1763,7 @@ export const ImportAgentRequestMessageSchema = z.object({
cwd: z.string().optional(),
workspaceId: z.string().optional(),
labels: z.record(z.string(), z.string()).optional(),
modeId: z.string().optional(),
requestId: z.string(),
});
@@ -411,6 +411,7 @@ describe("workspace message schemas", () => {
providerId: "custom-codex",
providerHandleId: "thread-1",
cwd: "/tmp/repo",
modeId: "full-access",
});
const legacyRequest = SessionInboundMessageSchema.parse({
type: "import_agent_request",
@@ -426,6 +427,7 @@ describe("workspace message schemas", () => {
providerId: "custom-codex",
providerHandleId: "thread-1",
cwd: "/tmp/repo",
modeId: "full-access",
});
expect(legacyRequest).toEqual({
type: "import_agent_request",