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

Function assistantToCodebuffMessage

common/src/util/messages.ts:103–124  ·  view source on GitHub ↗
(
  message: Omit<AssistantMessage, 'content'> & {
    content: Exclude<AssistantMessage['content'], string>[number]
  },
)

Source from the content-addressed store, hash-verified

101 AuxiliaryMessageData
102
103function assistantToCodebuffMessage(
104 message: Omit<AssistantMessage, 'content'> & {
105 content: Exclude<AssistantMessage['content'], string>[number]
106 },
107): AssistantMessage {
108 // if (message.content.type === 'tool-call') {
109 // return cloneDeep({
110 // ...message,
111 // content: [
112 // {
113 // type: 'text',
114 // text: getToolCallString(
115 // message.content.toolName,
116 // message.content.input,
117 // false,
118 // ),
119 // },
120 // ],
121 // })
122 // }
123 return cloneDeep({ ...message, content: [message.content] })
124}
125
126function convertToolResultMessage(
127 message: ToolMessage,

Callers 1

convertToolMessageFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected