feat : add click on engine lines

This commit is contained in:
GuillaumeSD
2025-05-11 18:21:45 +02:00
parent 74a2adbb7d
commit 6535fce2f4
22 changed files with 285 additions and 156 deletions

View File

@@ -7,6 +7,7 @@ import {
LichessResponse,
} from "@/types/lichess";
import { logErrorToSentry } from "./sentry";
import { formatUciPv } from "./chess";
export const getLichessEval = async (
fen: string,
@@ -26,7 +27,7 @@ export const getLichessEval = async (
}
const lines: LineEval[] = data.pvs.map((pv, index) => ({
pv: pv.moves.split(" "),
pv: formatUciPv(fen, pv.moves.split(" ")),
cp: pv.cp,
mate: pv.mate,
depth: data.depth,