MCPcopy Create free account
hub / github.com/apache/maka / isAssistantThinking

Function isAssistantThinking

packages/core/src/session.ts:1113–1125  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

1111}
1112
1113function isAssistantThinking(value: unknown): value is AssistantThinking {
1114 return (
1115 isRecord(value) &&
1116 hasExactShape(value, ASSISTANT_THINKING_SHAPE) &&
1117 typeof value.text === 'string' &&
1118 isOptionalString(value.signature) &&
1119 (value.providerOptions === undefined || isRecord(value.providerOptions)) &&
1120 (value.parts === undefined ||
1121 (Array.isArray(value.parts) &&
1122 value.parts.length > 0 &&
1123 value.parts.every(isAssistantThinkingPart)))
1124 );
1125}
1126
1127function isOptionalFiniteDuration(value: unknown): boolean {
1128 return value === undefined || isFiniteNumber(value);

Callers 1

decodeStoredMessageFunction · 0.85

Calls 3

isRecordFunction · 0.90
hasExactShapeFunction · 0.85
isOptionalStringFunction · 0.70

Tested by

no test coverage detected