|
|
@@ -70,6 +70,7 @@ import {
|
|
|
} from "lucide-react"
|
|
|
import { cn } from "@/lib/utils"
|
|
|
import { PathTooltip } from "../ui/PathTooltip"
|
|
|
+import { OpenMarkdownPreviewButton } from "./OpenMarkdownPreviewButton"
|
|
|
|
|
|
// Helper function to get previous todos before a specific message
|
|
|
function getPreviousTodos(messages: ClineMessage[], currentMessageTs: number): any[] {
|
|
|
@@ -1205,10 +1206,12 @@ export const ChatRowContent = ({
|
|
|
return null // we should never see this message type
|
|
|
case "text":
|
|
|
return (
|
|
|
- <div>
|
|
|
+ <div className="group">
|
|
|
<div style={headerStyle}>
|
|
|
<MessageCircle className="w-4 shrink-0" aria-label="Speech bubble icon" />
|
|
|
<span style={{ fontWeight: "bold" }}>{t("chat:text.rooSaid")}</span>
|
|
|
+ <div style={{ flexGrow: 1 }} />
|
|
|
+ <OpenMarkdownPreviewButton markdown={message.text} />
|
|
|
</div>
|
|
|
<div className="pl-6">
|
|
|
<Markdown markdown={message.text} partial={message.partial} />
|
|
|
@@ -1343,15 +1346,17 @@ export const ChatRowContent = ({
|
|
|
)
|
|
|
case "completion_result":
|
|
|
return (
|
|
|
- <>
|
|
|
+ <div className="group">
|
|
|
<div style={headerStyle}>
|
|
|
{icon}
|
|
|
{title}
|
|
|
+ <div style={{ flexGrow: 1 }} />
|
|
|
+ <OpenMarkdownPreviewButton markdown={message.text} />
|
|
|
</div>
|
|
|
<div className="border-l border-green-600/30 ml-2 pl-4 pb-1">
|
|
|
<Markdown markdown={message.text} />
|
|
|
</div>
|
|
|
- </>
|
|
|
+ </div>
|
|
|
)
|
|
|
case "shell_integration_warning":
|
|
|
return <CommandExecutionError />
|
|
|
@@ -1602,10 +1607,12 @@ export const ChatRowContent = ({
|
|
|
case "completion_result":
|
|
|
if (message.text) {
|
|
|
return (
|
|
|
- <div>
|
|
|
+ <div className="group">
|
|
|
<div style={headerStyle}>
|
|
|
{icon}
|
|
|
{title}
|
|
|
+ <div style={{ flexGrow: 1 }} />
|
|
|
+ <OpenMarkdownPreviewButton markdown={message.text} />
|
|
|
</div>
|
|
|
<div style={{ color: "var(--vscode-charts-green)", paddingTop: 10 }}>
|
|
|
<Markdown markdown={message.text} partial={message.partial} />
|