File tree Expand file tree Collapse file tree 2 files changed +9
-10
lines changed
refact-agent/gui/src/components/Tools Expand file tree Collapse file tree 2 files changed +9
-10
lines changed Original file line number Diff line number Diff line change 18
18
margin-top : 0 ;
19
19
}
20
20
21
- : global (.radix-themes ) .textdoc .textdoc__update : global (.hljs .language-diff ) {
21
+ /* :global(.radix-themes) .textdoc.textdoc__update :global(.hljs.language-diff) {
22
22
--hlbg: var(--gray-3);
23
23
--hlcolor1: var(--gray-12);
24
- /* --hlcolor2: #000000;
25
- --hlcolor3: #000080;
26
- --hlcolor4: #800080;
27
- --hlcolor5: #808000;
28
- --hlcolor6: #800000;
29
- --hlcolor7: #0055af; */
30
24
--hlcolor8: var(--green-9);
31
25
--hlcolor9: var(--red-9);
32
26
}
44
38
45
39
.textdoc__update .textdoc__diffbox {
46
40
box-shadow: var(--shadow-1);
47
- }
41
+ } */
Original file line number Diff line number Diff line change @@ -264,11 +264,16 @@ const UpdateTextDoc: React.FC<{
264
264
265
265
const lineCount = useMemo ( ( ) => code . split ( "\n" ) . length , [ code ] ) ;
266
266
267
+ const copyToClipBoard = useCopyToClipboard ( ) ;
268
+ const handleCopy = useCallback ( ( ) => {
269
+ copyToClipBoard ( toolCall . function . arguments . replacement ) ;
270
+ } , [ copyToClipBoard , toolCall . function . arguments . replacement ] ) ;
271
+
267
272
return (
268
- < Box className = { classNames ( styles . textdoc , styles . textdoc__update ) } >
273
+ < Box className = { styles . textdoc } >
269
274
< TextDocHeader toolCall = { toolCall } />
270
275
< Reveal isRevealingCode defaultOpen = { lineCount < 9 } >
271
- < Markdown useInlineStyles = { false } > { code } </ Markdown >
276
+ < Markdown onCopyClick = { handleCopy } > { code } </ Markdown >
272
277
</ Reveal >
273
278
</ Box >
274
279
) ;
You can’t perform that action at this time.
0 commit comments