Restore global agent listing (#1420)
This commit is contained in:
@@ -23,11 +23,39 @@ describe("buildAgentLsFetchOptions", () => {
|
||||
});
|
||||
});
|
||||
|
||||
it("uses the unscoped archived query for -a", () => {
|
||||
it("fetches global non-archived agents for -g", () => {
|
||||
expect(buildAgentLsFetchOptions({ global: true })).toEqual({});
|
||||
});
|
||||
|
||||
it("keeps -a within the active scope", () => {
|
||||
expect(buildAgentLsFetchOptions({ all: true })).toEqual({
|
||||
scope: "active",
|
||||
filter: {
|
||||
includeArchived: true,
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
it("fetches all global agents for -a -g", () => {
|
||||
expect(buildAgentLsFetchOptions({ all: true, global: true })).toEqual({
|
||||
filter: {
|
||||
includeArchived: true,
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
it("applies filters to global queries", () => {
|
||||
expect(
|
||||
buildAgentLsFetchOptions({
|
||||
global: true,
|
||||
label: ["surface=workspace"],
|
||||
thinking: " medium ",
|
||||
}),
|
||||
).toEqual({
|
||||
filter: {
|
||||
labels: { surface: "workspace" },
|
||||
thinkingOptionId: "medium",
|
||||
},
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user