claude-opus-4-8-thinking @ max · cursor
cursormax
- config
- claude-opus-4-8-thinking-eff-max--cli--cursor--dev
- batch
- 2026-07-19--unified
- transport
- cursor-agent-cli-isolated-home
- protocol
- cli · plan
- served model
- claude-opus-4-8-thinking-max
- 采集于
- 2026年7月18日 11:54 · N=2
variant
live
slot 0 · P-q · sandboxed iframe

截图是 similarity 通道测量时的原始像素。运行 live 会在 sandboxed iframe 中重新执行原始输出;渲染结果取决于你的浏览器和字体,不保证与测量像素一致。
similarity 邻居
最近
claude-opus-4-8-thinking @xhigh · cursor0.73claude-opus-4-8 @xhigh · kiro0.72claude-opus-4-7-thinking @xhigh · cursor0.71claude-opus-4-8 @max · cursor-xl0.71claude-sonnet-5 @xhigh · cursor-xl0.71最远
grok-4.3 · api0.47grok-4.3 @low · api0.47grok-4.3 @medium · api0.49north-mini-code-free · api0.49deepseek-v4-pro · opencode0.49限于 session 2026-07-19--unified
similarity 衡量本 session 内的趋同程度 —— 不是质量。
Fidelity —— 卡片展示的数据对不对?
- namematch
- conditionmatch
- datematch
- max tempmatch展示值:25
- min tempmatch展示值:16
- hourlyambiguouscoverage · 0 命中 · 0 不符 · 24 未展示
- request sidematch0 处违规
extractor fidelity-extractor-v1+Berlin-2026-07-15
源码 —— 原始模型输出,一字节未改
下载 card.html<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Weather</title>
<style>
:root {
--accent: #9fd0ff;
--from: #243b55;
--to: #3f5c7a;
--ink: #ffffff;
--card-w: 1120px;
--radius: 30px;
--font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji", sans-serif;
}
* { box-sizing: border-box; }
html, body {
margin: 0;
padding: 0;
height: 100%;
background: #1a2a3a;
color: var(--ink);
font-family: var(--font);
-webkit-font-smoothing: antialiased;
text-rendering: optimizeLegibility;
}
.scene {
position: relative;
min-height: 100vh;
width: 100%;
display: flex;
align-items: center;
justify-content: center;
padding: 32px;
overflow: hidden;
}
/* Background layers */
.bg {
position: absolute;
inset: -10%;
z-index: 0;
}
.bg--neutral {
background: linear-gradient(145deg, #243b55 0%, #3f5c7a 100%);
}
.bg--theme {
opacity: 0;
transition: opacity 0.9s ease;
}
.bg--theme.show { opacity: 1; }
.blob {
position: absolute;
z-index: 1;
border-radius: 50%;
filter: blur(60px);
opacity: 0.55;
pointer-events: none;
mix-blend-mode: screen;
}
.blob--1 {
width: 560px; height: 560px;
top: -160px; right: -120px;
background: radial-gradient(circle at center, rgba(255,255,255,0.55), rgba(255,255,255,0) 68%);
animation: drift1 22s ease-in-out infinite;
}
.blob--2 {
width: 480px; height: 480px;
bottom: -180px; left: -100px;
background: radial-gradient(circle at center, var(--accent), rgba(255,255,255,0) 66%);
opacity: 0.28;
animation: drift2 26s ease-in-out infinite;
}
@keyframes drift1 { 0%,100%{transform:translate(0,0)} 50%{transform:translate(-30px,26px)} }
@keyframes drift2 { 0%,100%{transform:translate(0,0)} 50%{transform:translate(34px,-22px)} }
/* Card */
.card {
position: relative;
z-index: 2;
width: 100%;
max-width: var(--card-w);
background: rgba(255, 255, 255, 0.10);
border: 1px solid rgba(255, 255, 255, 0.18);
border-radius: var(--radius);
box-shadow:
0 30px 80px rgba(0, 0, 0, 0.35),
inset 0 1px 0 rgba(255, 255, 255, 0.22);
-webkit-backdrop-filter: blur(26px) saturate(150%);
backdrop-filter: blur(26px) saturate(150%);
padding: 40px 48px 44px;
animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
@keyframes rise {
from { opacity: 0; transform: translateY(22px) scale(0.99); }
to { opacity: 1; transform: none; }
}
/* Top bar */
.top {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 24px;
padding-bottom: 26px;
margin-bottom: 30px;
border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}
.loc { display: flex; align-items: center; gap: 13px; min-width: 0; }
.loc .pin {
flex: none;
width: 34px; height: 34px;
display: grid; place-items: center;
border-radius: 12px;
background: rgba(255,255,255,0.16);
box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
}
.loc .pin svg { width: 18px; height: 18px; }
.loc__name {
font-size: 30px;
font-weight: 700;
letter-spacing: -0.02em;
line-height: 1.1;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 560px;
}
.loc__sub {
font-size: 13px;
font-weight: 500;
color: rgba(255, 255, 255, 0.62);
margin-top: 3px;
letter-spacing: 0.01em;
}
.date { text-align: right; flex: none; }
.date__main {
font-size: 17px;
font-weight: 600;
letter-spacing: -0.01em;
}
.date__tag {
display: inline-block;
margin-top: 8px;
font-size: 11px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.09em;
padding: 5px 11px;
border-radius: 999px;
background: rgba(255, 255, 255, 0.15);
border: 1px solid rgba(255, 255, 255, 0.18);
color: rgba(255, 255, 255, 0.9);
}
/* Content region (swaps between loading / error / data) */
.content { min-height: 430px; }
/* Hero */
.hero {
display: grid;
grid-template-columns: 210px 1fr;
gap: 34px;
align-items: center;
}
.hero__icon {
width: 210px; height: 190px;
display: grid; place-items: center;
position: relative;
}
.hero__icon::after {
content: "";
position: absolute;
inset: 14px;
border-radius: 50%;
background: radial-gradient(circle at 50% 45%, var(--accent), transparent 62%);
opacity: 0.32;
filter: blur(14px);
z-index: -1;
}
.hero__icon svg { width: 190px; height: 175px; overflow: visible; }
.cond {
font-size: 30px;
font-weight: 700;
letter-spacing: -0.02em;
margin-bottom: 20px;
}
.stats {
display: flex;
align-items: flex-end;
gap: 40px;
}
.stat { display: flex; flex-direction: column; }
.stat__k {
font-size: 12px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.11em;
color: rgba(255, 255, 255, 0.62);
margin-bottom: 4px;
}
.stat__v {
font-weight: 300;
line-height: 0.95;
letter-spacing: -0.04em;
font-variant-numeric: tabular-nums;
text-shadow: 0 2px 24px rgba(0, 0, 0, 0.22);
}
.stat--hero .stat__v { font-size: 108px; }
.stat--hero .stat__k { color: rgba(255,255,255,0.78); }
.stat--sub .stat__v { font-size: 52px; color: rgba(255, 255, 255, 0.9); }
.stat__v .deg { color: var(--accent); }
.stat--divider {
align-self: stretch;
width: 1px;
background: linear-gradient(rgba(255,255,255,0), rgba(255,255,255,0.25), rgba(255,255,255,0));
margin: 6px 0;
}
/* Chart */
.chart {
margin-top: 34px;
background: rgba(0, 0, 0, 0.14);
border: 1px solid rgba(255, 255, 255, 0.08);
border-radius: 20px;
padding: 20px 22px 14px;
}
.chart__head {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 6px;
}
.chart__label {
font-size: 12px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.11em;
color: rgba(255, 255, 255, 0.66);
}
.chart__legend {
font-size: 12px;
font-weight: 600;
color: rgba(255, 255, 255, 0.6);
font-variant-numeric: tabular-nums;
}
.chart svg { display: block; width: 100%; height: auto; }
.chart__empty {
height: 210px;
display: grid;
place-items: center;
color: rgba(255, 255, 255, 0.6);
font-size: 15px;
font-weight: 500;
}
/* Loading / error messages */
.msg {
min-height: 430px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
text-align: center;
gap: 6px;
padding: 20px;
}
.msg svg { width: 78px; height: 78px; margin-bottom: 14px; opacity: 0.92; }
.msg__title { font-size: 24px; font-weight: 700; letter-spacing: -0.01em; }
.msg__detail {
font-size: 15px;
font-weight: 500;
color: rgba(255, 255, 255, 0.68);
max-width: 560px;
line-height: 1.5;
}
.msg__detail code {
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
font-size: 13px;
background: rgba(0,0,0,0.22);
padding: 2px 7px;
border-radius: 6px;
}
.spinner {
width: 46px; height: 46px;
border-radius: 50%;
border: 4px solid rgba(255, 255, 255, 0.22);
border-top-color: var(--accent);
animation: spin 0.9s linear infinite;
margin-bottom: 18px;
}
@keyframes spin { to { transform: rotate(360deg); } }
/* ---- Weather icon animations ---- */
.wx-rays { transform-box: fill-box; transform-origin: center; animation: iconspin 20s linear infinite; }
@keyframes iconspin { to { transform: rotate(360deg); } }
.wx-sun-core { transform-box: fill-box; transform-origin: center; animation: sunpulse 4.5s ease-in-out infinite; }
@keyframes sunpulse { 0%,100%{ transform: scale(1); opacity: 1;} 50%{ transform: scale(1.05); opacity: 0.85;} }
.wx-cloud { transform-box: fill-box; transform-origin: center; animation: floaty 6s ease-in-out infinite; }
@keyframes floaty { 0%,100%{ transform: translateY(0);} 50%{ transform: translateY(-6px);} }
.wx-drop { animation: drop 1.5s cubic-bezier(0.55,0,0.9,0.4) infinite; }
@keyframes drop { 0%{ transform: translateY(-4px); opacity: 0;} 25%{ opacity: 1;} 100%{ transform: translateY(30px); opacity: 0;} }
.wx-flake { transform-box: fill-box; transform-origin: center; animation: flake 3s linear infinite; }
@keyframes flake { 0%{ transform: translateY(-4px); opacity: 0;} 20%{ opacity: 1;} 100%{ transform: translateY(34px); opacity: 0;} }
.wx-bolt { animation: flash 3.2s steps(1, end) infinite; }
@keyframes flash { 0%,88%,100%{ opacity: 0.25;} 90%,96%{ opacity: 1;} 93%{ opacity: 0.4;} }
.wx-fog { transform-box: fill-box; transform-origin: center; animation: fogdrift 5.5s ease-in-out infinite; }
@keyframes fogdrift { 0%,100%{ transform: translateX(-5px);} 50%{ transform: translateX(6px);} }
@media (prefers-reduced-motion: reduce) {
*, *::before, *::after { animation: none !important; transition: none !important; }
}
</style>
</head>
<body>
<div class="scene">
<div class="bg bg--neutral"></div>
<div class="bg bg--theme" id="bgTheme"></div>
<div class="blob blob--1"></div>
<div class="blob blob--2"></div>
<main class="card" role="region" aria-label="Weather card">
<div class="top">
<div class="loc">
<span class="pin" aria-hidden="true">
<svg viewBox="0 0 24 24" fill="none"><path d="M12 21s7-6.2 7-11a7 7 0 1 0-14 0c0 4.8 7 11 7 11Z" fill="rgba(255,255,255,0.92)"/><circle cx="12" cy="10" r="2.6" fill="rgba(0,0,0,0.35)"/></svg>
</span>
<div>
<div class="loc__name" id="locName"> </div>
<div class="loc__sub" id="locSub"> </div>
</div>
</div>
<div class="date">
<div class="date__main" id="dateMain"> </div>
<span class="date__tag" id="srcTag" style="visibility:hidden">Forecast</span>
</div>
</div>
<div class="content" id="content"></div>
</main>
</div>
<script>
(function () {
"use strict";
var DEFAULTS = { lat: 52.52, lon: 13.405, name: "Berlin" };
var WEEKDAYS = ["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];
var MONTHS = ["January","February","March","April","May","June","July","August","September","October","November","December"];
var WMO = {
0: { t: "Clear sky", g: "clear" },
1: { t: "Mainly clear", g: "clear" },
2: { t: "Partly cloudy", g: "partly" },
3: { t: "Overcast", g: "cloudy" },
45: { t: "Fog", g: "fog" },
48: { t: "Rime fog", g: "fog" },
51: { t: "Light drizzle", g: "drizzle" },
53: { t: "Drizzle", g: "drizzle" },
55: { t: "Dense drizzle", g: "drizzle" },
56: { t: "Freezing drizzle", g: "sleet" },
57: { t: "Freezing drizzle", g: "sleet" },
61: { t: "Light rain", g: "rain" },
63: { t: "Rain", g: "rain" },
65: { t: "Heavy rain", g: "rain" },
66: { t: "Freezing rain", g: "sleet" },
67: { t: "Freezing rain", g: "sleet" },
71: { t: "Light snow", g: "snow" },
73: { t: "Snow", g: "snow" },
75: { t: "Heavy snow", g: "snow" },
77: { t: "Snow grains", g: "snow" },
80: { t: "Rain showers", g: "rain" },
81: { t: "Rain showers", g: "rain" },
82: { t: "Violent rain showers", g: "rain" },
85: { t: "Snow showers", g: "snow" },
86: { t: "Heavy snow showers", g: "snow" },
95: { t: "Thunderstorm", g: "thunder" },
96: { t: "Thunderstorm, hail", g: "thunder" },
99: { t: "Thunderstorm, hail", g: "thunder" }
};
var THEMES = {
clear: { from: "#1D6FE0", to: "#68A8FF", accent: "#FFD36B", icon: "sun" },
partly: { from: "#3A72CC", to: "#7FB0EF", accent: "#FFD36B", icon: "partly" },
cloudy: { from: "#586A85", to: "#8E9EB8", accent: "#E1EAF7", icon: "cloud" },
fog: { from: "#5E6A7B", to: "#95A2B1", accent: "#E7EDF4", icon: "fog" },
drizzle: { from: "#3C5B79", to: "#6E8DAA", accent: "#A6E1FF", icon: "rain" },
rain: { from: "#2C4A67", to: "#557A9A", accent: "#8FD3FF", icon: "rain" },
sleet: { from: "#43617D", to: "#7E99B0", accent: "#CBEDFF", icon: "sleet" },
snow: { from: "#5A79AA", to: "#A2C2E9", accent: "#F2F8FF", icon: "snow" },
thunder: { from: "#322E52", to: "#5C5583", accent: "#C9BAFF", icon: "thunder" },
neutral: { from: "#243b55", to: "#4E6C8C", accent: "#9FD0FF", icon: "cloud" }
};
var $ = function (id) { return document.getElementById(id); };
// ---- URL params & validation ----
var qs = new URLSearchParams(window.location.search);
function numParam(v, d) {
if (v === null || v === "") return d;
var n = parseFloat(v);
return isFinite(n) ? n : d;
}
function pad2(n) { return (n < 10 ? "0" : "") + n; }
function utcTodayStr() {
var d = new Date();
return d.getUTCFullYear() + "-" + pad2(d.getUTCMonth() + 1) + "-" + pad2(d.getUTCDate());
}
function isValidDateStr(s) {
if (!/^\d{4}-\d{2}-\d{2}$/.test(s)) return false;
var p = s.split("-");
var y = +p[0], m = +p[1], d = +p[2];
var dt = new Date(Date.UTC(y, m - 1, d));
return dt.getUTCFullYear() === y && dt.getUTCMonth() === m - 1 && dt.getUTCDate() === d;
}
var lat = numParam(qs.get("lat"), DEFAULTS.lat);
var lon = numParam(qs.get("lon"), DEFAULTS.lon);
var name = (qs.get("name") || "").trim() || DEFAULTS.name;
var todayStr = utcTodayStr();
var date = qs.get("date");
if (!date || !isValidDateStr(date)) date = todayStr;
var isPast = date < todayStr;
var endpoint = isPast ? "/api/om/archive" : "/api/om/forecast";
// ---- Formatting helpers ----
function fmtDate(s) {
var p = s.split("-");
var dt = new Date(Date.UTC(+p[0], +p[1] - 1, +p[2]));
return WEEKDAYS[dt.getUTCDay()] + ", " + MONTHS[dt.getUTCMonth()] + " " + dt.getUTCDate() + ", " + dt.getUTCFullYear();
}
function deg(v) {
return '<span class="num">' + Math.round(v) + "</span><span class=\"deg\">\u00B0</span>";
}
function hexToRgba(hex, a) {
var h = hex.replace("#", "");
if (h.length === 3) h = h[0] + h[0] + h[1] + h[1] + h[2] + h[2];
var r = parseInt(h.slice(0, 2), 16),
g = parseInt(h.slice(2, 4), 16),
b = parseInt(h.slice(4, 6), 16);
return "rgba(" + r + "," + g + "," + b + "," + a + ")";
}
function esc(s) {
return String(s).replace(/[&<>"']/g, function (c) {
return { "&": "&", "<": "<", ">": ">", '"': """, "'": "'" }[c];
});
}
// ---- Header ----
$("locName").textContent = name;
$("locSub").textContent = lat.toFixed(2) + "\u00B0, " + lon.toFixed(2) + "\u00B0";
$("dateMain").textContent = fmtDate(date);
var srcTag = $("srcTag");
srcTag.textContent = isPast ? "Historical" : "Forecast";
srcTag.style.visibility = "visible";
// ---- Theme application ----
function applyTheme(th) {
var root = document.documentElement;
root.style.setProperty("--accent", th.accent);
root.style.setProperty("--from", th.from);
root.style.setProperty("--to", th.to);
var bg = $("bgTheme");
bg.style.backgroundImage = "linear-gradient(145deg, " + th.from + " 0%, " + th.to + " 100%)";
requestAnimationFrame(function () { bg.classList.add("show"); });
}
applyTheme(THEMES.neutral);
// ---- Weather icons ----
function sunRays(cx, cy, inner, outer) {
var out = "";
for (var i = 0; i < 8; i++) {
var a = (Math.PI / 4) * i;
var x1 = cx + Math.cos(a) * inner, y1 = cy + Math.sin(a) * inner;
var x2 = cx + Math.cos(a) * outer, y2 = cy + Math.sin(a) * outer;
out += '<line x1="' + x1.toFixed(1) + '" y1="' + y1.toFixed(1) + '" x2="' + x2.toFixed(1) + '" y2="' + y2.toFixed(1) + '"/>';
}
return out;
}
function cloud(cx, cy, s, fill) {
return '<g class="wx-cloud" fill="' + fill + '">' +
'<circle cx="' + (cx - 20 * s) + '" cy="' + (cy + 4 * s) + '" r="' + 16 * s + '"/>' +
'<circle cx="' + cx + '" cy="' + (cy - 8 * s) + '" r="' + 21 * s + '"/>' +
'<circle cx="' + (cx + 20 * s) + '" cy="' + (cy + 4 * s) + '" r="' + 15 * s + '"/>' +
'<rect x="' + (cx - 24 * s) + '" y="' + (cy + 2 * s) + '" width="' + 48 * s + '" height="' + 20 * s + '" rx="' + 10 * s + '"/>' +
"</g>";
}
function buildIcon(type, accent) {
var svgO = '<svg viewBox="0 0 130 130" aria-hidden="true">';
var svgC = "</svg>";
if (type === "sun") {
return svgO +
'<g class="wx-rays" stroke="' + accent + '" stroke-width="6" stroke-linecap="round">' +
sunRays(65, 62, 34, 48) + "</g>" +
'<circle class="wx-sun-core" cx="65" cy="62" r="24" fill="' + accent + '"/>' + svgC;
}
if (type === "partly") {
return svgO +
'<g class="wx-rays" stroke="' + accent + '" stroke-width="5" stroke-linecap="round">' +
sunRays(46, 44, 22, 33) + "</g>" +
'<circle class="wx-sun-core" cx="46" cy="44" r="16" fill="' + accent + '"/>' +
cloud(72, 74, 1.05, "#ffffff") + svgC;
}
if (type === "cloud") {
return svgO + cloud(65, 66, 1.25, "#ffffff") + svgC;
}
if (type === "fog") {
var lines = "";
var fy = [96, 108, 120];
for (var i = 0; i < 3; i++) {
lines += '<line class="wx-fog" x1="' + (30 + i * 4) + '" y1="' + fy[i] + '" x2="' + (100 - i * 3) + '" y2="' + fy[i] +
'" stroke="rgba(255,255,255,0.8)" stroke-width="5" stroke-linecap="round" style="animation-delay:' + (i * 0.5) + 's"/>';
}
return svgO + cloud(65, 58, 1.15, "rgba(255,255,255,0.92)") + lines + svgC;
}
if (type === "rain" || type === "drizzle" || type === "sleet") {
var extras = "";
var dropX = [46, 65, 84];
for (var j = 0; j < 3; j++) {
if (type === "sleet" && j === 1) {
extras += '<circle class="wx-flake" cx="' + dropX[j] + '" cy="98" r="4.5" fill="#ffffff" style="animation-delay:' + (j * 0.35) + 's"/>';
} else {
extras += '<line class="wx-drop" x1="' + dropX[j] + '" y1="96" x2="' + (dropX[j] - 3) + '" y2="108" stroke="' + accent +
'" stroke-width="4.5" stroke-linecap="round" style="animation-delay:' + (j * 0.35) + 's"/>';
}
}
return svgO + cloud(65, 60, 1.15, "#ffffff") + extras + svgC;
}
if (type === "snow") {
var flakes = "";
var fx = [46, 65, 84];
for (var k = 0; k < 3; k++) {
flakes += '<circle class="wx-flake" cx="' + fx[k] + '" cy="98" r="5" fill="#ffffff" style="animation-delay:' + (k * 0.5) + 's"/>';
}
return svgO + cloud(65, 60, 1.15, "#ffffff") + flakes + svgC;
}
if (type === "thunder") {
return svgO + cloud(65, 58, 1.15, "rgba(255,255,255,0.94)") +
'<path class="wx-bolt" d="M64 90 L52 114 L62 114 L56 130 L80 102 L68 102 L76 90 Z" fill="#FFD36B" stroke="rgba(0,0,0,0.15)" stroke-width="1"/>' +
svgC;
}
return svgO + cloud(65, 66, 1.25, "#ffffff") + svgC;
}
// ---- Smooth path (cardinal spline) ----
function smoothPath(pts) {
if (!pts.length) return "";
if (pts.length === 1) return "M" + pts[0].x + "," + pts[0].y;
var t = 0.16;
var d = "M" + pts[0].x.toFixed(2) + "," + pts[0].y.toFixed(2);
for (var i = 0; i < pts.length - 1; i++) {
var p0 = pts[i - 1] || pts[i];
var p1 = pts[i];
var p2 = pts[i + 1];
var p3 = pts[i + 2] || p2;
var c1x = p1.x + (p2.x - p0.x) * t;
var c1y = p1.y + (p2.y - p0.y) * t;
var c2x = p2.x - (p3.x - p1.x) * t;
var c2y = p2.y - (p3.y - p1.y) * t;
d += " C" + c1x.toFixed(2) + "," + c1y.toFixed(2) + " " + c2x.toFixed(2) + "," + c2y.toFixed(2) + " " + p2.x.toFixed(2) + "," + p2.y.toFixed(2);
}
return d;
}
// ---- Hourly chart ----
function buildChart(times, temps, accent) {
var vals = [];
for (var i = 0; i < temps.length; i++) {
var v = temps[i];
vals.push(typeof v === "number" && isFinite(v) ? v : null);
}
var finite = vals.filter(function (v) { return v !== null; });
if (finite.length < 2) {
return '<div class="chart__empty">Hourly data unavailable</div>';
}
var W = 1000, H = 250;
var padL = 26, padR = 26, padT = 42, padB = 46;
var n = vals.length;
var lo = Math.min.apply(null, finite);
var hi = Math.max.apply(null, finite);
var range = hi - lo;
var padY = Math.max(1.5, range * 0.18);
var loB = lo - padY, hiB = hi + padY;
function xAt(i) { return padL + (i / (n - 1)) * (W - padL - padR); }
function yAt(v) { return padT + (1 - (v - loB) / (hiB - loB)) * (H - padT - padB); }
var pts = [];
for (var a = 0; a < n; a++) {
if (vals[a] !== null) pts.push({ x: xAt(a), y: yAt(vals[a]), v: vals[a], i: a });
}
var baseline = H - padB;
var line = smoothPath(pts);
var area = line + " L" + pts[pts.length - 1].x.toFixed(2) + "," + baseline + " L" + pts[0].x.toFixed(2) + "," + baseline + " Z";
// gridlines
var grid = "";
for (var g = 0; g <= 3; g++) {
var gy = padT + (g / 3) * (H - padT - padB);
grid += '<line x1="' + padL + '" y1="' + gy.toFixed(1) + '" x2="' + (W - padR) + '" y2="' + gy.toFixed(1) +
'" stroke="rgba(255,255,255,0.10)" stroke-width="1"/>';
}
// hour extraction
function hourAt(i) {
var tt = times && times[i];
if (typeof tt === "string" && tt.length >= 13) return tt.slice(11, 13);
return pad2(i % 24);
}
// x labels + faint ticks at every 3h
var xlabels = "", ticks = "";
for (var b = 0; b < n; b++) {
var hh = hourAt(b);
if (+hh % 3 === 0) {
var xx = xAt(b);
xlabels += '<text x="' + xx.toFixed(1) + '" y="' + (H - 14) + '" text-anchor="middle" fill="rgba(255,255,255,0.65)" font-size="13" font-weight="600">' + hh + '</text>';
if (vals[b] !== null) {
ticks += '<circle cx="' + xx.toFixed(1) + '" cy="' + yAt(vals[b]).toFixed(1) + '" r="2.6" fill="rgba(255,255,255,0.55)"/>';
}
}
}
// max / min markers
var maxP = pts[0], minP = pts[0];
for (var m = 1; m < pts.length; m++) {
if (pts[m].v > maxP.v) maxP = pts[m];
if (pts[m].v < minP.v) minP = pts[m];
}
function marker(p, label, above) {
var ly = above ? p.y - 14 : p.y + 24;
return '<circle cx="' + p.x.toFixed(1) + '" cy="' + p.y.toFixed(1) + '" r="5.5" fill="' + accent + '" stroke="#fff" stroke-width="2"/>' +
'<text x="' + p.x.toFixed(1) + '" y="' + ly.toFixed(1) + '" text-anchor="middle" fill="#fff" font-size="14" font-weight="700" ' +
'style="paint-order:stroke;stroke:rgba(0,0,0,0.28);stroke-width:3px;stroke-linejoin:round">' + label + "</text>";
}
var markers = marker(maxP, Math.round(maxP.v) + "\u00B0", true);
if (minP.i !== maxP.i) markers += marker(minP, Math.round(minP.v) + "\u00B0", false);
var svg =
'<svg viewBox="0 0 ' + W + " " + H + '" preserveAspectRatio="none" role="img" aria-label="Hourly temperature chart">' +
'<defs><linearGradient id="areaGrad" x1="0" y1="0" x2="0" y2="1">' +
'<stop offset="0%" stop-color="' + hexToRgba(accent, 0.45) + '"/>' +
'<stop offset="100%" stop-color="' + hexToRgba(accent, 0.02) + '"/>' +
"</linearGradient></defs>" +
grid +
'<path d="' + area + '" fill="url(#areaGrad)"/>' +
'<path d="' + line + '" fill="none" stroke="' + accent + '" stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round"/>' +
ticks + xlabels + markers +
"</svg>";
return svg;
}
// ---- Renderers ----
function renderLoading() {
$("content").innerHTML =
'<div class="msg"><div class="spinner"></div><div class="msg__title">Loading weather\u2026</div>' +
'<div class="msg__detail">Fetching conditions for ' + esc(name) + "</div></div>";
}
function renderError(detail) {
var icon =
'<svg viewBox="0 0 24 24" fill="none" aria-hidden="true">' +
'<path d="M7 18a4 4 0 0 1 0-8 5.5 5.5 0 0 1 10.6-1.3A3.8 3.8 0 0 1 18 18H7Z" stroke="rgba(255,255,255,0.9)" stroke-width="1.5" stroke-linejoin="round"/>' +
'<line x1="4" y1="3.5" x2="20.5" y2="20.5" stroke="rgba(255,255,255,0.9)" stroke-width="1.6" stroke-linecap="round"/></svg>';
$("content").innerHTML =
'<div class="msg">' + icon +
'<div class="msg__title">Weather data couldn\u2019t be loaded</div>' +
'<div class="msg__detail">' + detail + "</div></div>";
}
function renderData(model) {
var th = model.theme;
var avgTxt = model.avg !== null ? deg(model.avg) : "—";
var html =
'<div class="hero">' +
'<div class="hero__icon">' + buildIcon(th.icon, th.accent) + "</div>" +
'<div class="hero__body">' +
'<div class="cond">' + esc(model.cond) + "</div>" +
'<div class="stats">' +
'<div class="stat stat--hero"><div class="stat__k">High</div><div class="stat__v">' + deg(model.max) + "</div></div>" +
'<div class="stat--divider"></div>' +
'<div class="stat stat--sub"><div class="stat__k">Low</div><div class="stat__v">' + deg(model.min) + "</div></div>" +
'<div class="stat stat--sub"><div class="stat__k">Average</div><div class="stat__v">' + avgTxt + "</div></div>" +
"</div>" +
"</div>" +
"</div>" +
'<div class="chart">' +
'<div class="chart__head">' +
'<div class="chart__label">Hourly temperature</div>' +
'<div class="chart__legend">' + esc(date) + " \u00B7 UTC</div>" +
"</div>" +
buildChart(model.times, model.temps, th.accent) +
"</div>";
$("content").innerHTML = html;
}
// ---- Fetch ----
function buildUrl() {
var p = new URLSearchParams();
p.set("latitude", String(lat));
p.set("longitude", String(lon));
p.set("daily", "temperature_2m_max,temperature_2m_min,weather_code");
p.set("hourly", "temperature_2m");
p.set("timezone", "UTC");
p.set("temperature_unit", "celsius");
p.set("start_date", date);
p.set("end_date", date);
return endpoint + "?" + p.toString();
}
function firstNum(arr) {
if (!Array.isArray(arr) || !arr.length) return null;
var v = arr[0];
return typeof v === "number" && isFinite(v) ? v : null;
}
function load() {
renderLoading();
var url = buildUrl();
var controller = ("AbortController" in window) ? new AbortController() : null;
var timer = setTimeout(function () { if (controller) controller.abort(); }, 12000);
fetch(url, controller ? { signal: controller.signal } : undefined)
.then(function (res) {
clearTimeout(timer);
if (!res.ok) throw new Error("The weather service returned status " + res.status + ".");
return res.json();
})
.then(function (data) {
if (!data || typeof data !== "object") throw new Error("The response was not valid weather data.");
if (data.error) throw new Error(data.reason ? String(data.reason) : "The weather service reported an error.");
var daily = data.daily || {};
var hourly = data.hourly || {};
var tmax = firstNum(daily.temperature_2m_max);
var tmin = firstNum(daily.temperature_2m_min);
var code = firstNum(daily.weather_code);
var times = Array.isArray(hourly.time) ? hourly.time : [];
var temps = Array.isArray(hourly.temperature_2m) ? hourly.temperature_2m : [];
if (tmax === null && tmin === null && !temps.length) {
throw new Error("No weather data is available for this date and location.");
}
var finite = temps.filter(function (v) { return typeof v === "number" && isFinite(v); });
var avg = finite.length
? finite.reduce(function (s, v) { return s + v; }, 0) / finite.length
: (tmax !== null && tmin !== null ? (tmax + tmin) / 2 : null);
var info = (code !== null && WMO[code]) ? WMO[code] : null;
var theme = THEMES[info ? info.g : "neutral"] || THEMES.neutral;
var cond = info ? info.t : "Conditions unavailable";
applyTheme(theme);
renderData({
theme: theme,
cond: cond,
max: tmax !== null ? tmax : hi(finite),
min: tmin !== null ? tmin : loOf(finite),
avg: avg !== null ? Math.round(avg) : null,
times: times,
temps: temps
});
})
.catch(function (err) {
clearTimeout(timer);
var msg;
if (err && err.name === "AbortError") {
msg = "The request timed out. Please check your connection and try again.";
} else if (err instanceof TypeError) {
msg = "The weather service could not be reached at <code>" + esc(endpoint) + "</code>.";
} else {
msg = esc(err && err.message ? err.message : "An unexpected error occurred.");
}
renderError(msg);
});
}
function hi(a) { return a.length ? Math.max.apply(null, a) : 0; }
function loOf(a) { return a.length ? Math.min.apply(null, a) : 0; }
load();
})();
</script>
</body>
</html>L1 —— 廉价的确定性描述量
| bytes 总计 | 29,241 | html / css / js | 1,237 / 9,040 / 18,964 |
|---|---|---|---|
| dom 节点 | 27 | dom 深度 | 8 |
| css 规则 | 91 | 含 js | 是 |
| brightness | 120.6 | contrast | 19.2 |
| colorfulness | 30.1 | 留白 | 51.5% |
该 slot 的 telemetry
| prompt tokens | 74 | completion tokens | 59,039 |
|---|---|---|---|
| total tokens | 59,113 | wall | 1,112.9 s |
| cost | — | request id | — |
config.json608 B
{
"N": 2,
"auth": {
"credential_ref": "WCB_NONE",
"method": "oauth-login"
},
"billing": "plan",
"config_id": "claude-opus-4-8-thinking-eff-max--cli--cursor--dev",
"effort": "max",
"family": "claude",
"m": {
"min": 2,
"q": 2
},
"model_id": "claude-opus-4-8-thinking",
"protocol": "cli",
"served_model": "claude-opus-4-8-thinking-max",
"telemetry": {
"completion_tokens": 198839,
"cost_usd": null,
"prompt_tokens": 156,
"total_tokens": 198995,
"wall_ms": 2984275
},
"transport": "cursor-agent-cli-isolated-home",
"vendor_sanction_ref": null
}send-log2.5 KB
{
"N": 2,
"batch_id": "2026-08-13--cursor-s1",
"config_id": "claude-opus-4-8-thinking-eff-max--cli--cursor--dev",
"positions": [
{
"attempts": [
{
"attempt_index": 0,
"backoff_ms": null,
"charged": true,
"ended_at": "2026-08-12T20:22:59.548259+00:00",
"http_status": null,
"outcome": "valid",
"reached_model": true,
"reason": "ok",
"request_id": null,
"started_at": "2026-08-12T20:04:26.657368+00:00"
}
],
"block_index": 0,
"model_reaching_attempt_index": 0,
"slot_index": 0,
"terminal_state": "valid",
"variant": "P-q"
},
{
"attempts": [
{
"attempt_index": 0,
"backoff_ms": null,
"charged": true,
"ended_at": "2026-08-12T20:27:30.283091+00:00",
"http_status": null,
"outcome": "valid",
"reached_model": true,
"reason": "ok",
"request_id": null,
"started_at": "2026-08-12T20:23:02.962476+00:00"
}
],
"block_index": 0,
"model_reaching_attempt_index": 0,
"slot_index": 0,
"terminal_state": "valid",
"variant": "P-min"
},
{
"attempts": [
{
"attempt_index": 0,
"backoff_ms": null,
"charged": true,
"ended_at": "2026-08-12T20:42:21.708130+00:00",
"http_status": null,
"outcome": "valid",
"reached_model": true,
"reason": "ok",
"request_id": null,
"started_at": "2026-08-12T20:27:33.148024+00:00"
}
],
"block_index": 1,
"model_reaching_attempt_index": 0,
"slot_index": 1,
"terminal_state": "valid",
"variant": "P-min"
},
{
"attempts": [
{
"attempt_index": 0,
"backoff_ms": null,
"charged": true,
"ended_at": "2026-08-12T20:54:20.505821+00:00",
"http_status": null,
"outcome": "valid",
"reached_model": true,
"reason": "ok",
"request_id": null,
"started_at": "2026-08-12T20:42:24.982765+00:00"
}
],
"block_index": 1,
"model_reaching_attempt_index": 0,
"slot_index": 1,
"terminal_state": "valid",
"variant": "P-q"
}
],
"retry_policy": {
"max_unreachable_retries": 5,
"rate_limit_backoff": {
"max_attempts": 4,
"max_total_ms": 60000
}
}
}