SSL prompt-section.test.ts
Interaktion und PortierbarkeitJAVA
import fs from "node:fs/promises"; import os from "node:os"; import path from "node:path"; import { afterAll, beforeAll, describe, expect, it } from "vitest"; import { resolveMemoryWikiConfig } from "./config.js"; import { buildWikiPromptSection, createWikiPromptSectionBuilder } from "./prompt-section.js";
describe("buildWikiPromptSection", () => {
it("prefers shared memory corpus guidance when memory tools are available", () => { const lines = buildWikiPromptSection({
availableTools: new Set(["memory_search", "memory_get", "wiki_search", "wiki_get"]),
});
expect(lines.join("\n")).toContain("`memory_search` with `corpus=all`");
expect(lines.join("\n")).toContain("`memory_get` with `corpus=wiki` or `corpus=all`");
expect(lines.join("\n")).toContain("wiki-specific ranking or provenance details");
});
it("stays empty when no wiki or memory-adjacent tools are registered", () => {
expect(buildWikiPromptSection({ availableTools: new Set(["web_search"]) })).toEqual([]);
});
expect(firstLines).toEqual(secondLines);
expect(firstLines.join("\n")).toContain( "Alpha uses PostgreSQL for production writes. (confidence 0.91, freshness fresh)",
);
expect(firstLines.join("\n")).toContain( "Alpha was renamed in 2026. (confidence 0.42, freshness aging)",
);
});
});
Messung V0.5 in Prozent
¤ Diese beiden folgenden Angebotsgruppen bietet das Unternehmen0.1Angebot
(Wie Sie bei der Firma Beratungs- und Dienstleistungen beauftragen können 2026-09-27)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.