1-
2- import * as React from 'react' ;
3- import { Button } from '@mantine/core' ;
4- import { IconRotateDot } from '@tabler/icons-react' ;
1+ import * as React from "react" ;
2+ import { Button } from "@mantine/core" ;
3+ import { IconRotateDot } from "@tabler/icons-react" ;
54import { observer } from "mobx-react-lite" ;
65import { useMst } from "@/views/stores/RootStore" ;
76
8-
97const RegenerationButton = observer ( ( ) => {
10- const { chat } = useMst ( ) ;
11- return ( < Button
12- size = 'xs'
13- sx = { {
14- backgroundColor :"#ED6A45" ,
15- fontFamily : 'var(--vscode-editor-font-familyy)' ,
16- fontSize : 'var(--vscode-editor-font-size)' ,
17- color :"#fff" ,
18- "&:hover" :{
19- backgroundColor :"#ED6A45" ,
20- opacity : 0.8 ,
21- } ,
22- "&:focus" :{
23- backgroundColor :"#ED6A45" ,
24- opacity : 0.8 ,
25- }
26- } }
27- styles = { {
28- icon : {
29- color :"#fff" ,
30- } ,
31- label : {
32- fontSize : 'var(--vscode-editor-font-size)' ,
33- color :"#fff" ,
34- }
35- } }
36- leftIcon = { < IconRotateDot color = 'var(--vscode-button-foreground)' /> }
37- onClick = { ( ) => chat . reGenerating ( ) }
38- variant = "white" >
39- Regeneration
40- </ Button > ) ;
8+ const { chat } = useMst ( ) ;
9+ return (
10+ < Button
11+ size = "xs"
12+ sx = { {
13+ backgroundColor : "#ED6A45" ,
14+ fontFamily : "var(--vscode-editor-font-familyy)" ,
15+ fontSize : "var(--vscode-editor-font-size)" ,
16+ color : "#fff" ,
17+ "&:hover" : {
18+ backgroundColor : "#ED6A45" ,
19+ opacity : 0.8 ,
20+ } ,
21+ "&:focus" : {
22+ backgroundColor : "#ED6A45" ,
23+ opacity : 0.8 ,
24+ } ,
25+ } }
26+ styles = { {
27+ icon : {
28+ color : "#fff" ,
29+ } ,
30+ label : {
31+ fontSize : "var(--vscode-editor-font-size)" ,
32+ color : "#fff" ,
33+ } ,
34+ } }
35+ leftIcon = { < IconRotateDot color = "#fff" /> }
36+ onClick = { ( ) => chat . reGenerating ( ) }
37+ variant = "white"
38+ >
39+ Regeneration
40+ </ Button >
41+ ) ;
4142} ) ;
4243
43- export default RegenerationButton ;
44+ export default RegenerationButton ;
0 commit comments