evalstate's picture
download
raw
950 Bytes
import { HUB_REPO_DETAILS_TOOL_ID, MODEL_DETAIL_TOOL_ID, DATASET_DETAIL_TOOL_ID } from '@llmindset/hf-mcp';
import { mapLegacySearchToolId } from './repo-search-migration.js';
export function normalizeBuiltInTools(ids) {
const seen = new Set();
const normalized = [];
let addHubInspect = false;
for (const rawId of ids) {
const normalizedToolId = mapLegacySearchToolId(rawId);
if (normalizedToolId === MODEL_DETAIL_TOOL_ID || normalizedToolId === DATASET_DETAIL_TOOL_ID) {
addHubInspect = true;
continue;
}
if (!seen.has(normalizedToolId)) {
seen.add(normalizedToolId);
normalized.push(normalizedToolId);
}
}
if (addHubInspect && !seen.has(HUB_REPO_DETAILS_TOOL_ID)) {
seen.add(HUB_REPO_DETAILS_TOOL_ID);
normalized.push(HUB_REPO_DETAILS_TOOL_ID);
}
return normalized;
}
//# sourceMappingURL=tool-normalizer.js.map

Xet Storage Details

Size:
950 Bytes
·
Xet hash:
f0b20c66f15f610f4242c2c15684df45caa88188db32f381f65f591dee358d17

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.