@@ -672,13 +672,6 @@ export function UserMessageDisplay(props: { message: UserMessage; parts: PartTyp
672672
673673 const agents = createMemo ( ( ) => ( props . parts ?. filter ( ( p ) => p . type === "agent" ) as AgentPart [ ] ) ?? [ ] )
674674
675- const provider = createMemo ( ( ) => {
676- const id = props . message . model ?. providerID
677- if ( ! id ) return ""
678- const match = data . store . provider ?. all ?. find ( ( p ) => p . id === id )
679- return match ?. name ?? id
680- } )
681-
682675 const model = createMemo ( ( ) => {
683676 const providerID = props . message . model ?. providerID
684677 const modelID = props . message . model ?. modelID
@@ -699,7 +692,7 @@ export function UserMessageDisplay(props: { message: UserMessage; parts: PartTyp
699692
700693 const metaHead = createMemo ( ( ) => {
701694 const agent = props . message . agent
702- const items = [ agent ? agent [ 0 ] ?. toUpperCase ( ) + agent . slice ( 1 ) : "" , provider ( ) , model ( ) ]
695+ const items = [ agent ? agent [ 0 ] ?. toUpperCase ( ) + agent . slice ( 1 ) : "" , model ( ) ]
703696 return items . filter ( ( x ) => ! ! x ) . join ( "\u00A0\u00B7\u00A0" )
704697 } )
705698
@@ -1055,13 +1048,6 @@ PART_MAPPING["text"] = function TextPartDisplay(props) {
10551048 props . message . role === "assistant" && ( props . message as AssistantMessage ) . error ?. name === "MessageAbortedError" ,
10561049 )
10571050
1058- const provider = createMemo ( ( ) => {
1059- if ( props . message . role !== "assistant" ) return ""
1060- const id = ( props . message as AssistantMessage ) . providerID
1061- const match = data . store . provider ?. all ?. find ( ( p ) => p . id === id )
1062- return match ?. name ?? id
1063- } )
1064-
10651051 const model = createMemo ( ( ) => {
10661052 if ( props . message . role !== "assistant" ) return ""
10671053 const message = props . message as AssistantMessage
@@ -1076,9 +1062,10 @@ PART_MAPPING["text"] = function TextPartDisplay(props) {
10761062 if ( typeof completed !== "number" ) return ""
10771063 const ms = completed - message . time . created
10781064 if ( ! ( ms >= 0 ) ) return ""
1079- if ( ms < 60_000 ) return `${ ( ms / 1000 ) . toFixed ( 1 ) } s`
1080- const minutes = Math . floor ( ms / 60_000 )
1081- const seconds = Math . round ( ( ms - minutes * 60_000 ) / 1000 )
1065+ const total = Math . round ( ms / 1000 )
1066+ if ( total < 60 ) return `${ total } s`
1067+ const minutes = Math . floor ( total / 60 )
1068+ const seconds = total % 60
10821069 return `${ minutes } m ${ seconds } s`
10831070 } )
10841071
@@ -1087,7 +1074,6 @@ PART_MAPPING["text"] = function TextPartDisplay(props) {
10871074 const agent = ( props . message as AssistantMessage ) . agent
10881075 const items = [
10891076 agent ? agent [ 0 ] ?. toUpperCase ( ) + agent . slice ( 1 ) : "" ,
1090- provider ( ) ,
10911077 model ( ) ,
10921078 duration ( ) ,
10931079 interrupted ( ) ? i18n . t ( "ui.message.interrupted" ) : "" ,
0 commit comments