gpt-5.1 @ high · cursor
cursorhigh
- config
- gpt-5.1-eff-high--cli--cursor--dev
- batch
- 2026-07-19--unified
- transport
- cursor-agent-cli-isolated-home
- protocol
- cli · plan
- served model
- gpt-5.1-high
- 采集于
- 2026年7月18日 11:54 · N=2
variant
live
slot 0 · P-q · sandboxed iframe

截图是 similarity 通道测量时的原始像素。运行 live 会在 sandboxed iframe 中重新执行原始输出;渲染结果取决于你的浏览器和字体,不保证与测量像素一致。
similarity 邻居本 session 没有 similarity 数据 —— 这个 batch 没有计算 pairs。
Fidelity —— 卡片展示的数据对不对?
- namematch
- conditionmatch
- datematch
- max tempmismatch展示值:19.7
- min tempmismatch展示值:20.3
- hourlymismatchcoverage 22/24 · 22 命中 · 2 不符 · 0 未展示
- request sidematch0 处违规
extractor fidelity-extractor-v1+Berlin-2026-07-15
源码 —— 原始模型输出,一字节未改
下载 card.html<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Weather Card</title>
<meta name="viewport" content="width=1280, height=800, initial-scale=1.0">
<meta name="color-scheme" content="dark light">
<style>
:root {
--bg-gradient-start: #0f172a;
--bg-gradient-mid: #1e293b;
--bg-gradient-end: #020617;
--accent: #38bdf8;
--accent-soft: rgba(56, 189, 248, 0.12);
--accent-strong: rgba(56, 189, 248, 0.45);
--card-bg: rgba(15, 23, 42, 0.92);
--card-border: rgba(148, 163, 184, 0.55);
--card-shadow: 0 22px 40px rgba(15, 23, 42, 0.75);
--text-main: #e5e7eb;
--text-soft: #9ca3af;
--text-subtle: #6b7280;
--chip-bg: rgba(15, 23, 42, 0.8);
--chip-border: rgba(156, 163, 175, 0.6);
--chart-bg: radial-gradient(circle at top, rgba(56, 189, 248, 0.18), transparent 60%);
--error: #fb7185;
--success: #22c55e;
}
* {
box-sizing: border-box;
}
body {
margin: 0;
min-height: 100vh;
font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
background:
radial-gradient(circle at top left, #0ea5e9 0, transparent 45%),
radial-gradient(circle at bottom right, #6366f1 0, transparent 50%),
linear-gradient(135deg, var(--bg-gradient-start), var(--bg-gradient-mid), var(--bg-gradient-end));
color: var(--text-main);
display: flex;
align-items: center;
justify-content: center;
padding: 32px;
}
.container {
width: 100%;
max-width: 960px;
animation: fadeIn 600ms ease-out;
}
.card {
background: radial-gradient(circle at top left, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.96)) padding-box;
border-radius: 24px;
border: 1px solid var(--card-border);
box-shadow: var(--card-shadow);
padding: 28px 28px 26px;
display: grid;
grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
gap: 24px;
position: relative;
overflow: hidden;
backdrop-filter: blur(18px) saturate(140%);
}
.card::before {
content: "";
position: absolute;
inset: -2px;
border-radius: inherit;
background: conic-gradient(from 210deg, rgba(56, 189, 248, 0.2), transparent 18%, transparent 62%, rgba(96, 165, 250, 0.28), transparent 84%, rgba(56, 189, 248, 0.24));
opacity: 0.75;
mix-blend-mode: screen;
pointer-events: none;
z-index: -1;
}
.card::after {
content: "";
position: absolute;
inset: 1px;
border-radius: inherit;
background: linear-gradient(145deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.98));
z-index: -1;
}
.left-pane,
.right-pane {
display: flex;
flex-direction: column;
gap: 18px;
}
.header-row {
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
}
.location-block {
display: flex;
flex-direction: column;
gap: 3px;
min-width: 0;
}
.location-name {
font-size: 22px;
font-weight: 600;
letter-spacing: 0.02em;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.secondary-line {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 10px;
font-size: 12px;
color: var(--text-soft);
}
.tag {
padding: 2px 8px;
border-radius: 999px;
border: 1px solid rgba(148, 163, 184, 0.4);
background: radial-gradient(circle at top, rgba(148, 163, 184, 0.16), rgba(15, 23, 42, 0.8));
display: inline-flex;
align-items: center;
gap: 6px;
white-space: nowrap;
}
.tag-dot {
width: 6px;
height: 6px;
border-radius: 999px;
background: var(--accent);
box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.28);
}
.date-text {
font-variant-numeric: tabular-nums;
}
.coords {
font-variant-numeric: tabular-nums;
opacity: 0.9;
}
.status-pill {
padding: 4px 10px;
border-radius: 999px;
font-size: 11px;
text-transform: uppercase;
letter-spacing: 0.09em;
border: 1px solid rgba(148, 163, 184, 0.4);
background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.76));
display: inline-flex;
align-items: center;
gap: 6px;
color: var(--text-soft);
}
.status-pill-dot {
width: 7px;
height: 7px;
border-radius: 999px;
background: radial-gradient(circle, var(--accent), rgba(56, 189, 248, 0.1));
box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.18);
animation: pulse 1800ms ease-out infinite;
}
.status-pill.error .status-pill-dot {
background: radial-gradient(circle, var(--error), rgba(248, 113, 113, 0.1));
box-shadow: 0 0 0 4px rgba(248, 113, 113, 0.25);
animation: none;
}
.status-text {
margin-top: 4px;
font-size: 12px;
color: var(--text-subtle);
min-height: 16px;
}
.hero-row {
display: flex;
align-items: flex-end;
justify-content: space-between;
gap: 20px;
margin-top: 8px;
}
.temperature-block {
display: flex;
flex-direction: column;
gap: 8px;
}
.current-temp {
font-size: 54px;
font-weight: 700;
line-height: 1;
letter-spacing: -0.04em;
display: flex;
align-items: baseline;
gap: 4px;
}
.current-temp span.unit {
font-size: 22px;
font-weight: 500;
color: var(--text-soft);
letter-spacing: 0;
transform: translateY(-3px);
}
.minmax-row {
display: flex;
gap: 10px;
font-size: 13px;
}
.minmax-chip {
padding: 5px 10px 6px;
border-radius: 999px;
border: 1px solid var(--chip-border);
background: linear-gradient(135deg, var(--chip-bg), rgba(15, 23, 42, 0.92));
display: inline-flex;
align-items: baseline;
gap: 6px;
color: var(--text-soft);
}
.minmax-chip span.value {
font-variant-numeric: tabular-nums;
color: var(--text-main);
font-weight: 500;
}
.minmax-chip span.label {
text-transform: uppercase;
letter-spacing: 0.12em;
font-size: 10px;
opacity: 0.9;
}
.meta-row {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 10px;
margin-top: 8px;
font-size: 12px;
color: var(--text-soft);
}
.condition {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 3px 8px;
border-radius: 999px;
background: linear-gradient(135deg, rgba(56, 189, 248, 0.22), rgba(56, 189, 248, 0.02));
color: #e0f2fe;
border: 1px solid rgba(56, 189, 248, 0.45);
}
.condition-label {
text-transform: uppercase;
letter-spacing: 0.14em;
font-size: 10px;
opacity: 0.9;
}
.condition-text {
font-size: 12px;
letter-spacing: 0.02em;
}
.api-source {
opacity: 0.85;
}
.divider {
height: 1px;
background: linear-gradient(to right, rgba(148, 163, 184, 0.3), rgba(15, 23, 42, 0), rgba(148, 163, 184, 0.28));
margin: 4px 0 2px;
}
.weather-icon-wrapper {
width: 96px;
height: 96px;
border-radius: 24px;
background: radial-gradient(circle at 30% 20%, rgba(248, 250, 252, 0.16), transparent 60%), radial-gradient(circle at 80% 110%, rgba(56, 189, 248, 0.55), rgba(56, 189, 248, 0.06));
border: 1px solid rgba(148, 163, 184, 0.4);
box-shadow: 0 18px 36px rgba(15, 23, 42, 0.9);
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
}
.weather-icon {
width: 80px;
height: 80px;
}
.summary-row {
display: flex;
flex-wrap: wrap;
gap: 10px;
margin-top: 10px;
font-size: 12px;
color: var(--text-subtle);
}
.summary-item {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 4px 8px;
border-radius: 999px;
background: rgba(15, 23, 42, 0.85);
border: 1px solid rgba(55, 65, 81, 0.9);
}
.summary-item span.value {
font-variant-numeric: tabular-nums;
color: var(--text-main);
}
.section-title-row {
display: flex;
align-items: baseline;
justify-content: space-between;
gap: 10px;
margin-bottom: 4px;
}
.section-title {
font-size: 13px;
font-weight: 600;
letter-spacing: 0.12em;
text-transform: uppercase;
color: var(--text-soft);
}
.section-subtitle {
font-size: 11px;
color: var(--text-subtle);
}
.hourly-panel {
position: relative;
padding: 14px 14px 10px;
border-radius: 18px;
border: 1px solid rgba(31, 41, 55, 0.9);
background:
var(--chart-bg),
radial-gradient(circle at bottom, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.98));
box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.9);
display: flex;
flex-direction: column;
gap: 10px;
}
.hourly-strip {
display: flex;
gap: 8px;
overflow-x: auto;
padding-bottom: 4px;
scrollbar-width: thin;
scrollbar-color: rgba(148, 163, 184, 0.7) rgba(15, 23, 42, 0.2);
}
.hourly-strip::-webkit-scrollbar {
height: 6px;
}
.hourly-strip::-webkit-scrollbar-track {
background: rgba(15, 23, 42, 0.3);
border-radius: 999px;
}
.hourly-strip::-webkit-scrollbar-thumb {
background: rgba(148, 163, 184, 0.85);
border-radius: 999px;
}
.hour-pill {
min-width: 72px;
padding: 7px 9px 8px;
border-radius: 16px;
background: rgba(15, 23, 42, 0.9);
border: 1px solid rgba(31, 41, 55, 0.95);
display: flex;
flex-direction: column;
gap: 2px;
font-size: 11px;
color: var(--text-soft);
position: relative;
}
.hour-pill::before {
content: "";
position: absolute;
inset: 0;
border-radius: inherit;
background: linear-gradient(135deg, rgba(56, 189, 248, 0.18), transparent 48%, rgba(56, 189, 248, 0.1));
opacity: 0;
transition: opacity 120ms ease-out;
pointer-events: none;
}
.hour-pill.highlight::before {
opacity: 1;
}
.hour-pill-time {
font-variant-numeric: tabular-nums;
letter-spacing: 0.08em;
text-transform: uppercase;
opacity: 0.9;
}
.hour-pill-temp {
font-size: 13px;
font-variant-numeric: tabular-nums;
color: var(--text-main);
font-weight: 500;
}
.hour-pill-bar {
margin-top: 3px;
height: 4px;
border-radius: 999px;
background: rgba(30, 64, 175, 0.7);
overflow: hidden;
position: relative;
}
.hour-pill-bar-fill {
position: absolute;
inset: 0;
border-radius: inherit;
background: linear-gradient(90deg, rgba(56, 189, 248, 0.2), rgba(56, 189, 248, 0.9));
transform-origin: left center;
}
.hourly-footer {
display: flex;
align-items: center;
justify-content: space-between;
gap: 10px;
font-size: 11px;
color: var(--text-subtle);
}
.legend {
display: flex;
flex-wrap: wrap;
gap: 6px;
align-items: center;
}
.legend-item {
display: inline-flex;
align-items: center;
gap: 5px;
}
.legend-swatch {
width: 18px;
height: 4px;
border-radius: 999px;
background: linear-gradient(90deg, rgba(56, 189, 248, 0.25), rgba(56, 189, 248, 0.85));
}
.legend-label {
opacity: 0.9;
}
.range-labels {
display: flex;
align-items: center;
gap: 8px;
font-variant-numeric: tabular-nums;
}
.range-labels span.value {
color: var(--text-main);
}
.range-labels span.separator {
opacity: 0.4;
}
.error-note {
color: var(--error);
}
.error-state .card {
border-color: rgba(248, 113, 113, 0.8);
}
.error-state .status-pill {
border-color: rgba(248, 113, 113, 0.6);
color: #fecaca;
}
.error-state .status-pill-dot {
background: radial-gradient(circle, var(--error), rgba(248, 113, 113, 0.08));
box-shadow: 0 0 0 4px rgba(248, 113, 113, 0.25);
animation: none;
}
.subtle-label {
font-size: 10px;
text-transform: uppercase;
letter-spacing: 0.16em;
color: var(--text-subtle);
}
@media (max-width: 960px) {
body {
padding: 20px;
}
.card {
grid-template-columns: minmax(0, 1fr);
}
.weather-icon-wrapper {
width: 88px;
height: 88px;
}
}
@keyframes fadeIn {
from {
opacity: 0;
transform: translateY(10px) scale(0.99);
}
to {
opacity: 1;
transform: translateY(0) scale(1);
}
}
@keyframes pulse {
0% {
transform: scale(1);
opacity: 1;
}
60% {
transform: scale(1.14);
opacity: 0.45;
}
100% {
transform: scale(1);
opacity: 1;
}
}
</style>
</head>
<body>
<div class="container">
<main class="card" aria-live="polite">
<section class="left-pane">
<div class="header-row">
<div class="location-block">
<div class="location-name" id="location-name">—</div>
<div class="secondary-line">
<div class="tag" aria-label="Requested date in UTC">
<span class="tag-dot"></span>
<span class="date-text" id="date-label">—</span>
</div>
<span class="coords" id="coordinates-label">Lat — • Lon —</span>
</div>
</div>
<div class="status-pill" id="status-pill">
<span class="status-pill-dot"></span>
<span id="status-pill-text">Loading</span>
</div>
</div>
<div class="status-text" id="status-text"></div>
<div class="divider"></div>
<div class="hero-row">
<div class="temperature-block">
<div class="current-temp">
<span id="hero-temp">—</span>
<span class="unit">°C</span>
</div>
<div class="minmax-row">
<div class="minmax-chip" aria-label="Maximum temperature">
<span class="label">Max</span>
<span class="value" id="max-temp">—</span>
<span class="unit">°C</span>
</div>
<div class="minmax-chip" aria-label="Minimum temperature">
<span class="label">Min</span>
<span class="value" id="min-temp">—</span>
<span class="unit">°C</span>
</div>
</div>
<div class="meta-row">
<div class="condition" id="condition-chip" aria-label="Weather condition">
<span class="condition-label">Condition</span>
<span class="condition-text" id="weather-description">—</span>
</div>
<span class="api-source" id="api-source">—</span>
</div>
</div>
<div class="weather-icon-wrapper" aria-hidden="true">
<div class="weather-icon" id="weather-icon"></div>
</div>
</div>
<div class="summary-row">
<div class="summary-item">
<span class="subtle-label">Daily Range</span>
<span class="value" id="summary-range">—</span>
</div>
<div class="summary-item">
<span class="subtle-label">Hours Loaded</span>
<span class="value" id="summary-hours">—</span>
</div>
<div class="summary-item">
<span class="subtle-label">Scale</span>
<span class="value">Celsius</span>
</div>
</div>
</section>
<section class="right-pane" aria-label="Hourly temperatures">
<div class="section-title-row">
<div>
<div class="section-title">Hourly Temperatures</div>
<div class="section-subtitle">UTC for the requested date</div>
</div>
<div class="section-subtitle" id="hourly-date-label"></div>
</div>
<div class="hourly-panel">
<div class="hourly-strip" id="hourly-strip">
<!-- Hour chips injected here -->
</div>
<div class="hourly-footer">
<div class="legend">
<div class="legend-item">
<div class="legend-swatch"></div>
<span class="legend-label">Warmer hours extend further</span>
</div>
</div>
<div class="range-labels">
<span>Hourly min</span>
<span class="separator">•</span>
<span class="value" id="hourly-min">—</span>
<span>°C</span>
<span class="separator">/</span>
<span>max</span>
<span class="separator">•</span>
<span class="value" id="hourly-max">—</span>
<span>°C</span>
</div>
</div>
<div class="status-text error-note" id="hourly-status"></div>
</div>
<div class="section-subtitle" style="margin-top: 6px;">
The card uses an Open‑Meteo compatible same‑origin API. If data cannot be loaded, the message above will let you know.
</div>
</section>
</main>
</div>
<script>
(function () {
function getQueryParam(name, defaultValue) {
try {
var params = new URLSearchParams(window.location.search || "");
var value = params.get(name);
if (value === null || String(value).trim() === "") {
return defaultValue;
}
return value;
} catch (e) {
return defaultValue;
}
}
function todayUtcIsoDate() {
return new Date().toISOString().slice(0, 10);
}
function isPastDate(dateStrIso) {
var today = todayUtcIsoDate();
return dateStrIso < today;
}
function formatDateUtc(dateStrIso) {
try {
var date = new Date(dateStrIso + "T00:00:00Z");
if (isNaN(date.getTime())) return dateStrIso;
return new Intl.DateTimeFormat("en-GB", {
weekday: "short",
day: "2-digit",
month: "short",
year: "numeric",
timeZone: "UTC"
}).format(date);
} catch (e) {
return dateStrIso;
}
}
function clamp(val, min, max) {
return Math.min(max, Math.max(min, val));
}
function roundToOneDecimal(value) {
if (typeof value !== "number" || !isFinite(value)) return NaN;
return Math.round(value * 10) / 10;
}
function describeWeather(code) {
var numeric = Number(code);
if (!isFinite(numeric)) return "Unknown conditions";
var map = {
0: "Clear sky",
1: "Mainly clear",
2: "Partly cloudy",
3: "Overcast",
45: "Foggy",
48: "Depositing rime fog",
51: "Light drizzle",
53: "Moderate drizzle",
55: "Dense drizzle",
56: "Light freezing drizzle",
57: "Dense freezing drizzle",
61: "Slight rain",
63: "Moderate rain",
65: "Heavy rain",
66: "Light freezing rain",
67: "Heavy freezing rain",
71: "Slight snowfall",
73: "Moderate snowfall",
75: "Heavy snowfall",
77: "Snow grains",
80: "Slight rain showers",
81: "Moderate rain showers",
82: "Violent rain showers",
85: "Slight snow showers",
86: "Heavy snow showers",
95: "Thunderstorm",
96: "Thunderstorm with slight hail",
99: "Thunderstorm with heavy hail"
};
return map.hasOwnProperty(numeric) ? map[numeric] : "Unknown conditions";
}
function categorizeWeather(code) {
var numeric = Number(code);
if (!isFinite(numeric)) return "unknown";
if (numeric === 0) return "clear";
if ([1, 2, 3, 45, 48].indexOf(numeric) !== -1) return "cloudy";
if (
(numeric >= 51 && numeric <= 57) ||
(numeric >= 61 && numeric <= 67) ||
(numeric >= 80 && numeric <= 82)
) {
return "rain";
}
if (
(numeric >= 71 && numeric <= 77) ||
numeric === 85 ||
numeric === 86
) {
return "snow";
}
if (numeric === 95 || numeric === 96 || numeric === 99) return "storm";
return "unknown";
}
function renderWeatherIcon(code) {
var category = categorizeWeather(code);
var iconContainer = document.getElementById("weather-icon");
if (!iconContainer) return;
var svg = "";
if (category === "clear") {
svg =
'<svg viewBox="0 0 80 80" xmlns="http://www.w3.org/2000/svg">' +
'<defs>' +
'<radialGradient id="sunGlow" cx="50%" cy="35%" r="60%">' +
'<stop offset="0%" stop-color="#fef9c3"/>' +
'<stop offset="50%" stop-color="#facc15"/>' +
'<stop offset="100%" stop-color="#ea580c"/>' +
'</radialGradient>' +
'</defs>' +
'<circle cx="40" cy="32" r="16" fill="url(#sunGlow)" />' +
'<g stroke="#fed7aa" stroke-width="2.2" stroke-linecap="round">' +
'<line x1="40" y1="8" x2="40" y2="18"/>' +
'<line x1="40" y1="46" x2="40" y2="56"/>' +
'<line x1="16" y1="32" x2="26" y2="32"/>' +
'<line x1="54" y1="32" x2="64" y2="32"/>' +
'<line x1="22" y1="18" x2="28" y2="24"/>' +
'<line x1="52" y1="40" x2="58" y2="46"/>' +
'<line x1="22" y1="46" x2="28" y2="40"/>' +
'<line x1="52" y1="24" x2="58" y2="18"/>' +
'</g>' +
'<rect x="14" y="52" width="52" height="10" rx="5" fill="rgba(15,23,42,0.65)" />' +
'</svg>';
} else if (category === "cloudy") {
svg =
'<svg viewBox="0 0 80 80" xmlns="http://www.w3.org/2000/svg">' +
'<defs>' +
'<linearGradient id="cloudGrad" x1="0" y1="0" x2="1" y2="1">' +
'<stop offset="0%" stop-color="#e5e7eb"/>' +
'<stop offset="100%" stop-color="#9ca3af"/>' +
'</linearGradient>' +
'</defs>' +
'<circle cx="28" cy="30" r="11" fill="url(#cloudGrad)" opacity="0.9"/>' +
'<circle cx="45" cy="28" r="13" fill="url(#cloudGrad)"/>' +
'<circle cx="56" cy="34" r="11" fill="url(#cloudGrad)" opacity="0.96"/>' +
'<rect x="18" y="34" width="44" height="15" rx="7.5" fill="url(#cloudGrad)"/>' +
'<rect x="16" y="52" width="48" height="9" rx="4.5" fill="rgba(15,23,42,0.7)" />' +
'</svg>';
} else if (category === "rain") {
svg =
'<svg viewBox="0 0 80 80" xmlns="http://www.w3.org/2000/svg">' +
'<defs>' +
'<linearGradient id="cloudRainGrad" x1="0" y1="0" x2="1" y2="1">' +
'<stop offset="0%" stop-color="#e5e7eb"/>' +
'<stop offset="100%" stop-color="#9ca3af"/>' +
'</linearGradient>' +
'<linearGradient id="raindropGrad" x1="0" y1="0" x2="0" y2="1">' +
'<stop offset="0%" stop-color="#bae6fd"/>' +
'<stop offset="100%" stop-color="#0ea5e9"/>' +
'</linearGradient>' +
'</defs>' +
'<circle cx="30" cy="30" r="11" fill="url(#cloudRainGrad)" opacity="0.9"/>' +
'<circle cx="46" cy="28" r="13" fill="url(#cloudRainGrad)"/>' +
'<circle cx="58" cy="34" r="11" fill="url(#cloudRainGrad)" opacity="0.96"/>' +
'<rect x="20" y="34" width="44" height="15" rx="7.5" fill="url(#cloudRainGrad)"/>' +
'<g stroke="url(#raindropGrad)" stroke-width="2.4" stroke-linecap="round">' +
'<line x1="30" y1="50" x2="26" y2="60"/>' +
'<line x1="40" y1="50" x2="36" y2="62"/>' +
'<line x1="50" y1="50" x2="46" y2="60"/>' +
'</g>' +
'</svg>';
} else if (category === "snow") {
svg =
'<svg viewBox="0 0 80 80" xmlns="http://www.w3.org/2000/svg">' +
'<defs>' +
'<linearGradient id="cloudSnowGrad" x1="0" y1="0" x2="1" y2="1">' +
'<stop offset="0%" stop-color="#e5e7eb"/>' +
'<stop offset="100%" stop-color="#9ca3af"/>' +
'</linearGradient>' +
'</defs>' +
'<circle cx="30" cy="30" r="11" fill="url(#cloudSnowGrad)" opacity="0.9"/>' +
'<circle cx="46" cy="28" r="13" fill="url(#cloudSnowGrad)"/>' +
'<circle cx="58" cy="34" r="11" fill="url(#cloudSnowGrad)" opacity="0.96"/>' +
'<rect x="20" y="34" width="44" height="15" rx="7.5" fill="url(#cloudSnowGrad)"/>' +
'<g fill="#e0f2fe" opacity="0.95">' +
'<circle cx="30" cy="53" r="2"/>' +
'<circle cx="40" cy="57" r="2"/>' +
'<circle cx="50" cy="53" r="2"/>' +
'<circle cx="35" cy="61" r="1.8"/>' +
'<circle cx="45" cy="61" r="1.8"/>' +
'</g>' +
'</svg>';
} else if (category === "storm") {
svg =
'<svg viewBox="0 0 80 80" xmlns="http://www.w3.org/2000/svg">' +
'<defs>' +
'<linearGradient id="cloudStormGrad" x1="0" y1="0" x2="1" y2="1">' +
'<stop offset="0%" stop-color="#e5e7eb"/>' +
'<stop offset="100%" stop-color="#6b7280"/>' +
'</linearGradient>' +
'<linearGradient id="boltGrad" x1="0" y1="0" x2="1" y2="1">' +
'<stop offset="0%" stop-color="#fef9c3"/>' +
'<stop offset="100%" stop-color="#facc15"/>' +
'</linearGradient>' +
'</defs>' +
'<circle cx="28" cy="30" r="11" fill="url(#cloudStormGrad)" opacity="0.9"/>' +
'<circle cx="45" cy="28" r="13" fill="url(#cloudStormGrad)"/>' +
'<circle cx="56" cy="34" r="11" fill="url(#cloudStormGrad)" opacity="0.96"/>' +
'<rect x="18" y="34" width="44" height="15" rx="7.5" fill="url(#cloudStormGrad)"/>' +
'<polygon points="37,42 49,42 42,54 49,54 35,70 38,57 32,57" fill="url(#boltGrad)" />' +
'</svg>';
} else {
svg =
'<svg viewBox="0 0 80 80" xmlns="http://www.w3.org/2000/svg">' +
'<defs>' +
'<linearGradient id="defaultCloudGrad" x1="0" y1="0" x2="1" y2="1">' +
'<stop offset="0%" stop-color="#e5e7eb"/>' +
'<stop offset="100%" stop-color="#9ca3af"/>' +
'</linearGradient>' +
'</defs>' +
'<circle cx="30" cy="30" r="11" fill="url(#defaultCloudGrad)" opacity="0.9"/>' +
'<circle cx="46" cy="28" r="13" fill="url(#defaultCloudGrad)"/>' +
'<circle cx="58" cy="34" r="11" fill="url(#defaultCloudGrad)" opacity="0.96"/>' +
'<rect x="20" y="34" width="44" height="15" rx="7.5" fill="url(#defaultCloudGrad)"/>' +
'</svg>';
}
iconContainer.innerHTML = svg;
}
function buildApiUrl(lat, lon, dateStrIso) {
var past = isPastDate(dateStrIso);
var basePath = past ? "/api/om/archive" : "/api/om/forecast";
var params = new URLSearchParams();
params.set("latitude", String(lat));
params.set("longitude", String(lon));
params.set("daily", "temperature_2m_max,temperature_2m_min,weather_code");
params.set("hourly", "temperature_2m");
params.set("timezone", "UTC");
params.set("temperature_unit", "celsius");
params.set("start_date", dateStrIso);
params.set("end_date", dateStrIso);
return {
url: basePath + "?" + params.toString(),
sourceLabel: past ? "Archive API • Historical" : "Forecast API • Today & future"
};
}
function extractDaily(data, dateStrIso) {
if (!data || !data.daily || !Array.isArray(data.daily.time)) {
return null;
}
var idx = data.daily.time.indexOf(dateStrIso);
if (idx === -1) {
idx = data.daily.time.findIndex(function (t) {
return typeof t === "string" && t.slice(0, 10) === dateStrIso;
});
}
if (idx === -1) return null;
var maxArr = data.daily.temperature_2m_max || [];
var minArr = data.daily.temperature_2m_min || [];
var wmoArr = data.daily.weathercode || data.daily.weather_code || [];
return {
max: typeof maxArr[idx] === "number" ? maxArr[idx] : NaN,
min: typeof minArr[idx] === "number" ? minArr[idx] : NaN,
weatherCode: wmoArr[idx]
};
}
function extractHourly(data, dateStrIso) {
if (!data || !data.hourly || !Array.isArray(data.hourly.time)) {
return [];
}
var times = data.hourly.time;
var temps = data.hourly.temperature_2m || [];
var result = [];
for (var i = 0; i < times.length; i++) {
var t = times[i];
if (typeof t === "string" && t.slice(0, 10) === dateStrIso) {
var tempVal = typeof temps[i] === "number" ? temps[i] : NaN;
result.push({ time: t, temp: tempVal });
}
}
return result;
}
function populateHourlyStrip(hourly) {
var strip = document.getElementById("hourly-strip");
var hourlyStatus = document.getElementById("hourly-status");
var hourlyMin = document.getElementById("hourly-min");
var hourlyMax = document.getElementById("hourly-max");
var summaryHours = document.getElementById("summary-hours");
strip.innerHTML = "";
hourlyStatus.textContent = "";
if (!hourly || hourly.length === 0) {
hourlyStatus.textContent = "No hourly data returned for this date.";
hourlyMin.textContent = "—";
hourlyMax.textContent = "—";
summaryHours.textContent = "0";
return;
}
var numericTemps = hourly
.map(function (h) { return typeof h.temp === "number" && isFinite(h.temp) ? h.temp : null; })
.filter(function (v) { return v !== null; });
var min = Math.min.apply(null, numericTemps);
var max = Math.max.apply(null, numericTemps);
if (!isFinite(min) || !isFinite(max)) {
hourlyStatus.textContent = "Hourly temperatures missing from response.";
hourlyMin.textContent = "—";
hourlyMax.textContent = "—";
summaryHours.textContent = String(hourly.length);
return;
}
hourlyMin.textContent = roundToOneDecimal(min).toFixed(1);
hourlyMax.textContent = roundToOneDecimal(max).toFixed(1);
summaryHours.textContent = String(hourly.length);
var highlightIndex = 0;
var highest = -Infinity;
for (var i = 0; i < hourly.length; i++) {
if (typeof hourly[i].temp === "number" && hourly[i].temp > highest) {
highest = hourly[i].temp;
highlightIndex = i;
}
}
for (var j = 0; j < hourly.length; j++) {
var h = hourly[j];
var timePart = typeof h.time === "string" && h.time.indexOf("T") !== -1
? h.time.split("T")[1]
: "";
var label = timePart ? timePart.slice(0, 5) : "—";
var tVal = typeof h.temp === "number" && isFinite(h.temp) ? h.temp : NaN;
var tRounded = isFinite(tVal) ? roundToOneDecimal(tVal).toFixed(1) : "—";
var ratio = isFinite(tVal) && max > min
? (tVal - min) / (max - min)
: 0.5;
ratio = clamp(ratio, 0.08, 1);
var pill = document.createElement("div");
pill.className = "hour-pill" + (j === highlightIndex ? " highlight" : "");
var timeElm = document.createElement("div");
timeElm.className = "hour-pill-time";
timeElm.textContent = label;
pill.appendChild(timeElm);
var tempElm = document.createElement("div");
tempElm.className = "hour-pill-temp";
tempElm.textContent = tRounded + "°";
pill.appendChild(tempElm);
var bar = document.createElement("div");
bar.className = "hour-pill-bar";
var barFill = document.createElement("div");
barFill.className = "hour-pill-bar-fill";
barFill.style.transform = "scaleX(" + (0.12 + ratio * 0.88) + ")";
bar.appendChild(barFill);
pill.appendChild(bar);
strip.appendChild(pill);
}
}
function setStatusLoading() {
var pill = document.getElementById("status-pill");
var pillText = document.getElementById("status-pill-text");
var statusText = document.getElementById("status-text");
if (!pill || !pillText || !statusText) return;
pill.classList.remove("error");
pillText.textContent = "Loading";
statusText.textContent = "Retrieving daily and hourly data from the weather API…";
}
function setStatusSuccess() {
var pill = document.getElementById("status-pill");
var pillText = document.getElementById("status-pill-text");
var statusText = document.getElementById("status-text");
if (!pill || !pillText || !statusText) return;
pill.classList.remove("error");
pillText.textContent = "Loaded";
statusText.textContent = "";
}
function setStatusError(message) {
var pill = document.getElementById("status-pill");
var pillText = document.getElementById("status-pill-text");
var statusText = document.getElementById("status-text");
if (!pill || !pillText || !statusText) return;
pill.classList.add("error");
pillText.textContent = "Unavailable";
statusText.textContent = message || "Unable to load weather data for this location and date.";
}
async function loadWeather() {
var root = document.body;
try {
setStatusLoading();
var defaultDate = todayUtcIsoDate();
var latStr = getQueryParam("lat", "52.52");
var lonStr = getQueryParam("lon", "13.405");
var lat = parseFloat(latStr);
var lon = parseFloat(lonStr);
if (!isFinite(lat)) lat = 52.52;
if (!isFinite(lon)) lon = 13.405;
var locationName = getQueryParam("name", "Berlin");
var dateStr = getQueryParam("date", defaultDate);
var locElm = document.getElementById("location-name");
var dateElm = document.getElementById("date-label");
var coordsElm = document.getElementById("coordinates-label");
var hourlyDateElm = document.getElementById("hourly-date-label");
if (locElm) locElm.textContent = locationName;
if (dateElm) dateElm.textContent = formatDateUtc(dateStr) + " • UTC";
if (coordsElm) coordsElm.textContent =
"Lat " + lat.toFixed(3) + " • Lon " + lon.toFixed(3);
if (hourlyDateElm) hourlyDateElm.textContent = dateStr + " (UTC)";
var apiInfo = buildApiUrl(lat, lon, dateStr);
var apiSourceElm = document.getElementById("api-source");
if (apiSourceElm) apiSourceElm.textContent = apiInfo.sourceLabel;
var response = await fetch(apiInfo.url);
if (!response.ok) {
throw new Error("HTTP " + response.status);
}
var data = await response.json();
var daily = extractDaily(data, dateStr);
var hourly = extractHourly(data, dateStr);
if (!daily) {
throw new Error("No daily data available for the requested date.");
}
var maxTemp = roundToOneDecimal(daily.max);
var minTemp = roundToOneDecimal(daily.min);
var heroTemp = isFinite(maxTemp) && isFinite(minTemp)
? roundToOneDecimal((maxTemp + minTemp) / 2)
: (isFinite(maxTemp) ? maxTemp : minTemp);
var heroElm = document.getElementById("hero-temp");
var maxElm = document.getElementById("max-temp");
var minElm = document.getElementById("min-temp");
var rangeElm = document.getElementById("summary-range");
var conditionElm = document.getElementById("weather-description");
if (heroElm) heroElm.textContent = isFinite(heroTemp) ? heroTemp.toFixed(1) : "—";
if (maxElm) maxElm.textContent = isFinite(maxTemp) ? maxTemp.toFixed(1) : "—";
if (minElm) minElm.textContent = isFinite(minTemp) ? minTemp.toFixed(1) : "—";
if (rangeElm) {
if (isFinite(minTemp) && isFinite(maxTemp)) {
rangeElm.textContent = minTemp.toFixed(1) + "° – " + maxTemp.toFixed(1) + "°";
} else {
rangeElm.textContent = "—";
}
}
var desc = describeWeather(daily.weatherCode);
if (conditionElm) conditionElm.textContent = desc;
renderWeatherIcon(daily.weatherCode);
populateHourlyStrip(hourly);
setStatusSuccess();
root.classList.remove("error-state");
} catch (err) {
console.error(err);
setStatusError("Unable to load weather data for this location and date.");
root.classList.add("error-state");
var heroElmErr = document.getElementById("hero-temp");
var hourlyStatusErr = document.getElementById("hourly-status");
var summaryHoursErr = document.getElementById("summary-hours");
var hourlyMinErr = document.getElementById("hourly-min");
var hourlyMaxErr = document.getElementById("hourly-max");
if (heroElmErr) heroElmErr.textContent = "—";
if (hourlyStatusErr) {
hourlyStatusErr.textContent = "Hourly temperatures unavailable due to a data loading error.";
}
if (summaryHoursErr) summaryHoursErr.textContent = "0";
if (hourlyMinErr) hourlyMinErr.textContent = "—";
if (hourlyMaxErr) hourlyMaxErr.textContent = "—";
}
}
if (document.readyState === "loading") {
document.addEventListener("DOMContentLoaded", loadWeather);
} else {
loadWeather();
}
})();
</script>
</body>
</html>L1 —— 廉价的确定性描述量
| bytes 总计 | 39,021 | html / css / js | 4,679 / 13,184 / 21,158 |
|---|---|---|---|
| dom 节点 | 81 | dom 深度 | 10 |
| css 规则 | 78 | 含 js | 是 |
| brightness | 48.2 | contrast | 25.5 |
| colorfulness | 57.8 | 留白 | 52.9% |
该 slot 的 telemetry
| prompt tokens | 17,642 | completion tokens | 15,140 |
|---|---|---|---|
| total tokens | 32,782 | wall | 154.3 s |
| cost | — | request id | — |
config.json557 B
{
"N": 2,
"auth": {
"credential_ref": "WCB_NONE",
"method": "oauth-login"
},
"billing": "plan",
"config_id": "gpt-5.1-eff-high--cli--cursor--dev",
"effort": "high",
"family": "gpt",
"m": {
"min": 2,
"q": 2
},
"model_id": "gpt-5.1",
"protocol": "cli",
"served_model": "gpt-5.1-high",
"telemetry": {
"completion_tokens": 50757,
"cost_usd": null,
"prompt_tokens": 70549,
"total_tokens": 121306,
"wall_ms": 503954
},
"transport": "cursor-agent-cli-isolated-home",
"vendor_sanction_ref": null
}send-log2.5 KB
{
"N": 2,
"batch_id": "2026-08-13--cursor-s2",
"config_id": "gpt-5.1-eff-high--cli--cursor--dev",
"positions": [
{
"attempts": [
{
"attempt_index": 0,
"backoff_ms": null,
"charged": true,
"ended_at": "2026-08-12T22:34:16.976228+00:00",
"http_status": null,
"outcome": "valid",
"reached_model": true,
"reason": "ok",
"request_id": null,
"started_at": "2026-08-12T22:32:43.448716+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-12T22:36:54.839978+00:00",
"http_status": null,
"outcome": "valid",
"reached_model": true,
"reason": "ok",
"request_id": null,
"started_at": "2026-08-12T22:34:20.503562+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-12T22:39:47.365072+00:00",
"http_status": null,
"outcome": "valid",
"reached_model": true,
"reason": "ok",
"request_id": null,
"started_at": "2026-08-12T22:36:58.847830+00:00"
}
],
"block_index": 1,
"model_reaching_attempt_index": 0,
"slot_index": 1,
"terminal_state": "valid",
"variant": "P-q"
},
{
"attempts": [
{
"attempt_index": 0,
"backoff_ms": null,
"charged": true,
"ended_at": "2026-08-12T22:41:18.846982+00:00",
"http_status": null,
"outcome": "valid",
"reached_model": true,
"reason": "ok",
"request_id": null,
"started_at": "2026-08-12T22:39:51.266082+00:00"
}
],
"block_index": 1,
"model_reaching_attempt_index": 0,
"slot_index": 1,
"terminal_state": "valid",
"variant": "P-min"
}
],
"retry_policy": {
"max_unreachable_retries": 5,
"rate_limit_backoff": {
"max_attempts": 4,
"max_total_ms": 60000
}
}
}