Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。
TypeScript agentai-agentai-assistantandroidclaude-codecodexelectroniosllmmacosreact-nativetypescriptwindows
import { readFileSync } from 'node:fs';
import { snapshotPath } from './paths.ts';
export interface SnapshotColor {
id: string;
light: string | null;
dark: string | null;
}
export interface ColorDefaultsSnapshot {
source: string;
count: number;
colors: SnapshotColor[];
}
export function readSnapshot(repoRoot?: string): ColorDefaultsSnapshot {
return JSON.parse(readFileSync(snapshotPath(repoRoot), 'utf8')) as ColorDefaultsSnapshot;
}
export function snapshotById(
snapshot: ColorDefaultsSnapshot,
): Map<string, SnapshotColor> {
return new Map(snapshot.colors.map((entry) => [entry.id, entry]));
}