@@ -1219,6 +1237,7 @@ export const ChatRowContent = ({
{t("chat:feedback.youSaid")}
+ {timestampElement}
{icon}
{title}
+ {timestampElement}
diff --git a/webview-ui/src/components/settings/SettingsView.tsx b/webview-ui/src/components/settings/SettingsView.tsx
index 6331f13edf9..c98d98f899f 100644
--- a/webview-ui/src/components/settings/SettingsView.tsx
+++ b/webview-ui/src/components/settings/SettingsView.tsx
@@ -209,6 +209,8 @@ const SettingsView = forwardRef
(({ onDone, t
openRouterImageGenerationSelectedModel,
reasoningBlockCollapsed,
enterBehavior,
+ showTimestamps,
+ timestampFormat,
includeCurrentTime,
includeCurrentCost,
maxGitStatusFiles,
@@ -411,6 +413,8 @@ const SettingsView = forwardRef(({ onDone, t
includeTaskHistoryInEnhance: includeTaskHistoryInEnhance ?? true,
reasoningBlockCollapsed: reasoningBlockCollapsed ?? true,
enterBehavior: enterBehavior ?? "send",
+ showTimestamps: showTimestamps ?? false,
+ timestampFormat: timestampFormat ?? "24hour",
includeCurrentTime: includeCurrentTime ?? true,
includeCurrentCost: includeCurrentCost ?? true,
maxGitStatusFiles: maxGitStatusFiles ?? 0,
@@ -830,6 +834,8 @@ const SettingsView = forwardRef(({ onDone, t
)}
diff --git a/webview-ui/src/components/settings/UISettings.tsx b/webview-ui/src/components/settings/UISettings.tsx
index b4e5a4e861a..5a67ffb9618 100644
--- a/webview-ui/src/components/settings/UISettings.tsx
+++ b/webview-ui/src/components/settings/UISettings.tsx
@@ -1,6 +1,6 @@
import { HTMLAttributes, useMemo } from "react"
import { useAppTranslation } from "@/i18n/TranslationContext"
-import { VSCodeCheckbox } from "@vscode/webview-ui-toolkit/react"
+import { VSCodeCheckbox, VSCodeDropdown, VSCodeOption } from "@vscode/webview-ui-toolkit/react"
import { Glasses } from "lucide-react"
import { telemetryClient } from "@/utils/TelemetryClient"
@@ -12,12 +12,16 @@ import { ExtensionStateContextType } from "@/context/ExtensionStateContext"
interface UISettingsProps extends HTMLAttributes {
reasoningBlockCollapsed: boolean
enterBehavior: "send" | "newline"
+ showTimestamps: boolean
+ timestampFormat: "12hour" | "24hour"
setCachedStateField: SetCachedStateField
}
export const UISettings = ({
reasoningBlockCollapsed,
enterBehavior,
+ showTimestamps,
+ timestampFormat,
setCachedStateField,
...props
}: UISettingsProps) => {
@@ -48,6 +52,24 @@ export const UISettings = ({
})
}
+ const handleShowTimestampsChange = (value: boolean) => {
+ setCachedStateField("showTimestamps", value)
+
+ // Track telemetry event
+ telemetryClient.capture("ui_settings_show_timestamps_changed", {
+ enabled: value,
+ })
+ }
+
+ const handleTimestampFormatChange = (format: "12hour" | "24hour") => {
+ setCachedStateField("timestampFormat", format)
+
+ // Track telemetry event
+ telemetryClient.capture("ui_settings_timestamp_format_changed", {
+ format,
+ })
+ }
+
return (
@@ -86,6 +108,44 @@ export const UISettings = ({
{t("settings:ui.requireCtrlEnterToSend.description", { primaryMod })}
+
+ {/* Show Timestamps Setting */}
+
+
handleShowTimestampsChange(e.target.checked)}
+ data-testid="show-timestamps-checkbox">
+ {t("settings:ui.showTimestamps.label")}
+
+
+ {t("settings:ui.showTimestamps.description")}
+
+
+
+ {/* Timestamp Format Setting - only visible when timestamps are enabled */}
+ {showTimestamps && (
+
+
+ {t("settings:ui.timestampFormat.label")}
+
+ handleTimestampFormatChange(e.target.value as "12hour" | "24hour")
+ }
+ data-testid="timestamp-format-dropdown">
+
+ {t("settings:ui.timestampFormat.options.24hour")}
+
+
+ {t("settings:ui.timestampFormat.options.12hour")}
+
+
+
+
+ {t("settings:ui.timestampFormat.description")}
+
+
+ )}
diff --git a/webview-ui/src/components/settings/__tests__/UISettings.spec.tsx b/webview-ui/src/components/settings/__tests__/UISettings.spec.tsx
index 2a21a410b38..bd302196883 100644
--- a/webview-ui/src/components/settings/__tests__/UISettings.spec.tsx
+++ b/webview-ui/src/components/settings/__tests__/UISettings.spec.tsx
@@ -6,6 +6,8 @@ describe("UISettings", () => {
const defaultProps = {
reasoningBlockCollapsed: false,
enterBehavior: "send" as const,
+ showTimestamps: false,
+ timestampFormat: "24hour" as const,
setCachedStateField: vi.fn(),
}
diff --git a/webview-ui/src/context/ExtensionStateContext.tsx b/webview-ui/src/context/ExtensionStateContext.tsx
index 3fe5340bdbc..85a13449573 100644
--- a/webview-ui/src/context/ExtensionStateContext.tsx
+++ b/webview-ui/src/context/ExtensionStateContext.tsx
@@ -163,6 +163,10 @@ export interface ExtensionStateContextType extends ExtensionState {
setIncludeCurrentTime: (value: boolean) => void
includeCurrentCost?: boolean
setIncludeCurrentCost: (value: boolean) => void
+ showTimestamps?: boolean
+ setShowTimestamps: (value: boolean) => void
+ timestampFormat?: "12hour" | "24hour"
+ setTimestampFormat: (value: "12hour" | "24hour") => void
}
export const ExtensionStateContext = createContext