MCPcopy Create free account
hub / github.com/microsoft/AI-Engineering-Coach / getOpenCodeUserText

Function getOpenCodeUserText

src/core/parser-opencode.ts:119–126  ·  view source on GitHub ↗
(msg: OcMessage, partsByMsg: Map<string, OcPart[]>)

Source from the content-addressed store, hash-verified

117}
118
119function getOpenCodeUserText(msg: OcMessage, partsByMsg: Map<string, OcPart[]>): string {
120 const userParts = partsByMsg.get(msg.id) || [];
121 const userTextFromParts = userParts
122 .filter(part => part.type === 'text' && part.text)
123 .map(part => part.text!)
124 .join('\n');
125 return userTextFromParts || msg.summary?.title || '';
126}
127
128function findAssistantMessage(messages: OcMessage[], startIndex: number, parentId: string): OcMessage | null {
129 for (let i = startIndex; i < messages.length; i++) {

Callers 1

buildOpenCodeRequestFunction · 0.85

Calls 2

getMethod · 0.80
filterMethod · 0.80

Tested by

no test coverage detected