Skip to content

Commit ccd4355

Browse files
committed
test(catalog): reproduce Cursor code-mode deferral gap
1 parent b81314c commit ccd4355

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

‎tests/catalog-cursor-search.test.ts‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@ import { describe, expect, test } from "bun:test";
22
import { buildCatalogEntries, normalizeRoutedCatalogEntry } from "../src/codex/catalog";
33

44
describe("routed catalog search advertising", () => {
5-
test("cursor entries do not advertise the hosted search tool (runTurn bypasses the sidecar)", () => {
5+
test("cursor entries enable deferred discovery without advertising hosted web search", () => {
66
const entry = normalizeRoutedCatalogEntry({ slug: "cursor/auto" } as never) as Record<string, unknown>;
7-
expect(entry.supports_search_tool).toBe(false);
7+
expect(entry.tool_mode).toBe("code_mode_only");
8+
expect(entry.supports_search_tool).toBe(true);
89
expect(entry.web_search_tool_type).toBeUndefined();
910
expect(entry.supports_parallel_tool_calls).toBe(true);
1011
});
@@ -37,13 +38,14 @@ describe("routed catalog search advertising", () => {
3738
expect(routed?.web_search_tool_type).toBe("text_and_image");
3839
});
3940

40-
test("cursor template-less fallback rows stay opted out (no deferred discovery, no hosted search)", () => {
41+
test("cursor template-less fallback rows keep deferred discovery without hosted search", () => {
4142
const entries = buildCatalogEntries(null, [], [
4243
{ provider: "cursor", id: "auto" },
4344
]) as Array<Record<string, unknown>>;
4445
const routed = entries.find(e => typeof e.slug === "string" && (e.slug as string).startsWith("cursor/"));
4546
expect(routed).toBeDefined();
46-
expect(routed?.supports_search_tool).toBe(false);
47+
expect(routed?.tool_mode).toBe("code_mode_only");
48+
expect(routed?.supports_search_tool).toBe(true);
4749
expect(routed?.web_search_tool_type).toBeUndefined();
4850
});
4951
});

0 commit comments

Comments
 (0)