timchen0618 commited on
Commit
d0a0739
Β·
1 Parent(s): 58fe58d

Add question, correct answer, and accuracy to Selected Tools tab

Browse files

Backend loads new columns from HF datasets (question, correct_answer, correct).
Frontend shows: question + answer in header, accuracy % in stats banner,
correct/incorrect badges (βœ“/βœ—) on sidebar items and header.
Rationale and selected steps now hidden when empty (new-format datasets).

backend/api/selected_tools.py CHANGED
@@ -96,7 +96,7 @@ def _load(variant: str) -> list:
96
  sel_idx = []
97
  rows.append({
98
  "query_id": str(row["query_id"]),
99
- "rationale": row["rationale"],
100
  "selected_indices": sel_idx,
101
  "k_requested": int(row["k_requested"]),
102
  "k_effective": int(row["k_effective"]),
@@ -106,6 +106,9 @@ def _load(variant: str) -> list:
106
  "tool_call_counts": tool_counts,
107
  "total_tool_calls": total_tool_calls,
108
  "status": row["status"],
 
 
 
109
  })
110
  _cache[variant] = rows
111
  return rows
 
96
  sel_idx = []
97
  rows.append({
98
  "query_id": str(row["query_id"]),
99
+ "rationale": row.get("rationale") or "",
100
  "selected_indices": sel_idx,
101
  "k_requested": int(row["k_requested"]),
102
  "k_effective": int(row["k_effective"]),
 
106
  "tool_call_counts": tool_counts,
107
  "total_tool_calls": total_tool_calls,
108
  "status": row["status"],
109
+ "question": row.get("question") or "",
110
+ "correct_answer": row.get("correct_answer") or "",
111
+ "correct": row.get("correct"), # None if not available
112
  })
113
  _cache[variant] = rows
114
  return rows
build_all_sel_tools_test300_v2.sh ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+ set -e
3
+
4
+ export HF_HOME=/scratch/hc3337/.cache/huggingface
5
+
6
+ PYTHON=/scratch/hc3337/envs/raca-py312/bin/python
7
+ SCRIPT=/scratch/hc3337/projects/BrowseComp-Plus/scripts/build_selected_tools_from_traj.py
8
+ RUN_BASE=/scratch/hc3337/projects/BrowseComp-Plus/runs/bcp/Qwen3-Embedding-8B/test300/gpt-oss-120b
9
+ EVAL_BASE=/scratch/hc3337/projects/BrowseComp-Plus/evals/bcp/Qwen3-Embedding-8B/test300/gpt-oss-120b
10
+
11
+ build() {
12
+ KEY=$1
13
+ RUN_DIR=$RUN_BASE/$2
14
+ EVAL_DIR=$EVAL_BASE/$2
15
+ REPO=timchen0618/browsecomp-plus-sel-tools-test300-${KEY}-v1
16
+ echo "[$(date -u +%H:%M:%S)] Building ${KEY} -> ${REPO}"
17
+ $PYTHON $SCRIPT \
18
+ --run-dir "$RUN_DIR" \
19
+ --eval-dir "$EVAL_DIR" \
20
+ --push-to-hub "$REPO" \
21
+ --commit-message "Add question/answer/correct: ${KEY}" 2>&1
22
+ echo "[$(date -u +%H:%M:%S)] Done: ${KEY}"
23
+ }
24
+
25
+ build gpt-oss-120b traj_summary_orig_ext_selected_tools_gpt-oss-120b_seed0
26
+ build gpt-oss-120b-less-chars traj_summary_orig_ext_selected_tools_gpt-oss-120b_seed0_less_chars
27
+ build gemini-2p5-pro traj_summary_orig_ext_selected_tools_gpt-oss-120b_gemini-2.5-pro_1_seed0
28
+ build gemini-3p1-pro traj_summary_orig_ext_selected_tools_gpt-oss-120b_gemini_3.1-pro-preview_seed0
29
+ build random-seed0 traj_summary_orig_ext_selected_tools_random_seed0_gpt-oss-120b_seed0
30
+ build random-seed1 traj_summary_orig_ext_selected_tools_random_seed1_gpt-oss-120b_seed0
31
+ build random-seed3 traj_summary_orig_ext_selected_tools_random_seed3_gpt-oss-120b_seed0
32
+ build random-seed4 traj_summary_orig_ext_selected_tools_random_seed4_gpt-oss-120b_seed0
33
+ build random-seed5 traj_summary_orig_ext_selected_tools_random_seed5_gpt-oss-120b_seed0
34
+ build random-seed6 traj_summary_orig_ext_selected_tools_random_seed6_gpt-oss-120b_seed0
35
+ build random-seed7 traj_summary_orig_ext_selected_tools_random_seed7_gpt-oss-120b_seed0
36
+
37
+ echo "ALL DONE at $(date -u)"
build_selected_tools_from_traj_v2.py ADDED
@@ -0,0 +1,272 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ """
3
+ Build a Selected Tools HF dataset by extracting excerpts directly from the
4
+ <trajectory_summary> tag embedded in each run file's user message.
5
+
6
+ Now supports --eval-dir to join with evaluation results (question, correct_answer, correct).
7
+
8
+ No JSONL file required β€” works for any traj_summary_orig_ext_selected_tools_* dir.
9
+
10
+ Output columns (compatible with selected_tools.py backend):
11
+ query_id, excerpt, new_trajectory, status, tool_call_counts,
12
+ rationale, selected_indices, k_requested, k_effective, direct_answer,
13
+ question, correct_answer, correct
14
+
15
+ Requires: pip install 'datasets>=2.14'
16
+ Python env: /scratch/hc3337/envs/raca-py312/bin/python
17
+ """
18
+
19
+ from __future__ import annotations
20
+ import argparse, json, re, sys
21
+ from pathlib import Path
22
+ from typing import Any
23
+
24
+
25
+ # ── Trajectory formatter (same as build_scout_runs_dataset.py) ────────────────
26
+
27
+ def _parse_tool_call_block(text: str) -> str:
28
+ rest = text[len("[Tool call]"):].lstrip()
29
+ newline_idx = rest.find("\n")
30
+ if newline_idx >= 0:
31
+ tool_name = rest[:newline_idx].strip()
32
+ body = rest[newline_idx + 1:].strip()
33
+ else:
34
+ tool_name = rest.strip()
35
+ body = ""
36
+ if body.lower().startswith("arguments:\n"):
37
+ body = body[len("arguments:\n"):]
38
+ result_part = ""
39
+ for marker in ("\n\n[Tool result]:\n", "\n[Tool result]:\n"):
40
+ if marker in body:
41
+ args_part, result_part = body.split(marker, 1)
42
+ body = args_part
43
+ break
44
+ block = f"[Tool Call: {tool_name}]\n{body.strip()}"
45
+ if result_part:
46
+ block += f"\n\n[Tool Result]\n{result_part.strip()}"
47
+ return block
48
+
49
+
50
+ def _split_reasoning_text(text: str) -> list[tuple[str, str]]:
51
+ parts = re.split(r"(?m)(?=^\[Tool call\])", text, flags=re.MULTILINE)
52
+ out: list[tuple[str, str]] = []
53
+ for part in parts:
54
+ part = part.strip()
55
+ if not part:
56
+ continue
57
+ out.append(("tool_call" if part.startswith("[Tool call]") else "reasoning", part))
58
+ return out
59
+
60
+
61
+ def format_new_trajectory(result: list[dict[str, Any]]) -> str:
62
+ blocks: list[str] = []
63
+ pending: list[str] = []
64
+
65
+ def flush():
66
+ if pending:
67
+ combined = "\n\n".join(t for t in pending if t.strip())
68
+ if combined.strip():
69
+ blocks.append(f"[Reasoning]\n{combined.strip()}")
70
+ pending.clear()
71
+
72
+ for item in result:
73
+ item_type = item.get("type", "")
74
+ output = item.get("output", "")
75
+ if item_type == "user":
76
+ continue
77
+ text = "\n".join(str(s) for s in output) if isinstance(output, list) else str(output)
78
+ text = text.strip()
79
+ if not text:
80
+ continue
81
+ if item_type == "reasoning":
82
+ for sub_type, sub_text in _split_reasoning_text(text):
83
+ if sub_type == "tool_call":
84
+ flush()
85
+ blocks.append(_parse_tool_call_block(sub_text))
86
+ else:
87
+ pending.append(sub_text)
88
+ elif item_type == "tool_call":
89
+ flush()
90
+ tool_name = str(item.get("tool_name") or "unknown")
91
+ args = str(item.get("arguments") or "").strip()
92
+ block = f"[Tool Call: {tool_name}]\n{args}"
93
+ if text:
94
+ block += f"\n\n[Tool Result]\n{text}"
95
+ blocks.append(block)
96
+ elif item_type == "output_text":
97
+ flush()
98
+ blocks.append(f"[Final Answer]\n{text}")
99
+ else:
100
+ flush()
101
+ blocks.append(text)
102
+ flush()
103
+ return "\n\n---\n\n".join(blocks)
104
+
105
+
106
+ def extract_trajectory_summary(user_text: str) -> str:
107
+ """Extract raw content between <trajectory_summary> tags.
108
+ Takes the LAST match β€” the first is an empty demonstration in the prompt preamble.
109
+ """
110
+ matches = re.findall(r"<trajectory_summary>(.*?)</trajectory_summary>", user_text, re.DOTALL)
111
+ if not matches:
112
+ return ""
113
+ return matches[-1].strip()
114
+
115
+
116
+ # ── Eval data loading ─────────────────────────────────────────────────────────
117
+
118
+ def load_eval_data(eval_dir: Path) -> dict[str | int, dict]:
119
+ """Load eval files and return query_id -> {question, correct_answer, correct}."""
120
+ eval_map: dict[str | int, dict] = {}
121
+ for p in eval_dir.glob("*_eval.json"):
122
+ try:
123
+ d = json.load(p.open("r", encoding="utf-8"))
124
+ qid_raw = str(d.get("query_id", "")).strip()
125
+ qid: str | int = int(qid_raw) if qid_raw.isdigit() else qid_raw
126
+ judge_result = d.get("judge_result") or {}
127
+ correct_val = judge_result.get("correct")
128
+ eval_map[qid] = {
129
+ "question": str(d.get("question") or ""),
130
+ "correct_answer": str(d.get("correct_answer") or ""),
131
+ "correct": bool(correct_val) if correct_val is not None else None,
132
+ }
133
+ except Exception as e:
134
+ print(f"warning: skipping {p.name}: {e}", file=sys.stderr)
135
+ print(f"Loaded {len(eval_map)} eval entries from {eval_dir}", file=sys.stderr)
136
+ return eval_map
137
+
138
+
139
+ # ── Run file loading ──────────────────────────────────────────────────────────
140
+
141
+ def _coerce_query_id(qid: str) -> int | str:
142
+ s = str(qid).strip()
143
+ return int(s) if s.isdigit() else s
144
+
145
+
146
+ def _sort_key(qid: int | str) -> tuple[int, str]:
147
+ s = str(qid).strip()
148
+ return (0, f"{int(s):010d}") if s.isdigit() else (1, s)
149
+
150
+
151
+ def build_rows(run_dir: Path, strict: bool,
152
+ eval_map: dict | None = None) -> list[dict[str, Any]]:
153
+ rows = []
154
+ files = sorted(run_dir.glob("run_*.json"))
155
+ if not files:
156
+ raise FileNotFoundError(f"No run_*.json under {run_dir}")
157
+
158
+ for p in files:
159
+ d = json.load(p.open("r", encoding="utf-8"))
160
+ qid = _coerce_query_id(str(d.get("query_id", "")).strip())
161
+
162
+ result = d.get("result", [])
163
+
164
+ # extract user message
165
+ user_text = ""
166
+ for item in result:
167
+ if item.get("type") == "user":
168
+ out = item.get("output", "")
169
+ user_text = "\n".join(str(s) for s in out) if isinstance(out, list) else str(out)
170
+ break
171
+
172
+ excerpt = extract_trajectory_summary(user_text)
173
+ if not excerpt:
174
+ msg = f"{p.name}: no <trajectory_summary> content found"
175
+ if strict:
176
+ raise ValueError(msg)
177
+ print(f"warning: skip {msg}", file=sys.stderr)
178
+ continue
179
+
180
+ tc_raw = d.get("tool_call_counts") or {}
181
+ tc = {str(k): int(v) for k, v in tc_raw.items() if v is not None}
182
+
183
+ # Join with eval data if available
184
+ eval_entry = (eval_map or {}).get(qid, {})
185
+ question = eval_entry.get("question", "")
186
+ correct_answer = eval_entry.get("correct_answer", "")
187
+ correct = eval_entry.get("correct", None)
188
+
189
+ rows.append({
190
+ "query_id": qid,
191
+ "excerpt": excerpt,
192
+ "new_trajectory": format_new_trajectory(result),
193
+ "status": str(d.get("status", "")),
194
+ "tool_call_counts": json.dumps(tc, sort_keys=True),
195
+ # JSONL-derived fields β€” not available, set compatible defaults
196
+ "rationale": "",
197
+ "selected_indices": "[]",
198
+ "k_requested": 0,
199
+ "k_effective": 0,
200
+ "direct_answer": False,
201
+ # Eval fields
202
+ "question": question,
203
+ "correct_answer": correct_answer,
204
+ "correct": correct,
205
+ })
206
+
207
+ rows.sort(key=lambda r: _sort_key(str(r["query_id"])))
208
+ return rows
209
+
210
+
211
+ def main():
212
+ ap = argparse.ArgumentParser(
213
+ description="Build Selected Tools HF dataset from <trajectory_summary> in run files."
214
+ )
215
+ ap.add_argument("--run-dir", type=Path, required=True,
216
+ help="Directory of run_*.json files.")
217
+ ap.add_argument("--eval-dir", type=Path, default=None,
218
+ help="Directory of *_eval.json files with question/correct_answer/judge_result.")
219
+ ap.add_argument("--no-strict", action="store_true",
220
+ help="Skip files missing <trajectory_summary> instead of erroring.")
221
+ ap.add_argument("--output", type=Path,
222
+ help="Output path (.parquet, .jsonl, .json).")
223
+ ap.add_argument("--push-to-hub", metavar="REPO_ID",
224
+ help="Push to HuggingFace Hub.")
225
+ ap.add_argument("--split", default="train")
226
+ ap.add_argument("--commit-message",
227
+ default="Update dataset from build_selected_tools_from_traj.py")
228
+ args = ap.parse_args()
229
+
230
+ if not args.output and not args.push_to_hub:
231
+ print("Error: --output or --push-to-hub required", file=sys.stderr)
232
+ sys.exit(2)
233
+
234
+ eval_map = None
235
+ if args.eval_dir:
236
+ eval_map = load_eval_data(args.eval_dir.resolve())
237
+
238
+ rows = build_rows(args.run_dir.resolve(), strict=not args.no_strict, eval_map=eval_map)
239
+
240
+ if args.output:
241
+ suf = args.output.suffix.lower()
242
+ if suf == ".jsonl":
243
+ with args.output.open("w") as f:
244
+ for row in rows:
245
+ f.write(json.dumps(row, ensure_ascii=False) + "\n")
246
+ elif suf == ".json":
247
+ with args.output.open("w") as f:
248
+ json.dump(rows, f, ensure_ascii=False, indent=2)
249
+ elif suf == ".parquet":
250
+ from datasets import Dataset
251
+ Dataset.from_list(rows).to_parquet(str(args.output))
252
+ else:
253
+ print(f"Error: unsupported extension {suf!r}", file=sys.stderr)
254
+ sys.exit(2)
255
+
256
+ if args.push_to_hub:
257
+ from datasets import Dataset
258
+ ds = Dataset.from_list(rows)
259
+ ds.push_to_hub(args.push_to_hub, split=args.split,
260
+ commit_message=args.commit_message)
261
+
262
+ correct_count = sum(1 for r in rows if r.get("correct") is True)
263
+ total_with_eval = sum(1 for r in rows if r.get("correct") is not None)
264
+ print(f"Wrote {len(rows)} rows. Columns: {list(rows[0].keys()) if rows else []}")
265
+ if total_with_eval:
266
+ print(f"Eval coverage: {total_with_eval}/{len(rows)} rows, {correct_count} correct ({100*correct_count//total_with_eval}%)")
267
+ if args.push_to_hub:
268
+ print(f"Pushed to {args.push_to_hub} (split {args.split!r}).")
269
+
270
+
271
+ if __name__ == "__main__":
272
+ main()
frontend/dist/assets/{ExperimentsApp-TxH1JPsd.js β†’ ExperimentsApp-MhV_BmUC.js} RENAMED
The diff for this file is too large to render. See raw diff
 
frontend/dist/assets/{ModelApp-BeZukO0m.js β†’ ModelApp-ByP0hVWF.js} RENAMED
@@ -1,4 +1,4 @@
1
- import{r as i,p as re,a as le,j as e}from"./index-Br9e1W0j.js";const U="/api/model",X="/api/presets/model";async function L(t,l){const n=await fetch(t,{headers:{"Content-Type":"application/json"},...l});if(!n.ok){const c=await n.json().catch(()=>({error:n.statusText}));throw new Error(c.error||n.statusText)}return n.json()}const A={loadDataset(t,l,n,c){return L(`${U}/datasets/load`,{method:"POST",body:JSON.stringify({repo:t,column:l,split:n,prompt_column:c})})},listDatasets(){return L(`${U}/datasets/`)},getQuestion(t,l){return L(`${U}/datasets/${t}/question/${l}`)},getSummary(t){return L(`${U}/datasets/${t}/summary`)},unloadDataset(t){return L(`${U}/datasets/${t}`,{method:"DELETE"})},listPresets(){return L(`${X}`)},createPreset(t,l,n,c){return L(`${X}`,{method:"POST",body:JSON.stringify({name:t,repo:l,column:n,split:c})})},updatePreset(t,l){return L(`${X}/${t}`,{method:"PUT",body:JSON.stringify(l)})},deletePreset(t){return L(`${X}/${t}`,{method:"DELETE"})}};function ie(){const t=i.useRef(re().params),[l,n]=i.useState([]),[c,p]=i.useState([]),[s,x]=i.useState("all"),[b,g]=i.useState({}),[h,S]=i.useState({}),[I,j]=i.useState(null),[w,k]=i.useState({}),[o,m]=i.useState(null);i.useEffect(()=>{A.listPresets().then(p).catch(()=>{})},[]),i.useEffect(()=>{const a=re().params,d=parseInt(a.get("q")||"0"),f=parseInt(a.get("s")||"0"),u=a.get("filter")||"all";x(u),(!isNaN(d)||!isNaN(f))&&(window.__initialQ=isNaN(d)?0:d,window.__initialS=isNaN(f)?0:f)},[]);const y=i.useMemo(()=>{const r={};for(const a of l){const d=a.questionFingerprint;r[d]||(r[d]=[]),r[d].push(a)}return r},[l]),P=i.useMemo(()=>Object.keys(y).sort(),[y]);i.useEffect(()=>{if(o&&y[o])return;const r=P.find(a=>y[a].some(d=>d.active));r?m(r):P.length>0?m(P[0]):m(null)},[P,y,o]);const N=i.useMemo(()=>l.filter(r=>r.active&&r.questionFingerprint===o),[l,o]),[F,W]=i.useState([]);i.useEffect(()=>{const r=new Set(N.map(a=>a.id));W(a=>{const d=a.filter(v=>r.has(v)),f=N.map(v=>v.id).filter(v=>!a.includes(v)),u=[...d,...f];return u.length===a.length&&u.every((v,C)=>v===a[C])?a:u})},[N]);const H=i.useMemo(()=>{const r=new Map(N.map(a=>[a.id,a]));return F.map(a=>r.get(a)).filter(a=>a!==void 0)},[N,F]),Y=i.useCallback((r,a)=>{r!==a&&W(d=>{const f=[...d],u=f.indexOf(r),v=f.indexOf(a);return u===-1||v===-1?d:(f.splice(u,1),f.splice(v,0,r),f)})},[]),D=o?w[o]:void 0,E=(D==null?void 0:D.questionIdx)??0,M=(D==null?void 0:D.sampleIdx)??0,G=i.useCallback(r=>{o&&k(a=>{const d=a[o]??{questionIdx:0,sampleIdx:0},f=typeof r=="function"?r(d.questionIdx):r;return{...a,[o]:{...d,questionIdx:f}}})},[o]),B=i.useCallback(r=>{o&&k(a=>{const d=a[o]??{questionIdx:0,sampleIdx:0},f=typeof r=="function"?r(d.sampleIdx):r;return{...a,[o]:{...d,sampleIdx:f}}})},[o]);i.useEffect(()=>{const r=new URLSearchParams,a=l.filter(d=>d.active);a.length>0&&(r.set("repos",a.map(d=>d.repo).join(",")),r.set("cols",a.map(d=>d.column).join(",")),r.set("pcols",a.map(d=>d.promptColumn||"formatted_prompt").join(","))),r.set("q",String(E)),r.set("s",String(M)),s!=="all"&&r.set("filter",s),o&&r.set("group",o),le({params:r})},[l,E,M,s,o]),i.useEffect(()=>{N.forEach(r=>{const a=`${r.id}:${E}`;b[a]||A.getQuestion(r.id,E).then(d=>{g(f=>({...f,[a]:d}))}).catch(()=>{})})},[E,N]);const O=i.useCallback(async(r,a,d,f,u,v)=>{S(C=>({...C,[r]:!0})),j(null);try{const{question_fingerprint:C,...Q}=await A.loadDataset(r,a,d,f),V=C??"",ee={...Q,questionFingerprint:V,active:!0,presetId:u,presetName:v};n(T=>T.some(q=>q.id===ee.id)?T:[...T,ee]),k(T=>{if(T[V])return T;const q=window,ne=typeof q.__initialQ=="number"?q.__initialQ:0,oe=typeof q.__initialS=="number"?q.__initialS:0,te=Object.keys(T).length===0;return{...T,[V]:{questionIdx:te?ne:0,sampleIdx:te?oe:0}}}),m(V)}catch(C){j(C instanceof Error?C.message:"Failed to load dataset")}finally{S(C=>({...C,[r]:!1}))}},[]);i.useEffect(()=>{var u,v,C;const r=t.current,a=((u=r.get("repos"))==null?void 0:u.split(",").filter(Boolean))||[],d=((v=r.get("cols"))==null?void 0:v.split(","))||[],f=((C=r.get("pcols"))==null?void 0:C.split(","))||[];for(let Q=0;Q<a.length;Q++)O(a[Q],d[Q]||void 0,void 0,f[Q]||void 0)},[O]);const R=i.useCallback(async r=>{await A.unloadDataset(r).catch(()=>{}),n(a=>a.filter(d=>d.id!==r))},[]),$=i.useCallback(r=>{n(a=>{const d=a.map(u=>u.id===r?{...u,active:!u.active}:u),f=d.find(u=>u.id===r);return f&&f.active&&m(f.questionFingerprint),d})},[]),_=i.useCallback((r,a)=>{n(d=>d.map(f=>f.id===r?{...f,presetName:a}:f))},[]),J=i.useCallback(r=>{n(a=>a.map(d=>d.id===r?{...d,presetId:void 0,presetName:void 0}:d))},[]),K=Math.min(...N.map(r=>r.n_rows),1/0),z=Math.max(...N.map(r=>r.n_samples),0);return{datasets:l,presets:c,setPresets:p,questionIdx:E,setQuestionIdx:G,sampleIdx:M,setSampleIdx:B,filter:s,setFilter:x,loading:h,error:I,setError:j,activeDatasets:N,orderedActiveDatasets:H,maxQuestions:K,maxSamples:z,addDataset:O,removeDataset:R,toggleDataset:$,updateDatasetPresetName:_,clearDatasetPreset:J,getQuestionData:r=>b[`${r}:${E}`],reorderPanels:Y,groups:y,groupIds:P,currentGroupId:o,setCurrentGroupId:m}}const se=[{bg:"bg-blue-500",border:"border-blue-500",text:"text-blue-400",label:"text-blue-300"},{bg:"bg-emerald-500",border:"border-emerald-500",text:"text-emerald-400",label:"text-emerald-300"},{bg:"bg-amber-500",border:"border-amber-500",text:"text-amber-400",label:"text-amber-300"},{bg:"bg-purple-500",border:"border-purple-500",text:"text-purple-400",label:"text-purple-300"},{bg:"bg-rose-500",border:"border-rose-500",text:"text-rose-400",label:"text-rose-300"},{bg:"bg-cyan-500",border:"border-cyan-500",text:"text-cyan-400",label:"text-cyan-300"}];function ce({datasets:t,presets:l,loading:n,groups:c,groupIds:p,currentGroupId:s,onAddDataset:x,onRemoveDataset:b,onToggleDataset:g,onSetCurrentGroup:h,onLoadPreset:S,onSavePreset:I,onDeletePreset:j,onUpdatePreset:w}){const[k,o]=i.useState(!1),[m,y]=i.useState(""),[P,N]=i.useState(""),[F,W]=i.useState("train"),[H,Y]=i.useState(""),[D,E]=i.useState(""),[M,G]=i.useState(null),[B,O]=i.useState(""),[R,$]=i.useState(null),[_,J]=i.useState(""),K=()=>{m.trim()&&(x(m.trim(),P.trim()||void 0,F.trim()||void 0,H.trim()||void 0),y(""),o(!1))},z=r=>{B.trim()&&(I(B.trim(),r.repo,r.column,r.split),O(""),G(null))},Z=r=>{const a=p.indexOf(r);return se[a%se.length]};return e.jsxs("div",{className:"w-72 min-w-72 bg-gray-900 border-r border-gray-700 flex flex-col h-full",children:[e.jsxs("div",{className:"p-3 border-b border-gray-700",children:[e.jsx("div",{className:"flex items-center justify-between mb-2",children:e.jsx("h3",{className:"text-xs font-semibold text-gray-400 uppercase tracking-wider",children:"Presets"})}),l.length===0?e.jsx("p",{className:"text-xs text-gray-500 italic",children:"No presets saved"}):e.jsxs(e.Fragment,{children:[l.length>6&&e.jsx("input",{type:"text",value:D,onChange:r=>E(r.target.value),placeholder:"Search presets...",className:"w-full px-2 py-1 mb-2 text-xs bg-gray-800 border border-gray-600 rounded text-gray-200 placeholder-gray-500 focus:border-blue-500 focus:outline-none"}),e.jsx("div",{className:"flex flex-wrap gap-1 max-h-32 overflow-y-auto",children:l.filter(r=>!D||r.name.toLowerCase().includes(D.toLowerCase())||r.repo.toLowerCase().includes(D.toLowerCase())).map(r=>e.jsxs("div",{className:"group relative",children:[e.jsx("button",{onClick:()=>S(r),className:"px-2 py-1 text-xs bg-gray-800 hover:bg-gray-700 rounded border border-gray-600 text-gray-300 transition-colors",title:`${r.repo} (${r.column}, ${r.split??"train"})`,children:r.name}),e.jsx("div",{className:"hidden group-hover:flex absolute top-full left-0 mt-1 z-10 gap-1",children:e.jsx("button",{onClick:()=>j(r.id),className:"px-1.5 py-0.5 text-[10px] bg-red-900 hover:bg-red-800 rounded text-red-300",children:"Delete"})})]},r.id))})]})]}),e.jsxs("div",{className:"flex-1 overflow-y-auto p-3",children:[e.jsx("h3",{className:"text-xs font-semibold text-gray-400 uppercase tracking-wider mb-2",children:"Loaded Repos"}),t.length===0?e.jsx("p",{className:"text-xs text-gray-500 italic",children:"No repos loaded. Add one below."}):e.jsx("div",{className:"space-y-3",children:p.map(r=>{const a=Z(r),d=c[r],f=r===s;return e.jsxs("div",{children:[e.jsxs("button",{onClick:()=>h(r),className:`w-full flex items-center gap-1.5 mb-1 px-1 py-0.5 rounded transition-colors ${f?"bg-gray-800":"hover:bg-gray-800/50"}`,children:[e.jsx("span",{className:`inline-block w-2 h-2 rounded-full ${a.bg} shrink-0`}),e.jsxs("span",{className:`text-[10px] font-semibold uppercase tracking-wider ${f?a.label:"text-gray-500"}`,children:["Group ",p.indexOf(r)+1,e.jsxs("span",{className:"normal-case font-normal ml-1 text-gray-600",children:["(",d.length," repo",d.length!==1?"s":"",")"]})]}),f&&e.jsx("span",{className:"text-[9px] text-gray-600 ml-auto",children:"viewing"})]}),e.jsx("div",{className:`space-y-1 border-l-2 ml-1 pl-2 ${f?a.border:"border-gray-700"}`,children:d.map(u=>e.jsxs("div",{children:[e.jsxs("div",{onClick:()=>{u.presetId&&($(R===u.id?null:u.id),J(u.presetName||""),o(!1))},className:`flex items-center gap-2 px-2 py-1.5 rounded text-sm transition-colors ${u.active?"bg-gray-800":"bg-gray-900 opacity-60"} ${R===u.id?"ring-1 ring-blue-500":""} ${u.presetId?"cursor-pointer":""}`,children:[e.jsx("input",{type:"checkbox",checked:u.active,onChange:()=>g(u.id),onClick:v=>v.stopPropagation(),className:"rounded border-gray-600 bg-gray-800 text-blue-500 focus:ring-blue-500 focus:ring-offset-0"}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"text-gray-200 truncate text-xs font-medium",title:u.presetName?`${u.presetName}
2
  ${u.repo}`:u.repo,children:u.presetName||u.name}),e.jsxs("div",{className:"text-[10px] text-gray-500",children:[u.column," | ",u.n_rows," rows | ",u.n_samples," samples"]})]}),e.jsx("button",{onClick:v=>{v.stopPropagation(),G(M===u.id?null:u.id),O("")},className:`transition-colors shrink-0 ${M===u.id?"text-blue-400":"text-gray-600 hover:text-blue-400"}`,title:"Save as preset",children:e.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 5a2 2 0 012-2h10a2 2 0 012 2v16l-7-3.5L5 21V5z"})})}),e.jsx("button",{onClick:v=>{v.stopPropagation(),b(u.id)},className:"text-gray-600 hover:text-red-400 transition-colors shrink-0",title:"Remove",children:e.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),M===u.id&&e.jsxs("div",{className:"flex gap-1 mt-1 ml-6",children:[e.jsx("input",{type:"text",value:B,onChange:v=>O(v.target.value),onKeyDown:v=>{v.key==="Enter"&&z(u),v.key==="Escape"&&G(null)},placeholder:"Preset name...",className:"flex-1 px-2 py-1 text-xs bg-gray-800 border border-gray-600 rounded text-gray-200 placeholder-gray-500 focus:border-blue-500 focus:outline-none",autoFocus:!0}),e.jsx("button",{onClick:()=>z(u),className:"px-2 py-1 text-xs bg-blue-600 hover:bg-blue-500 rounded text-white",children:"Save"})]})]},u.id))})]},r)})})]}),R&&(()=>{const r=t.find(a=>a.id===R);return r!=null&&r.presetId?e.jsxs("div",{className:"p-3 border-t border-gray-700 space-y-2",children:[e.jsx("div",{className:"text-[10px] text-gray-500 uppercase font-semibold tracking-wider",children:"Edit Preset"}),e.jsx("input",{type:"text",value:_,onChange:a=>J(a.target.value),onKeyDown:a=>{a.key==="Enter"&&_.trim()&&(w(r.presetId,r.id,{name:_.trim()}),$(null)),a.key==="Escape"&&$(null)},placeholder:"Preset name...",className:"w-full px-2 py-1 text-xs bg-gray-800 border border-gray-600 rounded text-gray-200 placeholder-gray-500 focus:border-blue-500 focus:outline-none",autoFocus:!0}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("button",{onClick:()=>{_.trim()&&(w(r.presetId,r.id,{name:_.trim()}),$(null))},disabled:!_.trim(),className:"flex-1 px-2 py-1 text-xs bg-blue-600 hover:bg-blue-500 disabled:bg-gray-700 disabled:text-gray-500 rounded text-white transition-colors",children:"Save"}),e.jsx("button",{onClick:()=>{j(r.presetId,r.id),$(null)},className:"px-2 py-1 text-xs bg-red-900 hover:bg-red-800 rounded text-red-300 transition-colors",children:"Delete"}),e.jsx("button",{onClick:()=>$(null),className:"px-2 py-1 text-xs bg-gray-700 hover:bg-gray-600 rounded text-gray-300 transition-colors",children:"Cancel"})]})]}):null})(),e.jsx("div",{className:"p-3 border-t border-gray-700",children:k?e.jsxs("div",{className:"space-y-2",children:[e.jsx("input",{type:"text",value:m,onChange:r=>y(r.target.value),onKeyDown:r=>r.key==="Enter"&&K(),placeholder:"org/dataset-name",className:"w-full px-2 py-1.5 text-sm bg-gray-800 border border-gray-600 rounded text-gray-200 placeholder-gray-500 focus:border-blue-500 focus:outline-none",autoFocus:!0}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("input",{type:"text",value:P,onChange:r=>N(r.target.value),placeholder:"Response col (auto-detect)",className:"flex-1 px-2 py-1 text-xs bg-gray-800 border border-gray-600 rounded text-gray-200 placeholder-gray-500 focus:border-blue-500 focus:outline-none"}),e.jsx("input",{type:"text",value:F,onChange:r=>W(r.target.value),placeholder:"Split",className:"w-16 px-2 py-1 text-xs bg-gray-800 border border-gray-600 rounded text-gray-200 placeholder-gray-500 focus:border-blue-500 focus:outline-none"})]}),e.jsx("div",{className:"flex gap-2",children:e.jsx("input",{type:"text",value:H,onChange:r=>Y(r.target.value),placeholder:"Prompt col (auto-detect)",className:"flex-1 px-2 py-1 text-xs bg-gray-800 border border-gray-600 rounded text-gray-200 placeholder-gray-500 focus:border-blue-500 focus:outline-none"})}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("button",{onClick:K,disabled:!m.trim()||n[m.trim()],className:"flex-1 px-2 py-1.5 text-sm bg-blue-600 hover:bg-blue-500 disabled:bg-gray-700 disabled:text-gray-500 rounded text-white transition-colors",children:n[m.trim()]?"Loading...":"Load"}),e.jsx("button",{onClick:()=>o(!1),className:"px-3 py-1.5 text-sm bg-gray-700 hover:bg-gray-600 rounded text-gray-300 transition-colors",children:"Cancel"})]})]}):e.jsx("button",{onClick:()=>{$(null),o(!0),y(""),N(""),W("train"),Y("")},className:"w-full px-3 py-2 text-sm bg-blue-600 hover:bg-blue-500 rounded text-white font-medium transition-colors",children:"+ Add Repo"})})]})}function de(t){if(!t)return[{text:"(no response)",className:"text-gray-500 italic"}];const l=[],n=t.split(`
3
  `);for(let c=0;c<n.length;c++){const p=n[c],s=p.toLowerCase().trim();let x="text-gray-300";s.startsWith("wait")||s.startsWith("hmm")||s.startsWith("but wait")?x="text-yellow-400":s.startsWith("let me try")||s.startsWith("let me reconsider")||s.startsWith("let me think")?x="text-cyan-400":s.startsWith("so the answer")||s.startsWith("so the expression")||s.startsWith("therefore")||s.startsWith("the final")?x="text-green-400 font-bold":s.startsWith("i give up")||s.startsWith("i can't find")||s.startsWith("i'm stuck")||s.startsWith("i'm sorry")?x="text-red-400 font-bold":p.includes("=")&&/[+\-*/]/.test(p)&&(x="text-gray-100"),l.push({text:p,className:x}),c<n.length-1&&l.push({text:`
4
  `,className:""})}return l}function ue(t){if(!t||!t.trim())return[];try{const l=JSON.parse(t);if(Array.isArray(l)&&l.length>0&&l[0].role!==void 0)return l.map(n=>({role:String(n.role||"unknown"),content:String(n.content??"")}))}catch{}if(t.includes("<|im_start|>"))return t.split("<|im_start|>").filter(Boolean).map(n=>{const c=n.indexOf(`
 
1
+ import{r as i,p as re,a as le,j as e}from"./index-BFtcA7GQ.js";const U="/api/model",X="/api/presets/model";async function L(t,l){const n=await fetch(t,{headers:{"Content-Type":"application/json"},...l});if(!n.ok){const c=await n.json().catch(()=>({error:n.statusText}));throw new Error(c.error||n.statusText)}return n.json()}const A={loadDataset(t,l,n,c){return L(`${U}/datasets/load`,{method:"POST",body:JSON.stringify({repo:t,column:l,split:n,prompt_column:c})})},listDatasets(){return L(`${U}/datasets/`)},getQuestion(t,l){return L(`${U}/datasets/${t}/question/${l}`)},getSummary(t){return L(`${U}/datasets/${t}/summary`)},unloadDataset(t){return L(`${U}/datasets/${t}`,{method:"DELETE"})},listPresets(){return L(`${X}`)},createPreset(t,l,n,c){return L(`${X}`,{method:"POST",body:JSON.stringify({name:t,repo:l,column:n,split:c})})},updatePreset(t,l){return L(`${X}/${t}`,{method:"PUT",body:JSON.stringify(l)})},deletePreset(t){return L(`${X}/${t}`,{method:"DELETE"})}};function ie(){const t=i.useRef(re().params),[l,n]=i.useState([]),[c,p]=i.useState([]),[s,x]=i.useState("all"),[b,g]=i.useState({}),[h,S]=i.useState({}),[I,j]=i.useState(null),[w,k]=i.useState({}),[o,m]=i.useState(null);i.useEffect(()=>{A.listPresets().then(p).catch(()=>{})},[]),i.useEffect(()=>{const a=re().params,d=parseInt(a.get("q")||"0"),f=parseInt(a.get("s")||"0"),u=a.get("filter")||"all";x(u),(!isNaN(d)||!isNaN(f))&&(window.__initialQ=isNaN(d)?0:d,window.__initialS=isNaN(f)?0:f)},[]);const y=i.useMemo(()=>{const r={};for(const a of l){const d=a.questionFingerprint;r[d]||(r[d]=[]),r[d].push(a)}return r},[l]),P=i.useMemo(()=>Object.keys(y).sort(),[y]);i.useEffect(()=>{if(o&&y[o])return;const r=P.find(a=>y[a].some(d=>d.active));r?m(r):P.length>0?m(P[0]):m(null)},[P,y,o]);const N=i.useMemo(()=>l.filter(r=>r.active&&r.questionFingerprint===o),[l,o]),[F,W]=i.useState([]);i.useEffect(()=>{const r=new Set(N.map(a=>a.id));W(a=>{const d=a.filter(v=>r.has(v)),f=N.map(v=>v.id).filter(v=>!a.includes(v)),u=[...d,...f];return u.length===a.length&&u.every((v,C)=>v===a[C])?a:u})},[N]);const H=i.useMemo(()=>{const r=new Map(N.map(a=>[a.id,a]));return F.map(a=>r.get(a)).filter(a=>a!==void 0)},[N,F]),Y=i.useCallback((r,a)=>{r!==a&&W(d=>{const f=[...d],u=f.indexOf(r),v=f.indexOf(a);return u===-1||v===-1?d:(f.splice(u,1),f.splice(v,0,r),f)})},[]),D=o?w[o]:void 0,E=(D==null?void 0:D.questionIdx)??0,M=(D==null?void 0:D.sampleIdx)??0,G=i.useCallback(r=>{o&&k(a=>{const d=a[o]??{questionIdx:0,sampleIdx:0},f=typeof r=="function"?r(d.questionIdx):r;return{...a,[o]:{...d,questionIdx:f}}})},[o]),B=i.useCallback(r=>{o&&k(a=>{const d=a[o]??{questionIdx:0,sampleIdx:0},f=typeof r=="function"?r(d.sampleIdx):r;return{...a,[o]:{...d,sampleIdx:f}}})},[o]);i.useEffect(()=>{const r=new URLSearchParams,a=l.filter(d=>d.active);a.length>0&&(r.set("repos",a.map(d=>d.repo).join(",")),r.set("cols",a.map(d=>d.column).join(",")),r.set("pcols",a.map(d=>d.promptColumn||"formatted_prompt").join(","))),r.set("q",String(E)),r.set("s",String(M)),s!=="all"&&r.set("filter",s),o&&r.set("group",o),le({params:r})},[l,E,M,s,o]),i.useEffect(()=>{N.forEach(r=>{const a=`${r.id}:${E}`;b[a]||A.getQuestion(r.id,E).then(d=>{g(f=>({...f,[a]:d}))}).catch(()=>{})})},[E,N]);const O=i.useCallback(async(r,a,d,f,u,v)=>{S(C=>({...C,[r]:!0})),j(null);try{const{question_fingerprint:C,...Q}=await A.loadDataset(r,a,d,f),V=C??"",ee={...Q,questionFingerprint:V,active:!0,presetId:u,presetName:v};n(T=>T.some(q=>q.id===ee.id)?T:[...T,ee]),k(T=>{if(T[V])return T;const q=window,ne=typeof q.__initialQ=="number"?q.__initialQ:0,oe=typeof q.__initialS=="number"?q.__initialS:0,te=Object.keys(T).length===0;return{...T,[V]:{questionIdx:te?ne:0,sampleIdx:te?oe:0}}}),m(V)}catch(C){j(C instanceof Error?C.message:"Failed to load dataset")}finally{S(C=>({...C,[r]:!1}))}},[]);i.useEffect(()=>{var u,v,C;const r=t.current,a=((u=r.get("repos"))==null?void 0:u.split(",").filter(Boolean))||[],d=((v=r.get("cols"))==null?void 0:v.split(","))||[],f=((C=r.get("pcols"))==null?void 0:C.split(","))||[];for(let Q=0;Q<a.length;Q++)O(a[Q],d[Q]||void 0,void 0,f[Q]||void 0)},[O]);const R=i.useCallback(async r=>{await A.unloadDataset(r).catch(()=>{}),n(a=>a.filter(d=>d.id!==r))},[]),$=i.useCallback(r=>{n(a=>{const d=a.map(u=>u.id===r?{...u,active:!u.active}:u),f=d.find(u=>u.id===r);return f&&f.active&&m(f.questionFingerprint),d})},[]),_=i.useCallback((r,a)=>{n(d=>d.map(f=>f.id===r?{...f,presetName:a}:f))},[]),J=i.useCallback(r=>{n(a=>a.map(d=>d.id===r?{...d,presetId:void 0,presetName:void 0}:d))},[]),K=Math.min(...N.map(r=>r.n_rows),1/0),z=Math.max(...N.map(r=>r.n_samples),0);return{datasets:l,presets:c,setPresets:p,questionIdx:E,setQuestionIdx:G,sampleIdx:M,setSampleIdx:B,filter:s,setFilter:x,loading:h,error:I,setError:j,activeDatasets:N,orderedActiveDatasets:H,maxQuestions:K,maxSamples:z,addDataset:O,removeDataset:R,toggleDataset:$,updateDatasetPresetName:_,clearDatasetPreset:J,getQuestionData:r=>b[`${r}:${E}`],reorderPanels:Y,groups:y,groupIds:P,currentGroupId:o,setCurrentGroupId:m}}const se=[{bg:"bg-blue-500",border:"border-blue-500",text:"text-blue-400",label:"text-blue-300"},{bg:"bg-emerald-500",border:"border-emerald-500",text:"text-emerald-400",label:"text-emerald-300"},{bg:"bg-amber-500",border:"border-amber-500",text:"text-amber-400",label:"text-amber-300"},{bg:"bg-purple-500",border:"border-purple-500",text:"text-purple-400",label:"text-purple-300"},{bg:"bg-rose-500",border:"border-rose-500",text:"text-rose-400",label:"text-rose-300"},{bg:"bg-cyan-500",border:"border-cyan-500",text:"text-cyan-400",label:"text-cyan-300"}];function ce({datasets:t,presets:l,loading:n,groups:c,groupIds:p,currentGroupId:s,onAddDataset:x,onRemoveDataset:b,onToggleDataset:g,onSetCurrentGroup:h,onLoadPreset:S,onSavePreset:I,onDeletePreset:j,onUpdatePreset:w}){const[k,o]=i.useState(!1),[m,y]=i.useState(""),[P,N]=i.useState(""),[F,W]=i.useState("train"),[H,Y]=i.useState(""),[D,E]=i.useState(""),[M,G]=i.useState(null),[B,O]=i.useState(""),[R,$]=i.useState(null),[_,J]=i.useState(""),K=()=>{m.trim()&&(x(m.trim(),P.trim()||void 0,F.trim()||void 0,H.trim()||void 0),y(""),o(!1))},z=r=>{B.trim()&&(I(B.trim(),r.repo,r.column,r.split),O(""),G(null))},Z=r=>{const a=p.indexOf(r);return se[a%se.length]};return e.jsxs("div",{className:"w-72 min-w-72 bg-gray-900 border-r border-gray-700 flex flex-col h-full",children:[e.jsxs("div",{className:"p-3 border-b border-gray-700",children:[e.jsx("div",{className:"flex items-center justify-between mb-2",children:e.jsx("h3",{className:"text-xs font-semibold text-gray-400 uppercase tracking-wider",children:"Presets"})}),l.length===0?e.jsx("p",{className:"text-xs text-gray-500 italic",children:"No presets saved"}):e.jsxs(e.Fragment,{children:[l.length>6&&e.jsx("input",{type:"text",value:D,onChange:r=>E(r.target.value),placeholder:"Search presets...",className:"w-full px-2 py-1 mb-2 text-xs bg-gray-800 border border-gray-600 rounded text-gray-200 placeholder-gray-500 focus:border-blue-500 focus:outline-none"}),e.jsx("div",{className:"flex flex-wrap gap-1 max-h-32 overflow-y-auto",children:l.filter(r=>!D||r.name.toLowerCase().includes(D.toLowerCase())||r.repo.toLowerCase().includes(D.toLowerCase())).map(r=>e.jsxs("div",{className:"group relative",children:[e.jsx("button",{onClick:()=>S(r),className:"px-2 py-1 text-xs bg-gray-800 hover:bg-gray-700 rounded border border-gray-600 text-gray-300 transition-colors",title:`${r.repo} (${r.column}, ${r.split??"train"})`,children:r.name}),e.jsx("div",{className:"hidden group-hover:flex absolute top-full left-0 mt-1 z-10 gap-1",children:e.jsx("button",{onClick:()=>j(r.id),className:"px-1.5 py-0.5 text-[10px] bg-red-900 hover:bg-red-800 rounded text-red-300",children:"Delete"})})]},r.id))})]})]}),e.jsxs("div",{className:"flex-1 overflow-y-auto p-3",children:[e.jsx("h3",{className:"text-xs font-semibold text-gray-400 uppercase tracking-wider mb-2",children:"Loaded Repos"}),t.length===0?e.jsx("p",{className:"text-xs text-gray-500 italic",children:"No repos loaded. Add one below."}):e.jsx("div",{className:"space-y-3",children:p.map(r=>{const a=Z(r),d=c[r],f=r===s;return e.jsxs("div",{children:[e.jsxs("button",{onClick:()=>h(r),className:`w-full flex items-center gap-1.5 mb-1 px-1 py-0.5 rounded transition-colors ${f?"bg-gray-800":"hover:bg-gray-800/50"}`,children:[e.jsx("span",{className:`inline-block w-2 h-2 rounded-full ${a.bg} shrink-0`}),e.jsxs("span",{className:`text-[10px] font-semibold uppercase tracking-wider ${f?a.label:"text-gray-500"}`,children:["Group ",p.indexOf(r)+1,e.jsxs("span",{className:"normal-case font-normal ml-1 text-gray-600",children:["(",d.length," repo",d.length!==1?"s":"",")"]})]}),f&&e.jsx("span",{className:"text-[9px] text-gray-600 ml-auto",children:"viewing"})]}),e.jsx("div",{className:`space-y-1 border-l-2 ml-1 pl-2 ${f?a.border:"border-gray-700"}`,children:d.map(u=>e.jsxs("div",{children:[e.jsxs("div",{onClick:()=>{u.presetId&&($(R===u.id?null:u.id),J(u.presetName||""),o(!1))},className:`flex items-center gap-2 px-2 py-1.5 rounded text-sm transition-colors ${u.active?"bg-gray-800":"bg-gray-900 opacity-60"} ${R===u.id?"ring-1 ring-blue-500":""} ${u.presetId?"cursor-pointer":""}`,children:[e.jsx("input",{type:"checkbox",checked:u.active,onChange:()=>g(u.id),onClick:v=>v.stopPropagation(),className:"rounded border-gray-600 bg-gray-800 text-blue-500 focus:ring-blue-500 focus:ring-offset-0"}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"text-gray-200 truncate text-xs font-medium",title:u.presetName?`${u.presetName}
2
  ${u.repo}`:u.repo,children:u.presetName||u.name}),e.jsxs("div",{className:"text-[10px] text-gray-500",children:[u.column," | ",u.n_rows," rows | ",u.n_samples," samples"]})]}),e.jsx("button",{onClick:v=>{v.stopPropagation(),G(M===u.id?null:u.id),O("")},className:`transition-colors shrink-0 ${M===u.id?"text-blue-400":"text-gray-600 hover:text-blue-400"}`,title:"Save as preset",children:e.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 5a2 2 0 012-2h10a2 2 0 012 2v16l-7-3.5L5 21V5z"})})}),e.jsx("button",{onClick:v=>{v.stopPropagation(),b(u.id)},className:"text-gray-600 hover:text-red-400 transition-colors shrink-0",title:"Remove",children:e.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),M===u.id&&e.jsxs("div",{className:"flex gap-1 mt-1 ml-6",children:[e.jsx("input",{type:"text",value:B,onChange:v=>O(v.target.value),onKeyDown:v=>{v.key==="Enter"&&z(u),v.key==="Escape"&&G(null)},placeholder:"Preset name...",className:"flex-1 px-2 py-1 text-xs bg-gray-800 border border-gray-600 rounded text-gray-200 placeholder-gray-500 focus:border-blue-500 focus:outline-none",autoFocus:!0}),e.jsx("button",{onClick:()=>z(u),className:"px-2 py-1 text-xs bg-blue-600 hover:bg-blue-500 rounded text-white",children:"Save"})]})]},u.id))})]},r)})})]}),R&&(()=>{const r=t.find(a=>a.id===R);return r!=null&&r.presetId?e.jsxs("div",{className:"p-3 border-t border-gray-700 space-y-2",children:[e.jsx("div",{className:"text-[10px] text-gray-500 uppercase font-semibold tracking-wider",children:"Edit Preset"}),e.jsx("input",{type:"text",value:_,onChange:a=>J(a.target.value),onKeyDown:a=>{a.key==="Enter"&&_.trim()&&(w(r.presetId,r.id,{name:_.trim()}),$(null)),a.key==="Escape"&&$(null)},placeholder:"Preset name...",className:"w-full px-2 py-1 text-xs bg-gray-800 border border-gray-600 rounded text-gray-200 placeholder-gray-500 focus:border-blue-500 focus:outline-none",autoFocus:!0}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("button",{onClick:()=>{_.trim()&&(w(r.presetId,r.id,{name:_.trim()}),$(null))},disabled:!_.trim(),className:"flex-1 px-2 py-1 text-xs bg-blue-600 hover:bg-blue-500 disabled:bg-gray-700 disabled:text-gray-500 rounded text-white transition-colors",children:"Save"}),e.jsx("button",{onClick:()=>{j(r.presetId,r.id),$(null)},className:"px-2 py-1 text-xs bg-red-900 hover:bg-red-800 rounded text-red-300 transition-colors",children:"Delete"}),e.jsx("button",{onClick:()=>$(null),className:"px-2 py-1 text-xs bg-gray-700 hover:bg-gray-600 rounded text-gray-300 transition-colors",children:"Cancel"})]})]}):null})(),e.jsx("div",{className:"p-3 border-t border-gray-700",children:k?e.jsxs("div",{className:"space-y-2",children:[e.jsx("input",{type:"text",value:m,onChange:r=>y(r.target.value),onKeyDown:r=>r.key==="Enter"&&K(),placeholder:"org/dataset-name",className:"w-full px-2 py-1.5 text-sm bg-gray-800 border border-gray-600 rounded text-gray-200 placeholder-gray-500 focus:border-blue-500 focus:outline-none",autoFocus:!0}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("input",{type:"text",value:P,onChange:r=>N(r.target.value),placeholder:"Response col (auto-detect)",className:"flex-1 px-2 py-1 text-xs bg-gray-800 border border-gray-600 rounded text-gray-200 placeholder-gray-500 focus:border-blue-500 focus:outline-none"}),e.jsx("input",{type:"text",value:F,onChange:r=>W(r.target.value),placeholder:"Split",className:"w-16 px-2 py-1 text-xs bg-gray-800 border border-gray-600 rounded text-gray-200 placeholder-gray-500 focus:border-blue-500 focus:outline-none"})]}),e.jsx("div",{className:"flex gap-2",children:e.jsx("input",{type:"text",value:H,onChange:r=>Y(r.target.value),placeholder:"Prompt col (auto-detect)",className:"flex-1 px-2 py-1 text-xs bg-gray-800 border border-gray-600 rounded text-gray-200 placeholder-gray-500 focus:border-blue-500 focus:outline-none"})}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("button",{onClick:K,disabled:!m.trim()||n[m.trim()],className:"flex-1 px-2 py-1.5 text-sm bg-blue-600 hover:bg-blue-500 disabled:bg-gray-700 disabled:text-gray-500 rounded text-white transition-colors",children:n[m.trim()]?"Loading...":"Load"}),e.jsx("button",{onClick:()=>o(!1),className:"px-3 py-1.5 text-sm bg-gray-700 hover:bg-gray-600 rounded text-gray-300 transition-colors",children:"Cancel"})]})]}):e.jsx("button",{onClick:()=>{$(null),o(!0),y(""),N(""),W("train"),Y("")},className:"w-full px-3 py-2 text-sm bg-blue-600 hover:bg-blue-500 rounded text-white font-medium transition-colors",children:"+ Add Repo"})})]})}function de(t){if(!t)return[{text:"(no response)",className:"text-gray-500 italic"}];const l=[],n=t.split(`
3
  `);for(let c=0;c<n.length;c++){const p=n[c],s=p.toLowerCase().trim();let x="text-gray-300";s.startsWith("wait")||s.startsWith("hmm")||s.startsWith("but wait")?x="text-yellow-400":s.startsWith("let me try")||s.startsWith("let me reconsider")||s.startsWith("let me think")?x="text-cyan-400":s.startsWith("so the answer")||s.startsWith("so the expression")||s.startsWith("therefore")||s.startsWith("the final")?x="text-green-400 font-bold":s.startsWith("i give up")||s.startsWith("i can't find")||s.startsWith("i'm stuck")||s.startsWith("i'm sorry")?x="text-red-400 font-bold":p.includes("=")&&/[+\-*/]/.test(p)&&(x="text-gray-100"),l.push({text:p,className:x}),c<n.length-1&&l.push({text:`
4
  `,className:""})}return l}function ue(t){if(!t||!t.trim())return[];try{const l=JSON.parse(t);if(Array.isArray(l)&&l.length>0&&l[0].role!==void 0)return l.map(n=>({role:String(n.role||"unknown"),content:String(n.content??"")}))}catch{}if(t.includes("<|im_start|>"))return t.split("<|im_start|>").filter(Boolean).map(n=>{const c=n.indexOf(`
frontend/dist/assets/{PlanRevisionsApp-C6iQwYC9.js β†’ PlanRevisionsApp-Dm4VU5KS.js} RENAMED
@@ -1,4 +1,4 @@
1
- import{r as i,j as t}from"./index-Br9e1W0j.js";function S(r,p){const x=r.split(`
2
  `),n=p.split(`
3
  `),d=new Set(x),m=new Set(n),s=[];let o=0,a=0;for(;o<x.length||a<n.length;){const u=x[o],l=n[a];o>=x.length?(s.push({text:n[a],type:"add"}),a++):a>=n.length?(s.push({text:x[o],type:"del"}),o++):u===l?(s.push({text:u,type:"same"}),o++,a++):m.has(u)?d.has(l)?(s.push({text:u,type:"del"}),s.push({text:l,type:"add"}),o++,a++):(s.push({text:l,type:"add"}),a++):(s.push({text:u,type:"del"}),o++)}return s}function _({prev:r,curr:p}){const x=i.useMemo(()=>S(r,p),[r,p]);return t.jsx("pre",{className:"text-xs font-mono whitespace-pre-wrap leading-relaxed",children:x.map((n,d)=>n.type==="same"?t.jsx("span",{className:"text-gray-300",children:n.text+`
4
  `},d):n.type==="add"?t.jsx("span",{className:"bg-green-900/40 text-green-300",children:"+ "+n.text+`
 
1
+ import{r as i,j as t}from"./index-BFtcA7GQ.js";function S(r,p){const x=r.split(`
2
  `),n=p.split(`
3
  `),d=new Set(x),m=new Set(n),s=[];let o=0,a=0;for(;o<x.length||a<n.length;){const u=x[o],l=n[a];o>=x.length?(s.push({text:n[a],type:"add"}),a++):a>=n.length?(s.push({text:x[o],type:"del"}),o++):u===l?(s.push({text:u,type:"same"}),o++,a++):m.has(u)?d.has(l)?(s.push({text:u,type:"del"}),s.push({text:l,type:"add"}),o++,a++):(s.push({text:l,type:"add"}),a++):(s.push({text:u,type:"del"}),o++)}return s}function _({prev:r,curr:p}){const x=i.useMemo(()=>S(r,p),[r,p]);return t.jsx("pre",{className:"text-xs font-mono whitespace-pre-wrap leading-relaxed",children:x.map((n,d)=>n.type==="same"?t.jsx("span",{className:"text-gray-300",children:n.text+`
4
  `},d):n.type==="add"?t.jsx("span",{className:"bg-green-900/40 text-green-300",children:"+ "+n.text+`
frontend/dist/assets/{ScoutRunsApp-CjdPIJcI.js β†’ ScoutRunsApp-BqSa3vbC.js} RENAMED
@@ -1,4 +1,4 @@
1
- import{r as n,j as e}from"./index-Br9e1W0j.js";const _={reasoning:{border:"border-purple-700",labelColor:"text-purple-400",bg:"bg-purple-950/30"},tool_call:{border:"border-blue-700",labelColor:"text-blue-400",bg:"bg-blue-950/30"},tool_result:{border:"border-gray-600",labelColor:"text-gray-400",bg:"bg-gray-800/30"},final_answer:{border:"border-green-700",labelColor:"text-green-400",bg:"bg-green-950/30"},unknown:{border:"border-gray-700",labelColor:"text-gray-500",bg:""}};function h(a){if(!a)return[];const l=[],g=a.split(`
2
 
3
  ---
4
 
 
1
+ import{r as n,j as e}from"./index-BFtcA7GQ.js";const _={reasoning:{border:"border-purple-700",labelColor:"text-purple-400",bg:"bg-purple-950/30"},tool_call:{border:"border-blue-700",labelColor:"text-blue-400",bg:"bg-blue-950/30"},tool_result:{border:"border-gray-600",labelColor:"text-gray-400",bg:"bg-gray-800/30"},final_answer:{border:"border-green-700",labelColor:"text-green-400",bg:"bg-green-950/30"},unknown:{border:"border-gray-700",labelColor:"text-gray-500",bg:""}};function h(a){if(!a)return[];const l=[],g=a.split(`
2
 
3
  ---
4
 
frontend/dist/assets/SelectedToolsApp-BXaKmpYg.js ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import{r as n,j as e}from"./index-BFtcA7GQ.js";const E={reasoning:{border:"border-purple-700",labelColor:"text-purple-400",bg:"bg-purple-950/30"},tool_call:{border:"border-blue-700",labelColor:"text-blue-400",bg:"bg-blue-950/30"},tool_result:{border:"border-gray-600",labelColor:"text-gray-400",bg:"bg-gray-800/30"},final_answer:{border:"border-green-700",labelColor:"text-green-400",bg:"bg-green-950/30"},unknown:{border:"border-gray-700",labelColor:"text-gray-500",bg:""}};function $(a){if(!a)return[];const l=[],d=a.split(/\n\n(?=\[)/);for(const o of d){const r=o.trim();r.startsWith("[Reasoning]:")?l.push({type:"reasoning",label:"Reasoning",content:r.slice(12).trim()}):r.startsWith("[Tool call]")?l.push({type:"tool_call",label:"Tool Call",content:r.slice(11).trim()}):r.startsWith("[Tool result]:")?l.push({type:"tool_result",label:"Tool Result",content:r.slice(14).trim()}):r.startsWith("[Final answer]:")?l.push({type:"final_answer",label:"Final Answer",content:r.slice(15).trim()}):r&&l.push({type:"unknown",label:"β€”",content:r})}return l}function F(a){if(!a)return[];const l=[],d=a.split(`
2
+
3
+ ---
4
+
5
+ `);for(const o of d){const r=o.trim();if(r.startsWith(`[Reasoning]
6
+ `))l.push({type:"reasoning",label:"Reasoning",content:r.slice(12).trim()});else if(r.startsWith("[Tool Call:")){const u=`
7
+
8
+ [Tool Result]
9
+ `,p=r.indexOf(u),i=r.indexOf(`]
10
+ `),x=i>=0?r.slice(11,i).trim():"unknown";if(p>=0){const g=r.slice(0,p).replace(/^\[Tool Call:[^\]]*\]\n/,"").trim(),b=r.slice(p+u.length).trim();l.push({type:"tool_call",label:`Tool Call: ${x}`,content:g}),l.push({type:"tool_result",label:"Tool Result",content:b})}else{const g=r.replace(/^\[Tool Call:[^\]]*\]\n/,"").trim();l.push({type:"tool_call",label:`Tool Call: ${x}`,content:g})}}else r.startsWith(`[Final Answer]
11
+ `)?l.push({type:"final_answer",label:"Final Answer",content:r.slice(15).trim()}):r&&l.push({type:"unknown",label:"β€”",content:r})}return l}function k({blocks:a}){return a.length===0?e.jsx("div",{className:"text-gray-500 text-xs italic",children:"No steps."}):e.jsx("div",{className:"space-y-2",children:a.map((l,d)=>{const o=E[l.type];return e.jsxs("div",{className:`border-l-2 ${o.border} ${o.bg} pl-3 py-1.5 rounded-r`,children:[e.jsx("div",{className:`text-[10px] font-bold uppercase tracking-widest mb-1 ${o.labelColor}`,children:l.label??l.type}),e.jsx("pre",{className:"text-xs text-gray-300 whitespace-pre-wrap font-mono leading-relaxed",children:l.content})]},d)})})}function W(){const[a,l]=n.useState([]),[d,o]=n.useState(!0),[r,u]=n.useState(null),[p,i]=n.useState(0),[x,g]=n.useState(""),[b,f]=n.useState("all"),[h,_]=n.useState("traj_summary_orig_ext"),[j,C]=n.useState({});n.useEffect(()=>{o(!0),l([]),i(0),fetch(`/api/selected-tools/?variant=${encodeURIComponent(h)}`).then(t=>{if(!t.ok)throw new Error(t.statusText);return t.json()}).then(t=>{l(t.rows),t.variants&&C(t.variants),o(!1)}).catch(t=>{u(t.message),o(!1)})},[h]);const y=n.useMemo(()=>{let t=a;if(b==="direct"&&(t=t.filter(c=>c.direct_answer)),b==="searched"&&(t=t.filter(c=>!c.direct_answer)),x.trim()){const c=x.toLowerCase();t=t.filter(q=>q.query_id.includes(c))}return t},[a,x,b]),s=y[p]??null,T=n.useMemo(()=>s?$(s.excerpt):[],[s]),S=n.useMemo(()=>s?F(s.new_trajectory):[],[s]),N=a.filter(t=>t.direct_answer).length,R=a.length?Math.round(100*N/a.length):0,m=a.filter(t=>t.correct!==null&&t.correct!==void 0),v=m.filter(t=>t.correct===!0).length,w=m.length?Math.round(100*v/m.length):null;return d?e.jsx("div",{className:"h-full flex items-center justify-center text-gray-400",children:"Loading from HuggingFace…"}):r?e.jsxs("div",{className:"h-full flex items-center justify-center text-red-400",children:["Error: ",r]}):e.jsxs("div",{className:"h-full flex overflow-hidden bg-gray-950 text-gray-100",children:[e.jsxs("div",{className:"w-64 shrink-0 flex flex-col border-r border-gray-800 bg-gray-900",children:[Object.keys(j).length>0&&e.jsxs("div",{className:"px-2 py-2 border-b border-gray-800 bg-gray-900/80",children:[e.jsx("div",{className:"text-[10px] text-gray-500 uppercase tracking-widest mb-1",children:"Variant"}),e.jsx("select",{value:h,onChange:t=>{_(t.target.value),f("all"),g("")},className:"w-full bg-gray-800 border border-gray-700 text-gray-200 text-xs rounded px-2 py-1.5",children:Object.entries(j).map(([t,c])=>e.jsx("option",{value:t,children:c.label},t))})]}),e.jsxs("div",{className:"px-3 py-2 border-b border-gray-800 bg-gray-900/80 space-y-1.5",children:[w!==null&&e.jsxs("div",{children:[e.jsx("div",{className:"text-[10px] text-gray-500 uppercase tracking-widest mb-0.5",children:"Accuracy"}),e.jsxs("div",{className:"text-lg font-bold text-sky-400",children:[w,"%"]}),e.jsxs("div",{className:"text-[10px] text-gray-600",children:[v," / ",m.length," correct"]})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-[10px] text-gray-500 uppercase tracking-widest mb-0.5",children:"Direct-answer rate"}),e.jsxs("div",{className:"text-base font-bold text-emerald-400",children:[R,"%"]}),e.jsxs("div",{className:"text-[10px] text-gray-600",children:[N," / ",a.length," no tool calls"]})]})]}),e.jsx("div",{className:"flex gap-1 px-2 py-2 border-b border-gray-800",children:["all","direct","searched"].map(t=>e.jsx("button",{onClick:()=>{f(t),i(0)},className:`flex-1 text-[10px] py-1 rounded border transition-colors capitalize ${b===t?t==="direct"?"bg-emerald-900/60 border-emerald-600 text-emerald-300":t==="searched"?"bg-blue-900/60 border-blue-600 text-blue-300":"bg-gray-700 border-gray-500 text-gray-200":"bg-gray-800/50 border-gray-700 text-gray-500 hover:border-gray-500"}`,children:t},t))}),e.jsxs("div",{className:"px-2 py-1.5 border-b border-gray-800",children:[e.jsx("input",{type:"text",placeholder:"Search query ID…",value:x,onChange:t=>{g(t.target.value),i(0)},className:"w-full bg-gray-800 border border-gray-700 text-gray-200 text-xs rounded px-2 py-1.5 placeholder-gray-600"}),e.jsxs("div",{className:"text-[10px] text-gray-600 mt-1",children:[y.length," / ",a.length]})]}),e.jsx("div",{className:"flex-1 overflow-y-auto",children:y.map((t,c)=>e.jsxs("button",{onClick:()=>i(c),className:`w-full text-left px-3 py-2 border-b border-gray-800/50 text-xs transition-colors ${p===c?"bg-blue-900/40 text-blue-200 border-l-2 border-l-blue-500":"text-gray-400 hover:bg-gray-800"}`,children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("span",{className:"font-medium text-gray-200",children:["#",t.query_id]}),e.jsxs("div",{className:"flex items-center gap-1",children:[t.correct===!0&&e.jsx("span",{className:"text-[9px] px-1.5 py-0.5 rounded-full bg-green-900/60 text-green-400 border border-green-800",children:"βœ“"}),t.correct===!1&&e.jsx("span",{className:"text-[9px] px-1.5 py-0.5 rounded-full bg-red-900/60 text-red-400 border border-red-800",children:"βœ—"}),t.direct_answer?e.jsx("span",{className:"text-[9px] px-1.5 py-0.5 rounded-full bg-emerald-900/60 text-emerald-400 border border-emerald-800",children:"direct"}):e.jsxs("span",{className:"text-[9px] px-1.5 py-0.5 rounded-full bg-blue-900/60 text-blue-400 border border-blue-800",children:[t.total_tool_calls," calls"]})]})]}),e.jsxs("div",{className:"text-[10px] text-gray-600 mt-0.5",children:["k=",t.k_effective," selected steps"]})]},t.query_id))})]}),s?e.jsxs("div",{className:"flex-1 flex flex-col min-w-0 overflow-hidden",children:[e.jsxs("div",{className:"px-4 py-2 bg-gray-900/60 border-b border-gray-800 shrink-0",children:[e.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[e.jsxs("span",{className:"text-sm font-medium text-gray-100",children:["Query #",s.query_id]}),s.correct===!0&&e.jsx("span",{className:"text-xs px-2 py-0.5 rounded-full bg-green-900/50 text-green-300 border border-green-800 font-semibold",children:"βœ“ Correct"}),s.correct===!1&&e.jsx("span",{className:"text-xs px-2 py-0.5 rounded-full bg-red-900/50 text-red-300 border border-red-800 font-semibold",children:"βœ— Incorrect"}),s.direct_answer?e.jsx("span",{className:"text-xs px-2 py-0.5 rounded-full bg-emerald-900/50 text-emerald-300 border border-emerald-800",children:"Direct answer"}):e.jsxs("span",{className:"text-xs px-2 py-0.5 rounded-full bg-blue-900/50 text-blue-300 border border-blue-800",children:[s.total_tool_calls," tool calls"]}),e.jsxs("span",{className:"text-xs text-gray-500",children:["k=",s.k_effective," steps selected"]}),e.jsx("span",{className:`text-xs px-2 py-0.5 rounded-full ${s.status==="completed"?"bg-gray-800 text-gray-400":"bg-amber-900/50 text-amber-300"}`,children:s.status})]}),s.question&&e.jsxs("div",{className:"mt-1.5 text-xs text-gray-200 leading-snug bg-gray-800/40 rounded px-2 py-1.5 border border-gray-700",children:[e.jsx("span",{className:"text-[10px] font-bold uppercase tracking-widest text-violet-400 mr-2",children:"Question"}),s.question]}),s.correct_answer&&e.jsxs("div",{className:"mt-1 text-xs leading-snug bg-gray-800/40 rounded px-2 py-1.5 border border-gray-700 flex items-start gap-2",children:[e.jsx("span",{className:"text-[10px] font-bold uppercase tracking-widest text-green-400 shrink-0 mt-0.5",children:"Answer"}),e.jsx("span",{className:s.correct===!0?"text-green-300":s.correct===!1?"text-red-300":"text-gray-300",children:s.correct_answer})]}),s.selected_indices.length>0&&e.jsxs("div",{className:"mt-1.5 flex items-center gap-1.5 flex-wrap",children:[e.jsx("span",{className:"text-[10px] font-bold uppercase tracking-widest text-gray-500",children:"Selected steps"}),s.selected_indices.map(t=>e.jsxs("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-gray-800 border border-gray-700 text-gray-300 font-mono",children:["#",t]},t))]}),s.rationale&&e.jsxs("div",{className:"mt-1.5 text-xs text-gray-400 leading-snug bg-gray-800/50 rounded px-2 py-1.5 border border-gray-700",children:[e.jsx("span",{className:"text-[10px] font-bold uppercase tracking-widest text-amber-500 mr-2",children:"Rationale"}),s.rationale]})]}),e.jsxs("div",{className:"flex-1 flex overflow-hidden min-w-0",children:[e.jsxs("div",{className:"flex-1 flex flex-col min-w-0 border-r border-gray-800 overflow-hidden",children:[e.jsxs("div",{className:"px-3 py-1.5 bg-gray-900/40 border-b border-gray-800 shrink-0",children:[e.jsx("span",{className:"text-[11px] font-semibold text-amber-400 uppercase tracking-widest",children:"Selected Tool Calls"}),e.jsxs("span",{className:"text-[10px] text-gray-600 ml-2",children:["reference trajectory Β· ",s.k_effective," steps"]})]}),e.jsx("div",{className:"flex-1 overflow-y-auto p-3",children:e.jsx(k,{blocks:T})})]}),e.jsxs("div",{className:"flex-1 flex flex-col min-w-0 overflow-hidden",children:[e.jsxs("div",{className:"px-3 py-1.5 bg-gray-900/40 border-b border-gray-800 shrink-0",children:[e.jsx("span",{className:"text-[11px] font-semibold text-sky-400 uppercase tracking-widest",children:"New Trajectory"}),e.jsx("span",{className:"text-[10px] text-gray-600 ml-2",children:"gpt-oss-120b Β· conditioned on selected steps"})]}),e.jsx("div",{className:"flex-1 overflow-y-auto p-3",children:e.jsx(k,{blocks:S})})]})]})]}):e.jsx("div",{className:"flex-1 flex items-center justify-center text-gray-500",children:"No query selected."})]})}export{W as default};
frontend/dist/assets/SelectedToolsApp-O2UtdiCF.js DELETED
@@ -1,11 +0,0 @@
1
- import{r as n,j as e}from"./index-Br9e1W0j.js";const S={reasoning:{border:"border-purple-700",labelColor:"text-purple-400",bg:"bg-purple-950/30"},tool_call:{border:"border-blue-700",labelColor:"text-blue-400",bg:"bg-blue-950/30"},tool_result:{border:"border-gray-600",labelColor:"text-gray-400",bg:"bg-gray-800/30"},final_answer:{border:"border-green-700",labelColor:"text-green-400",bg:"bg-green-950/30"},unknown:{border:"border-gray-700",labelColor:"text-gray-500",bg:""}};function R(l){if(!l)return[];const s=[],i=l.split(/\n\n(?=\[)/);for(const o of i){const r=o.trim();r.startsWith("[Reasoning]:")?s.push({type:"reasoning",label:"Reasoning",content:r.slice(12).trim()}):r.startsWith("[Tool call]")?s.push({type:"tool_call",label:"Tool Call",content:r.slice(11).trim()}):r.startsWith("[Tool result]:")?s.push({type:"tool_result",label:"Tool Result",content:r.slice(14).trim()}):r.startsWith("[Final answer]:")?s.push({type:"final_answer",label:"Final Answer",content:r.slice(15).trim()}):r&&s.push({type:"unknown",label:"β€”",content:r})}return s}function E(l){if(!l)return[];const s=[],i=l.split(`
2
-
3
- ---
4
-
5
- `);for(const o of i){const r=o.trim();if(r.startsWith(`[Reasoning]
6
- `))s.push({type:"reasoning",label:"Reasoning",content:r.slice(12).trim()});else if(r.startsWith("[Tool Call:")){const u=`
7
-
8
- [Tool Result]
9
- `,p=r.indexOf(u),d=r.indexOf(`]
10
- `),x=d>=0?r.slice(11,d).trim():"unknown";if(p>=0){const b=r.slice(0,p).replace(/^\[Tool Call:[^\]]*\]\n/,"").trim(),g=r.slice(p+u.length).trim();s.push({type:"tool_call",label:`Tool Call: ${x}`,content:b}),s.push({type:"tool_result",label:"Tool Result",content:g})}else{const b=r.replace(/^\[Tool Call:[^\]]*\]\n/,"").trim();s.push({type:"tool_call",label:`Tool Call: ${x}`,content:b})}}else r.startsWith(`[Final Answer]
11
- `)?s.push({type:"final_answer",label:"Final Answer",content:r.slice(15).trim()}):r&&s.push({type:"unknown",label:"β€”",content:r})}return s}function N({blocks:l}){return l.length===0?e.jsx("div",{className:"text-gray-500 text-xs italic",children:"No steps."}):e.jsx("div",{className:"space-y-2",children:l.map((s,i)=>{const o=S[s.type];return e.jsxs("div",{className:`border-l-2 ${o.border} ${o.bg} pl-3 py-1.5 rounded-r`,children:[e.jsx("div",{className:`text-[10px] font-bold uppercase tracking-widest mb-1 ${o.labelColor}`,children:s.label??s.type}),e.jsx("pre",{className:"text-xs text-gray-300 whitespace-pre-wrap font-mono leading-relaxed",children:s.content})]},i)})})}function F(){const[l,s]=n.useState([]),[i,o]=n.useState(!0),[r,u]=n.useState(null),[p,d]=n.useState(0),[x,b]=n.useState(""),[g,y]=n.useState("all"),[m,v]=n.useState("traj_summary_orig_ext"),[f,w]=n.useState({});n.useEffect(()=>{o(!0),s([]),d(0),fetch(`/api/selected-tools/?variant=${encodeURIComponent(m)}`).then(t=>{if(!t.ok)throw new Error(t.statusText);return t.json()}).then(t=>{s(t.rows),t.variants&&w(t.variants),o(!1)}).catch(t=>{u(t.message),o(!1)})},[m]);const h=n.useMemo(()=>{let t=l;if(g==="direct"&&(t=t.filter(c=>c.direct_answer)),g==="searched"&&(t=t.filter(c=>!c.direct_answer)),x.trim()){const c=x.toLowerCase();t=t.filter(T=>T.query_id.includes(c))}return t},[l,x,g]),a=h[p]??null,_=n.useMemo(()=>a?R(a.excerpt):[],[a]),k=n.useMemo(()=>a?E(a.new_trajectory):[],[a]),j=l.filter(t=>t.direct_answer).length,C=l.length?Math.round(100*j/l.length):0;return i?e.jsx("div",{className:"h-full flex items-center justify-center text-gray-400",children:"Loading from HuggingFace…"}):r?e.jsxs("div",{className:"h-full flex items-center justify-center text-red-400",children:["Error: ",r]}):e.jsxs("div",{className:"h-full flex overflow-hidden bg-gray-950 text-gray-100",children:[e.jsxs("div",{className:"w-64 shrink-0 flex flex-col border-r border-gray-800 bg-gray-900",children:[Object.keys(f).length>0&&e.jsxs("div",{className:"px-2 py-2 border-b border-gray-800 bg-gray-900/80",children:[e.jsx("div",{className:"text-[10px] text-gray-500 uppercase tracking-widest mb-1",children:"Variant"}),e.jsx("select",{value:m,onChange:t=>{v(t.target.value),y("all"),b("")},className:"w-full bg-gray-800 border border-gray-700 text-gray-200 text-xs rounded px-2 py-1.5",children:Object.entries(f).map(([t,c])=>e.jsx("option",{value:t,children:c.label},t))})]}),e.jsxs("div",{className:"px-3 py-2 border-b border-gray-800 bg-gray-900/80",children:[e.jsx("div",{className:"text-[10px] text-gray-500 uppercase tracking-widest mb-1",children:"Direct-answer rate"}),e.jsxs("div",{className:"text-lg font-bold text-emerald-400",children:[C,"%"]}),e.jsxs("div",{className:"text-[10px] text-gray-600",children:[j," / ",l.length," no tool calls"]})]}),e.jsx("div",{className:"flex gap-1 px-2 py-2 border-b border-gray-800",children:["all","direct","searched"].map(t=>e.jsx("button",{onClick:()=>{y(t),d(0)},className:`flex-1 text-[10px] py-1 rounded border transition-colors capitalize ${g===t?t==="direct"?"bg-emerald-900/60 border-emerald-600 text-emerald-300":t==="searched"?"bg-blue-900/60 border-blue-600 text-blue-300":"bg-gray-700 border-gray-500 text-gray-200":"bg-gray-800/50 border-gray-700 text-gray-500 hover:border-gray-500"}`,children:t},t))}),e.jsxs("div",{className:"px-2 py-1.5 border-b border-gray-800",children:[e.jsx("input",{type:"text",placeholder:"Search query ID…",value:x,onChange:t=>{b(t.target.value),d(0)},className:"w-full bg-gray-800 border border-gray-700 text-gray-200 text-xs rounded px-2 py-1.5 placeholder-gray-600"}),e.jsxs("div",{className:"text-[10px] text-gray-600 mt-1",children:[h.length," / ",l.length]})]}),e.jsx("div",{className:"flex-1 overflow-y-auto",children:h.map((t,c)=>e.jsxs("button",{onClick:()=>d(c),className:`w-full text-left px-3 py-2 border-b border-gray-800/50 text-xs transition-colors ${p===c?"bg-blue-900/40 text-blue-200 border-l-2 border-l-blue-500":"text-gray-400 hover:bg-gray-800"}`,children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("span",{className:"font-medium text-gray-200",children:["#",t.query_id]}),t.direct_answer?e.jsx("span",{className:"text-[9px] px-1.5 py-0.5 rounded-full bg-emerald-900/60 text-emerald-400 border border-emerald-800",children:"direct"}):e.jsxs("span",{className:"text-[9px] px-1.5 py-0.5 rounded-full bg-blue-900/60 text-blue-400 border border-blue-800",children:[t.total_tool_calls," calls"]})]}),e.jsxs("div",{className:"text-[10px] text-gray-600 mt-0.5",children:["k=",t.k_effective," selected steps"]})]},t.query_id))})]}),a?e.jsxs("div",{className:"flex-1 flex flex-col min-w-0 overflow-hidden",children:[e.jsxs("div",{className:"px-4 py-2 bg-gray-900/60 border-b border-gray-800 shrink-0",children:[e.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[e.jsxs("span",{className:"text-sm font-medium text-gray-100",children:["Query #",a.query_id]}),a.direct_answer?e.jsx("span",{className:"text-xs px-2 py-0.5 rounded-full bg-emerald-900/50 text-emerald-300 border border-emerald-800",children:"Direct answer"}):e.jsxs("span",{className:"text-xs px-2 py-0.5 rounded-full bg-blue-900/50 text-blue-300 border border-blue-800",children:[a.total_tool_calls," tool calls"]}),e.jsxs("span",{className:"text-xs text-gray-500",children:["k=",a.k_effective," steps selected"]}),e.jsx("span",{className:`text-xs px-2 py-0.5 rounded-full ${a.status==="completed"?"bg-gray-800 text-gray-400":"bg-amber-900/50 text-amber-300"}`,children:a.status})]}),e.jsxs("div",{className:"mt-1.5 flex items-center gap-1.5 flex-wrap",children:[e.jsx("span",{className:"text-[10px] font-bold uppercase tracking-widest text-gray-500",children:"Selected steps"}),a.selected_indices.map(t=>e.jsxs("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-gray-800 border border-gray-700 text-gray-300 font-mono",children:["#",t]},t))]}),e.jsxs("div",{className:"mt-1.5 text-xs text-gray-400 leading-snug bg-gray-800/50 rounded px-2 py-1.5 border border-gray-700",children:[e.jsx("span",{className:"text-[10px] font-bold uppercase tracking-widest text-amber-500 mr-2",children:"Rationale"}),a.rationale]})]}),e.jsxs("div",{className:"flex-1 flex overflow-hidden min-w-0",children:[e.jsxs("div",{className:"flex-1 flex flex-col min-w-0 border-r border-gray-800 overflow-hidden",children:[e.jsxs("div",{className:"px-3 py-1.5 bg-gray-900/40 border-b border-gray-800 shrink-0",children:[e.jsx("span",{className:"text-[11px] font-semibold text-amber-400 uppercase tracking-widest",children:"Selected Tool Calls"}),e.jsxs("span",{className:"text-[10px] text-gray-600 ml-2",children:["reference trajectory Β· ",a.k_effective," steps"]})]}),e.jsx("div",{className:"flex-1 overflow-y-auto p-3",children:e.jsx(N,{blocks:_})})]}),e.jsxs("div",{className:"flex-1 flex flex-col min-w-0 overflow-hidden",children:[e.jsxs("div",{className:"px-3 py-1.5 bg-gray-900/40 border-b border-gray-800 shrink-0",children:[e.jsx("span",{className:"text-[11px] font-semibold text-sky-400 uppercase tracking-widest",children:"New Trajectory"}),e.jsx("span",{className:"text-[10px] text-gray-600 ml-2",children:"gpt-oss-120b Β· conditioned on selected steps"})]}),e.jsx("div",{className:"flex-1 overflow-y-auto p-3",children:e.jsx(N,{blocks:k})})]})]})]}):e.jsx("div",{className:"flex-1 flex items-center justify-center text-gray-500",children:"No query selected."})]})}export{F as default};
 
 
 
 
 
 
 
 
 
 
 
 
frontend/dist/assets/{SftDiffApp-8y9MrABD.js β†’ SftDiffApp-RlJJgAZ7.js} RENAMED
@@ -1 +1 @@
1
- import{r as d,j as e}from"./index-Br9e1W0j.js";const N={user:{bg:"bg-amber-950/40",border:"border-amber-600",label:"text-amber-400",tag:"USER MESSAGE"},reasoning:{bg:"bg-purple-950/40",border:"border-purple-600",label:"text-purple-400",tag:"REASONING"},tool_call:{bg:"bg-blue-950/40",border:"border-blue-600",label:"text-blue-400",tag:"TOOL CALL"},tool_resp:{bg:"bg-gray-800/60",border:"border-gray-600",label:"text-gray-400",tag:"TOOL RESPONSE"}};function g({kind:r,label:t,children:l}){const s=N[r];return e.jsxs("div",{className:`border-l-2 ${s.border} ${s.bg} pl-3 py-2 rounded-r mb-2`,children:[e.jsx("div",{className:`text-[9px] font-bold uppercase tracking-widest mb-1.5 ${s.label}`,children:t??s.tag}),l]})}function A(r){return r.split(/\n\n/).map(t=>t.trim()).filter(Boolean).flatMap(t=>{try{const l=JSON.parse(t);return typeof l=="object"&&l!==null&&"type"in l?[l]:[]}catch{return[]}})}function T({excerpt:r,userContent:t}){const l=d.useMemo(()=>A(r),[r]);return e.jsxs("div",{className:"space-y-0",children:[e.jsx(g,{kind:"user",children:e.jsx("pre",{className:"text-xs text-gray-200 whitespace-pre-wrap font-mono leading-relaxed",children:t})}),l.map((s,a)=>{const n=JSON.stringify(s,null,2);return s.type==="reasoning"?e.jsx(g,{kind:"reasoning",children:e.jsx("pre",{className:"text-xs text-gray-200 whitespace-pre-wrap font-mono leading-relaxed",children:n})},a):s.type==="function_call"?e.jsx(g,{kind:"tool_call",label:`TOOL CALL${s.name?`: ${s.name}`:""}`,children:e.jsx("pre",{className:"text-xs text-gray-200 whitespace-pre-wrap font-mono leading-relaxed",children:n})},a):s.type==="function_call_output"?e.jsx(g,{kind:"tool_resp",children:e.jsx("pre",{className:"text-xs text-gray-200 whitespace-pre-wrap font-mono leading-relaxed",children:n})},a):e.jsx("div",{className:"border-l-2 border-gray-700 pl-3 py-2 mb-2",children:e.jsx("pre",{className:"text-xs text-gray-400 whitespace-pre-wrap font-mono leading-relaxed",children:n})},a)})]})}function I(r){const t=[],l=/(<tool_call>[\s\S]*?<\/tool_call>)/g;let s=0,a;for(;(a=l.exec(r))!==null;){const i=r.slice(s,a.index).trim();i&&t.push({kind:"reasoning",text:i}),t.push({kind:"tool_call",text:a[1]}),s=a.index+a[1].length}const n=r.slice(s).trim();return n&&t.push({kind:"reasoning",text:n}),t}function M(r){const t=[],l=/(<think>[\s\S]*?<\/think>|<tool_call>[\s\S]*?<\/tool_call>)/g;let s=0,a;for(;(a=l.exec(r))!==null;){const i=r.slice(s,a.index).trim();i&&t.push({kind:"reasoning",text:i}),a[1].startsWith("<think>")?t.push({kind:"reasoning",text:a[1]}):t.push({kind:"tool_call",text:a[1]}),s=a.index+a[1].length}const n=r.slice(s).trim();return n&&t.push({kind:"reasoning",text:n}),t}function R({content:r,template:t}){const l=t==="qwen"?M(r):I(r),s=l.some(n=>n.kind==="tool_call"),a=N.reasoning;return e.jsxs("div",{className:`border-l-2 ${a.border} ${a.bg} pl-3 py-2 rounded-r mb-2`,children:[e.jsx("div",{className:`text-[9px] font-bold uppercase tracking-widest mb-1.5 ${a.label}`,children:s?"REASONING + TOOL CALL":"REASONING"}),l.map((n,i)=>{if(n.kind==="tool_call"){const p=N.tool_call;return e.jsxs("div",{className:`border-l-2 ${p.border} ${p.bg} pl-2 py-1.5 rounded-r mb-1.5`,children:[e.jsx("div",{className:`text-[9px] font-bold uppercase tracking-widest mb-1 ${p.label}`,children:"TOOL CALL"}),e.jsx("pre",{className:"text-xs text-gray-200 whitespace-pre-wrap font-mono leading-relaxed",children:n.text})]},i)}return e.jsx("pre",{className:"text-xs text-gray-200 whitespace-pre-wrap font-mono leading-relaxed mb-1.5",children:n.text},i)})]})}function G({messages:r,template:t}){return e.jsx("div",{className:"space-y-0",children:r.map((l,s)=>l.role==="user"&&s===0?e.jsx(g,{kind:"user",children:e.jsx("pre",{className:"text-xs text-gray-200 whitespace-pre-wrap font-mono leading-relaxed",children:l.content})},s):l.role==="user"?e.jsx(g,{kind:"tool_resp",children:e.jsx("pre",{className:"text-xs text-gray-200 whitespace-pre-wrap font-mono leading-relaxed",children:l.content})},s):e.jsx(R,{content:l.content,template:t},s))})}function D(){return e.jsxs("div",{className:"flex items-center gap-4 px-4 py-1.5 bg-gray-900/80 border-b border-gray-800 shrink-0 flex-wrap",children:[e.jsx("span",{className:"text-[9px] font-bold uppercase tracking-widest text-gray-500 mr-1",children:"Legend"}),Object.entries(N).map(([r,t])=>e.jsxs("span",{className:`flex items-center gap-1.5 text-[10px] ${t.label}`,children:[e.jsx("span",{className:`inline-block w-2.5 h-2.5 rounded-sm border ${t.border} ${t.bg}`}),t.tag]},r))]})}function B({value:r,onChange:t}){return e.jsxs("select",{value:r,onChange:l=>t(l.target.value),className:"text-xs bg-gray-800 border border-gray-600 text-gray-200 rounded px-2 py-1 ml-2 cursor-pointer",children:[e.jsx("option",{value:"gpt-oss",children:"gpt-oss"}),e.jsx("option",{value:"qwen",children:"qwen"})]})}function P(){var v,k,_,S;const[r,t]=d.useState([]),[l,s]=d.useState(!0),[a,n]=d.useState(null),[i,p]=d.useState(0),[f,E]=d.useState(""),[b,q]=d.useState("gpt-oss");d.useEffect(()=>{s(!0),fetch("/api/sft-diff/").then(o=>{if(!o.ok)throw new Error(o.statusText);return o.json()}).then(o=>{t(o.rows),s(!1)}).catch(o=>{n(o.message),s(!1)})},[]);const w=d.useMemo(()=>{if(!f.trim())return r;const o=f.toLowerCase();return r.filter(x=>{var m,u,j,h;return x.query_id.toLowerCase().includes(o)||(((u=(m=x.messages_gpt)==null?void 0:m[0])==null?void 0:u.content)??((h=(j=x.messages_qwen)==null?void 0:j[0])==null?void 0:h.content)??"").toLowerCase().includes(o)})},[r,f]),c=w[i]??null,y=c?b==="qwen"?c.messages_qwen:c.messages_gpt:null,$=((k=(v=c==null?void 0:c.messages_gpt)==null?void 0:v[0])==null?void 0:k.content)??((S=(_=c==null?void 0:c.messages_qwen)==null?void 0:_[0])==null?void 0:S.content)??"";return l?e.jsx("div",{className:"h-full flex items-center justify-center text-gray-400",children:"Loading…"}):a?e.jsxs("div",{className:"h-full flex items-center justify-center text-red-400",children:["Error: ",a]}):e.jsxs("div",{className:"h-full flex overflow-hidden bg-gray-950 text-gray-100",children:[e.jsxs("div",{className:"w-60 shrink-0 flex flex-col border-r border-gray-800 bg-gray-900",children:[e.jsxs("div",{className:"px-2 py-1.5 border-b border-gray-800",children:[e.jsx("input",{type:"text",placeholder:"Search query ID or question…",value:f,onChange:o=>{E(o.target.value),p(0)},className:"w-full bg-gray-800 border border-gray-700 text-gray-200 text-xs rounded px-2 py-1.5 placeholder-gray-600"}),e.jsxs("div",{className:"text-[10px] text-gray-600 mt-1",children:[w.length," / ",r.length]})]}),e.jsx("div",{className:"flex-1 overflow-y-auto",children:w.map((o,x)=>{var h,L,O,C;const m=((L=(h=o.messages_gpt)==null?void 0:h[0])==null?void 0:L.content)??((C=(O=o.messages_qwen)==null?void 0:O[0])==null?void 0:C.content)??"",u=m.match(/Question:\s*([\s\S]{0,120})/),j=u?u[1].trim().replace(/\n/g," "):m.slice(0,80);return e.jsxs("button",{onClick:()=>p(x),className:`w-full text-left px-3 py-2 border-b border-gray-800/50 text-xs transition-colors ${i===x?"bg-blue-900/40 text-blue-200 border-l-2 border-l-blue-500":"text-gray-400 hover:bg-gray-800"}`,children:[e.jsxs("div",{className:"font-medium text-gray-200 mb-0.5",children:["#",o.query_id]}),e.jsx("div",{className:"text-[10px] text-gray-500 leading-snug line-clamp-2",children:j})]},o.query_id+x)})})]}),c?e.jsxs("div",{className:"flex-1 flex flex-col min-w-0 overflow-hidden",children:[e.jsx(D,{}),e.jsxs("div",{className:"flex-1 flex overflow-hidden min-w-0",children:[e.jsxs("div",{className:"flex-1 flex flex-col min-w-0 border-r border-gray-800 overflow-hidden",children:[e.jsxs("div",{className:"px-3 py-1.5 bg-gray-900/60 border-b border-gray-800 shrink-0",children:[e.jsx("span",{className:"text-[11px] font-semibold text-amber-400 uppercase tracking-widest",children:"Original"}),e.jsx("span",{className:"text-[10px] text-gray-500 ml-2",children:"excerpt field β€” raw JSON items"})]}),e.jsx("div",{className:"flex-1 overflow-y-auto p-3",children:e.jsx(T,{excerpt:c.excerpt,userContent:$})})]}),e.jsxs("div",{className:"flex-1 flex flex-col min-w-0 overflow-hidden",children:[e.jsxs("div",{className:"px-3 py-1.5 bg-gray-900/60 border-b border-gray-800 shrink-0 flex items-center",children:[e.jsx("span",{className:"text-[11px] font-semibold text-sky-400 uppercase tracking-widest",children:"Converted"}),e.jsx(B,{value:b,onChange:q}),y&&e.jsxs("span",{className:"text-[10px] text-gray-500 ml-2",children:[y.length," messages"]})]}),e.jsx("div",{className:"flex-1 overflow-y-auto p-3",children:y?e.jsx(G,{messages:y,template:b}):e.jsxs("div",{className:"text-gray-500 text-xs italic mt-4",children:["Not available for ",b," template."]})})]})]})]}):e.jsx("div",{className:"flex-1 flex items-center justify-center text-gray-500",children:"No record selected."})]})}export{P as default};
 
1
+ import{r as d,j as e}from"./index-BFtcA7GQ.js";const N={user:{bg:"bg-amber-950/40",border:"border-amber-600",label:"text-amber-400",tag:"USER MESSAGE"},reasoning:{bg:"bg-purple-950/40",border:"border-purple-600",label:"text-purple-400",tag:"REASONING"},tool_call:{bg:"bg-blue-950/40",border:"border-blue-600",label:"text-blue-400",tag:"TOOL CALL"},tool_resp:{bg:"bg-gray-800/60",border:"border-gray-600",label:"text-gray-400",tag:"TOOL RESPONSE"}};function g({kind:r,label:t,children:l}){const s=N[r];return e.jsxs("div",{className:`border-l-2 ${s.border} ${s.bg} pl-3 py-2 rounded-r mb-2`,children:[e.jsx("div",{className:`text-[9px] font-bold uppercase tracking-widest mb-1.5 ${s.label}`,children:t??s.tag}),l]})}function A(r){return r.split(/\n\n/).map(t=>t.trim()).filter(Boolean).flatMap(t=>{try{const l=JSON.parse(t);return typeof l=="object"&&l!==null&&"type"in l?[l]:[]}catch{return[]}})}function T({excerpt:r,userContent:t}){const l=d.useMemo(()=>A(r),[r]);return e.jsxs("div",{className:"space-y-0",children:[e.jsx(g,{kind:"user",children:e.jsx("pre",{className:"text-xs text-gray-200 whitespace-pre-wrap font-mono leading-relaxed",children:t})}),l.map((s,a)=>{const n=JSON.stringify(s,null,2);return s.type==="reasoning"?e.jsx(g,{kind:"reasoning",children:e.jsx("pre",{className:"text-xs text-gray-200 whitespace-pre-wrap font-mono leading-relaxed",children:n})},a):s.type==="function_call"?e.jsx(g,{kind:"tool_call",label:`TOOL CALL${s.name?`: ${s.name}`:""}`,children:e.jsx("pre",{className:"text-xs text-gray-200 whitespace-pre-wrap font-mono leading-relaxed",children:n})},a):s.type==="function_call_output"?e.jsx(g,{kind:"tool_resp",children:e.jsx("pre",{className:"text-xs text-gray-200 whitespace-pre-wrap font-mono leading-relaxed",children:n})},a):e.jsx("div",{className:"border-l-2 border-gray-700 pl-3 py-2 mb-2",children:e.jsx("pre",{className:"text-xs text-gray-400 whitespace-pre-wrap font-mono leading-relaxed",children:n})},a)})]})}function I(r){const t=[],l=/(<tool_call>[\s\S]*?<\/tool_call>)/g;let s=0,a;for(;(a=l.exec(r))!==null;){const i=r.slice(s,a.index).trim();i&&t.push({kind:"reasoning",text:i}),t.push({kind:"tool_call",text:a[1]}),s=a.index+a[1].length}const n=r.slice(s).trim();return n&&t.push({kind:"reasoning",text:n}),t}function M(r){const t=[],l=/(<think>[\s\S]*?<\/think>|<tool_call>[\s\S]*?<\/tool_call>)/g;let s=0,a;for(;(a=l.exec(r))!==null;){const i=r.slice(s,a.index).trim();i&&t.push({kind:"reasoning",text:i}),a[1].startsWith("<think>")?t.push({kind:"reasoning",text:a[1]}):t.push({kind:"tool_call",text:a[1]}),s=a.index+a[1].length}const n=r.slice(s).trim();return n&&t.push({kind:"reasoning",text:n}),t}function R({content:r,template:t}){const l=t==="qwen"?M(r):I(r),s=l.some(n=>n.kind==="tool_call"),a=N.reasoning;return e.jsxs("div",{className:`border-l-2 ${a.border} ${a.bg} pl-3 py-2 rounded-r mb-2`,children:[e.jsx("div",{className:`text-[9px] font-bold uppercase tracking-widest mb-1.5 ${a.label}`,children:s?"REASONING + TOOL CALL":"REASONING"}),l.map((n,i)=>{if(n.kind==="tool_call"){const p=N.tool_call;return e.jsxs("div",{className:`border-l-2 ${p.border} ${p.bg} pl-2 py-1.5 rounded-r mb-1.5`,children:[e.jsx("div",{className:`text-[9px] font-bold uppercase tracking-widest mb-1 ${p.label}`,children:"TOOL CALL"}),e.jsx("pre",{className:"text-xs text-gray-200 whitespace-pre-wrap font-mono leading-relaxed",children:n.text})]},i)}return e.jsx("pre",{className:"text-xs text-gray-200 whitespace-pre-wrap font-mono leading-relaxed mb-1.5",children:n.text},i)})]})}function G({messages:r,template:t}){return e.jsx("div",{className:"space-y-0",children:r.map((l,s)=>l.role==="user"&&s===0?e.jsx(g,{kind:"user",children:e.jsx("pre",{className:"text-xs text-gray-200 whitespace-pre-wrap font-mono leading-relaxed",children:l.content})},s):l.role==="user"?e.jsx(g,{kind:"tool_resp",children:e.jsx("pre",{className:"text-xs text-gray-200 whitespace-pre-wrap font-mono leading-relaxed",children:l.content})},s):e.jsx(R,{content:l.content,template:t},s))})}function D(){return e.jsxs("div",{className:"flex items-center gap-4 px-4 py-1.5 bg-gray-900/80 border-b border-gray-800 shrink-0 flex-wrap",children:[e.jsx("span",{className:"text-[9px] font-bold uppercase tracking-widest text-gray-500 mr-1",children:"Legend"}),Object.entries(N).map(([r,t])=>e.jsxs("span",{className:`flex items-center gap-1.5 text-[10px] ${t.label}`,children:[e.jsx("span",{className:`inline-block w-2.5 h-2.5 rounded-sm border ${t.border} ${t.bg}`}),t.tag]},r))]})}function B({value:r,onChange:t}){return e.jsxs("select",{value:r,onChange:l=>t(l.target.value),className:"text-xs bg-gray-800 border border-gray-600 text-gray-200 rounded px-2 py-1 ml-2 cursor-pointer",children:[e.jsx("option",{value:"gpt-oss",children:"gpt-oss"}),e.jsx("option",{value:"qwen",children:"qwen"})]})}function P(){var v,k,_,S;const[r,t]=d.useState([]),[l,s]=d.useState(!0),[a,n]=d.useState(null),[i,p]=d.useState(0),[f,E]=d.useState(""),[b,q]=d.useState("gpt-oss");d.useEffect(()=>{s(!0),fetch("/api/sft-diff/").then(o=>{if(!o.ok)throw new Error(o.statusText);return o.json()}).then(o=>{t(o.rows),s(!1)}).catch(o=>{n(o.message),s(!1)})},[]);const w=d.useMemo(()=>{if(!f.trim())return r;const o=f.toLowerCase();return r.filter(x=>{var m,u,j,h;return x.query_id.toLowerCase().includes(o)||(((u=(m=x.messages_gpt)==null?void 0:m[0])==null?void 0:u.content)??((h=(j=x.messages_qwen)==null?void 0:j[0])==null?void 0:h.content)??"").toLowerCase().includes(o)})},[r,f]),c=w[i]??null,y=c?b==="qwen"?c.messages_qwen:c.messages_gpt:null,$=((k=(v=c==null?void 0:c.messages_gpt)==null?void 0:v[0])==null?void 0:k.content)??((S=(_=c==null?void 0:c.messages_qwen)==null?void 0:_[0])==null?void 0:S.content)??"";return l?e.jsx("div",{className:"h-full flex items-center justify-center text-gray-400",children:"Loading…"}):a?e.jsxs("div",{className:"h-full flex items-center justify-center text-red-400",children:["Error: ",a]}):e.jsxs("div",{className:"h-full flex overflow-hidden bg-gray-950 text-gray-100",children:[e.jsxs("div",{className:"w-60 shrink-0 flex flex-col border-r border-gray-800 bg-gray-900",children:[e.jsxs("div",{className:"px-2 py-1.5 border-b border-gray-800",children:[e.jsx("input",{type:"text",placeholder:"Search query ID or question…",value:f,onChange:o=>{E(o.target.value),p(0)},className:"w-full bg-gray-800 border border-gray-700 text-gray-200 text-xs rounded px-2 py-1.5 placeholder-gray-600"}),e.jsxs("div",{className:"text-[10px] text-gray-600 mt-1",children:[w.length," / ",r.length]})]}),e.jsx("div",{className:"flex-1 overflow-y-auto",children:w.map((o,x)=>{var h,L,O,C;const m=((L=(h=o.messages_gpt)==null?void 0:h[0])==null?void 0:L.content)??((C=(O=o.messages_qwen)==null?void 0:O[0])==null?void 0:C.content)??"",u=m.match(/Question:\s*([\s\S]{0,120})/),j=u?u[1].trim().replace(/\n/g," "):m.slice(0,80);return e.jsxs("button",{onClick:()=>p(x),className:`w-full text-left px-3 py-2 border-b border-gray-800/50 text-xs transition-colors ${i===x?"bg-blue-900/40 text-blue-200 border-l-2 border-l-blue-500":"text-gray-400 hover:bg-gray-800"}`,children:[e.jsxs("div",{className:"font-medium text-gray-200 mb-0.5",children:["#",o.query_id]}),e.jsx("div",{className:"text-[10px] text-gray-500 leading-snug line-clamp-2",children:j})]},o.query_id+x)})})]}),c?e.jsxs("div",{className:"flex-1 flex flex-col min-w-0 overflow-hidden",children:[e.jsx(D,{}),e.jsxs("div",{className:"flex-1 flex overflow-hidden min-w-0",children:[e.jsxs("div",{className:"flex-1 flex flex-col min-w-0 border-r border-gray-800 overflow-hidden",children:[e.jsxs("div",{className:"px-3 py-1.5 bg-gray-900/60 border-b border-gray-800 shrink-0",children:[e.jsx("span",{className:"text-[11px] font-semibold text-amber-400 uppercase tracking-widest",children:"Original"}),e.jsx("span",{className:"text-[10px] text-gray-500 ml-2",children:"excerpt field β€” raw JSON items"})]}),e.jsx("div",{className:"flex-1 overflow-y-auto p-3",children:e.jsx(T,{excerpt:c.excerpt,userContent:$})})]}),e.jsxs("div",{className:"flex-1 flex flex-col min-w-0 overflow-hidden",children:[e.jsxs("div",{className:"px-3 py-1.5 bg-gray-900/60 border-b border-gray-800 shrink-0 flex items-center",children:[e.jsx("span",{className:"text-[11px] font-semibold text-sky-400 uppercase tracking-widest",children:"Converted"}),e.jsx(B,{value:b,onChange:q}),y&&e.jsxs("span",{className:"text-[10px] text-gray-500 ml-2",children:[y.length," messages"]})]}),e.jsx("div",{className:"flex-1 overflow-y-auto p-3",children:y?e.jsx(G,{messages:y,template:b}):e.jsxs("div",{className:"text-gray-500 text-xs italic mt-4",children:["Not available for ",b," template."]})})]})]})]}):e.jsx("div",{className:"flex-1 flex items-center justify-center text-gray-500",children:"No record selected."})]})}export{P as default};
frontend/dist/assets/{TrajExtApp-CfgqCtlI.js β†’ TrajExtApp-DjSZ_Kko.js} RENAMED
@@ -1 +1 @@
1
- import{r as l,j as e}from"./index-Br9e1W0j.js";function S(r){try{return JSON.parse(r).map(o=>({type:["reasoning","tool_call","tool_result","final_answer"].includes(o.type)?o.type:"unknown",content:o.content}))}catch{return[]}}function T(r){if(!r||r==="(no trajectory steps)")return[];const n=[],o=r.split(/\n\n(?=\[(?:Reasoning\]:|Tool call\]|Tool result\]:|Final answer\]:))/);for(const d of o){const s=d.trim();s.startsWith("[Reasoning]:")?n.push({type:"reasoning",content:s.slice(12).trim()}):s.startsWith("[Tool call]")?n.push({type:"tool_call",content:s.slice(11).trim()}):s.startsWith("[Tool result]:")?n.push({type:"tool_result",content:s.slice(14).trim()}):s.startsWith("[Final answer]:")?n.push({type:"final_answer",content:s.slice(15).trim()}):s&&n.push({type:"unknown",content:s})}return n}const k={reasoning:{border:"border-purple-700",label:"Reasoning",labelColor:"text-purple-400",bg:"bg-purple-950/30"},tool_call:{border:"border-blue-700",label:"Tool Call",labelColor:"text-blue-400",bg:"bg-blue-950/30"},tool_result:{border:"border-gray-600",label:"Tool Result",labelColor:"text-gray-400",bg:"bg-gray-800/30"},final_answer:{border:"border-green-700",label:"Final Answer",labelColor:"text-green-400",bg:"bg-green-950/30"},unknown:{border:"border-gray-700",label:"β€”",labelColor:"text-gray-500",bg:""}};function C({row:r}){const n=l.useMemo(()=>r.trajectory_blocks?S(r.trajectory_blocks):T(r.trajectory_text),[r.trajectory_blocks,r.trajectory_text]);return n.length===0?e.jsx("div",{className:"text-gray-500 text-xs",children:"No trajectory steps."}):e.jsx("div",{className:"space-y-2",children:n.map((o,d)=>{const s=k[o.type];return e.jsxs("div",{className:`border-l-2 ${s.border} ${s.bg} pl-3 py-1 rounded-r`,children:[e.jsx("div",{className:`text-[10px] font-bold uppercase tracking-widest mb-1 ${s.labelColor}`,children:s.label}),e.jsx("pre",{className:"text-xs text-gray-300 whitespace-pre-wrap font-mono leading-relaxed",children:o.content})]},d)})})}const E={traj_ext:"Full Trajectory (Tags)",traj_orig_ext:"Full Trajectory (Original Messages)",traj_summary_ext:"Summary (Tags)",traj_summary_orig_ext:"Summary (Original Messages)",traj_summary_ext_selected_tools:"Selected Tools (Tags)",traj_summary_orig_ext_selected_tools:"Selected Tools (Original Messages)"},f=r=>E[r]??r,M=["trajectory","prompt","both"];function R(){const[r,n]=l.useState([]),[o,d]=l.useState(!0),[s,j]=l.useState(null),[b,p]=l.useState(0),[c,_]=l.useState("trajectory"),[u,N]=l.useState(""),[x,v]=l.useState("all"),[m,w]=l.useState({});l.useEffect(()=>{d(!0),fetch("/api/traj-ext/").then(t=>{if(!t.ok)throw new Error(t.statusText);return t.json()}).then(t=>{n(t.rows),d(!1)}).catch(t=>{j(t.message),d(!1)})},[]);const h=l.useMemo(()=>Array.from(new Set(r.map(i=>i.run_name??""))).filter(Boolean).sort(),[r]),y=l.useMemo(()=>{let t=r;if(x!=="all"&&(t=t.filter(g=>g.run_name===x)),!u.trim())return t;const i=u.toLowerCase();return t.filter(g=>g.query_id.includes(i)||g.question.toLowerCase().includes(i))},[r,u,x]),a=y[b]??null;return l.useEffect(()=>{a&&(c!=="prompt"&&c!=="both"||m[a.run_id]||fetch(`/api/traj-ext/${encodeURIComponent(a.run_id)}`).then(t=>t.json()).then(t=>w(i=>({...i,[a.run_id]:t.formatted_prompt??""}))).catch(()=>{}))},[a==null?void 0:a.run_id,c]),o?e.jsx("div",{className:"h-full flex items-center justify-center text-gray-400",children:"Loading traj-ext data from HuggingFace…"}):s?e.jsxs("div",{className:"h-full flex items-center justify-center text-red-400",children:["Error: ",s]}):e.jsxs("div",{className:"h-full flex overflow-hidden bg-gray-950 text-gray-100",children:[e.jsxs("div",{className:"w-64 shrink-0 flex flex-col border-r border-gray-800 bg-gray-900",children:[e.jsxs("div",{className:"p-2 border-b border-gray-800 space-y-1.5",children:[h.length>0&&e.jsxs("select",{value:x,onChange:t=>{v(t.target.value),p(0)},className:"w-full bg-gray-800 border border-gray-700 text-gray-200 text-xs rounded px-2 py-1.5",children:[e.jsxs("option",{value:"all",children:["All runs (",r.length,")"]}),h.map(t=>e.jsx("option",{value:t,children:f(t)},t))]}),e.jsx("input",{type:"text",placeholder:"Search queries…",value:u,onChange:t=>{N(t.target.value),p(0)},className:"w-full bg-gray-800 border border-gray-700 text-gray-200 text-xs rounded px-2 py-1.5 placeholder-gray-600"}),e.jsxs("div",{className:"text-[10px] text-gray-600",children:[y.length,x!=="all"||u?` / ${r.length}`:""," trajectories"]})]}),e.jsx("div",{className:"flex-1 overflow-y-auto",children:y.map((t,i)=>e.jsxs("button",{onClick:()=>p(i),className:`w-full text-left px-3 py-2 border-b border-gray-800/50 text-xs transition-colors ${b===i?"bg-blue-900/40 text-blue-200 border-l-2 border-l-blue-500":"text-gray-400 hover:bg-gray-800"}`,children:[e.jsxs("div",{className:"font-medium text-gray-200",children:["#",t.query_id]}),e.jsxs("div",{className:"text-gray-500 truncate mt-0.5",children:[t.question.slice(0,60),"…"]}),e.jsxs("div",{className:"flex gap-2 mt-1 text-[10px] text-gray-600 flex-wrap items-center",children:[e.jsxs("span",{children:[t.n_tool_calls," tools"]}),e.jsxs("span",{children:[t.n_reasoning_steps," reasoning"]}),e.jsx("span",{className:t.status==="completed"?"text-green-600":"text-amber-600",children:t.status}),t.n_tool_calls===0&&e.jsx("span",{className:"px-1 py-0.5 rounded bg-yellow-900/50 text-yellow-300 font-semibold",children:"direct"})]}),t.run_name&&x==="all"&&e.jsx("div",{className:"mt-0.5 text-[9px] text-indigo-400 truncate",children:f(t.run_name)})]},t.run_id))})]}),a?e.jsxs("div",{className:"flex-1 flex flex-col min-w-0 overflow-hidden",children:[e.jsxs("div",{className:"px-4 py-2 bg-gray-900/60 border-b border-gray-800 shrink-0",children:[e.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[e.jsxs("span",{className:"text-sm font-medium text-gray-100",children:["Query #",a.query_id]}),e.jsx("span",{className:`text-xs px-2 py-0.5 rounded-full ${a.status==="completed"?"bg-green-900/50 text-green-300":"bg-amber-900/50 text-amber-300"}`,children:a.status}),e.jsxs("span",{className:"text-xs text-gray-500",children:[a.n_tool_calls," tool calls Β· ",a.n_reasoning_steps," reasoning"]}),a.n_tool_calls===0&&e.jsx("span",{className:"px-1.5 py-0.5 rounded bg-yellow-900/50 text-yellow-300 text-xs font-semibold",children:"direct"}),e.jsx("div",{className:"ml-auto flex gap-1",children:M.map(t=>e.jsx("button",{onClick:()=>_(t),className:`px-2 py-0.5 text-xs rounded border transition-colors capitalize ${c===t?"bg-blue-700 border-blue-500 text-white":"bg-gray-800 border-gray-700 text-gray-400 hover:border-gray-500"}`,children:t},t))})]}),e.jsx("div",{className:"mt-1 text-xs text-gray-300 leading-snug",children:a.question})]}),e.jsxs("div",{className:"flex-1 overflow-y-auto p-4 space-y-4 min-w-0",children:[(c==="prompt"||c==="both")&&e.jsxs("div",{children:[c==="both"&&e.jsx("div",{className:"text-xs font-semibold text-gray-400 uppercase tracking-wide mb-2",children:"Prompt"}),m[a.run_id]?e.jsx("pre",{className:"text-xs font-mono whitespace-pre-wrap text-gray-200 bg-gray-900 border border-gray-700 rounded p-3 leading-relaxed",children:m[a.run_id]}):e.jsx("div",{className:"text-gray-500 text-xs p-3",children:"Loading prompt…"})]}),(c==="trajectory"||c==="both")&&e.jsxs("div",{children:[c==="both"&&e.jsx("div",{className:"text-xs font-semibold text-gray-400 uppercase tracking-wide mb-2 mt-4",children:"Trajectory"}),e.jsx(C,{row:a})]})]})]}):e.jsx("div",{className:"flex-1 flex items-center justify-center text-gray-500",children:"No trajectory selected."})]})}export{R as default};
 
1
+ import{r as l,j as e}from"./index-BFtcA7GQ.js";function S(r){try{return JSON.parse(r).map(o=>({type:["reasoning","tool_call","tool_result","final_answer"].includes(o.type)?o.type:"unknown",content:o.content}))}catch{return[]}}function T(r){if(!r||r==="(no trajectory steps)")return[];const n=[],o=r.split(/\n\n(?=\[(?:Reasoning\]:|Tool call\]|Tool result\]:|Final answer\]:))/);for(const d of o){const s=d.trim();s.startsWith("[Reasoning]:")?n.push({type:"reasoning",content:s.slice(12).trim()}):s.startsWith("[Tool call]")?n.push({type:"tool_call",content:s.slice(11).trim()}):s.startsWith("[Tool result]:")?n.push({type:"tool_result",content:s.slice(14).trim()}):s.startsWith("[Final answer]:")?n.push({type:"final_answer",content:s.slice(15).trim()}):s&&n.push({type:"unknown",content:s})}return n}const k={reasoning:{border:"border-purple-700",label:"Reasoning",labelColor:"text-purple-400",bg:"bg-purple-950/30"},tool_call:{border:"border-blue-700",label:"Tool Call",labelColor:"text-blue-400",bg:"bg-blue-950/30"},tool_result:{border:"border-gray-600",label:"Tool Result",labelColor:"text-gray-400",bg:"bg-gray-800/30"},final_answer:{border:"border-green-700",label:"Final Answer",labelColor:"text-green-400",bg:"bg-green-950/30"},unknown:{border:"border-gray-700",label:"β€”",labelColor:"text-gray-500",bg:""}};function C({row:r}){const n=l.useMemo(()=>r.trajectory_blocks?S(r.trajectory_blocks):T(r.trajectory_text),[r.trajectory_blocks,r.trajectory_text]);return n.length===0?e.jsx("div",{className:"text-gray-500 text-xs",children:"No trajectory steps."}):e.jsx("div",{className:"space-y-2",children:n.map((o,d)=>{const s=k[o.type];return e.jsxs("div",{className:`border-l-2 ${s.border} ${s.bg} pl-3 py-1 rounded-r`,children:[e.jsx("div",{className:`text-[10px] font-bold uppercase tracking-widest mb-1 ${s.labelColor}`,children:s.label}),e.jsx("pre",{className:"text-xs text-gray-300 whitespace-pre-wrap font-mono leading-relaxed",children:o.content})]},d)})})}const E={traj_ext:"Full Trajectory (Tags)",traj_orig_ext:"Full Trajectory (Original Messages)",traj_summary_ext:"Summary (Tags)",traj_summary_orig_ext:"Summary (Original Messages)",traj_summary_ext_selected_tools:"Selected Tools (Tags)",traj_summary_orig_ext_selected_tools:"Selected Tools (Original Messages)"},f=r=>E[r]??r,M=["trajectory","prompt","both"];function R(){const[r,n]=l.useState([]),[o,d]=l.useState(!0),[s,j]=l.useState(null),[b,p]=l.useState(0),[c,_]=l.useState("trajectory"),[u,N]=l.useState(""),[x,v]=l.useState("all"),[m,w]=l.useState({});l.useEffect(()=>{d(!0),fetch("/api/traj-ext/").then(t=>{if(!t.ok)throw new Error(t.statusText);return t.json()}).then(t=>{n(t.rows),d(!1)}).catch(t=>{j(t.message),d(!1)})},[]);const h=l.useMemo(()=>Array.from(new Set(r.map(i=>i.run_name??""))).filter(Boolean).sort(),[r]),y=l.useMemo(()=>{let t=r;if(x!=="all"&&(t=t.filter(g=>g.run_name===x)),!u.trim())return t;const i=u.toLowerCase();return t.filter(g=>g.query_id.includes(i)||g.question.toLowerCase().includes(i))},[r,u,x]),a=y[b]??null;return l.useEffect(()=>{a&&(c!=="prompt"&&c!=="both"||m[a.run_id]||fetch(`/api/traj-ext/${encodeURIComponent(a.run_id)}`).then(t=>t.json()).then(t=>w(i=>({...i,[a.run_id]:t.formatted_prompt??""}))).catch(()=>{}))},[a==null?void 0:a.run_id,c]),o?e.jsx("div",{className:"h-full flex items-center justify-center text-gray-400",children:"Loading traj-ext data from HuggingFace…"}):s?e.jsxs("div",{className:"h-full flex items-center justify-center text-red-400",children:["Error: ",s]}):e.jsxs("div",{className:"h-full flex overflow-hidden bg-gray-950 text-gray-100",children:[e.jsxs("div",{className:"w-64 shrink-0 flex flex-col border-r border-gray-800 bg-gray-900",children:[e.jsxs("div",{className:"p-2 border-b border-gray-800 space-y-1.5",children:[h.length>0&&e.jsxs("select",{value:x,onChange:t=>{v(t.target.value),p(0)},className:"w-full bg-gray-800 border border-gray-700 text-gray-200 text-xs rounded px-2 py-1.5",children:[e.jsxs("option",{value:"all",children:["All runs (",r.length,")"]}),h.map(t=>e.jsx("option",{value:t,children:f(t)},t))]}),e.jsx("input",{type:"text",placeholder:"Search queries…",value:u,onChange:t=>{N(t.target.value),p(0)},className:"w-full bg-gray-800 border border-gray-700 text-gray-200 text-xs rounded px-2 py-1.5 placeholder-gray-600"}),e.jsxs("div",{className:"text-[10px] text-gray-600",children:[y.length,x!=="all"||u?` / ${r.length}`:""," trajectories"]})]}),e.jsx("div",{className:"flex-1 overflow-y-auto",children:y.map((t,i)=>e.jsxs("button",{onClick:()=>p(i),className:`w-full text-left px-3 py-2 border-b border-gray-800/50 text-xs transition-colors ${b===i?"bg-blue-900/40 text-blue-200 border-l-2 border-l-blue-500":"text-gray-400 hover:bg-gray-800"}`,children:[e.jsxs("div",{className:"font-medium text-gray-200",children:["#",t.query_id]}),e.jsxs("div",{className:"text-gray-500 truncate mt-0.5",children:[t.question.slice(0,60),"…"]}),e.jsxs("div",{className:"flex gap-2 mt-1 text-[10px] text-gray-600 flex-wrap items-center",children:[e.jsxs("span",{children:[t.n_tool_calls," tools"]}),e.jsxs("span",{children:[t.n_reasoning_steps," reasoning"]}),e.jsx("span",{className:t.status==="completed"?"text-green-600":"text-amber-600",children:t.status}),t.n_tool_calls===0&&e.jsx("span",{className:"px-1 py-0.5 rounded bg-yellow-900/50 text-yellow-300 font-semibold",children:"direct"})]}),t.run_name&&x==="all"&&e.jsx("div",{className:"mt-0.5 text-[9px] text-indigo-400 truncate",children:f(t.run_name)})]},t.run_id))})]}),a?e.jsxs("div",{className:"flex-1 flex flex-col min-w-0 overflow-hidden",children:[e.jsxs("div",{className:"px-4 py-2 bg-gray-900/60 border-b border-gray-800 shrink-0",children:[e.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[e.jsxs("span",{className:"text-sm font-medium text-gray-100",children:["Query #",a.query_id]}),e.jsx("span",{className:`text-xs px-2 py-0.5 rounded-full ${a.status==="completed"?"bg-green-900/50 text-green-300":"bg-amber-900/50 text-amber-300"}`,children:a.status}),e.jsxs("span",{className:"text-xs text-gray-500",children:[a.n_tool_calls," tool calls Β· ",a.n_reasoning_steps," reasoning"]}),a.n_tool_calls===0&&e.jsx("span",{className:"px-1.5 py-0.5 rounded bg-yellow-900/50 text-yellow-300 text-xs font-semibold",children:"direct"}),e.jsx("div",{className:"ml-auto flex gap-1",children:M.map(t=>e.jsx("button",{onClick:()=>_(t),className:`px-2 py-0.5 text-xs rounded border transition-colors capitalize ${c===t?"bg-blue-700 border-blue-500 text-white":"bg-gray-800 border-gray-700 text-gray-400 hover:border-gray-500"}`,children:t},t))})]}),e.jsx("div",{className:"mt-1 text-xs text-gray-300 leading-snug",children:a.question})]}),e.jsxs("div",{className:"flex-1 overflow-y-auto p-4 space-y-4 min-w-0",children:[(c==="prompt"||c==="both")&&e.jsxs("div",{children:[c==="both"&&e.jsx("div",{className:"text-xs font-semibold text-gray-400 uppercase tracking-wide mb-2",children:"Prompt"}),m[a.run_id]?e.jsx("pre",{className:"text-xs font-mono whitespace-pre-wrap text-gray-200 bg-gray-900 border border-gray-700 rounded p-3 leading-relaxed",children:m[a.run_id]}):e.jsx("div",{className:"text-gray-500 text-xs p-3",children:"Loading prompt…"})]}),(c==="trajectory"||c==="both")&&e.jsxs("div",{children:[c==="both"&&e.jsx("div",{className:"text-xs font-semibold text-gray-400 uppercase tracking-wide mb-2 mt-4",children:"Trajectory"}),e.jsx(C,{row:a})]})]})]}):e.jsx("div",{className:"flex-1 flex items-center justify-center text-gray-500",children:"No trajectory selected."})]})}export{R as default};
frontend/dist/assets/{VisualizerApp-Dpfv1hVE.js β†’ VisualizerApp-Bo-eQZ6n.js} RENAMED
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ModelApp-BeZukO0m.js","assets/index-Br9e1W0j.js","assets/index-CHBmtDYC.css","assets/PlanRevisionsApp-C6iQwYC9.js","assets/TrajExtApp-CfgqCtlI.js","assets/SelectedToolsApp-O2UtdiCF.js","assets/ScoutRunsApp-CjdPIJcI.js"])))=>i.map(i=>d[i]);
2
- import{u as o,j as e,n as d,r as l,_ as t}from"./index-Br9e1W0j.js";const c=l.lazy(()=>t(()=>import("./ModelApp-BeZukO0m.js"),__vite__mapDeps([0,1,2]))),n=l.lazy(()=>t(()=>import("./PlanRevisionsApp-C6iQwYC9.js"),__vite__mapDeps([3,1,2]))),x=l.lazy(()=>t(()=>import("./TrajExtApp-CfgqCtlI.js"),__vite__mapDeps([4,1,2]))),m=l.lazy(()=>t(()=>import("./SelectedToolsApp-O2UtdiCF.js"),__vite__mapDeps([5,1,2]))),u=l.lazy(()=>t(()=>import("./ScoutRunsApp-CjdPIJcI.js"),__vite__mapDeps([6,1,2]))),i=[{id:"model",label:"Model Trace",activeClass:"border-blue-500 text-blue-400"},{id:"plan-revisions",label:"Plan Revisions",activeClass:"border-amber-500 text-amber-400"},{id:"traj-ext",label:"Traj Ext",activeClass:"border-emerald-500 text-emerald-400"},{id:"selected-tools",label:"Selected Tools",activeClass:"border-amber-400 text-amber-300"},{id:"scout-runs",label:"Scout Runs",activeClass:"border-cyan-500 text-cyan-400"}],p=new Set(i.map(r=>r.id));function _(){const r=o(),s=p.has(r.tab)?r.tab:"model";return e.jsxs("div",{className:"h-full flex flex-col",children:[e.jsx("div",{className:"flex items-center border-b border-gray-800 bg-gray-900/50 px-2 shrink-0",children:i.map(a=>e.jsx("button",{onClick:()=>d({page:"viz",tab:a.id}),className:`px-5 py-2 text-sm font-medium border-b-2 transition-colors ${s===a.id?a.activeClass:"border-transparent text-gray-500 hover:text-gray-300"}`,children:a.label},a.id))}),e.jsx("div",{className:"flex-1 overflow-hidden",children:e.jsxs(l.Suspense,{fallback:e.jsx("div",{className:"flex items-center justify-center h-full text-gray-500",children:"Loading..."}),children:[s==="model"&&e.jsx("div",{className:"theme-model h-full",children:e.jsx(c,{})}),s==="plan-revisions"&&e.jsx("div",{className:"h-full",children:e.jsx(n,{})}),s==="traj-ext"&&e.jsx("div",{className:"h-full",children:e.jsx(x,{})}),s==="selected-tools"&&e.jsx("div",{className:"h-full",children:e.jsx(m,{})}),s==="scout-runs"&&e.jsx("div",{className:"h-full",children:e.jsx(u,{})})]})})]})}export{_ as default};
 
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ModelApp-ByP0hVWF.js","assets/index-BFtcA7GQ.js","assets/index-CxBbYLho.css","assets/PlanRevisionsApp-Dm4VU5KS.js","assets/TrajExtApp-DjSZ_Kko.js","assets/SelectedToolsApp-BXaKmpYg.js","assets/ScoutRunsApp-BqSa3vbC.js"])))=>i.map(i=>d[i]);
2
+ import{u as o,j as e,n as d,r as l,_ as t}from"./index-BFtcA7GQ.js";const c=l.lazy(()=>t(()=>import("./ModelApp-ByP0hVWF.js"),__vite__mapDeps([0,1,2]))),n=l.lazy(()=>t(()=>import("./PlanRevisionsApp-Dm4VU5KS.js"),__vite__mapDeps([3,1,2]))),x=l.lazy(()=>t(()=>import("./TrajExtApp-DjSZ_Kko.js"),__vite__mapDeps([4,1,2]))),m=l.lazy(()=>t(()=>import("./SelectedToolsApp-BXaKmpYg.js"),__vite__mapDeps([5,1,2]))),u=l.lazy(()=>t(()=>import("./ScoutRunsApp-BqSa3vbC.js"),__vite__mapDeps([6,1,2]))),i=[{id:"model",label:"Model Trace",activeClass:"border-blue-500 text-blue-400"},{id:"plan-revisions",label:"Plan Revisions",activeClass:"border-amber-500 text-amber-400"},{id:"traj-ext",label:"Traj Ext",activeClass:"border-emerald-500 text-emerald-400"},{id:"selected-tools",label:"Selected Tools",activeClass:"border-amber-400 text-amber-300"},{id:"scout-runs",label:"Scout Runs",activeClass:"border-cyan-500 text-cyan-400"}],p=new Set(i.map(r=>r.id));function _(){const r=o(),s=p.has(r.tab)?r.tab:"model";return e.jsxs("div",{className:"h-full flex flex-col",children:[e.jsx("div",{className:"flex items-center border-b border-gray-800 bg-gray-900/50 px-2 shrink-0",children:i.map(a=>e.jsx("button",{onClick:()=>d({page:"viz",tab:a.id}),className:`px-5 py-2 text-sm font-medium border-b-2 transition-colors ${s===a.id?a.activeClass:"border-transparent text-gray-500 hover:text-gray-300"}`,children:a.label},a.id))}),e.jsx("div",{className:"flex-1 overflow-hidden",children:e.jsxs(l.Suspense,{fallback:e.jsx("div",{className:"flex items-center justify-center h-full text-gray-500",children:"Loading..."}),children:[s==="model"&&e.jsx("div",{className:"theme-model h-full",children:e.jsx(c,{})}),s==="plan-revisions"&&e.jsx("div",{className:"h-full",children:e.jsx(n,{})}),s==="traj-ext"&&e.jsx("div",{className:"h-full",children:e.jsx(x,{})}),s==="selected-tools"&&e.jsx("div",{className:"h-full",children:e.jsx(m,{})}),s==="scout-runs"&&e.jsx("div",{className:"h-full",children:e.jsx(u,{})})]})})]})}export{_ as default};
frontend/dist/assets/{index-Br9e1W0j.js β†’ index-BFtcA7GQ.js} RENAMED
The diff for this file is too large to render. See raw diff
 
frontend/dist/assets/{index-CHBmtDYC.css β†’ index-CxBbYLho.css} RENAMED
@@ -1 +1 @@
1
- *,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.container{width:100%}@media(min-width:640px){.container{max-width:640px}}@media(min-width:768px){.container{max-width:768px}}@media(min-width:1024px){.container{max-width:1024px}}@media(min-width:1280px){.container{max-width:1280px}}@media(min-width:1536px){.container{max-width:1536px}}.collapse{visibility:collapse}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.-left-\[17px\]{left:-17px}.-left-\[5px\]{left:-5px}.left-0{left:0}.left-4{left:1rem}.right-4{right:1rem}.right-5{right:1.25rem}.top-0{top:0}.top-3{top:.75rem}.top-4{top:1rem}.top-full{top:100%}.z-10{z-index:10}.z-40{z-index:40}.z-50{z-index:50}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-4{margin-top:1rem;margin-bottom:1rem}.mb-0\.5{margin-bottom:.125rem}.mb-1{margin-bottom:.25rem}.mb-1\.5{margin-bottom:.375rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.ml-1{margin-left:.25rem}.ml-1\.5{margin-left:.375rem}.ml-2{margin-left:.5rem}.ml-3{margin-left:.75rem}.ml-4{margin-left:1rem}.ml-6{margin-left:1.5rem}.ml-auto{margin-left:auto}.mr-0\.5{margin-right:.125rem}.mr-1{margin-right:.25rem}.mr-2{margin-right:.5rem}.mr-6{margin-right:1.5rem}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-6{margin-top:1.5rem}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.table{display:table}.grid{display:grid}.hidden{display:none}.aspect-square{aspect-ratio:1 / 1}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-3\.5{height:.875rem}.h-32{height:8rem}.h-4{height:1rem}.h-40{height:10rem}.h-48{height:12rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-64{height:16rem}.h-\[85vh\]{height:85vh}.h-full{height:100%}.h-screen{height:100vh}.max-h-24{max-height:6rem}.max-h-32{max-height:8rem}.max-h-60{max-height:15rem}.max-h-\[80vh\]{max-height:80vh}.max-h-\[90vh\]{max-height:90vh}.min-h-0{min-height:0px}.min-h-\[300px\]{min-height:300px}.w-12{width:3rem}.w-16{width:4rem}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-3\.5{width:.875rem}.w-36{width:9rem}.w-4{width:1rem}.w-48{width:12rem}.w-5{width:1.25rem}.w-56{width:14rem}.w-6{width:1.5rem}.w-60{width:15rem}.w-64{width:16rem}.w-72{width:18rem}.w-full{width:100%}.min-w-0{min-width:0px}.min-w-72{min-width:18rem}.max-w-2xl{max-width:42rem}.max-w-3xl{max-width:48rem}.max-w-4xl{max-width:56rem}.max-w-5xl{max-width:64rem}.max-w-\[80\%\]{max-width:80%}.max-w-\[90vw\]{max-width:90vw}.max-w-full{max-width:100%}.max-w-lg{max-width:32rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.flex-shrink-0,.shrink-0{flex-shrink:0}.table-auto{table-layout:auto}.border-collapse{border-collapse:collapse}.rotate-90{--tw-rotate: 90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-\[0\.97\]{--tw-scale-x: .97;--tw-scale-y: .97;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize-y{resize:vertical}.list-inside{list-style-position:inside}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(0px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0px * var(--tw-space-y-reverse))}.space-y-0\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.125rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem * var(--tw-space-y-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-sm{border-radius:.125rem}.rounded-xl{border-radius:.75rem}.rounded-r{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.border{border-width:1px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-l-2{border-left-width:2px}.border-l-4{border-left-width:4px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-amber-400{--tw-border-opacity: 1;border-color:rgb(251 191 36 / var(--tw-border-opacity, 1))}.border-amber-500{--tw-border-opacity: 1;border-color:rgb(245 158 11 / var(--tw-border-opacity, 1))}.border-amber-600{--tw-border-opacity: 1;border-color:rgb(217 119 6 / var(--tw-border-opacity, 1))}.border-amber-700\/40{border-color:#b4530966}.border-amber-700\/50{border-color:#b4530980}.border-amber-800{--tw-border-opacity: 1;border-color:rgb(146 64 14 / var(--tw-border-opacity, 1))}.border-blue-500{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}.border-blue-600{--tw-border-opacity: 1;border-color:rgb(37 99 235 / var(--tw-border-opacity, 1))}.border-blue-700{--tw-border-opacity: 1;border-color:rgb(29 78 216 / var(--tw-border-opacity, 1))}.border-blue-700\/50{border-color:#1d4ed880}.border-blue-800{--tw-border-opacity: 1;border-color:rgb(30 64 175 / var(--tw-border-opacity, 1))}.border-cyan-500{--tw-border-opacity: 1;border-color:rgb(6 182 212 / var(--tw-border-opacity, 1))}.border-cyan-700{--tw-border-opacity: 1;border-color:rgb(14 116 144 / var(--tw-border-opacity, 1))}.border-cyan-700\/30{border-color:#0e74904d}.border-cyan-700\/50{border-color:#0e749080}.border-cyan-800\/60{border-color:#155e7599}.border-emerald-500{--tw-border-opacity: 1;border-color:rgb(16 185 129 / var(--tw-border-opacity, 1))}.border-emerald-600{--tw-border-opacity: 1;border-color:rgb(5 150 105 / var(--tw-border-opacity, 1))}.border-emerald-700{--tw-border-opacity: 1;border-color:rgb(4 120 87 / var(--tw-border-opacity, 1))}.border-emerald-700\/50{border-color:#04785780}.border-emerald-800{--tw-border-opacity: 1;border-color:rgb(6 95 70 / var(--tw-border-opacity, 1))}.border-gray-500{--tw-border-opacity: 1;border-color:rgb(107 114 128 / var(--tw-border-opacity, 1))}.border-gray-600{--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity, 1))}.border-gray-700{--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity, 1))}.border-gray-700\/50{border-color:#37415180}.border-gray-800{--tw-border-opacity: 1;border-color:rgb(31 41 55 / var(--tw-border-opacity, 1))}.border-gray-800\/50{border-color:#1f293780}.border-green-600{--tw-border-opacity: 1;border-color:rgb(22 163 74 / var(--tw-border-opacity, 1))}.border-green-700{--tw-border-opacity: 1;border-color:rgb(21 128 61 / var(--tw-border-opacity, 1))}.border-orange-800\/50{border-color:#9a341280}.border-purple-500{--tw-border-opacity: 1;border-color:rgb(168 85 247 / var(--tw-border-opacity, 1))}.border-purple-600{--tw-border-opacity: 1;border-color:rgb(147 51 234 / var(--tw-border-opacity, 1))}.border-purple-700{--tw-border-opacity: 1;border-color:rgb(126 34 206 / var(--tw-border-opacity, 1))}.border-purple-700\/50{border-color:#7e22ce80}.border-red-600{--tw-border-opacity: 1;border-color:rgb(220 38 38 / var(--tw-border-opacity, 1))}.border-red-700{--tw-border-opacity: 1;border-color:rgb(185 28 28 / var(--tw-border-opacity, 1))}.border-rose-500{--tw-border-opacity: 1;border-color:rgb(244 63 94 / var(--tw-border-opacity, 1))}.border-transparent{border-color:transparent}.border-violet-500{--tw-border-opacity: 1;border-color:rgb(139 92 246 / var(--tw-border-opacity, 1))}.border-yellow-700\/50{border-color:#a1620780}.border-b-gray-800{--tw-border-opacity: 1;border-bottom-color:rgb(31 41 55 / var(--tw-border-opacity, 1))}.border-l-blue-500{--tw-border-opacity: 1;border-left-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}.border-l-cyan-500{--tw-border-opacity: 1;border-left-color:rgb(6 182 212 / var(--tw-border-opacity, 1))}.border-l-gray-500{--tw-border-opacity: 1;border-left-color:rgb(107 114 128 / var(--tw-border-opacity, 1))}.border-l-green-500{--tw-border-opacity: 1;border-left-color:rgb(34 197 94 / var(--tw-border-opacity, 1))}.border-l-purple-500{--tw-border-opacity: 1;border-left-color:rgb(168 85 247 / var(--tw-border-opacity, 1))}.border-t-transparent{border-top-color:transparent}.bg-amber-500{--tw-bg-opacity: 1;background-color:rgb(245 158 11 / var(--tw-bg-opacity, 1))}.bg-amber-900\/30{background-color:#78350f4d}.bg-amber-900\/50{background-color:#78350f80}.bg-amber-900\/60{background-color:#78350f99}.bg-amber-950\/40{background-color:#451a0366}.bg-black\/60{background-color:#0009}.bg-black\/80{background-color:#000c}.bg-black\/85{background-color:#000000d9}.bg-blue-100{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1))}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity, 1))}.bg-blue-500\/5{background-color:#3b82f60d}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity, 1))}.bg-blue-700{--tw-bg-opacity: 1;background-color:rgb(29 78 216 / var(--tw-bg-opacity, 1))}.bg-blue-900\/40{background-color:#1e3a8a66}.bg-blue-900\/50{background-color:#1e3a8a80}.bg-blue-900\/60{background-color:#1e3a8a99}.bg-blue-950\/30{background-color:#1725544d}.bg-blue-950\/40{background-color:#17255466}.bg-cyan-500{--tw-bg-opacity: 1;background-color:rgb(6 182 212 / var(--tw-bg-opacity, 1))}.bg-cyan-600{--tw-bg-opacity: 1;background-color:rgb(8 145 178 / var(--tw-bg-opacity, 1))}.bg-cyan-700\/40{background-color:#0e749066}.bg-cyan-900\/40{background-color:#164e6366}.bg-cyan-900\/50{background-color:#164e6380}.bg-emerald-500{--tw-bg-opacity: 1;background-color:rgb(16 185 129 / var(--tw-bg-opacity, 1))}.bg-emerald-900{--tw-bg-opacity: 1;background-color:rgb(6 78 59 / var(--tw-bg-opacity, 1))}.bg-emerald-900\/50{background-color:#064e3b80}.bg-emerald-900\/60{background-color:#064e3b99}.bg-emerald-950\/30{background-color:#022c224d}.bg-fuchsia-900\/60{background-color:#701a7599}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}.bg-gray-500{--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity, 1))}.bg-gray-500\/5{background-color:#6b72800d}.bg-gray-600{--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity, 1))}.bg-gray-700{--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity, 1))}.bg-gray-800{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity, 1))}.bg-gray-800\/30{background-color:#1f29374d}.bg-gray-800\/50{background-color:#1f293780}.bg-gray-800\/60{background-color:#1f293799}.bg-gray-900{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity, 1))}.bg-gray-900\/40{background-color:#11182766}.bg-gray-900\/50{background-color:#11182780}.bg-gray-900\/60{background-color:#11182799}.bg-gray-900\/80{background-color:#111827cc}.bg-gray-950{--tw-bg-opacity: 1;background-color:rgb(3 7 18 / var(--tw-bg-opacity, 1))}.bg-green-100{--tw-bg-opacity: 1;background-color:rgb(220 252 231 / var(--tw-bg-opacity, 1))}.bg-green-500{--tw-bg-opacity: 1;background-color:rgb(34 197 94 / var(--tw-bg-opacity, 1))}.bg-green-500\/5{background-color:#22c55e0d}.bg-green-600{--tw-bg-opacity: 1;background-color:rgb(22 163 74 / var(--tw-bg-opacity, 1))}.bg-green-700{--tw-bg-opacity: 1;background-color:rgb(21 128 61 / var(--tw-bg-opacity, 1))}.bg-green-900{--tw-bg-opacity: 1;background-color:rgb(20 83 45 / var(--tw-bg-opacity, 1))}.bg-green-900\/40{background-color:#14532d66}.bg-green-900\/50{background-color:#14532d80}.bg-green-950\/30{background-color:#052e164d}.bg-indigo-900\/60{background-color:#312e8199}.bg-lime-900\/60{background-color:#36531499}.bg-orange-100{--tw-bg-opacity: 1;background-color:rgb(255 237 213 / var(--tw-bg-opacity, 1))}.bg-orange-900\/20{background-color:#7c2d1233}.bg-orange-900\/60{background-color:#7c2d1299}.bg-purple-500{--tw-bg-opacity: 1;background-color:rgb(168 85 247 / var(--tw-bg-opacity, 1))}.bg-purple-500\/5{background-color:#a855f70d}.bg-purple-900\/50{background-color:#581c8780}.bg-purple-900\/60{background-color:#581c8799}.bg-purple-950\/30{background-color:#3b07644d}.bg-purple-950\/40{background-color:#3b076466}.bg-red-100{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity, 1))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity, 1))}.bg-red-900{--tw-bg-opacity: 1;background-color:rgb(127 29 29 / var(--tw-bg-opacity, 1))}.bg-red-900\/10{background-color:#7f1d1d1a}.bg-red-900\/40{background-color:#7f1d1d66}.bg-red-900\/50{background-color:#7f1d1d80}.bg-rose-500{--tw-bg-opacity: 1;background-color:rgb(244 63 94 / var(--tw-bg-opacity, 1))}.bg-rose-900\/60{background-color:#88133799}.bg-teal-900\/60{background-color:#134e4a99}.bg-violet-950\/30{background-color:#2e10654d}.bg-yellow-100{--tw-bg-opacity: 1;background-color:rgb(254 249 195 / var(--tw-bg-opacity, 1))}.bg-yellow-500{--tw-bg-opacity: 1;background-color:rgb(234 179 8 / var(--tw-bg-opacity, 1))}.bg-yellow-600{--tw-bg-opacity: 1;background-color:rgb(202 138 4 / var(--tw-bg-opacity, 1))}.bg-yellow-700{--tw-bg-opacity: 1;background-color:rgb(161 98 7 / var(--tw-bg-opacity, 1))}.bg-yellow-900\/50{background-color:#713f1280}.object-contain{-o-object-fit:contain;object-fit:contain}.object-cover{-o-object-fit:cover;object-fit:cover}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.pl-2{padding-left:.5rem}.pl-3{padding-left:.75rem}.pl-4{padding-left:1rem}.pt-3{padding-top:.75rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.align-top{vertical-align:top}.align-middle{vertical-align:middle}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[9px\]{font-size:9px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.capitalize{text-transform:capitalize}.normal-case{text-transform:none}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.leading-4{line-height:1rem}.leading-none{line-height:1}.leading-relaxed{line-height:1.625}.leading-snug{line-height:1.375}.tracking-wide{letter-spacing:.025em}.tracking-wider{letter-spacing:.05em}.tracking-widest{letter-spacing:.1em}.text-amber-300{--tw-text-opacity: 1;color:rgb(252 211 77 / var(--tw-text-opacity, 1))}.text-amber-400{--tw-text-opacity: 1;color:rgb(251 191 36 / var(--tw-text-opacity, 1))}.text-amber-400\/70{color:#fbbf24b3}.text-amber-400\/80{color:#fbbf24cc}.text-amber-500{--tw-text-opacity: 1;color:rgb(245 158 11 / var(--tw-text-opacity, 1))}.text-amber-600{--tw-text-opacity: 1;color:rgb(217 119 6 / var(--tw-text-opacity, 1))}.text-blue-200{--tw-text-opacity: 1;color:rgb(191 219 254 / var(--tw-text-opacity, 1))}.text-blue-300{--tw-text-opacity: 1;color:rgb(147 197 253 / var(--tw-text-opacity, 1))}.text-blue-400{--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity, 1))}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity, 1))}.text-blue-800{--tw-text-opacity: 1;color:rgb(30 64 175 / var(--tw-text-opacity, 1))}.text-cyan-200{--tw-text-opacity: 1;color:rgb(165 243 252 / var(--tw-text-opacity, 1))}.text-cyan-300{--tw-text-opacity: 1;color:rgb(103 232 249 / var(--tw-text-opacity, 1))}.text-cyan-400{--tw-text-opacity: 1;color:rgb(34 211 238 / var(--tw-text-opacity, 1))}.text-cyan-400\/70{color:#22d3eeb3}.text-cyan-400\/80{color:#22d3eecc}.text-cyan-500{--tw-text-opacity: 1;color:rgb(6 182 212 / var(--tw-text-opacity, 1))}.text-cyan-600{--tw-text-opacity: 1;color:rgb(8 145 178 / var(--tw-text-opacity, 1))}.text-emerald-300{--tw-text-opacity: 1;color:rgb(110 231 183 / var(--tw-text-opacity, 1))}.text-emerald-400{--tw-text-opacity: 1;color:rgb(52 211 153 / var(--tw-text-opacity, 1))}.text-fuchsia-300{--tw-text-opacity: 1;color:rgb(240 171 252 / var(--tw-text-opacity, 1))}.text-gray-100{--tw-text-opacity: 1;color:rgb(243 244 246 / var(--tw-text-opacity, 1))}.text-gray-200{--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity, 1))}.text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.text-green-300{--tw-text-opacity: 1;color:rgb(134 239 172 / var(--tw-text-opacity, 1))}.text-green-400{--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity, 1))}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity, 1))}.text-green-800{--tw-text-opacity: 1;color:rgb(22 101 52 / var(--tw-text-opacity, 1))}.text-indigo-300{--tw-text-opacity: 1;color:rgb(165 180 252 / var(--tw-text-opacity, 1))}.text-indigo-400{--tw-text-opacity: 1;color:rgb(129 140 248 / var(--tw-text-opacity, 1))}.text-lime-300{--tw-text-opacity: 1;color:rgb(190 242 100 / var(--tw-text-opacity, 1))}.text-orange-300{--tw-text-opacity: 1;color:rgb(253 186 116 / var(--tw-text-opacity, 1))}.text-orange-400{--tw-text-opacity: 1;color:rgb(251 146 60 / var(--tw-text-opacity, 1))}.text-orange-400\/70{color:#fb923cb3}.text-orange-700{--tw-text-opacity: 1;color:rgb(194 65 12 / var(--tw-text-opacity, 1))}.text-orange-800{--tw-text-opacity: 1;color:rgb(154 52 18 / var(--tw-text-opacity, 1))}.text-purple-300{--tw-text-opacity: 1;color:rgb(216 180 254 / var(--tw-text-opacity, 1))}.text-purple-400{--tw-text-opacity: 1;color:rgb(192 132 252 / var(--tw-text-opacity, 1))}.text-red-300{--tw-text-opacity: 1;color:rgb(252 165 165 / var(--tw-text-opacity, 1))}.text-red-400{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.text-red-400\/70{color:#f87171b3}.text-red-800{--tw-text-opacity: 1;color:rgb(153 27 27 / var(--tw-text-opacity, 1))}.text-rose-300{--tw-text-opacity: 1;color:rgb(253 164 175 / var(--tw-text-opacity, 1))}.text-rose-400{--tw-text-opacity: 1;color:rgb(251 113 133 / var(--tw-text-opacity, 1))}.text-sky-400{--tw-text-opacity: 1;color:rgb(56 189 248 / var(--tw-text-opacity, 1))}.text-teal-300{--tw-text-opacity: 1;color:rgb(94 234 212 / var(--tw-text-opacity, 1))}.text-violet-400{--tw-text-opacity: 1;color:rgb(167 139 250 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-yellow-300{--tw-text-opacity: 1;color:rgb(253 224 71 / var(--tw-text-opacity, 1))}.text-yellow-400{--tw-text-opacity: 1;color:rgb(250 204 21 / var(--tw-text-opacity, 1))}.text-yellow-800{--tw-text-opacity: 1;color:rgb(133 77 14 / var(--tw-text-opacity, 1))}.underline{text-decoration-line:underline}.underline-offset-2{text-underline-offset:2px}.placeholder-gray-500::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(107 114 128 / var(--tw-placeholder-opacity, 1))}.placeholder-gray-500::placeholder{--tw-placeholder-opacity: 1;color:rgb(107 114 128 / var(--tw-placeholder-opacity, 1))}.placeholder-gray-600::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(75 85 99 / var(--tw-placeholder-opacity, 1))}.placeholder-gray-600::placeholder{--tw-placeholder-opacity: 1;color:rgb(75 85 99 / var(--tw-placeholder-opacity, 1))}.accent-blue-500{accent-color:#3b82f6}.opacity-25{opacity:.25}.opacity-30{opacity:.3}.opacity-60{opacity:.6}.opacity-75{opacity:.75}.shadow-2xl{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-2{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-blue-400{--tw-ring-opacity: 1;--tw-ring-color: rgb(96 165 250 / var(--tw-ring-opacity, 1))}.ring-blue-500{--tw-ring-opacity: 1;--tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity, 1))}.ring-offset-1{--tw-ring-offset-width: 1px}.ring-offset-gray-900{--tw-ring-offset-color: #111827}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-sm{--tw-backdrop-blur: blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-150{transition-duration:.15s}.trace-scroll::-webkit-scrollbar{width:6px}.trace-scroll::-webkit-scrollbar-track{background:transparent}.trace-scroll::-webkit-scrollbar-thumb{background:#4b5563;border-radius:3px}.trace-scroll::-webkit-scrollbar-thumb:hover{background:#6b7280}.theme-model .panel-drop-target{outline:2px dashed #60a5fa;outline-offset:-2px;border-radius:.5rem;background:#60a5fa0d}.theme-arena .panel-drop-target{outline:2px dashed #a78bfa;outline-offset:-2px;border-radius:.5rem;background:#a78bfa0d}.theme-rlm .panel-drop-target{outline:2px dashed #fb923c;outline-offset:-2px;border-radius:.5rem;background:#fb923c0d}.theme-harbor .panel-drop-target{outline:2px dashed #2dd4bf;outline-offset:-2px;border-radius:.5rem;background:#2dd4bf0d}.code-block{font-family:JetBrains Mono,Fira Code,Cascadia Code,monospace;font-size:.8rem;line-height:1.4}.drag-handle{cursor:grab}.drag-handle:active{cursor:grabbing}.light{--tw-bg-opacity: 1}.light .bg-gray-950{background-color:#fff!important}.light .bg-gray-900{background-color:#f9fafb!important}.light .bg-gray-900\/80{background-color:#f9fafbcc!important}.light .bg-gray-900\/50{background-color:#f9fafb80!important}.light .bg-gray-800{background-color:#f3f4f6!important}.light .bg-gray-800\/50{background-color:#f3f4f680!important}.light .bg-gray-700{background-color:#e5e7eb!important}.light .text-gray-100{color:#111827!important}.light .text-gray-200{color:#1f2937!important}.light .text-gray-300{color:#374151!important}.light .text-gray-400{color:#6b7280!important}.light .text-gray-500{color:#9ca3af!important}.light .text-gray-600{color:#d1d5db!important}.light .border-gray-700{border-color:#e5e7eb!important}.light .border-gray-800{border-color:#f3f4f6!important}.light .border-gray-800\/50{border-color:#f3f4f680!important}.light .text-cyan-400{color:#0891b2!important}.light .text-cyan-400\/80{color:#0891b2cc!important}.light .border-cyan-500{border-color:#06b6d4!important}.light .text-emerald-300,.light .text-emerald-400{color:#059669!important}.light .text-amber-400{color:#d97706!important}.light .text-amber-400\/80{color:#d97706cc!important}.light .text-amber-400\/70{color:#d97706b3!important}.light .text-violet-400{color:#7c3aed!important}.light .text-red-400{color:#dc2626!important}.light .text-yellow-400{color:#ca8a04!important}.light .text-green-400{color:#16a34a!important}.light .bg-emerald-950\/30{background-color:#05966914!important}.light .bg-emerald-900{background-color:#05966926!important}.light .bg-violet-950\/30{background-color:#7c3aed14!important}.light .bg-orange-900\/20{background-color:#ea580c14!important}.light .bg-red-900\/10{background-color:#dc26260d!important}.light .bg-cyan-600{background-color:#0891b2!important}.light .border-emerald-500,.light .border-emerald-700{border-color:#059669!important}.light .border-amber-500{border-color:#d97706!important}.light .border-violet-500{border-color:#7c3aed!important}.light .border-cyan-500{border-color:#0891b2!important}.light .border-orange-800\/50{border-color:#ea580c4d!important}.light .hover\:bg-gray-800:hover{background-color:#e5e7eb!important}.light .hover\:bg-gray-900\/50:hover{background-color:#f9fafb80!important}.light .hover\:text-gray-200:hover{color:#1f2937!important}.light .hover\:text-gray-300:hover{color:#374151!important}.light .hover\:border-gray-700:hover{border-color:#d1d5db!important}.light .hover\:border-gray-400:hover{border-color:#9ca3af!important}.light .hover\:text-cyan-300:hover{color:#0891b2!important}.light select{background-color:#f3f4f6!important;color:#374151!important;border-color:#d1d5db!important}.light input{background-color:#f9fafb!important;color:#374151!important;border-color:#d1d5db!important}.light .trace-scroll::-webkit-scrollbar-thumb{background:#d1d5db}.light .trace-scroll::-webkit-scrollbar-thumb:hover{background:#9ca3af}.light pre{background-color:#f3f4f6!important}.light code{background-color:#f3f4f6!important;color:#374151!important}.first\:mt-0:first-child{margin-top:0}.last\:border-0:last-child{border-width:0px}.hover\:border-cyan-600:hover{--tw-border-opacity: 1;border-color:rgb(8 145 178 / var(--tw-border-opacity, 1))}.hover\:border-gray-400:hover{--tw-border-opacity: 1;border-color:rgb(156 163 175 / var(--tw-border-opacity, 1))}.hover\:border-gray-500:hover{--tw-border-opacity: 1;border-color:rgb(107 114 128 / var(--tw-border-opacity, 1))}.hover\:border-gray-700:hover{--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity, 1))}.hover\:bg-blue-500:hover{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity, 1))}.hover\:bg-cyan-500:hover{--tw-bg-opacity: 1;background-color:rgb(6 182 212 / var(--tw-bg-opacity, 1))}.hover\:bg-cyan-600\/50:hover{background-color:#0891b280}.hover\:bg-cyan-900\/70:hover{background-color:#164e63b3}.hover\:bg-gray-600:hover{--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity, 1))}.hover\:bg-gray-700:hover{--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity, 1))}.hover\:bg-gray-800:hover{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity, 1))}.hover\:bg-gray-800\/30:hover{background-color:#1f29374d}.hover\:bg-gray-800\/40:hover{background-color:#1f293766}.hover\:bg-gray-800\/50:hover{background-color:#1f293780}.hover\:bg-gray-900\/50:hover{background-color:#11182780}.hover\:bg-red-800:hover{--tw-bg-opacity: 1;background-color:rgb(153 27 27 / var(--tw-bg-opacity, 1))}.hover\:text-blue-400:hover{--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity, 1))}.hover\:text-cyan-300:hover{--tw-text-opacity: 1;color:rgb(103 232 249 / var(--tw-text-opacity, 1))}.hover\:text-cyan-400:hover{--tw-text-opacity: 1;color:rgb(34 211 238 / var(--tw-text-opacity, 1))}.hover\:text-gray-100:hover{--tw-text-opacity: 1;color:rgb(243 244 246 / var(--tw-text-opacity, 1))}.hover\:text-gray-200:hover{--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity, 1))}.hover\:text-gray-300:hover{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}.hover\:text-gray-400:hover{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.hover\:text-gray-800:hover{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity, 1))}.hover\:text-red-300:hover{--tw-text-opacity: 1;color:rgb(252 165 165 / var(--tw-text-opacity, 1))}.hover\:text-red-400:hover{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.hover\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.focus\:border-blue-500:focus{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}.focus\:border-cyan-500:focus{--tw-border-opacity: 1;border-color:rgb(6 182 212 / var(--tw-border-opacity, 1))}.focus\:border-cyan-600:focus{--tw-border-opacity: 1;border-color:rgb(8 145 178 / var(--tw-border-opacity, 1))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-blue-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity, 1))}.focus\:ring-offset-0:focus{--tw-ring-offset-width: 0px}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:bg-gray-700:disabled{--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity, 1))}.disabled\:text-gray-500:disabled{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.disabled\:opacity-40:disabled{opacity:.4}.group:hover .group-hover\:flex{display:flex}.group:hover .group-hover\:text-gray-200{--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity, 1))}.group:hover .group-hover\:text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}.group:hover .group-hover\:opacity-90{opacity:.9}.dark\:border-gray-600:is(.dark *){--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity, 1))}.dark\:text-gray-400:is(.dark *){--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.dark\:hover\:text-gray-200:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity, 1))}@media(min-width:640px){.sm\:block{display:block}.sm\:w-64{width:16rem}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(min-width:768px){.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}@media(min-width:1024px){.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}@media(min-width:1280px){.xl\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}
 
1
+ *,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.container{width:100%}@media(min-width:640px){.container{max-width:640px}}@media(min-width:768px){.container{max-width:768px}}@media(min-width:1024px){.container{max-width:1024px}}@media(min-width:1280px){.container{max-width:1280px}}@media(min-width:1536px){.container{max-width:1536px}}.collapse{visibility:collapse}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.-left-\[17px\]{left:-17px}.-left-\[5px\]{left:-5px}.left-0{left:0}.left-4{left:1rem}.right-4{right:1rem}.right-5{right:1.25rem}.top-0{top:0}.top-3{top:.75rem}.top-4{top:1rem}.top-full{top:100%}.z-10{z-index:10}.z-40{z-index:40}.z-50{z-index:50}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-4{margin-top:1rem;margin-bottom:1rem}.mb-0\.5{margin-bottom:.125rem}.mb-1{margin-bottom:.25rem}.mb-1\.5{margin-bottom:.375rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.ml-1{margin-left:.25rem}.ml-1\.5{margin-left:.375rem}.ml-2{margin-left:.5rem}.ml-3{margin-left:.75rem}.ml-4{margin-left:1rem}.ml-6{margin-left:1.5rem}.ml-auto{margin-left:auto}.mr-0\.5{margin-right:.125rem}.mr-1{margin-right:.25rem}.mr-2{margin-right:.5rem}.mr-6{margin-right:1.5rem}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-6{margin-top:1.5rem}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.table{display:table}.grid{display:grid}.hidden{display:none}.aspect-square{aspect-ratio:1 / 1}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-3\.5{height:.875rem}.h-32{height:8rem}.h-4{height:1rem}.h-40{height:10rem}.h-48{height:12rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-64{height:16rem}.h-\[85vh\]{height:85vh}.h-full{height:100%}.h-screen{height:100vh}.max-h-24{max-height:6rem}.max-h-32{max-height:8rem}.max-h-60{max-height:15rem}.max-h-\[80vh\]{max-height:80vh}.max-h-\[90vh\]{max-height:90vh}.min-h-0{min-height:0px}.min-h-\[300px\]{min-height:300px}.w-12{width:3rem}.w-16{width:4rem}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-3\.5{width:.875rem}.w-36{width:9rem}.w-4{width:1rem}.w-48{width:12rem}.w-5{width:1.25rem}.w-56{width:14rem}.w-6{width:1.5rem}.w-60{width:15rem}.w-64{width:16rem}.w-72{width:18rem}.w-full{width:100%}.min-w-0{min-width:0px}.min-w-72{min-width:18rem}.max-w-2xl{max-width:42rem}.max-w-3xl{max-width:48rem}.max-w-4xl{max-width:56rem}.max-w-5xl{max-width:64rem}.max-w-\[80\%\]{max-width:80%}.max-w-\[90vw\]{max-width:90vw}.max-w-full{max-width:100%}.max-w-lg{max-width:32rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.flex-shrink-0,.shrink-0{flex-shrink:0}.table-auto{table-layout:auto}.border-collapse{border-collapse:collapse}.rotate-90{--tw-rotate: 90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-\[0\.97\]{--tw-scale-x: .97;--tw-scale-y: .97;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize-y{resize:vertical}.list-inside{list-style-position:inside}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(0px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0px * var(--tw-space-y-reverse))}.space-y-0\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.125rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem * var(--tw-space-y-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-sm{border-radius:.125rem}.rounded-xl{border-radius:.75rem}.rounded-r{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.border{border-width:1px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-l-2{border-left-width:2px}.border-l-4{border-left-width:4px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-amber-400{--tw-border-opacity: 1;border-color:rgb(251 191 36 / var(--tw-border-opacity, 1))}.border-amber-500{--tw-border-opacity: 1;border-color:rgb(245 158 11 / var(--tw-border-opacity, 1))}.border-amber-600{--tw-border-opacity: 1;border-color:rgb(217 119 6 / var(--tw-border-opacity, 1))}.border-amber-700\/40{border-color:#b4530966}.border-amber-700\/50{border-color:#b4530980}.border-amber-800{--tw-border-opacity: 1;border-color:rgb(146 64 14 / var(--tw-border-opacity, 1))}.border-blue-500{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}.border-blue-600{--tw-border-opacity: 1;border-color:rgb(37 99 235 / var(--tw-border-opacity, 1))}.border-blue-700{--tw-border-opacity: 1;border-color:rgb(29 78 216 / var(--tw-border-opacity, 1))}.border-blue-700\/50{border-color:#1d4ed880}.border-blue-800{--tw-border-opacity: 1;border-color:rgb(30 64 175 / var(--tw-border-opacity, 1))}.border-cyan-500{--tw-border-opacity: 1;border-color:rgb(6 182 212 / var(--tw-border-opacity, 1))}.border-cyan-700{--tw-border-opacity: 1;border-color:rgb(14 116 144 / var(--tw-border-opacity, 1))}.border-cyan-700\/30{border-color:#0e74904d}.border-cyan-700\/50{border-color:#0e749080}.border-cyan-800\/60{border-color:#155e7599}.border-emerald-500{--tw-border-opacity: 1;border-color:rgb(16 185 129 / var(--tw-border-opacity, 1))}.border-emerald-600{--tw-border-opacity: 1;border-color:rgb(5 150 105 / var(--tw-border-opacity, 1))}.border-emerald-700{--tw-border-opacity: 1;border-color:rgb(4 120 87 / var(--tw-border-opacity, 1))}.border-emerald-700\/50{border-color:#04785780}.border-emerald-800{--tw-border-opacity: 1;border-color:rgb(6 95 70 / var(--tw-border-opacity, 1))}.border-gray-500{--tw-border-opacity: 1;border-color:rgb(107 114 128 / var(--tw-border-opacity, 1))}.border-gray-600{--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity, 1))}.border-gray-700{--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity, 1))}.border-gray-700\/50{border-color:#37415180}.border-gray-800{--tw-border-opacity: 1;border-color:rgb(31 41 55 / var(--tw-border-opacity, 1))}.border-gray-800\/50{border-color:#1f293780}.border-green-600{--tw-border-opacity: 1;border-color:rgb(22 163 74 / var(--tw-border-opacity, 1))}.border-green-700{--tw-border-opacity: 1;border-color:rgb(21 128 61 / var(--tw-border-opacity, 1))}.border-green-800{--tw-border-opacity: 1;border-color:rgb(22 101 52 / var(--tw-border-opacity, 1))}.border-orange-800\/50{border-color:#9a341280}.border-purple-500{--tw-border-opacity: 1;border-color:rgb(168 85 247 / var(--tw-border-opacity, 1))}.border-purple-600{--tw-border-opacity: 1;border-color:rgb(147 51 234 / var(--tw-border-opacity, 1))}.border-purple-700{--tw-border-opacity: 1;border-color:rgb(126 34 206 / var(--tw-border-opacity, 1))}.border-purple-700\/50{border-color:#7e22ce80}.border-red-600{--tw-border-opacity: 1;border-color:rgb(220 38 38 / var(--tw-border-opacity, 1))}.border-red-700{--tw-border-opacity: 1;border-color:rgb(185 28 28 / var(--tw-border-opacity, 1))}.border-red-800{--tw-border-opacity: 1;border-color:rgb(153 27 27 / var(--tw-border-opacity, 1))}.border-rose-500{--tw-border-opacity: 1;border-color:rgb(244 63 94 / var(--tw-border-opacity, 1))}.border-transparent{border-color:transparent}.border-violet-500{--tw-border-opacity: 1;border-color:rgb(139 92 246 / var(--tw-border-opacity, 1))}.border-yellow-700\/50{border-color:#a1620780}.border-b-gray-800{--tw-border-opacity: 1;border-bottom-color:rgb(31 41 55 / var(--tw-border-opacity, 1))}.border-l-blue-500{--tw-border-opacity: 1;border-left-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}.border-l-cyan-500{--tw-border-opacity: 1;border-left-color:rgb(6 182 212 / var(--tw-border-opacity, 1))}.border-l-gray-500{--tw-border-opacity: 1;border-left-color:rgb(107 114 128 / var(--tw-border-opacity, 1))}.border-l-green-500{--tw-border-opacity: 1;border-left-color:rgb(34 197 94 / var(--tw-border-opacity, 1))}.border-l-purple-500{--tw-border-opacity: 1;border-left-color:rgb(168 85 247 / var(--tw-border-opacity, 1))}.border-t-transparent{border-top-color:transparent}.bg-amber-500{--tw-bg-opacity: 1;background-color:rgb(245 158 11 / var(--tw-bg-opacity, 1))}.bg-amber-900\/30{background-color:#78350f4d}.bg-amber-900\/50{background-color:#78350f80}.bg-amber-900\/60{background-color:#78350f99}.bg-amber-950\/40{background-color:#451a0366}.bg-black\/60{background-color:#0009}.bg-black\/80{background-color:#000c}.bg-black\/85{background-color:#000000d9}.bg-blue-100{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1))}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity, 1))}.bg-blue-500\/5{background-color:#3b82f60d}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity, 1))}.bg-blue-700{--tw-bg-opacity: 1;background-color:rgb(29 78 216 / var(--tw-bg-opacity, 1))}.bg-blue-900\/40{background-color:#1e3a8a66}.bg-blue-900\/50{background-color:#1e3a8a80}.bg-blue-900\/60{background-color:#1e3a8a99}.bg-blue-950\/30{background-color:#1725544d}.bg-blue-950\/40{background-color:#17255466}.bg-cyan-500{--tw-bg-opacity: 1;background-color:rgb(6 182 212 / var(--tw-bg-opacity, 1))}.bg-cyan-600{--tw-bg-opacity: 1;background-color:rgb(8 145 178 / var(--tw-bg-opacity, 1))}.bg-cyan-700\/40{background-color:#0e749066}.bg-cyan-900\/40{background-color:#164e6366}.bg-cyan-900\/50{background-color:#164e6380}.bg-emerald-500{--tw-bg-opacity: 1;background-color:rgb(16 185 129 / var(--tw-bg-opacity, 1))}.bg-emerald-900{--tw-bg-opacity: 1;background-color:rgb(6 78 59 / var(--tw-bg-opacity, 1))}.bg-emerald-900\/50{background-color:#064e3b80}.bg-emerald-900\/60{background-color:#064e3b99}.bg-emerald-950\/30{background-color:#022c224d}.bg-fuchsia-900\/60{background-color:#701a7599}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}.bg-gray-500{--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity, 1))}.bg-gray-500\/5{background-color:#6b72800d}.bg-gray-600{--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity, 1))}.bg-gray-700{--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity, 1))}.bg-gray-800{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity, 1))}.bg-gray-800\/30{background-color:#1f29374d}.bg-gray-800\/40{background-color:#1f293766}.bg-gray-800\/50{background-color:#1f293780}.bg-gray-800\/60{background-color:#1f293799}.bg-gray-900{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity, 1))}.bg-gray-900\/40{background-color:#11182766}.bg-gray-900\/50{background-color:#11182780}.bg-gray-900\/60{background-color:#11182799}.bg-gray-900\/80{background-color:#111827cc}.bg-gray-950{--tw-bg-opacity: 1;background-color:rgb(3 7 18 / var(--tw-bg-opacity, 1))}.bg-green-100{--tw-bg-opacity: 1;background-color:rgb(220 252 231 / var(--tw-bg-opacity, 1))}.bg-green-500{--tw-bg-opacity: 1;background-color:rgb(34 197 94 / var(--tw-bg-opacity, 1))}.bg-green-500\/5{background-color:#22c55e0d}.bg-green-600{--tw-bg-opacity: 1;background-color:rgb(22 163 74 / var(--tw-bg-opacity, 1))}.bg-green-700{--tw-bg-opacity: 1;background-color:rgb(21 128 61 / var(--tw-bg-opacity, 1))}.bg-green-900{--tw-bg-opacity: 1;background-color:rgb(20 83 45 / var(--tw-bg-opacity, 1))}.bg-green-900\/40{background-color:#14532d66}.bg-green-900\/50{background-color:#14532d80}.bg-green-900\/60{background-color:#14532d99}.bg-green-950\/30{background-color:#052e164d}.bg-indigo-900\/60{background-color:#312e8199}.bg-lime-900\/60{background-color:#36531499}.bg-orange-100{--tw-bg-opacity: 1;background-color:rgb(255 237 213 / var(--tw-bg-opacity, 1))}.bg-orange-900\/20{background-color:#7c2d1233}.bg-orange-900\/60{background-color:#7c2d1299}.bg-purple-500{--tw-bg-opacity: 1;background-color:rgb(168 85 247 / var(--tw-bg-opacity, 1))}.bg-purple-500\/5{background-color:#a855f70d}.bg-purple-900\/50{background-color:#581c8780}.bg-purple-900\/60{background-color:#581c8799}.bg-purple-950\/30{background-color:#3b07644d}.bg-purple-950\/40{background-color:#3b076466}.bg-red-100{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity, 1))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity, 1))}.bg-red-900{--tw-bg-opacity: 1;background-color:rgb(127 29 29 / var(--tw-bg-opacity, 1))}.bg-red-900\/10{background-color:#7f1d1d1a}.bg-red-900\/40{background-color:#7f1d1d66}.bg-red-900\/50{background-color:#7f1d1d80}.bg-red-900\/60{background-color:#7f1d1d99}.bg-rose-500{--tw-bg-opacity: 1;background-color:rgb(244 63 94 / var(--tw-bg-opacity, 1))}.bg-rose-900\/60{background-color:#88133799}.bg-teal-900\/60{background-color:#134e4a99}.bg-violet-950\/30{background-color:#2e10654d}.bg-yellow-100{--tw-bg-opacity: 1;background-color:rgb(254 249 195 / var(--tw-bg-opacity, 1))}.bg-yellow-500{--tw-bg-opacity: 1;background-color:rgb(234 179 8 / var(--tw-bg-opacity, 1))}.bg-yellow-600{--tw-bg-opacity: 1;background-color:rgb(202 138 4 / var(--tw-bg-opacity, 1))}.bg-yellow-700{--tw-bg-opacity: 1;background-color:rgb(161 98 7 / var(--tw-bg-opacity, 1))}.bg-yellow-900\/50{background-color:#713f1280}.object-contain{-o-object-fit:contain;object-fit:contain}.object-cover{-o-object-fit:cover;object-fit:cover}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.pl-2{padding-left:.5rem}.pl-3{padding-left:.75rem}.pl-4{padding-left:1rem}.pt-3{padding-top:.75rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.align-top{vertical-align:top}.align-middle{vertical-align:middle}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[9px\]{font-size:9px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.capitalize{text-transform:capitalize}.normal-case{text-transform:none}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.leading-4{line-height:1rem}.leading-none{line-height:1}.leading-relaxed{line-height:1.625}.leading-snug{line-height:1.375}.tracking-wide{letter-spacing:.025em}.tracking-wider{letter-spacing:.05em}.tracking-widest{letter-spacing:.1em}.text-amber-300{--tw-text-opacity: 1;color:rgb(252 211 77 / var(--tw-text-opacity, 1))}.text-amber-400{--tw-text-opacity: 1;color:rgb(251 191 36 / var(--tw-text-opacity, 1))}.text-amber-400\/70{color:#fbbf24b3}.text-amber-400\/80{color:#fbbf24cc}.text-amber-500{--tw-text-opacity: 1;color:rgb(245 158 11 / var(--tw-text-opacity, 1))}.text-amber-600{--tw-text-opacity: 1;color:rgb(217 119 6 / var(--tw-text-opacity, 1))}.text-blue-200{--tw-text-opacity: 1;color:rgb(191 219 254 / var(--tw-text-opacity, 1))}.text-blue-300{--tw-text-opacity: 1;color:rgb(147 197 253 / var(--tw-text-opacity, 1))}.text-blue-400{--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity, 1))}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity, 1))}.text-blue-800{--tw-text-opacity: 1;color:rgb(30 64 175 / var(--tw-text-opacity, 1))}.text-cyan-200{--tw-text-opacity: 1;color:rgb(165 243 252 / var(--tw-text-opacity, 1))}.text-cyan-300{--tw-text-opacity: 1;color:rgb(103 232 249 / var(--tw-text-opacity, 1))}.text-cyan-400{--tw-text-opacity: 1;color:rgb(34 211 238 / var(--tw-text-opacity, 1))}.text-cyan-400\/70{color:#22d3eeb3}.text-cyan-400\/80{color:#22d3eecc}.text-cyan-500{--tw-text-opacity: 1;color:rgb(6 182 212 / var(--tw-text-opacity, 1))}.text-cyan-600{--tw-text-opacity: 1;color:rgb(8 145 178 / var(--tw-text-opacity, 1))}.text-emerald-300{--tw-text-opacity: 1;color:rgb(110 231 183 / var(--tw-text-opacity, 1))}.text-emerald-400{--tw-text-opacity: 1;color:rgb(52 211 153 / var(--tw-text-opacity, 1))}.text-fuchsia-300{--tw-text-opacity: 1;color:rgb(240 171 252 / var(--tw-text-opacity, 1))}.text-gray-100{--tw-text-opacity: 1;color:rgb(243 244 246 / var(--tw-text-opacity, 1))}.text-gray-200{--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity, 1))}.text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.text-green-300{--tw-text-opacity: 1;color:rgb(134 239 172 / var(--tw-text-opacity, 1))}.text-green-400{--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity, 1))}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity, 1))}.text-green-800{--tw-text-opacity: 1;color:rgb(22 101 52 / var(--tw-text-opacity, 1))}.text-indigo-300{--tw-text-opacity: 1;color:rgb(165 180 252 / var(--tw-text-opacity, 1))}.text-indigo-400{--tw-text-opacity: 1;color:rgb(129 140 248 / var(--tw-text-opacity, 1))}.text-lime-300{--tw-text-opacity: 1;color:rgb(190 242 100 / var(--tw-text-opacity, 1))}.text-orange-300{--tw-text-opacity: 1;color:rgb(253 186 116 / var(--tw-text-opacity, 1))}.text-orange-400{--tw-text-opacity: 1;color:rgb(251 146 60 / var(--tw-text-opacity, 1))}.text-orange-400\/70{color:#fb923cb3}.text-orange-700{--tw-text-opacity: 1;color:rgb(194 65 12 / var(--tw-text-opacity, 1))}.text-orange-800{--tw-text-opacity: 1;color:rgb(154 52 18 / var(--tw-text-opacity, 1))}.text-purple-300{--tw-text-opacity: 1;color:rgb(216 180 254 / var(--tw-text-opacity, 1))}.text-purple-400{--tw-text-opacity: 1;color:rgb(192 132 252 / var(--tw-text-opacity, 1))}.text-red-300{--tw-text-opacity: 1;color:rgb(252 165 165 / var(--tw-text-opacity, 1))}.text-red-400{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.text-red-400\/70{color:#f87171b3}.text-red-800{--tw-text-opacity: 1;color:rgb(153 27 27 / var(--tw-text-opacity, 1))}.text-rose-300{--tw-text-opacity: 1;color:rgb(253 164 175 / var(--tw-text-opacity, 1))}.text-rose-400{--tw-text-opacity: 1;color:rgb(251 113 133 / var(--tw-text-opacity, 1))}.text-sky-400{--tw-text-opacity: 1;color:rgb(56 189 248 / var(--tw-text-opacity, 1))}.text-teal-300{--tw-text-opacity: 1;color:rgb(94 234 212 / var(--tw-text-opacity, 1))}.text-violet-400{--tw-text-opacity: 1;color:rgb(167 139 250 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-yellow-300{--tw-text-opacity: 1;color:rgb(253 224 71 / var(--tw-text-opacity, 1))}.text-yellow-400{--tw-text-opacity: 1;color:rgb(250 204 21 / var(--tw-text-opacity, 1))}.text-yellow-800{--tw-text-opacity: 1;color:rgb(133 77 14 / var(--tw-text-opacity, 1))}.underline{text-decoration-line:underline}.underline-offset-2{text-underline-offset:2px}.placeholder-gray-500::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(107 114 128 / var(--tw-placeholder-opacity, 1))}.placeholder-gray-500::placeholder{--tw-placeholder-opacity: 1;color:rgb(107 114 128 / var(--tw-placeholder-opacity, 1))}.placeholder-gray-600::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(75 85 99 / var(--tw-placeholder-opacity, 1))}.placeholder-gray-600::placeholder{--tw-placeholder-opacity: 1;color:rgb(75 85 99 / var(--tw-placeholder-opacity, 1))}.accent-blue-500{accent-color:#3b82f6}.opacity-25{opacity:.25}.opacity-30{opacity:.3}.opacity-60{opacity:.6}.opacity-75{opacity:.75}.shadow-2xl{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-2{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-blue-400{--tw-ring-opacity: 1;--tw-ring-color: rgb(96 165 250 / var(--tw-ring-opacity, 1))}.ring-blue-500{--tw-ring-opacity: 1;--tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity, 1))}.ring-offset-1{--tw-ring-offset-width: 1px}.ring-offset-gray-900{--tw-ring-offset-color: #111827}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-sm{--tw-backdrop-blur: blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-150{transition-duration:.15s}.trace-scroll::-webkit-scrollbar{width:6px}.trace-scroll::-webkit-scrollbar-track{background:transparent}.trace-scroll::-webkit-scrollbar-thumb{background:#4b5563;border-radius:3px}.trace-scroll::-webkit-scrollbar-thumb:hover{background:#6b7280}.theme-model .panel-drop-target{outline:2px dashed #60a5fa;outline-offset:-2px;border-radius:.5rem;background:#60a5fa0d}.theme-arena .panel-drop-target{outline:2px dashed #a78bfa;outline-offset:-2px;border-radius:.5rem;background:#a78bfa0d}.theme-rlm .panel-drop-target{outline:2px dashed #fb923c;outline-offset:-2px;border-radius:.5rem;background:#fb923c0d}.theme-harbor .panel-drop-target{outline:2px dashed #2dd4bf;outline-offset:-2px;border-radius:.5rem;background:#2dd4bf0d}.code-block{font-family:JetBrains Mono,Fira Code,Cascadia Code,monospace;font-size:.8rem;line-height:1.4}.drag-handle{cursor:grab}.drag-handle:active{cursor:grabbing}.light{--tw-bg-opacity: 1}.light .bg-gray-950{background-color:#fff!important}.light .bg-gray-900{background-color:#f9fafb!important}.light .bg-gray-900\/80{background-color:#f9fafbcc!important}.light .bg-gray-900\/50{background-color:#f9fafb80!important}.light .bg-gray-800{background-color:#f3f4f6!important}.light .bg-gray-800\/50{background-color:#f3f4f680!important}.light .bg-gray-700{background-color:#e5e7eb!important}.light .text-gray-100{color:#111827!important}.light .text-gray-200{color:#1f2937!important}.light .text-gray-300{color:#374151!important}.light .text-gray-400{color:#6b7280!important}.light .text-gray-500{color:#9ca3af!important}.light .text-gray-600{color:#d1d5db!important}.light .border-gray-700{border-color:#e5e7eb!important}.light .border-gray-800{border-color:#f3f4f6!important}.light .border-gray-800\/50{border-color:#f3f4f680!important}.light .text-cyan-400{color:#0891b2!important}.light .text-cyan-400\/80{color:#0891b2cc!important}.light .border-cyan-500{border-color:#06b6d4!important}.light .text-emerald-300,.light .text-emerald-400{color:#059669!important}.light .text-amber-400{color:#d97706!important}.light .text-amber-400\/80{color:#d97706cc!important}.light .text-amber-400\/70{color:#d97706b3!important}.light .text-violet-400{color:#7c3aed!important}.light .text-red-400{color:#dc2626!important}.light .text-yellow-400{color:#ca8a04!important}.light .text-green-400{color:#16a34a!important}.light .bg-emerald-950\/30{background-color:#05966914!important}.light .bg-emerald-900{background-color:#05966926!important}.light .bg-violet-950\/30{background-color:#7c3aed14!important}.light .bg-orange-900\/20{background-color:#ea580c14!important}.light .bg-red-900\/10{background-color:#dc26260d!important}.light .bg-cyan-600{background-color:#0891b2!important}.light .border-emerald-500,.light .border-emerald-700{border-color:#059669!important}.light .border-amber-500{border-color:#d97706!important}.light .border-violet-500{border-color:#7c3aed!important}.light .border-cyan-500{border-color:#0891b2!important}.light .border-orange-800\/50{border-color:#ea580c4d!important}.light .hover\:bg-gray-800:hover{background-color:#e5e7eb!important}.light .hover\:bg-gray-900\/50:hover{background-color:#f9fafb80!important}.light .hover\:text-gray-200:hover{color:#1f2937!important}.light .hover\:text-gray-300:hover{color:#374151!important}.light .hover\:border-gray-700:hover{border-color:#d1d5db!important}.light .hover\:border-gray-400:hover{border-color:#9ca3af!important}.light .hover\:text-cyan-300:hover{color:#0891b2!important}.light select{background-color:#f3f4f6!important;color:#374151!important;border-color:#d1d5db!important}.light input{background-color:#f9fafb!important;color:#374151!important;border-color:#d1d5db!important}.light .trace-scroll::-webkit-scrollbar-thumb{background:#d1d5db}.light .trace-scroll::-webkit-scrollbar-thumb:hover{background:#9ca3af}.light pre{background-color:#f3f4f6!important}.light code{background-color:#f3f4f6!important;color:#374151!important}.first\:mt-0:first-child{margin-top:0}.last\:border-0:last-child{border-width:0px}.hover\:border-cyan-600:hover{--tw-border-opacity: 1;border-color:rgb(8 145 178 / var(--tw-border-opacity, 1))}.hover\:border-gray-400:hover{--tw-border-opacity: 1;border-color:rgb(156 163 175 / var(--tw-border-opacity, 1))}.hover\:border-gray-500:hover{--tw-border-opacity: 1;border-color:rgb(107 114 128 / var(--tw-border-opacity, 1))}.hover\:border-gray-700:hover{--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity, 1))}.hover\:bg-blue-500:hover{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity, 1))}.hover\:bg-cyan-500:hover{--tw-bg-opacity: 1;background-color:rgb(6 182 212 / var(--tw-bg-opacity, 1))}.hover\:bg-cyan-600\/50:hover{background-color:#0891b280}.hover\:bg-cyan-900\/70:hover{background-color:#164e63b3}.hover\:bg-gray-600:hover{--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity, 1))}.hover\:bg-gray-700:hover{--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity, 1))}.hover\:bg-gray-800:hover{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity, 1))}.hover\:bg-gray-800\/30:hover{background-color:#1f29374d}.hover\:bg-gray-800\/40:hover{background-color:#1f293766}.hover\:bg-gray-800\/50:hover{background-color:#1f293780}.hover\:bg-gray-900\/50:hover{background-color:#11182780}.hover\:bg-red-800:hover{--tw-bg-opacity: 1;background-color:rgb(153 27 27 / var(--tw-bg-opacity, 1))}.hover\:text-blue-400:hover{--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity, 1))}.hover\:text-cyan-300:hover{--tw-text-opacity: 1;color:rgb(103 232 249 / var(--tw-text-opacity, 1))}.hover\:text-cyan-400:hover{--tw-text-opacity: 1;color:rgb(34 211 238 / var(--tw-text-opacity, 1))}.hover\:text-gray-100:hover{--tw-text-opacity: 1;color:rgb(243 244 246 / var(--tw-text-opacity, 1))}.hover\:text-gray-200:hover{--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity, 1))}.hover\:text-gray-300:hover{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}.hover\:text-gray-400:hover{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.hover\:text-gray-800:hover{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity, 1))}.hover\:text-red-300:hover{--tw-text-opacity: 1;color:rgb(252 165 165 / var(--tw-text-opacity, 1))}.hover\:text-red-400:hover{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.hover\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.focus\:border-blue-500:focus{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}.focus\:border-cyan-500:focus{--tw-border-opacity: 1;border-color:rgb(6 182 212 / var(--tw-border-opacity, 1))}.focus\:border-cyan-600:focus{--tw-border-opacity: 1;border-color:rgb(8 145 178 / var(--tw-border-opacity, 1))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-blue-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity, 1))}.focus\:ring-offset-0:focus{--tw-ring-offset-width: 0px}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:bg-gray-700:disabled{--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity, 1))}.disabled\:text-gray-500:disabled{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.disabled\:opacity-40:disabled{opacity:.4}.group:hover .group-hover\:flex{display:flex}.group:hover .group-hover\:text-gray-200{--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity, 1))}.group:hover .group-hover\:text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}.group:hover .group-hover\:opacity-90{opacity:.9}.dark\:border-gray-600:is(.dark *){--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity, 1))}.dark\:text-gray-400:is(.dark *){--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.dark\:hover\:text-gray-200:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity, 1))}@media(min-width:640px){.sm\:block{display:block}.sm\:w-64{width:16rem}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(min-width:768px){.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}@media(min-width:1024px){.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}@media(min-width:1280px){.xl\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}
frontend/dist/index.html CHANGED
@@ -4,8 +4,8 @@
4
  <meta charset="UTF-8" />
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
  <title>RACA Dashboard</title>
7
- <script type="module" crossorigin src="/assets/index-Br9e1W0j.js"></script>
8
- <link rel="stylesheet" crossorigin href="/assets/index-CHBmtDYC.css">
9
  </head>
10
  <body class="bg-gray-950 text-gray-100">
11
  <div id="root"></div>
 
4
  <meta charset="UTF-8" />
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
  <title>RACA Dashboard</title>
7
+ <script type="module" crossorigin src="/assets/index-BFtcA7GQ.js"></script>
8
+ <link rel="stylesheet" crossorigin href="/assets/index-CxBbYLho.css">
9
  </head>
10
  <body class="bg-gray-950 text-gray-100">
11
  <div id="root"></div>
frontend/src/selected_tools/SelectedToolsApp.tsx CHANGED
@@ -14,6 +14,9 @@ interface Row {
14
  tool_call_counts: Record<string, number>;
15
  total_tool_calls: number;
16
  status: string;
 
 
 
17
  }
18
 
19
  // ── Block parsers ────────────────────────────────────────────────────────
@@ -167,6 +170,9 @@ export default function SelectedToolsApp() {
167
  // Stats
168
  const directCount = data.filter(r => r.direct_answer).length;
169
  const directPct = data.length ? Math.round(100 * directCount / data.length) : 0;
 
 
 
170
 
171
  if (loading) return <div className="h-full flex items-center justify-center text-gray-400">Loading from HuggingFace…</div>;
172
  if (error) return <div className="h-full flex items-center justify-center text-red-400">Error: {error}</div>;
@@ -194,10 +200,19 @@ export default function SelectedToolsApp() {
194
  )}
195
 
196
  {/* Stats banner */}
197
- <div className="px-3 py-2 border-b border-gray-800 bg-gray-900/80">
198
- <div className="text-[10px] text-gray-500 uppercase tracking-widest mb-1">Direct-answer rate</div>
199
- <div className="text-lg font-bold text-emerald-400">{directPct}%</div>
200
- <div className="text-[10px] text-gray-600">{directCount} / {data.length} no tool calls</div>
 
 
 
 
 
 
 
 
 
201
  </div>
202
 
203
  {/* Filter toggles */}
@@ -243,10 +258,18 @@ export default function SelectedToolsApp() {
243
  >
244
  <div className="flex items-center justify-between">
245
  <span className="font-medium text-gray-200">#{row.query_id}</span>
246
- {row.direct_answer
247
- ? <span className="text-[9px] px-1.5 py-0.5 rounded-full bg-emerald-900/60 text-emerald-400 border border-emerald-800">direct</span>
248
- : <span className="text-[9px] px-1.5 py-0.5 rounded-full bg-blue-900/60 text-blue-400 border border-blue-800">{row.total_tool_calls} calls</span>
249
- }
 
 
 
 
 
 
 
 
250
  </div>
251
  <div className="text-[10px] text-gray-600 mt-0.5">k={row.k_effective} selected steps</div>
252
  </button>
@@ -262,6 +285,12 @@ export default function SelectedToolsApp() {
262
  <div className="px-4 py-2 bg-gray-900/60 border-b border-gray-800 shrink-0">
263
  <div className="flex items-center gap-3 flex-wrap">
264
  <span className="text-sm font-medium text-gray-100">Query #{current.query_id}</span>
 
 
 
 
 
 
265
  {current.direct_answer
266
  ? <span className="text-xs px-2 py-0.5 rounded-full bg-emerald-900/50 text-emerald-300 border border-emerald-800">Direct answer</span>
267
  : <span className="text-xs px-2 py-0.5 rounded-full bg-blue-900/50 text-blue-300 border border-blue-800">{current.total_tool_calls} tool calls</span>
@@ -271,20 +300,40 @@ export default function SelectedToolsApp() {
271
  {current.status}
272
  </span>
273
  </div>
274
- {/* Selected indices */}
275
- <div className="mt-1.5 flex items-center gap-1.5 flex-wrap">
276
- <span className="text-[10px] font-bold uppercase tracking-widest text-gray-500">Selected steps</span>
277
- {current.selected_indices.map(idx => (
278
- <span key={idx} className="text-[10px] px-1.5 py-0.5 rounded bg-gray-800 border border-gray-700 text-gray-300 font-mono">
279
- #{idx}
 
 
 
 
 
 
 
280
  </span>
281
- ))}
282
- </div>
 
 
 
 
 
 
 
 
 
 
 
283
  {/* Rationale */}
284
- <div className="mt-1.5 text-xs text-gray-400 leading-snug bg-gray-800/50 rounded px-2 py-1.5 border border-gray-700">
285
- <span className="text-[10px] font-bold uppercase tracking-widest text-amber-500 mr-2">Rationale</span>
286
- {current.rationale}
287
- </div>
 
 
288
  </div>
289
 
290
  {/* Side-by-side columns */}
 
14
  tool_call_counts: Record<string, number>;
15
  total_tool_calls: number;
16
  status: string;
17
+ question: string;
18
+ correct_answer: string;
19
+ correct: boolean | null;
20
  }
21
 
22
  // ── Block parsers ────────────────────────────────────────────────────────
 
170
  // Stats
171
  const directCount = data.filter(r => r.direct_answer).length;
172
  const directPct = data.length ? Math.round(100 * directCount / data.length) : 0;
173
+ const evalRows = data.filter(r => r.correct !== null && r.correct !== undefined);
174
+ const correctCount = evalRows.filter(r => r.correct === true).length;
175
+ const accuracyPct = evalRows.length ? Math.round(100 * correctCount / evalRows.length) : null;
176
 
177
  if (loading) return <div className="h-full flex items-center justify-center text-gray-400">Loading from HuggingFace…</div>;
178
  if (error) return <div className="h-full flex items-center justify-center text-red-400">Error: {error}</div>;
 
200
  )}
201
 
202
  {/* Stats banner */}
203
+ <div className="px-3 py-2 border-b border-gray-800 bg-gray-900/80 space-y-1.5">
204
+ {accuracyPct !== null && (
205
+ <div>
206
+ <div className="text-[10px] text-gray-500 uppercase tracking-widest mb-0.5">Accuracy</div>
207
+ <div className="text-lg font-bold text-sky-400">{accuracyPct}%</div>
208
+ <div className="text-[10px] text-gray-600">{correctCount} / {evalRows.length} correct</div>
209
+ </div>
210
+ )}
211
+ <div>
212
+ <div className="text-[10px] text-gray-500 uppercase tracking-widest mb-0.5">Direct-answer rate</div>
213
+ <div className="text-base font-bold text-emerald-400">{directPct}%</div>
214
+ <div className="text-[10px] text-gray-600">{directCount} / {data.length} no tool calls</div>
215
+ </div>
216
  </div>
217
 
218
  {/* Filter toggles */}
 
258
  >
259
  <div className="flex items-center justify-between">
260
  <span className="font-medium text-gray-200">#{row.query_id}</span>
261
+ <div className="flex items-center gap-1">
262
+ {row.correct === true && (
263
+ <span className="text-[9px] px-1.5 py-0.5 rounded-full bg-green-900/60 text-green-400 border border-green-800">βœ“</span>
264
+ )}
265
+ {row.correct === false && (
266
+ <span className="text-[9px] px-1.5 py-0.5 rounded-full bg-red-900/60 text-red-400 border border-red-800">βœ—</span>
267
+ )}
268
+ {row.direct_answer
269
+ ? <span className="text-[9px] px-1.5 py-0.5 rounded-full bg-emerald-900/60 text-emerald-400 border border-emerald-800">direct</span>
270
+ : <span className="text-[9px] px-1.5 py-0.5 rounded-full bg-blue-900/60 text-blue-400 border border-blue-800">{row.total_tool_calls} calls</span>
271
+ }
272
+ </div>
273
  </div>
274
  <div className="text-[10px] text-gray-600 mt-0.5">k={row.k_effective} selected steps</div>
275
  </button>
 
285
  <div className="px-4 py-2 bg-gray-900/60 border-b border-gray-800 shrink-0">
286
  <div className="flex items-center gap-3 flex-wrap">
287
  <span className="text-sm font-medium text-gray-100">Query #{current.query_id}</span>
288
+ {current.correct === true && (
289
+ <span className="text-xs px-2 py-0.5 rounded-full bg-green-900/50 text-green-300 border border-green-800 font-semibold">βœ“ Correct</span>
290
+ )}
291
+ {current.correct === false && (
292
+ <span className="text-xs px-2 py-0.5 rounded-full bg-red-900/50 text-red-300 border border-red-800 font-semibold">βœ— Incorrect</span>
293
+ )}
294
  {current.direct_answer
295
  ? <span className="text-xs px-2 py-0.5 rounded-full bg-emerald-900/50 text-emerald-300 border border-emerald-800">Direct answer</span>
296
  : <span className="text-xs px-2 py-0.5 rounded-full bg-blue-900/50 text-blue-300 border border-blue-800">{current.total_tool_calls} tool calls</span>
 
300
  {current.status}
301
  </span>
302
  </div>
303
+ {/* Question */}
304
+ {current.question && (
305
+ <div className="mt-1.5 text-xs text-gray-200 leading-snug bg-gray-800/40 rounded px-2 py-1.5 border border-gray-700">
306
+ <span className="text-[10px] font-bold uppercase tracking-widest text-violet-400 mr-2">Question</span>
307
+ {current.question}
308
+ </div>
309
+ )}
310
+ {/* Correct answer */}
311
+ {current.correct_answer && (
312
+ <div className="mt-1 text-xs leading-snug bg-gray-800/40 rounded px-2 py-1.5 border border-gray-700 flex items-start gap-2">
313
+ <span className="text-[10px] font-bold uppercase tracking-widest text-green-400 shrink-0 mt-0.5">Answer</span>
314
+ <span className={current.correct === true ? "text-green-300" : current.correct === false ? "text-red-300" : "text-gray-300"}>
315
+ {current.correct_answer}
316
  </span>
317
+ </div>
318
+ )}
319
+ {/* Selected indices */}
320
+ {current.selected_indices.length > 0 && (
321
+ <div className="mt-1.5 flex items-center gap-1.5 flex-wrap">
322
+ <span className="text-[10px] font-bold uppercase tracking-widest text-gray-500">Selected steps</span>
323
+ {current.selected_indices.map(idx => (
324
+ <span key={idx} className="text-[10px] px-1.5 py-0.5 rounded bg-gray-800 border border-gray-700 text-gray-300 font-mono">
325
+ #{idx}
326
+ </span>
327
+ ))}
328
+ </div>
329
+ )}
330
  {/* Rationale */}
331
+ {current.rationale && (
332
+ <div className="mt-1.5 text-xs text-gray-400 leading-snug bg-gray-800/50 rounded px-2 py-1.5 border border-gray-700">
333
+ <span className="text-[10px] font-bold uppercase tracking-widest text-amber-500 mr-2">Rationale</span>
334
+ {current.rationale}
335
+ </div>
336
+ )}
337
  </div>
338
 
339
  {/* Side-by-side columns */}