diff --git a/webview-ui/src/components/chat/ChatRow.tsx b/webview-ui/src/components/chat/ChatRow.tsx
index 4299240a549a..3cf68e0f5821 100644
--- a/webview-ui/src/components/chat/ChatRow.tsx
+++ b/webview-ui/src/components/chat/ChatRow.tsx
@@ -1061,7 +1061,7 @@ export const ChatRowContent = ({
{t("chat:text.rooSaid")}
-
+
{message.images && message.images.length > 0 && (
{message.images.map((image, index) => (
@@ -1170,7 +1170,7 @@ export const ChatRowContent = ({
{title}
-
+
>
)
@@ -1324,7 +1324,7 @@ export const ChatRowContent = ({
)}
-
+
>
)
@@ -1410,7 +1410,11 @@ export const ChatRowContent = ({
{title}
-
+
)
@@ -1429,6 +1433,7 @@ export const ChatRowContent = ({
{
+interface MarkdownProps {
+ markdown?: string
+ partial?: boolean
+ messageTs?: number
+ onDeleteMessage?: () => void
+}
+
+export const Markdown = memo(({ markdown, partial, messageTs, onDeleteMessage }: MarkdownProps) => {
const [isHovering, setIsHovering] = useState(false)
// Shorter feedback duration for copy button flash.
const { copyWithFeedback } = useCopyToClipboard(200)
+ const handleDelete = () => {
+ if (onDeleteMessage) {
+ onDeleteMessage()
+ } else if (messageTs) {
+ vscode.postMessage({ type: "deleteMessage", value: messageTs })
+ }
+ }
+
if (!markdown || markdown.length === 0) {
return null
}
@@ -33,6 +49,8 @@ export const Markdown = memo(({ markdown, partial }: { markdown?: string; partia
opacity: 0,
animation: "fadeIn 0.2s ease-in-out forwards",
borderRadius: "4px",
+ display: "flex",
+ gap: "4px",
}}>
@@ -60,6 +78,22 @@ export const Markdown = memo(({ markdown, partial }: { markdown?: string; partia
+ {(messageTs || onDeleteMessage) && (
+
+
+
+
+
+ )}
)}