agentfootprint
Version:
The explainable agent framework — backtrack a wrong answer to the exact context that caused it (evidence, not guesses). Built on footprintjs.
18 lines • 727 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.mockLoader = void 0;
const text_js_1 = require("./text.js");
function mockLoader(options = {}) {
return {
name: 'mock',
extensions: options.extensions ?? ['.md', '.txt', '.html', '.pdf', '.mock'],
// eslint-disable-next-line @typescript-eslint/require-await
async load(input) {
const pages = options.pagesFor?.(input.uri);
const text = options.textFor?.(input.uri) ?? (0, text_js_1.decodeText)(input.bytes);
return { text: pages ? pages.join('\n\n') : text, ...(pages && { pages }) };
},
};
}
exports.mockLoader = mockLoader;
//# sourceMappingURL=mock.js.map