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

Method validateMediaCapabilities

apps/kimi-code/src/tui/kimi-tui.ts:1095–1114  ·  view source on GitHub ↗
(
    extraction: ReturnType<typeof extractMediaAttachments>,
  )

Source from the content-addressed store, hash-verified

1093 }
1094
1095 private validateMediaCapabilities(
1096 extraction: ReturnType<typeof extractMediaAttachments>,
1097 ): boolean {
1098 if (!extraction.hasMedia) return true;
1099 if (
1100 extraction.imageAttachmentIds.length > 0 &&
1101 !this.supportsCurrentModelCapability('image_in')
1102 ) {
1103 this.showError('Current model does not support image input.');
1104 return false;
1105 }
1106 if (
1107 extraction.videoAttachmentIds.length > 0 &&
1108 !this.supportsCurrentModelCapability('video_in')
1109 ) {
1110 this.showError('Current model does not support video input.');
1111 return false;
1112 }
1113 return true;
1114 }
1115
1116 private supportsCurrentModelCapability(capability: string): boolean {
1117 const capabilities =

Callers 1

sendNormalUserInputMethod · 0.95

Calls 2

showErrorMethod · 0.95

Tested by

no test coverage detected