Inline base64 source maps had been checked into tracked src files. This strips those comments from the repository without changing runtime behavior or adding ongoing guardrails, per the requested one-time cleanup scope. Constraint: Keep this change limited to tracked source cleanup only Rejected: Add CI/source verification guard | user requested one-time cleanup only Confidence: high Scope-risk: narrow Reversibility: clean Directive: If these directives reappear, fix the producing transform instead of reintroducing repo-side cleanup code Tested: rg -n "sourceMappingURL" ., bun run smoke, bun run verify:privacy, bun run test:provider, npm run test:provider-recommendation Not-tested: bun run typecheck (repository has many pre-existing unrelated failures) Co-authored-by: anandh8x <test@example.com>
63 lines
1.5 KiB
TypeScript
63 lines
1.5 KiB
TypeScript
import { c as _c } from "react-compiler-runtime";
|
|
import React from 'react';
|
|
import { stringWidth } from '../ink/stringWidth.js';
|
|
import { Box, Text } from '../ink.js';
|
|
import type { NormalizedMessage } from '../types/message.js';
|
|
type Props = {
|
|
message: NormalizedMessage;
|
|
isTranscriptMode: boolean;
|
|
};
|
|
export function MessageTimestamp(t0) {
|
|
const $ = _c(10);
|
|
const {
|
|
message,
|
|
isTranscriptMode
|
|
} = t0;
|
|
const shouldShowTimestamp = isTranscriptMode && message.timestamp && message.type === "assistant" && message.message.content.some(_temp);
|
|
if (!shouldShowTimestamp) {
|
|
return null;
|
|
}
|
|
let T0;
|
|
let formattedTimestamp;
|
|
let t1;
|
|
if ($[0] !== message.timestamp) {
|
|
formattedTimestamp = new Date(message.timestamp).toLocaleTimeString("en-US", {
|
|
hour: "2-digit",
|
|
minute: "2-digit",
|
|
hour12: true
|
|
});
|
|
T0 = Box;
|
|
t1 = stringWidth(formattedTimestamp);
|
|
$[0] = message.timestamp;
|
|
$[1] = T0;
|
|
$[2] = formattedTimestamp;
|
|
$[3] = t1;
|
|
} else {
|
|
T0 = $[1];
|
|
formattedTimestamp = $[2];
|
|
t1 = $[3];
|
|
}
|
|
let t2;
|
|
if ($[4] !== formattedTimestamp) {
|
|
t2 = <Text dimColor={true}>{formattedTimestamp}</Text>;
|
|
$[4] = formattedTimestamp;
|
|
$[5] = t2;
|
|
} else {
|
|
t2 = $[5];
|
|
}
|
|
let t3;
|
|
if ($[6] !== T0 || $[7] !== t1 || $[8] !== t2) {
|
|
t3 = <T0 minWidth={t1}>{t2}</T0>;
|
|
$[6] = T0;
|
|
$[7] = t1;
|
|
$[8] = t2;
|
|
$[9] = t3;
|
|
} else {
|
|
t3 = $[9];
|
|
}
|
|
return t3;
|
|
}
|
|
function _temp(c) {
|
|
return c.type === "text";
|
|
}
|