This commit is contained in:
2026-05-13 12:05:55 +03:00
parent c5b61ee3d8
commit 674c3cbd44
43 changed files with 382 additions and 639 deletions
+6 -2
View File
@@ -1,4 +1,7 @@
import axios from "axios";
import {toolsLogger} from "./tool-logger";
const logger = toolsLogger.child("brave-search");
import {Environment} from "../../common/environment";
import {logError} from "../../util/utils";
import {AiTool} from "../tool-types";
@@ -264,7 +267,8 @@ function normalizeBraveResultFilter(value: unknown): string {
}
export async function webSearch(args?: Record<string, unknown>) {
console.log("braveSearch()");
const startedAt = Date.now();
logger.info("start", {args});
try {
const query = asNonEmptyString(args?.query);
@@ -370,7 +374,7 @@ export async function webSearch(args?: Record<string, unknown>) {
response: data ?? null,
};
} finally {
console.log("END: braveSearch()");
logger.debug("done", {duration: logger.duration(startedAt)});
}
}