refactor(searchSpecSections): remove content field from result

- Eliminated `content` property from `searchSpecResultSchema` and output mapping.
- Updated `toolMetadata` description to reflect that only section references are returned and content must be fetched via `ask262_get_section_content`.
- Adjusted TypeScript code accordingly.
This commit is contained in:
2026-04-20 18:07:54 +05:30
parent 00b6924cea
commit a26f90cef9
+2 -3
View File
@@ -17,7 +17,6 @@ const searchSpecResultSchema = z.object({
.describe("Vector distance from query (lower = more similar)"),
partIndex: z.number().nullable(),
totalParts: z.number().nullable(),
content: z.string(),
});
const searchSpecOutputSchema = z.object({
@@ -31,7 +30,8 @@ const searchSpecOutputSchema = z.object({
export const toolMetadata = {
description:
"Vector search the ECMAScript specification for sections relevant to a query. " +
"Returns an array of sections with sectionId, sectionTitle, score, partIndex, totalParts, and content. " +
"Returns an array of section references (sectionId, sectionTitle, vectorDistance, partIndex, totalParts). " +
"Use ask262_get_section_content to retrieve the actual content for a section. " +
"partIndex and totalParts indicate which chunk of a multi-part section this is " +
"(0-indexed, partIndex+1/totalParts), null if single-part.",
args: {
@@ -86,7 +86,6 @@ export function createSearchSpecSectionsTool(
vectorDistance: Number(r._distance || 0),
partIndex: (r.partindex as number | undefined) ?? null,
totalParts: (r.totalparts as number | undefined) ?? null,
content: String(r.text || ""),
}),
);