sad-mcp 0.1.15 → 0.1.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/tools.js +5 -1
- package/package.json +1 -1
package/dist/tools.js
CHANGED
|
@@ -5,11 +5,15 @@ import { loadTextCache, saveTextEntry } from "./text-cache.js";
|
|
|
5
5
|
import { trackToolCall } from "./tracking.js";
|
|
6
6
|
// In-memory text cache for search (populated from disk cache + fresh extractions)
|
|
7
7
|
const textCache = new Map();
|
|
8
|
+
function isExamFile(file) {
|
|
9
|
+
return categorizeFile(file) === "exams";
|
|
10
|
+
}
|
|
8
11
|
async function ensureTextCache() {
|
|
9
12
|
if (textCache.size > 0)
|
|
10
13
|
return;
|
|
11
14
|
const files = await listAllFiles();
|
|
12
|
-
|
|
15
|
+
// Skip exam files during eager loading — they're extracted on demand via get_material
|
|
16
|
+
const extractableFiles = files.filter(f => isExtractable(f) && !isExamFile(f));
|
|
13
17
|
const diskCache = loadTextCache();
|
|
14
18
|
for (const file of extractableFiles) {
|
|
15
19
|
try {
|