1- import { VSCodeBadge , VSCodeButton , VSCodeProgressRing } from "@vscode/webview-ui-toolkit/react"
2- import deepEqual from "fast-deep-equal"
31import React , { memo , useEffect , useMemo , useRef , useState } from "react"
42import { useSize } from "react-use"
5- import { useCopyToClipboard } from "../../utils/clipboard"
63import { useTranslation , Trans } from "react-i18next"
4+ import deepEqual from "fast-deep-equal"
5+ import { VSCodeBadge , VSCodeButton , VSCodeProgressRing } from "@vscode/webview-ui-toolkit/react"
6+
7+ import { Button } from "@/components/ui"
8+
9+ import { useCopyToClipboard } from "../../utils/clipboard"
710import { safeJsonParse } from "../../utils/json"
811import {
912 ClineApiReqInfo ,
@@ -25,7 +28,7 @@ import McpResourceRow from "../mcp/McpResourceRow"
2528import McpToolRow from "../mcp/McpToolRow"
2629import { highlightMentions } from "./TaskHeader"
2730import { CheckpointSaved } from "./checkpoints/CheckpointSaved"
28- import FollowUpSuggest from "./FollowUpSuggest"
31+ import { FollowUpSuggest } from "./FollowUpSuggest"
2932
3033interface ChatRowProps {
3134 message : ClineMessage
@@ -230,7 +233,8 @@ export const ChatRowContent = ({
230233 return [
231234 < span
232235 className = "codicon codicon-question"
233- style = { { color : normalColor , marginBottom : "-1.5px" } } > </ span > ,
236+ style = { { color : normalColor , marginBottom : "-1.5px" } }
237+ /> ,
234238 < span style = { { color : normalColor , fontWeight : "bold" } } > { t ( "chat:questions.hasQuestion" ) } </ span > ,
235239 ]
236240 default :
@@ -795,39 +799,6 @@ export const ChatRowContent = ({
795799 </ >
796800 ) }
797801 </ p >
798-
799- { /* {apiProvider === "" && (
800- <div
801- style={{
802- display: "flex",
803- alignItems: "center",
804- backgroundColor:
805- "color-mix(in srgb, var(--vscode-errorForeground) 20%, transparent)",
806- color: "var(--vscode-editor-foreground)",
807- padding: "6px 8px",
808- borderRadius: "3px",
809- margin: "10px 0 0 0",
810- fontSize: "12px",
811- }}>
812- <i
813- className="codicon codicon-warning"
814- style={{
815- marginRight: 6,
816- fontSize: 16,
817- color: "var(--vscode-errorForeground)",
818- }}></i>
819- <span>
820- Uh-oh, this could be a problem on end. We've been alerted and
821- will resolve this ASAP. You can also{" "}
822- <a
823- href=""
824- style={{ color: "inherit", textDecoration: "underline" }}>
825- contact us
826- </a>
827- .
828- </span>
829- </div>
830- )} */ }
831802 </ >
832803 ) }
833804
@@ -853,46 +824,19 @@ export const ChatRowContent = ({
853824 )
854825 case "user_feedback" :
855826 return (
856- < div
857- className = "outline rounded p-4"
858- style = { {
859- color : "var(--vscode-badge-foreground)" ,
860- padding : "4px" ,
861- overflow : "hidden" ,
862- whiteSpace : "pre-wrap" ,
863- wordBreak : "break-word" ,
864- overflowWrap : "anywhere" ,
865- } } >
866- < div
867- style = { {
868- display : "flex" ,
869- justifyContent : "space-between" ,
870- alignItems : "flex-start" ,
871- gap : "10px" ,
872- } } >
873- < span style = { { display : "block" , flexGrow : 1 , padding : "4px" } } >
874- { highlightMentions ( message . text ) }
875- </ span >
876- < VSCodeButton
877- appearance = "icon"
878- style = { {
879- padding : "3px" ,
880- flexShrink : 0 ,
881- height : "24px" ,
882- marginTop : "-3px" ,
883- marginBottom : "-3px" ,
884- marginRight : "-6px" ,
885- } }
827+ < div className = "bg-vscode-editor-background border rounded-xs p-1 overflow-hidden whitespace-pre-wrap word-break-break-word overflow-wrap-anywhere" >
828+ < div className = "flex justify-between gap-2" >
829+ < div className = "flex-grow px-2 py-1" > { highlightMentions ( message . text ) } </ div >
830+ < Button
831+ variant = "ghost"
832+ size = "icon"
886833 disabled = { isStreaming }
887834 onClick = { ( e ) => {
888835 e . stopPropagation ( )
889- vscode . postMessage ( {
890- type : "deleteMessage" ,
891- value : message . ts ,
892- } )
836+ vscode . postMessage ( { type : "deleteMessage" , value : message . ts } )
893837 } } >
894- < span className = "codicon codicon-trash" > </ span >
895- </ VSCodeButton >
838+ < span className = "codicon codicon-trash" / >
839+ </ Button >
896840 </ div >
897841 { message . images && message . images . length > 0 && (
898842 < Thumbnails images = { message . images } style = { { marginTop : "8px" } } />
0 commit comments