- MCP
- blame on this site's /mcp
- CLI
- abso blame client/src/times.ts --json
- JSON
- /christopher/abso-core/blame/client/src/times.ts?format=json
24 linesFirst import 83% · pinch 17%Last change pinch in version 33,
24 lines from 2 changes in 2 versions.
2// issue 124): "08:34 UTC" today, "Oct 7 21:10 UTC" before that.
pinch33Client: a tell reads as who told you and how sure that is, with what was said on the lines below: "ann (as claimed) told you:", "Robin (a person) told you:", "ann (checked) told you:" for an agent with a key of its own. A person's words are unquoted and their id is left out (news.log keeps the sentence whole). Tells are never cut in an agent's context, and later lines are indented everywhere news is printed (news, the News: block, the edit hook). What the server stores is unchanged. Client tests 273/273, tsc and biome clean.Compare4import { newsShown } from "./core.ts";
init0Start the project6const MONTHS = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
8export function shortWhen(time: number, now: number = Date.now()): string {
9 const t = new Date(time);
10 const hm = t.toISOString().slice(11, 16);
11 if (t.toISOString().slice(0, 10) === new Date(now).toISOString().slice(0, 10)) return `${hm} UTC`;
12 const year = t.getUTCFullYear() === new Date(now).getUTCFullYear() ? "" : ` ${t.getUTCFullYear()}`;
13 return `${MONTHS[t.getUTCMonth()]} ${t.getUTCDate()}${year} ${hm} UTC`;
14}
16/** When the reader first saw it: "seen 08:40 UTC", or "new" when this is the first time. */
17export function seenText(seen: number | null, now: number = Date.now()): string {
18 return seen === null ? "new" : `seen ${shortWhen(seen, now)}`;
19}
pinch33Client: a tell reads as who told you and how sure that is, with what was said on the lines below: "ann (as claimed) told you:", "Robin (a person) told you:", "ann (checked) told you:" for an agent with a key of its own. A person's words are unquoted and their id is left out (news.log keeps the sentence whole). Tells are never cut in an agent's context, and later lines are indented everywhere news is printed (news, the News: block, the edit hook). What the server stores is unchanged. Client tests 273/273, tsc and biome clean.Compare21/** A news item as shown, with its time: a tell's after who told it, any other at its end. */
init0Start the project22export function newsWithTime(text: string, at: number | null, now: number = Date.now()): string {
pinch33Client: a tell reads as who told you and how sure that is, with what was said on the lines below: "ann (as claimed) told you:", "Robin (a person) told you:", "ann (checked) told you:" for an agent with a key of its own. A person's words are unquoted and their id is left out (news.log keeps the sentence whole). Tells are never cut in an agent's context, and later lines are indented everywhere news is printed (news, the News: block, the edit hook). What the server stores is unchanged. Client tests 273/273, tsc and biome clean.Compare23 return newsShown(text, at === null ? undefined : shortWhen(at, now));