@@ -54,10 +54,11 @@ func (s *SessionItem) SetMatch(m fuzzy.Match) {
5454
5555// Render returns the string representation of the session item.
5656func (s *SessionItem) Render(width int) string {
57− return renderItem(s.t, s.Title, s.UpdatedAt, s.focused, width, s.cache, &s.m)
57+ info := humanize.Time(time.Unix(s.UpdatedAt, 0))
58+ return renderItem(s.t, s.Title, info, s.focused, width, s.cache, &s.m)
5859}
5960
60−func renderItem(t *styles.Styles, title string, updatedAt int64, focused bool, width int, cache map[int]string, m *fuzzy.Match) string {
61+func renderItem(t *styles.Styles, title string, info string, focused bool, width int, cache map[int]string, m *fuzzy.Match) string {
6162 if cache == nil {
6263 cache = make(map[int]string)
6364 }
@@ -72,23 +73,23 @@ func renderItem(t *styles.Styles, title string, updatedAt int64, focused bool, w
7273 style = t.Dialog.SelectedItem
7374 }
7475
75− var age string
76− var ageLen int
76+ var infoText string
77+ var infoLen int
7778 lineWidth := width
78− if updatedAt > 0 {
79− age = fmt.Sprintf(" %s ", humanize.Time(time.Unix(updatedAt, 0)))
79+ if len(info) > 0 {
80+ infoText = fmt.Sprintf(" %s ", info)
8081 if focused {
81− age = t.Base.Render(age)
82+ infoText = t.Base.Render(infoText)
8283 } else {
83− age = t.Subtle.Render(age)
84+ infoText = t.Subtle.Render(infoText)
8485 }
8586
86− ageLen = lipgloss.Width(age)
87+ infoLen = lipgloss.Width(infoText)
8788 }
8889
8990 title = ansi.Truncate(title, max(0, lineWidth), "")
9091 titleLen := lipgloss.Width(title)
91− gap := strings.Repeat(" ", max(0, lineWidth-titleLen-ageLen))
92+ gap := strings.Repeat(" ", max(0, lineWidth-titleLen-infoLen))
9293 content := title
9394 if matches := len(m.MatchedIndexes); matches > 0 {
9495 var lastPos int
@@ -118,7 +119,7 @@ func renderItem(t *styles.Styles, title string, updatedAt int64, focused bool, w
118119 content = strings.Join(parts, "")
119120 }
120121
121− content = style.Render(content + gap + age)
122+ content = style.Render(content + gap + infoText)
122123 cache[width] = content
123124 return content
124125}