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

Function isContentPart

packages/kosong/src/message.ts:106–111  ·  view source on GitHub ↗
(part: StreamedMessagePart)

Source from the content-addressed store, hash-verified

104
105/** Check if a streamed part is a ContentPart (text, think, image_url, audio_url, video_url). */
106export function isContentPart(part: StreamedMessagePart): part is ContentPart {
107 const t = part.type;
108 return (
109 t === 'text' || t === 'think' || t === 'image_url' || t === 'audio_url' || t === 'video_url'
110 );
111}
112
113/** Check if a streamed part is a ToolCall. */
114export function isToolCall(part: StreamedMessagePart): part is ToolCall {

Callers 3

message.test.tsFile · 0.90
flushPartFunction · 0.90
generateFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected