Skip to content

Supercharge your AI agents with data from the web and beyond. Building the library for superintelligence. 🔥

revert changes for v1

Ademílson Tonato4e2e64f3437d
diff --git a/apps/api/src/__tests__/snips/v1/map.test.ts b/apps/api/src/__tests__/snips/v1/map.test.ts
index b7fa45320..f4f820848 100644
--- a/apps/api/src/__tests__/snips/v1/map.test.ts
+++ b/apps/api/src/__tests__/snips/v1/map.test.ts
@@ -69,31 +69,4 @@ describe("Map tests", () => {
},
60000,
);
-
- it.concurrent(
- "shows warning when results ≤ 1 and URL is not base domain",
- async () => {
- // Use a mock that returns 0 or 1 results to test the warning
- const response = await map(
- {
- url: "https://example.com/some/path",
- useMock: "map-empty", // This should return 0 or 1 results
- },
- identity,
- );
-
- expect(response.statusCode).toBe(200);
- expect(response.body.success).toBe(true);
-
- // If we get ≤ 1 results and the URL is not a base domain, we should get a warning
- if (response.body.links.length <= 1) {
- expect(response.body.warning).toBeDefined();
- expect(response.body.warning).toContain("Only");
- expect(response.body.warning).toContain("result(s) found");
- expect(response.body.warning).toContain("base domain");
- expect(response.body.warning).toContain("example.com");
- }
- },
- 60000,
- );
});
diff --git a/apps/api/src/controllers/v1/map.ts b/apps/api/src/controllers/v1/map.ts
index 9a83169b5..ea3ba4ccc 100644
--- a/apps/api/src/controllers/v1/map.ts
+++ b/apps/api/src/controllers/v1/map.ts
@@ -18,7 +18,6 @@ import {
} from "../../lib/validateUrl";
import { fireEngineMap } from "../../search/fireEngine";
import { billTeam } from "../../services/billing/credit_billing";
-import { isBaseDomain, extractBaseDomain } from "../../lib/url-utils";
import { logJob } from "../../services/logging/log_job";
import { performCosineSimilarity } from "../../lib/map-cosine";
import { logger } from "../../lib/logger";
@@ -475,20 +474,10 @@ export async function mapController(
linksCount: result.links.length,
});
- // Check if we should warn about base domain
- let warning: string | undefined;
- if (result.links.length <= 1 && !isBaseDomain(req.body.url)) {
- const baseDomain = extractBaseDomain(req.body.url);
- if (baseDomain) {
- warning = `Only ${result.links.length} result(s) found. For broader coverage, try mapping the base domain: ${baseDomain}`;
- }
- }
-
const response = {
success: true as const,
links: result.links,
scrape_id: result.scrape_id,
- ...(warning && { warning }),
};
return res.status(200).json(response);
diff --git a/apps/api/src/controllers/v1/types.ts b/apps/api/src/controllers/v1/types.ts
index ccd612d1f..1f7d8a4da 100644
--- a/apps/api/src/controllers/v1/types.ts
+++ b/apps/api/src/controllers/v1/types.ts
@@ -1101,7 +1101,6 @@ export type MapResponse =
success: true;
links: string[];
scrape_id?: string;
- warning?: string;
};
export type CrawlStatusParams = {