mirror of
https://github.com/getpaseo/paseo.git
synced 2026-11-08 09:24:41 +00:00
fix(cli): support mode when importing agents
This commit is contained in:
@@ -4717,6 +4717,7 @@ test("imports an agent by provider handle id", async () => {
|
||||
providerId: "custom-codex",
|
||||
providerHandleId: "thread-1",
|
||||
cwd: "/tmp/repo",
|
||||
modeId: "full-access",
|
||||
});
|
||||
|
||||
expect(mock.sent).toHaveLength(1);
|
||||
@@ -4729,6 +4730,7 @@ test("imports an agent by provider handle id", async () => {
|
||||
providerHandleId?: string;
|
||||
sessionId?: string;
|
||||
cwd?: string;
|
||||
modeId?: string;
|
||||
};
|
||||
};
|
||||
expect(request.message).toMatchObject({
|
||||
@@ -4736,6 +4738,7 @@ test("imports an agent by provider handle id", async () => {
|
||||
providerId: "custom-codex",
|
||||
providerHandleId: "thread-1",
|
||||
cwd: "/tmp/repo",
|
||||
modeId: "full-access",
|
||||
});
|
||||
expect(request.message).not.toHaveProperty("sessionId");
|
||||
|
||||
|
||||
@@ -192,6 +192,7 @@ interface ImportAgentInputBase {
|
||||
cwd?: string;
|
||||
workspaceId?: string;
|
||||
labels?: Record<string, string>;
|
||||
modeId?: string;
|
||||
}
|
||||
|
||||
export type ImportAgentInput =
|
||||
@@ -2969,6 +2970,7 @@ export class DaemonClient {
|
||||
...(input.cwd ? { cwd: input.cwd } : {}),
|
||||
...(input.workspaceId ? { workspaceId: input.workspaceId } : {}),
|
||||
...(input.labels && Object.keys(input.labels).length > 0 ? { labels: input.labels } : {}),
|
||||
...(input.modeId ? { modeId: input.modeId } : {}),
|
||||
});
|
||||
|
||||
const status = await this.sendRequest({
|
||||
|
||||
Reference in New Issue
Block a user