fix: timestamp formatting
This commit is contained in:
@@ -100,7 +100,7 @@ func renderUserMessage(msg message.Message, isFocused bool, width int, position
|
|||||||
|
|
||||||
// Add timestamp info
|
// Add timestamp info
|
||||||
info := []string{}
|
info := []string{}
|
||||||
timestamp := time.Unix(msg.CreatedAt, 0).Format("15:04:05")
|
timestamp := time.UnixMilli(msg.CreatedAt).Local().Format("02 Jan 2006 03:04 PM")
|
||||||
username, _ := config.GetUsername()
|
username, _ := config.GetUsername()
|
||||||
info = append(info, baseStyle.
|
info = append(info, baseStyle.
|
||||||
Width(width-1).
|
Width(width-1).
|
||||||
@@ -148,7 +148,7 @@ func renderAssistantMessage(
|
|||||||
baseStyle := styles.BaseStyle()
|
baseStyle := styles.BaseStyle()
|
||||||
|
|
||||||
// Always add timestamp info
|
// Always add timestamp info
|
||||||
timestamp := time.Unix(msg.CreatedAt, 0).Format("15:04:05")
|
timestamp := time.UnixMilli(msg.CreatedAt).Local().Format("02 Jan 2006 03:04 PM")
|
||||||
modelName := "Assistant"
|
modelName := "Assistant"
|
||||||
if msg.Model != "" {
|
if msg.Model != "" {
|
||||||
modelName = models.SupportedModels[msg.Model].Name
|
modelName = models.SupportedModels[msg.Model].Name
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ func (i *detailCmp) updateContent() {
|
|||||||
levelStyle := getLevelStyle(i.currentLog.Level)
|
levelStyle := getLevelStyle(i.currentLog.Level)
|
||||||
|
|
||||||
// Format timestamp
|
// Format timestamp
|
||||||
timeStr := time.Unix(i.currentLog.Timestamp, 0).Format(time.RFC3339)
|
timeStr := time.UnixMilli(i.currentLog.Timestamp).Format(time.RFC3339)
|
||||||
|
|
||||||
header := lipgloss.JoinHorizontal(
|
header := lipgloss.JoinHorizontal(
|
||||||
lipgloss.Center,
|
lipgloss.Center,
|
||||||
|
|||||||
@@ -165,7 +165,7 @@ func (i *tableCmp) updateRows() {
|
|||||||
|
|
||||||
for _, log := range i.logs {
|
for _, log := range i.logs {
|
||||||
// Format timestamp as time
|
// Format timestamp as time
|
||||||
timeStr := time.Unix(log.Timestamp, 0).Format("15:04:05")
|
timeStr := time.UnixMilli(log.Timestamp).Format("15:04:05")
|
||||||
|
|
||||||
// Include ID as hidden first column for selection
|
// Include ID as hidden first column for selection
|
||||||
row := table.Row{
|
row := table.Row{
|
||||||
|
|||||||
Reference in New Issue
Block a user