docs: update memory tool list, CLI usage, and config file reading logic (#4861)
Co-authored-by: Livia Ellen <liviaellen@msn.com>
This commit is contained in:
@@ -37,7 +37,6 @@ function createMockToolDeps(overrides = {}): ToolDeps {
|
||||
searchThreshold: 0.5,
|
||||
customInstructions: "test",
|
||||
customCategories: {},
|
||||
customPrompt: "test",
|
||||
} as any,
|
||||
provider: {
|
||||
search: vi
|
||||
@@ -108,13 +107,14 @@ describe("registerAllTools", () => {
|
||||
]);
|
||||
});
|
||||
|
||||
it("registers tools without a second argument (required, not optional)", () => {
|
||||
it("registers tools with optional: false metadata", () => {
|
||||
const ctx = createMockToolDeps();
|
||||
registerAllTools(ctx);
|
||||
|
||||
const calls = (ctx.api.registerTool as ReturnType<typeof vi.fn>).mock.calls;
|
||||
for (const call of calls) {
|
||||
expect(call).toHaveLength(1);
|
||||
expect(call).toHaveLength(2);
|
||||
expect(call[1]).toEqual({ optional: false });
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user