MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / guessMime

Function guessMime

packages/agent-core/src/services/fs/fsService.ts:640–645  ·  view source on GitHub ↗
(relPath: string, isBinary: boolean)

Source from the content-addressed store, hash-verified

638};
639
640function guessMime(relPath: string, isBinary: boolean): string {
641 const ext = path.extname(relPath).toLowerCase();
642 const mapped = EXT_TO_MIME[ext];
643 if (mapped !== undefined) return mapped;
644 return isBinary ? 'application/octet-stream' : 'text/plain';
645}
646
647const EXT_TO_LANGUAGE: Readonly<Record<string, string>> = {
648 '.ts': 'typescript',

Callers 4

readMethod · 0.85
resolveDownloadMethod · 0.85
buildFsEntryFromStatFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected