Skip to content

Commit 61aa130

Browse files
MarcMcIntosholegklimov
authored andcommitted
ui(markdown): remove custom stye for update textdoc
1 parent 54d83da commit 61aa130

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

refact-agent/gui/src/components/Tools/Texdoc.module.css

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,9 @@
1818
margin-top: 0;
1919
}
2020

21-
:global(.radix-themes) .textdoc.textdoc__update :global(.hljs.language-diff) {
21+
/* :global(.radix-themes) .textdoc.textdoc__update :global(.hljs.language-diff) {
2222
--hlbg: var(--gray-3);
2323
--hlcolor1: var(--gray-12);
24-
/* --hlcolor2: #000000;
25-
--hlcolor3: #000080;
26-
--hlcolor4: #800080;
27-
--hlcolor5: #808000;
28-
--hlcolor6: #800000;
29-
--hlcolor7: #0055af; */
3024
--hlcolor8: var(--green-9);
3125
--hlcolor9: var(--red-9);
3226
}
@@ -44,4 +38,4 @@
4438
4539
.textdoc__update .textdoc__diffbox {
4640
box-shadow: var(--shadow-1);
47-
}
41+
} */

refact-agent/gui/src/components/Tools/Textdoc.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,11 +264,16 @@ const UpdateTextDoc: React.FC<{
264264

265265
const lineCount = useMemo(() => code.split("\n").length, [code]);
266266

267+
const copyToClipBoard = useCopyToClipboard();
268+
const handleCopy = useCallback(() => {
269+
copyToClipBoard(toolCall.function.arguments.replacement);
270+
}, [copyToClipBoard, toolCall.function.arguments.replacement]);
271+
267272
return (
268-
<Box className={classNames(styles.textdoc, styles.textdoc__update)}>
273+
<Box className={styles.textdoc}>
269274
<TextDocHeader toolCall={toolCall} />
270275
<Reveal isRevealingCode defaultOpen={lineCount < 9}>
271-
<Markdown useInlineStyles={false}>{code}</Markdown>
276+
<Markdown onCopyClick={handleCopy}>{code}</Markdown>
272277
</Reveal>
273278
</Box>
274279
);

0 commit comments

Comments
 (0)