File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2929
3030 $ : toolCallCount = tokens .filter ((t ) => t ?.attributes ?.type === ' tool_calls' ).length ;
3131 $ : reasoningCount = tokens .filter ((t ) => t ?.attributes ?.type === ' reasoning' ).length ;
32- $ : hasPending = tokens .some (
32+ $ : hasPending = ! messageDone && tokens .some (
3333 (t ) => t ?.attributes ?.done !== undefined && t ?.attributes ?.done !== ' true'
3434 );
3535
Original file line number Diff line number Diff line change 384384 title ={detailToken .summary }
385385 open ={$settings ?.expandDetails ?? false }
386386 attributes ={detailToken ?.attributes }
387+ messageDone ={done }
387388 className =" w-full space-y-1"
388389 dir =" auto"
389390 >
406407 open ={false }
407408 disabled ={true }
408409 attributes ={detailToken ?.attributes }
410+ messageDone ={done }
409411 className =" w-full space-y-1"
410412 dir =" auto"
411413 />
429431 title ={token .summary }
430432 open ={$settings ?.expandDetails ?? false }
431433 attributes ={token ?.attributes }
434+ messageDone ={done }
432435 className =" w-full space-y-1"
433436 dir =" auto"
434437 >
451454 open ={false }
452455 disabled ={true }
453456 attributes ={token ?.attributes }
457+ messageDone ={done }
454458 className =" w-full space-y-1"
455459 dir =" auto"
456460 />
Original file line number Diff line number Diff line change 5050 export let grow = false ;
5151
5252 export let disabled = false ;
53+ export let messageDone = false ;
5354 export let hide = false ;
5455
5556 export let onChange: Function = () => {};
7374 >
7475 <div
7576 class =" w-full flex items-center justify-between gap-2 {attributes ?.done &&
76- attributes ?.done !== ' true'
77+ attributes ?.done !== ' true' && ! messageDone
7778 ? ' shimmer'
7879 : ' ' }
7980 "
8081 >
81- {#if attributes ?.done && attributes ?.done !== ' true' }
82+ {#if attributes ?.done && attributes ?.done !== ' true' && ! messageDone }
8283 <div >
8384 <Spinner className =" size-4" />
8485 </div >
8586 {/if }
8687
8788 <div class =" " >
8889 {#if attributes ?.type === ' reasoning' }
89- {#if attributes ?.done === ' true' && attributes ?.duration }
90+ {#if ( attributes ?.done === ' true' || messageDone ) && attributes ?.duration }
9091 {#if attributes .duration < 1 }
9192 {$i18n .t (' Thought for less than a second' )}
9293 {:else if attributes .duration < 60 }
9899 DURATION: dayjs .duration (attributes .duration , ' seconds' ).humanize ()
99100 })}
100101 {/if }
102+ {:else if attributes ?.done === ' true' || messageDone }
103+ {$i18n .t (' Thought' )}
101104 {:else }
102105 {$i18n .t (' Thinking...' )}
103106 {/if }
104107 {:else if attributes ?.type === ' code_interpreter' }
105- {#if attributes ?.done === ' true' }
108+ {#if attributes ?.done === ' true' || messageDone }
106109 {$i18n .t (' Analyzed' )}
107110 {:else }
108111 {$i18n .t (' Analyzing...' )}
You can’t perform that action at this time.
0 commit comments