Buckets:
| /** | |
| * Canonical tool IDs exported from their respective tool configurations | |
| * This ensures single source of truth for all tool identifiers | |
| */ | |
| import { | |
| SEMANTIC_SEARCH_TOOL_CONFIG, | |
| MODEL_SEARCH_TOOL_CONFIG, | |
| MODEL_DETAIL_TOOL_CONFIG, | |
| MODEL_DETAIL_PROMPT_CONFIG, | |
| PAPER_SEARCH_TOOL_CONFIG, | |
| REPO_SEARCH_TOOL_CONFIG, | |
| CREATE_REPO_TOOL_CONFIG, | |
| DATASET_SEARCH_TOOL_CONFIG, | |
| DATASET_DETAIL_TOOL_CONFIG, | |
| DATASET_DETAIL_PROMPT_CONFIG, | |
| HUB_REPO_DETAILS_TOOL_CONFIG, | |
| DUPLICATE_SPACE_TOOL_CONFIG, | |
| SPACE_INFO_TOOL_CONFIG, | |
| SPACE_FILES_TOOL_CONFIG, | |
| USER_SUMMARY_PROMPT_CONFIG, | |
| PAPER_SUMMARY_PROMPT_CONFIG, | |
| DOCS_SEMANTIC_SEARCH_CONFIG, | |
| DOC_FETCH_CONFIG, | |
| USE_SPACE_TOOL_CONFIG, | |
| HF_JOBS_TOOL_CONFIG, | |
| DYNAMIC_SPACE_TOOL_CONFIG, | |
| } from './index.js'; | |
| // Extract tool IDs from their configs (single source of truth) | |
| export const SPACE_SEARCH_TOOL_ID = SEMANTIC_SEARCH_TOOL_CONFIG.name; | |
| export const MODEL_SEARCH_TOOL_ID = MODEL_SEARCH_TOOL_CONFIG.name; | |
| export const REPO_SEARCH_TOOL_ID = REPO_SEARCH_TOOL_CONFIG.name; | |
| export const CREATE_REPO_TOOL_ID = CREATE_REPO_TOOL_CONFIG.name; | |
| export const MODEL_DETAIL_TOOL_ID = MODEL_DETAIL_TOOL_CONFIG.name; | |
| export const PAPER_SEARCH_TOOL_ID = PAPER_SEARCH_TOOL_CONFIG.name; | |
| export const DATASET_SEARCH_TOOL_ID = DATASET_SEARCH_TOOL_CONFIG.name; | |
| export const DATASET_DETAIL_TOOL_ID = DATASET_DETAIL_TOOL_CONFIG.name; | |
| export const HUB_REPO_DETAILS_TOOL_ID = HUB_REPO_DETAILS_TOOL_CONFIG.name; | |
| export const DUPLICATE_SPACE_TOOL_ID = DUPLICATE_SPACE_TOOL_CONFIG.name; | |
| export const SPACE_INFO_TOOL_ID = SPACE_INFO_TOOL_CONFIG.name; | |
| export const SPACE_FILES_TOOL_ID = SPACE_FILES_TOOL_CONFIG.name; | |
| export const USE_SPACE_TOOL_ID = USE_SPACE_TOOL_CONFIG.name; | |
| export const DOCS_SEMANTIC_SEARCH_TOOL_ID = DOCS_SEMANTIC_SEARCH_CONFIG.name; | |
| export const DOC_FETCH_TOOL_ID = DOC_FETCH_CONFIG.name; | |
| export const USER_SUMMARY_PROMPT_ID = USER_SUMMARY_PROMPT_CONFIG.name; | |
| export const PAPER_SUMMARY_PROMPT_ID = PAPER_SUMMARY_PROMPT_CONFIG.name; | |
| export const MODEL_DETAIL_PROMPT_ID = MODEL_DETAIL_PROMPT_CONFIG.name; | |
| export const DATASET_DETAIL_PROMPT_ID = DATASET_DETAIL_PROMPT_CONFIG.name; | |
| export const HF_JOBS_TOOL_ID = HF_JOBS_TOOL_CONFIG.name; | |
| export const DYNAMIC_SPACE_TOOL_ID = DYNAMIC_SPACE_TOOL_CONFIG.name; | |
| // Complete list of all built-in tool IDs | |
| export const ALL_BUILTIN_TOOL_IDS = [ | |
| SPACE_SEARCH_TOOL_ID, | |
| MODEL_SEARCH_TOOL_ID, | |
| REPO_SEARCH_TOOL_ID, | |
| CREATE_REPO_TOOL_ID, | |
| MODEL_DETAIL_TOOL_ID, | |
| PAPER_SEARCH_TOOL_ID, | |
| DATASET_SEARCH_TOOL_ID, | |
| DATASET_DETAIL_TOOL_ID, | |
| HUB_REPO_DETAILS_TOOL_ID, | |
| DUPLICATE_SPACE_TOOL_ID, | |
| SPACE_INFO_TOOL_ID, | |
| SPACE_FILES_TOOL_ID, | |
| DOCS_SEMANTIC_SEARCH_TOOL_ID, | |
| DOC_FETCH_TOOL_ID, | |
| USE_SPACE_TOOL_ID, | |
| HF_JOBS_TOOL_ID, | |
| DYNAMIC_SPACE_TOOL_ID, | |
| ] as const; | |
| // Grouped tool IDs for bouquet configurations | |
| export const TOOL_ID_GROUPS = { | |
| search: [SPACE_SEARCH_TOOL_ID, REPO_SEARCH_TOOL_ID, PAPER_SEARCH_TOOL_ID, DOCS_SEMANTIC_SEARCH_TOOL_ID] as const, | |
| spaces: [ | |
| SPACE_SEARCH_TOOL_ID, | |
| DUPLICATE_SPACE_TOOL_ID, | |
| SPACE_INFO_TOOL_ID, | |
| SPACE_FILES_TOOL_ID, | |
| USE_SPACE_TOOL_ID, | |
| ] as const, | |
| detail: [MODEL_DETAIL_TOOL_ID, DATASET_DETAIL_TOOL_ID, HUB_REPO_DETAILS_TOOL_ID] as const, | |
| docs: [DOCS_SEMANTIC_SEARCH_TOOL_ID, DOC_FETCH_TOOL_ID] as const, | |
| hf_api: [ | |
| SPACE_SEARCH_TOOL_ID, | |
| REPO_SEARCH_TOOL_ID, | |
| CREATE_REPO_TOOL_ID, | |
| PAPER_SEARCH_TOOL_ID, | |
| HUB_REPO_DETAILS_TOOL_ID, | |
| DOCS_SEMANTIC_SEARCH_TOOL_ID, | |
| // HF_JOBS_TOOL_ID, | |
| ] as const, | |
| dynamic_space: [DYNAMIC_SPACE_TOOL_ID] as const, | |
| all: [...ALL_BUILTIN_TOOL_IDS] as const, | |
| } as const; | |
| // TypeScript type for built-in tool IDs | |
| export type BuiltinToolId = (typeof ALL_BUILTIN_TOOL_IDS)[number]; | |
| // Type guard function | |
| export function isValidBuiltinToolId(toolId: string): toolId is BuiltinToolId { | |
| return (ALL_BUILTIN_TOOL_IDS as readonly string[]).includes(toolId); | |
| } | |
Xet Storage Details
- Size:
- 3.82 kB
- Xet hash:
- a0bea82abda324a49b55a81b618460df1c3e12cd1f02ff46322748a4e4bf8fd5
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.