@@ -79,6 +79,7 @@ const context = createContext<{
7979 width : number
8080 conceal : ( ) => boolean
8181 showThinking : ( ) => boolean
82+ showTimestamps : ( ) => boolean
8283} > ( )
8384
8485function use ( ) {
@@ -109,6 +110,7 @@ export function Session() {
109110 const [ sidebar , setSidebar ] = createSignal < "show" | "hide" | "auto" > ( kv . get ( "sidebar" , "auto" ) )
110111 const [ conceal , setConceal ] = createSignal ( true )
111112 const [ showThinking , setShowThinking ] = createSignal ( true )
113+ const [ showTimestamps , setShowTimestamps ] = createSignal ( kv . get ( "timestamps" , "hide" ) === "show" )
112114
113115 const wide = createMemo ( ( ) => dimensions ( ) . width > 120 )
114116 const sidebarVisible = createMemo ( ( ) => sidebar ( ) === "show" || ( sidebar ( ) === "auto" && wide ( ) ) )
@@ -403,6 +405,19 @@ export function Session() {
403405 dialog . clear ( )
404406 } ,
405407 } ,
408+ {
409+ title : "Toggle timestamps" ,
410+ value : "session.toggle.timestamps" ,
411+ category : "Session" ,
412+ onSelect : ( dialog ) => {
413+ setShowTimestamps ( ( prev ) => {
414+ const next = ! prev
415+ kv . set ( "timestamps" , next ? "show" : "hide" )
416+ return next
417+ } )
418+ dialog . clear ( )
419+ } ,
420+ } ,
406421 {
407422 title : "Toggle thinking blocks" ,
408423 value : "session.toggle.thinking" ,
@@ -712,6 +727,7 @@ export function Session() {
712727 } ,
713728 conceal,
714729 showThinking,
730+ showTimestamps,
715731 } }
716732 >
717733 < box flexDirection = "row" paddingBottom = { 1 } paddingTop = { 1 } paddingLeft = { 2 } paddingRight = { 2 } gap = { 2 } >
@@ -891,6 +907,7 @@ function UserMessage(props: {
891907 index : number
892908 pending ?: string
893909} ) {
910+ const ctx = use ( )
894911 const text = createMemo ( ( ) => props . parts . flatMap ( ( x ) => ( x . type === "text" && ! x . synthetic ? [ x ] : [ ] ) ) [ 0 ] )
895912 const files = createMemo ( ( ) => props . parts . flatMap ( ( x ) => ( x . type === "file" ? [ x ] : [ ] ) ) )
896913 const sync = useSync ( )
@@ -949,7 +966,13 @@ function UserMessage(props: {
949966 { sync . data . config . username ?? "You" } { " " }
950967 < Show
951968 when = { queued ( ) }
952- fallback = { < span style = { { fg : theme . textMuted } } > { Locale . time ( props . message . time . created ) } </ span > }
969+ fallback = {
970+ < span style = { { fg : theme . textMuted } } >
971+ { ctx . showTimestamps ( )
972+ ? `· ${ Locale . todayTimeOrDateTime ( props . message . time . created ) } `
973+ : `· ${ Locale . time ( props . message . time . created ) } ` }
974+ </ span >
975+ }
953976 >
954977 < span style = { { bg : theme . accent , fg : theme . backgroundPanel , bold : true } } > QUEUED </ span >
955978 </ Show >
@@ -973,6 +996,7 @@ function UserMessage(props: {
973996function AssistantMessage ( props : { message : AssistantMessage ; parts : Part [ ] ; last : boolean } ) {
974997 const local = useLocal ( )
975998 const { theme } = useTheme ( )
999+ const ctx = use ( )
9761000 return (
9771001 < >
9781002 < For each = { props . parts } >
@@ -1015,7 +1039,12 @@ function AssistantMessage(props: { message: AssistantMessage; parts: Part[]; las
10151039 < box paddingLeft = { 3 } >
10161040 < text marginTop = { 1 } >
10171041 < span style = { { fg : local . agent . color ( props . message . mode ) } } > { Locale . titlecase ( props . message . mode ) } </ span > { " " }
1018- < span style = { { fg : theme . textMuted } } > { props . message . modelID } </ span >
1042+ < span style = { { fg : theme . textMuted } } >
1043+ { props . message . modelID }
1044+ { ctx . showTimestamps ( ) &&
1045+ props . message . time . completed &&
1046+ ` · ${ Locale . todayTimeOrDateTime ( props . message . time . completed ) } ` }
1047+ </ span >
10191048 </ text >
10201049 </ box >
10211050 </ Match >
0 commit comments