e76d88e0c7
Import the existing Electron + React + TypeScript app as the version-control baseline before the scanner rework (C# input/capture sidecar, resolution-anchored layout profiles, OCR preprocessing, eval harness, rescan-merge, GOOD interop). Housekeeping in this commit: - Remove orphaned temp_inputhelper_block.ts (duplicate of the input-helper script). - Ignore .claude/scheduled_tasks.lock local session state. - Add .gitattributes to normalize line endings (LF in repo). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
18 lines
704 B
TypeScript
18 lines
704 B
TypeScript
import type { AppSnapshot, ArtifactVerdict } from "../types/domain";
|
|
|
|
export function summarizeSnapshot(snapshot: AppSnapshot) {
|
|
const useful = snapshot.recommendations.filter((entry: { verdict: ArtifactVerdict }) =>
|
|
["keep", "character_specific", "maybe_level"].includes(entry.verdict),
|
|
).length;
|
|
const trash = snapshot.recommendations.filter((entry: { verdict: ArtifactVerdict }) => entry.verdict === "trash_candidate").length;
|
|
const review = snapshot.recommendations.filter((entry: { verdict: ArtifactVerdict }) => entry.verdict === "needs_review").length;
|
|
|
|
return {
|
|
artifacts: snapshot.artifacts.length,
|
|
useful,
|
|
trash,
|
|
review,
|
|
builds: snapshot.builds.length,
|
|
};
|
|
}
|