From 33e086046851dfbe7e06a004d02b1c3f050fcd6a Mon Sep 17 00:00:00 2001 From: KevIsDev Date: Mon, 2 Jun 2025 11:39:49 +0100 Subject: [PATCH] fix: resolve conflicts --- app/components/chat/AssistantMessage.tsx | 130 ++++++++++++----------- app/components/chat/BaseChat.tsx | 2 +- app/components/chat/Markdown.tsx | 4 +- 3 files changed, 69 insertions(+), 67 deletions(-) diff --git a/app/components/chat/AssistantMessage.tsx b/app/components/chat/AssistantMessage.tsx index 7ed2840c..022b4fbe 100644 --- a/app/components/chat/AssistantMessage.tsx +++ b/app/components/chat/AssistantMessage.tsx @@ -83,76 +83,78 @@ export const AssistantMessage = memo( return (
-
- {(codeContext || chatSummary) && ( - }> - {chatSummary && ( -
-
-

Summary

-
- {chatSummary} -
-
- {codeContext && ( -
-

Context

-
- {codeContext.map((x) => { - const normalized = normalizedFilePath(x); - return ( - - { - e.preventDefault(); - e.stopPropagation(); - openArtifactInWorkbench(normalized); - }} - > - {normalized} - - - ); - })} + <> +
+ {(codeContext || chatSummary) && ( + }> + {chatSummary && ( +
+
+

Summary

+
+ {chatSummary}
+ {codeContext && ( +
+

Context

+
+ {codeContext.map((x) => { + const normalized = normalizedFilePath(x); + return ( + + { + e.preventDefault(); + e.stopPropagation(); + openArtifactInWorkbench(normalized); + }} + > + {normalized} + + + ); + })} +
+
+ )} +
+ )} +
+
+ )} +
+ {usage && ( +
+ Tokens: {usage.totalTokens} (prompt: {usage.promptTokens}, completion: {usage.completionTokens}) +
+ )} + {(onRewind || onFork) && messageId && ( +
+ {onRewind && ( + +
)} -
- - )} -
- {usage && ( -
- Tokens: {usage.totalTokens} (prompt: {usage.promptTokens}, completion: {usage.completionTokens}) -
- )} - {(onRewind || onFork) && messageId && ( -
- {onRewind && ( - -
- )} +
-
+ {content} diff --git a/app/components/chat/BaseChat.tsx b/app/components/chat/BaseChat.tsx index 97c9314f..1d1803fd 100644 --- a/app/components/chat/BaseChat.tsx +++ b/app/components/chat/BaseChat.tsx @@ -370,8 +370,8 @@ export const BaseChat = React.forwardRef( append={append} chatMode={chatMode} setChatMode={setChatMode} - model={model} provider={provider} + model={model} /> ) : null; }} diff --git a/app/components/chat/Markdown.tsx b/app/components/chat/Markdown.tsx index 82118451..3471c733 100644 --- a/app/components/chat/Markdown.tsx +++ b/app/components/chat/Markdown.tsx @@ -151,7 +151,7 @@ export const Markdown = memo( type: 'text', text: `[Model: ${model}]\n\n[Provider: ${provider?.name}]\n\n${message}`, }, - ] as any, // Type assertion to bypass compiler check + ] as any, role: 'user', }); console.log('Message appended:', message); @@ -164,7 +164,7 @@ export const Markdown = memo( type: 'text', text: `[Model: ${model}]\n\n[Provider: ${provider?.name}]\n\n${message}`, }, - ] as any, // Type assertion to bypass compiler check + ] as any, role: 'user', }); } else if (type === 'link' && typeof href === 'string') {