|
26 | 26 | import com.microsoft.copilot.eclipse.core.persistence.CopilotTurnData.ReplyData; |
27 | 27 | import com.microsoft.copilot.eclipse.core.persistence.CopilotTurnData.ToolCallData; |
28 | 28 | import com.microsoft.copilot.eclipse.core.persistence.UserTurnData.MessageData; |
29 | | -import com.microsoft.copilot.eclipse.core.utils.ChatMessageUtils; |
| 29 | + |
30 | 30 |
|
31 | 31 | /** |
32 | 32 | * Factory for creating and transforming conversation data objects. Responsible only for pure data transformation with |
@@ -218,12 +218,10 @@ public List<Turn> convertToTurns(List<AbstractTurnData> turnDataList) { |
218 | 218 | .forLeft(requestText == null ? "" : requestText); |
219 | 219 | result.add(new Turn(request, null, null)); |
220 | 220 | } else if (turnData instanceof CopilotTurnData copilotTurnData) { |
221 | | - // TODO: We don't persist images for now, so hard code the modelSupportVersion to false. In the future, handle |
222 | | - // images in responses and pass the model support version here if needed. |
| 221 | + // Assistant turns only contribute the response text; the request field is intentionally empty. |
223 | 222 | String responseText = extractResponseFromCopilotTurnData(copilotTurnData); |
224 | | - Either<String, List<ChatCompletionContentPart>> response = ChatMessageUtils |
225 | | - .createMessageWithImages(responseText, new ArrayList<>(), false); |
226 | | - result.add(new Turn(response, responseText, null)); |
| 223 | + Either<String, List<ChatCompletionContentPart>> request = Either.forLeft(""); |
| 224 | + result.add(new Turn(request, responseText, null)); |
227 | 225 | } |
228 | 226 | } |
229 | 227 | return result; |
|
0 commit comments