@@ -33,7 +33,7 @@ interface MessageMarkdownProps extends React.ComponentProps<typeof ReactMarkdown
3333 children : string ,
3434 className : string ,
3535 messageDone ?: boolean ,
36- temp ?: boolean
36+ activeStep ?: boolean
3737}
3838
3939type Step = {
@@ -54,7 +54,7 @@ function parseMetaData(string) {
5454}
5555
5656const MessageMarkdown = observer ( ( props : MessageMarkdownProps ) => {
57- const { children, temp = false , messageDone } = props ;
57+ const { children, activeStep = false , messageDone } = props ;
5858 const { chat } = useMst ( ) ;
5959 const [ steps , setSteps ] = useState < Step [ ] > ( [ ] ) ;
6060 const tree = fromMarkdown ( children ) ;
@@ -177,7 +177,7 @@ Generate a professionally written and formatted release note in markdown with th
177177 return < ReactMarkdown
178178 { ...props }
179179 remarkPlugins = { [ ( ) => ( tree ) => {
180- let stepCount = 1 ;
180+ let stepCount = 0 ;
181181 let chatmarkCount = 0 ;
182182 let previousNode :any = null ;
183183 visit ( tree , function ( node ) {
@@ -227,8 +227,8 @@ Generate a professionally written and formatted release note in markdown with th
227227 }
228228
229229 if ( lanugage === 'step' || lanugage === 'Step' ) {
230- let done = Number ( index ) < codes . length ? true : lastNode . type !== 'code' ;
231- return < Step language = { lanugage } done = { temp ? done : true } index = { index } > { value } </ Step > ;
230+ const status = activeStep && Number ( index ) === codes . length - 1 && lastNode . type === 'code' ? "running" : "done" ;
231+ return < Step language = { lanugage } status = { status } index = { index } > { value } </ Step > ;
232232 }
233233
234234 if ( lanugage === 'chatmark' || lanugage === 'ChatMark' ) {
0 commit comments