MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / getMessageText

Function getMessageText

cli/src/commands/__tests__/init.test.ts:20–30  ·  view source on GitHub ↗
(messages: ChatMessage[])

Source from the content-addressed store, hash-verified

18
19/** Helper to extract text content from ChatMessages returned by getSystemMessage */
20const getMessageText = (messages: ChatMessage[]): string => {
21 return messages
22 .map((m) => {
23 // ChatMessage has content as a string, not an array
24 if (typeof m.content === 'string') {
25 return m.content
26 }
27 return ''
28 })
29 .join('')
30}
31
32describe('handleInitializationFlowLocally', () => {
33 const TEST_PROJECT_ROOT = '/test/project'

Callers 1

init.test.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected