MCPcopy Index your code
hub / github.com/anus-dev/ANUS / getResponseText

Function getResponseText

packages/core/src/utils/partUtils.ts:68–86  ·  view source on GitHub ↗
(
  response: GenerateContentResponse,
)

Source from the content-addressed store, hash-verified

66}
67
68export function getResponseText(
69 response: GenerateContentResponse,
70): string | null {
71 if (response.candidates && response.candidates.length > 0) {
72 const candidate = response.candidates[0];
73
74 if (
75 candidate.content &&
76 candidate.content.parts &&
77 candidate.content.parts.length > 0
78 ) {
79 return candidate.content.parts
80 .filter((part) => part.text)
81 .map((part) => part.text)
82 .join('');
83 }
84 }
85 return null;
86}

Callers 8

partUtils.test.tsFile · 0.70
summarizeToolOutputFunction · 0.70
executeFallbackMethod · 0.50
executeMethod · 0.50
executeMethod · 0.50
runMethod · 0.50
generateJsonMethod · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected