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

Function mimeFromDataUrl

apps/kimi-web/src/composables/useFilePreview.ts:156–159  ·  view source on GitHub ↗
(url: string)

Source from the content-addressed store, hash-verified

154 }
155
156 function mimeFromDataUrl(url: string): string | undefined {
157 const match = /^data:([^;,]+)/i.exec(url);
158 return match?.[1];
159 }
160
161 function openMediaPreview(media: ToolMedia): void {
162 if (media.kind !== 'image') return;

Callers 1

openMediaPreviewFunction · 0.85

Calls 1

execMethod · 0.65

Tested by

no test coverage detected