airabbitX commited on
Commit
6542219
Β·
verified Β·
1 Parent(s): a57b07a

Create index.html

Browse files
Files changed (1) hide show
  1. index.html +686 -19
index.html CHANGED
@@ -1,19 +1,686 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Surf Spot Finder (Animated Annotation)</title>
7
+ <style>
8
+ /* Basic simulation of Streamlit layout and theme */
9
+ body {
10
+ font-family: "Source Sans Pro", sans-serif; /* Simulating Streamlit default */
11
+ margin: 0;
12
+ padding: 0;
13
+ background-color: #FFFFFF; /* White background */
14
+ color: #161616; /* Text color */
15
+ display: flex;
16
+ min-height: 100vh;
17
+ }
18
+ .sidebar {
19
+ width: 300px; /* Typical sidebar width */
20
+ background-color: #F0F2F6; /* Secondary background color */
21
+ padding: 20px;
22
+ overflow-y: auto; /* Allow scrolling if content overflows */
23
+ flex-shrink: 0; /* Prevent sidebar from shrinking */
24
+ position: sticky;
25
+ top: 0;
26
+ height: 100vh; /* Make it full height */
27
+ box-sizing: border-box; /* Include padding in width */
28
+ position: relative; /* Important: Needed for z-index to create a stacking context */
29
+ z-index: 10; /* Important: Ensure sidebar content is above main content */
30
+ }
31
+ .main-content {
32
+ flex-grow: 1; /* Main content takes remaining space */
33
+ padding: 20px;
34
+ max-width: 900px; /* Limit main content width */
35
+ margin: 0 auto; /* Center main content */
36
+ box-sizing: border-box; /* Include padding in width */
37
+ /* Main content doesn't strictly need z-index here,
38
+ as sidebar's higher z-index handles stacking */
39
+ }
40
+ h1, h2, h3, h4, h5, h6 {
41
+ color: #161616; /* Dark text for headings */
42
+ }
43
+ button {
44
+ background-color: #00d230; /* Primary color */
45
+ color: white;
46
+ padding: 10px 20px;
47
+ border: none;
48
+ border-radius: 5px;
49
+ cursor: pointer;
50
+ font-size: 1rem;
51
+ margin-top: 15px;
52
+ width: 100%; /* Make button fill sidebar width */
53
+ box-sizing: border-box;
54
+ transition: border-color 0.5s ease; /* Transition for highlight */
55
+ }
56
+ button:disabled {
57
+ background-color: #cccccc;
58
+ cursor: not-allowed;
59
+ }
60
+ input[type="text"],
61
+ input[type="number"],
62
+ input[type="date"],
63
+ select {
64
+ width: 100%;
65
+ padding: 8px;
66
+ margin-top: 5px;
67
+ margin-bottom: 10px;
68
+ border: 1px solid #cccccc;
69
+ border-radius: 4px;
70
+ box-sizing: border-box; /* Include padding and border in the element's total width and height */
71
+ transition: border-color 0.5s ease; /* Transition for highlight */
72
+ }
73
+ .st-columns {
74
+ display: flex;
75
+ gap: 10px; /* Space between columns */
76
+ /* Removed margin-bottom from here, added to annotated-field */
77
+ transition: border-color 0.5s ease; /* Transition for highlight */
78
+ }
79
+ .st-columns > div {
80
+ flex: 1; /* Distribute space */
81
+ }
82
+ .st-columns > div:first-child {
83
+ flex: 3; /* Simulate 3:1 ratio */
84
+ }
85
+
86
+ .st-expander {
87
+ border: 1px solid #cccccc;
88
+ border-radius: 5px;
89
+ margin-bottom: 15px;
90
+ overflow: hidden; /* Hide overflow from inner content like data editor */
91
+ }
92
+ .st-expander-header {
93
+ padding: 10px;
94
+ background-color: #F8F9FA; /* Slightly different background for header */
95
+ cursor: pointer;
96
+ font-weight: bold;
97
+ }
98
+ .st-expander-content {
99
+ padding: 10px;
100
+ border-top: 1px solid #cccccc;
101
+ /* By default, show content as if expander is open */
102
+ display: block;
103
+ }
104
+ .st-info {
105
+ background-color: #e6f7ff; /* Light blue */
106
+ border-left: 5px solid #2196F3; /* Blue border */
107
+ padding: 15px;
108
+ margin-bottom: 15px;
109
+ border-radius: 4px;
110
+ }
111
+ .st-success {
112
+ color: green;
113
+ font-weight: bold;
114
+ margin-left: 5px;
115
+ }
116
+ .st-error {
117
+ color: red;
118
+ font-weight: bold;
119
+ margin-left: 5px;
120
+ }
121
+ table {
122
+ width: 100%;
123
+ border-collapse: collapse;
124
+ margin-top: 10px;
125
+ margin-bottom: 10px;
126
+ font-size: 0.9em; /* Smaller text in tables */
127
+ transition: border-color 0.5s ease; /* Transition for highlight */
128
+ }
129
+ th, td {
130
+ border: 1px solid #dddddd;
131
+ text-align: left;
132
+ padding: 8px;
133
+ vertical-align: top; /* Align content to top */
134
+ }
135
+ th {
136
+ background-color: #f2f2f2;
137
+ }
138
+ td:first-child {
139
+ width: 80%; /* Criteria column wider */
140
+ }
141
+ td:last-child {
142
+ width: 20%; /* Points column narrower */
143
+ }
144
+ textarea {
145
+ width: 100%;
146
+ padding: 8px;
147
+ margin-top: 0; /* Adjust spacing */
148
+ margin-bottom: 0; /* Adjust spacing */
149
+ border: 1px solid #cccccc;
150
+ border-radius: 4px;
151
+ box-sizing: border-box;
152
+ min-height: 50px; /* Make textareas smaller in table */
153
+ resize: vertical; /* Allow vertical resize */
154
+ font-size: 1em; /* Reset font size for input */
155
+ transition: border-color 0.5s ease; /* Transition for highlight */
156
+ }
157
+ td input[type="number"] {
158
+ width: 60px; /* Smaller width for point input */
159
+ padding: 4px;
160
+ margin: 0;
161
+ transition: border-color 0.5s ease; /* Transition for highlight */
162
+ }
163
+
164
+
165
+ /* Simulate data editor add row button */
166
+ .add-row-button {
167
+ display: inline-block;
168
+ background-color: #e9e9e9;
169
+ border: 1px solid #cccccc;
170
+ border-radius: 4px;
171
+ padding: 4px 8px;
172
+ font-size: 0.9em;
173
+ cursor: pointer;
174
+ margin-top: 5px;
175
+ margin-bottom: 10px;
176
+ }
177
+
178
+ a {
179
+ color: #00d230; /* Primary color for links */
180
+ text-decoration: none;
181
+ }
182
+ a:hover {
183
+ text-decoration: underline;
184
+ }
185
+ .st-checkbox {
186
+ margin-top: 10px;
187
+ margin-bottom: 10px;
188
+ position: relative; /* Needed for absolute positioning inside */
189
+ display: inline-block; /* Make it an inline block to contain bubble */
190
+ }
191
+ /* Highlight the checkbox input itself */
192
+ .st-checkbox input[type="checkbox"] {
193
+ transition: outline-color 0.5s ease; /* Highlight checkbox outline */
194
+ }
195
+ .st-checkbox input[type="checkbox"].highlight {
196
+ outline: 2px solid red; /* Use outline for checkbox */
197
+ outline-offset: 2px; /* Keep outline separate from element */
198
+ border-color: red; /* Also highlight border just in case */
199
+ }
200
+
201
+ label {
202
+ font-weight: bold;
203
+ display: block; /* Make labels block elements */
204
+ margin-bottom: 5px;
205
+ }
206
+
207
+ /* Highlighting Style */
208
+ .highlight {
209
+ border-color: red !important; /* Use important to override default styles */
210
+ }
211
+ .highlight.st-columns {
212
+ /* Highlight borders of inputs within st-columns */
213
+ }
214
+ .highlight.st-columns input,
215
+ .highlight.st-columns select {
216
+ border-color: red !important;
217
+ }
218
+
219
+
220
+ /* Container for Annotated Fields */
221
+ .annotated-field {
222
+ position: relative; /* Parent for absolute positioning of bubble */
223
+ margin-bottom: 25px; /* Add space below each field group to make room for bubble */
224
+ }
225
+ /* Adjust margin for the very last annotated field if needed */
226
+ .sidebar .annotated-field:last-of-type {
227
+ margin-bottom: 15px; /* Less margin after the button */
228
+ }
229
+
230
+
231
+ /* Speech Bubble Style */
232
+ .speech-bubble {
233
+ position: absolute;
234
+ background-color: #ffffcc; /* Light yellow */
235
+ border: 1px solid #ffcc00; /* Orange border */
236
+ padding: 8px 12px; /* More padding */
237
+ border-radius: 8px; /* Rounder corners */
238
+ font-size: 0.85em; /* Slightly larger font */
239
+ z-index: 10; /* Higher z-index within the sidebar's stacking context */
240
+ width: 180px; /* Fixed width */
241
+ box-shadow: 2px 2px 5px rgba(0,0,0,0.2);
242
+ pointer-events: none; /* Allow clicks to pass through */
243
+ line-height: 1.4;
244
+ /* Position bubble to the right */
245
+ left: calc(100% + 15px); /* 15px space from the right edge of parent */
246
+ top: 50%; /* Vertically center */
247
+ transform: translateY(-50%); /* Adjust vertical centering */
248
+
249
+ opacity: 0; /* Initially hidden */
250
+ visibility: hidden; /* Initially hidden */
251
+ transition: opacity 0.5s ease, visibility 0.5s ease; /* Animation */
252
+ }
253
+
254
+ /* Speech Bubble Pointer (Points Left) */
255
+ .speech-bubble::before {
256
+ content: '';
257
+ position: absolute;
258
+ width: 0;
259
+ height: 0;
260
+ border-top: 8px solid transparent;
261
+ border-bottom: 8px solid transparent;
262
+ border-right: 8px solid #ffcc00; /* Border color */
263
+ left: -8px; /* Position at the edge */
264
+ top: 50%;
265
+ transform: translateY(-50%); /* Vertically center pointer */
266
+ }
267
+ .speech-bubble::after {
268
+ content: '';
269
+ position: absolute;
270
+ width: 0;
271
+ height: 0;
272
+ /* Inner pointer */
273
+ border-top: 7px solid transparent;
274
+ border-bottom: 7px solid transparent;
275
+ border-right: 7px solid #ffffcc; /* Background color */
276
+ left: -7px; /* Position slightly inside border */
277
+ top: 50%;
278
+ transform: translateY(-50%); /* Vertically center pointer */
279
+ }
280
+
281
+ /* Adjust bubble position for date/time columns (positioned below) */
282
+ .annotated-field .st-columns + .speech-bubble {
283
+ top: auto; /* Override top: 50% */
284
+ bottom: -20px; /* Position below the container */
285
+ left: 50%; /* Center horizontally */
286
+ transform: translateX(-50%);
287
+ width: 280px; /* Wider bubble */
288
+ }
289
+ .annotated-field .st-columns + .speech-bubble::before,
290
+ .annotated-field .st-columns + .speech-bubble::after {
291
+ left: 50%;
292
+ top: -8px; /* Position above */
293
+ bottom: auto; /* Override bottom */
294
+ transform: translateX(-50%) rotate(90deg); /* Rotate to point up */
295
+ border-left: 8px solid transparent; border-right: 8px solid transparent; border-bottom: 8px solid #ffcc00; border-top: none; /* Redefine border for upward pointer */
296
+ }
297
+ .annotated-field .st-columns + .speech-bubble::after {
298
+ left: 50%;
299
+ top: -7px; /* Position above */
300
+ bottom: auto;
301
+ transform: translateX(-50%) rotate(90deg);
302
+ border-left: 7px solid transparent; border-right: 7px solid transparent; border-bottom: 7px solid #ffffcc; border-top: none;
303
+ }
304
+
305
+ /* Position bubble for Data Editor Table (positioned to the right, slightly down) */
306
+ .annotated-field table + .speech-bubble {
307
+ top: 10px; /* Position slightly below the table top */
308
+ left: calc(100% + 15px); transform: none; width: 200px;
309
+ }
310
+
311
+ /* Position bubble for the checkbox (positioned to the right) */
312
+ .annotated-field .st-checkbox + .speech-bubble {
313
+ top: 50%; /* Vertically center with the checkbox */
314
+ left: calc(100% + 15px);
315
+ transform: translateY(-50%);
316
+ width: 150px;
317
+ }
318
+
319
+ /* Position bubble for the button (positioned to the right) */
320
+ .annotated-field button.highlight + .speech-bubble {
321
+ top: 50%; /* Vertically center with the button */
322
+ left: calc(100% + 15px);
323
+ transform: translateY(-50%);
324
+ width: 150px;
325
+ }
326
+
327
+
328
+ /* Styling for tool expanders */
329
+ .tool-description {
330
+ font-size: 0.9em;
331
+ color: #555;
332
+ }
333
+
334
+ </style>
335
+ </head>
336
+ <body>
337
+
338
+ <!-- Sidebar Simulation -->
339
+ <div class="sidebar">
340
+ <h3>Configuration</h3>
341
+
342
+ <p style="font-size: 0.9em;">Built using <a href="https://github.com/mozilla-ai/any-agent">Any-Agent</a></p>
343
+
344
+ <div class="annotated-field">
345
+ <label for="location">Enter a location</label>
346
+ <div class="st-columns">
347
+ <div><input type="text" id="location" value="Los Angeles California, US"></div>
348
+ <div><span class="st-success">βœ…</span></div>
349
+ </div>
350
+ <div class="speech-bubble">Enter the surf spot location (e.g., city, state, country). Used to find nearby surf spots.</div>
351
+ </div>
352
+
353
+
354
+ <div class="annotated-field">
355
+ <label for="max-driving-hours">Enter the maximum driving hours</label>
356
+ <input type="number" id="max-driving-hours" value="2" min="1">
357
+ <div class="speech-bubble">Sets the maximum driving distance from the location, in hours.</div>
358
+ </div>
359
+
360
+ <div class="annotated-field">
361
+ <div class="st-columns" id="date-time-inputs">
362
+ <div>
363
+ <label for="date-input">Select a date in the future</label>
364
+ <input type="date" id="date-input" value="2024-12-25">
365
+ </div>
366
+ <div>
367
+ <label for="time-select">Select a time</label>
368
+ <select id="time-select">
369
+ <option value="09:00" selected>09:00</option>
370
+ <option value="10:00">10:00</option>
371
+ <!-- ... other times ... -->
372
+ </select>
373
+ </div>
374
+ </div>
375
+ <div class="speech-bubble">
376
+ <span class="speech-bubble-pointer"></span>
377
+ Select the date and time for which you want the surf and wind forecasts. Must be in the future.
378
+ </div>
379
+ </div>
380
+
381
+
382
+ <div class="annotated-field">
383
+ <label for="framework-select">Select the agent framework to use</label>
384
+ <select id="framework-select">
385
+ <option>OPENAI</option>
386
+ <option>LANGCHAIN</option>
387
+ <option selected>ANYAGENT</option>
388
+ <!-- ... other frameworks ... -->
389
+ </select>
390
+ <div class="speech-bubble">Choose the underlying AI agent framework (e.g., LangChain, OpenAI Assistants, Any-Agent).</div>
391
+ </div>
392
+
393
+
394
+ <div class="annotated-field">
395
+ <label for="model-select">Select the model to use</label>
396
+ <select id="model-select">
397
+ <option>openai/gpt-4.1-nano</option>
398
+ <option selected>openai/gpt-4.1-mini</option>
399
+ <option>openai/gpt-4o</option>
400
+ <option>gemini/gemini-2.0-flash-lite</option>
401
+ <!-- ... other models ... -->
402
+ </select>
403
+ <div class="speech-bubble">Select the specific large language model the agent will use for reasoning and responses.</div>
404
+ </div>
405
+
406
+
407
+ <!-- Custom Evaluation Expander Simulation -->
408
+ <div class="st-expander">
409
+ <div class="st-expander-header">Custom Evaluation</div>
410
+ <div class="st-expander-content">
411
+
412
+ <div class="annotated-field">
413
+ <label for="eval-model-select">Select the model to use for LLM-as-a-Judge evaluation</label>
414
+ <select id="eval-model-select">
415
+ <option>openai/gpt-4.1-nano</option>
416
+ <option>openai/gpt-4.1-mini</option>
417
+ <option selected>openai/gpt-4o</option>
418
+ <!-- ... other models ... -->
419
+ </select>
420
+ <div class="speech-bubble">Choose the LLM that will act as the judge to evaluate the agent's performance based on your criteria.</div>
421
+ </div>
422
+
423
+
424
+ <p style="font-weight: bold;">Checkpoints</p>
425
+ <div class="annotated-field">
426
+ <table id="checkpoints-table">
427
+ <thead>
428
+ <tr>
429
+ <th>Criteria</th>
430
+ <th>Points</th>
431
+ </tr>
432
+ </thead>
433
+ <tbody>
434
+ <tr>
435
+ <td>Check if the agent considered at least three surf spot options</td>
436
+ <td>1</td>
437
+ </tr>
438
+ <tr>
439
+ <td>Check if the agent gathered wind forecasts for each surf spot being evaluated.</td>
440
+ <td>1</td>
441
+ </tr>
442
+ <tr>
443
+ <td>Check if the agent used any web search tools to explore which surf spots should be considered</td>
444
+ <td>1</td>
445
+ </tr>
446
+ <!-- ... simulate more rows ... -->
447
+ <tr>
448
+ <td><textarea placeholder="Enter criteria here..."></textarea></td>
449
+ <td><input type="number" value="1" min="0"></td>
450
+ </tr>
451
+ </tbody>
452
+ </table>
453
+ <div class="speech-bubble">
454
+ Define specific checkpoints the agent should meet and assign points. The judge LLM scores the trace.
455
+ </div>
456
+ <div class="add-row-button">
457
+ + Add row <!-- This button is part of the data editor simulation -->
458
+ </div>
459
+ </div>
460
+
461
+
462
+ <div class="annotated-field">
463
+ <div class="st-checkbox" id="run-evaluation-checkbox">
464
+ <label><input type="checkbox" checked> Run Evaluation</label>
465
+ </div>
466
+ <div class="speech-bubble">Toggle whether the custom evaluation runs after the agent finishes.</div>
467
+ </div>
468
+
469
+
470
+ </div>
471
+ </div>
472
+
473
+ <div class="annotated-field">
474
+ <button type="button" id="run-button">Run Agent πŸ€–</button>
475
+ <div class="speech-bubble">Click to start the agent with the current configuration.</div>
476
+ </div>
477
+
478
+
479
+ </div>
480
+
481
+ <!-- Main Content Simulation (Initial State) -->
482
+ <div class="main-content">
483
+ <h1>πŸ„ Surf Spot Finder</h1>
484
+ <p>Find the best surfing spots based on your location and preferences! <a href="https://github.com/mozilla-ai/surf-spot-finder">Github Repo</a></p>
485
+
486
+ <div class="st-info">
487
+ πŸ‘ˆ Configure your search parameters in the sidebar and click Run to start!
488
+ </div>
489
+
490
+ <h3>πŸ› οΈ Available Tools</h3>
491
+ <p>
492
+ The AI Agent built for this project has a few tools available for use in order to find the perfect surf spot.
493
+ The agent is given the freedom to use (or not use) these tools in order to accomplish the task.
494
+ </p>
495
+
496
+ <!-- Simulated Tool Expanders -->
497
+ <div class="st-expander">
498
+ <div class="st-expander-header">🌀️ get_wave_forecast</div>
499
+ <div class="st-expander-content tool-description">
500
+ Fetches the wave forecast for a given latitude and longitude.
501
+ Uses the <a href="https://open-meteo.com/en/docs/marine-weather-api">Open-Meteo Marine Weather API</a>.
502
+ It provides data like wave height, direction, and period.
503
+ </div>
504
+ </div>
505
+ <div class="st-expander">
506
+ <div class="st-expander-header">🌀️ get_wind_forecast</div>
507
+ <div class="st-expander-content tool-description">
508
+ Fetches the wind forecast for a given latitude and longitude.
509
+ Uses the <a href="https://open-meteo.com/en/docs/forecast-api">Open-Meteo Forecast API</a>.
510
+ It provides data like wind speed, direction, and gusts.
511
+ </div>
512
+ </div>
513
+ <div class="st-expander">
514
+ <div class="st-expander-header">πŸ“ get_area_lat_lon</div>
515
+ <div class="st-expander-content tool-description">
516
+ Gets the latitude and longitude for a given area name.
517
+ Uses the <a href="https://nominatim.org/release-docs/develop/api/Search/">Nominatim API</a>.
518
+ </div>
519
+ </div>
520
+ <div class="st-expander">
521
+ <div class="st-expander-header">🌐 search_web</div>
522
+ <div class="st-expander-content tool-description">
523
+ Search the web for information. Returns a list of snippets from the search results.
524
+ </div>
525
+ </div>
526
+ <div class="st-expander">
527
+ <div class="st-expander-header">🌐 visit_webpage</div>
528
+ <div class="st-expander-content tool-description">
529
+ Visit a webpage and extract its main content.
530
+ </div>
531
+ </div>
532
+ <!-- Note about potentially missing tools -->
533
+ <p style="font-size: 0.8em; color: #888;">
534
+ <span style="color: orange;">β–²</span> Some tools may not be listed depending on configuration. Please check the code for more details.
535
+ </p>
536
+
537
+
538
+ <h3>πŸ“Š Custom Evaluation</h3>
539
+ <p>
540
+ The Surf Spot Finder includes a powerful evaluation system that allows you to customize how the agent's performance is assessed.
541
+ You can find these settings in the sidebar under the "Custom Evaluation" expander.
542
+ </p>
543
+
544
+ <!-- Learn More Expander Simulation -->
545
+ <div class="st-expander">
546
+ <div class="st-expander-header">Learn more about Custom Evaluation</div>
547
+ <div class="st-expander-content">
548
+ <h4>What is Custom Evaluation?</h4>
549
+ <p class="tool-description">
550
+ The Custom Evaluation feature uses an LLM-as-a-Judge approach to evaluate how well the agent performs its task.
551
+ An LLM will be given the complete agent trace (not just the final answer), and will assess the agent's performance based on the criteria you set.
552
+ You can customize:
553
+ </p>
554
+ <ul>
555
+ <li class="tool-description"><b>Evaluation Model</b>: Choose which LLM should act as the judge</li>
556
+ <li class="tool-description"><b>Evaluation Criteria</b>: Define specific checkpoints that the agent should meet</li>
557
+ <li class="tool-description"><b>Scoring System</b>: Assign points to each criterion</li>
558
+ </ul>
559
+
560
+ <h4>How to Use Custom Evaluation</h4>
561
+ <p class="tool-description">
562
+ 1. <b>Select an Evaluation Model</b>: Choose which LLM you want to use as the judge<br>
563
+ 2. <b>Edit Checkpoints</b>: Use the data editor to:
564
+ </p>
565
+ <ul>
566
+ <li class="tool-description">Add new evaluation criteria</li>
567
+ <li class="tool-description">Modify existing criteria</li>
568
+ <li class="tool-description">Adjust point values</li>
569
+ <li class="tool-description">Remove criteria you don't want to evaluate</li>
570
+ </ul>
571
+
572
+ <h4>Example Criteria</h4>
573
+ <p class="tool-description">You can evaluate things like:</p>
574
+ <ul>
575
+ <li class="tool-description">Tool usage and success</li>
576
+ <li class="tool-description">Order of operations</li>
577
+ <li class="tool-description">Quality of final recommendations</li>
578
+ <li class="tool-description">Response completeness</li>
579
+ <li class="tool-description">Number of steps taken</li>
580
+ </ul>
581
+ <p class="tool-description">The evaluation results will be displayed after each agent run, showing how well the agent met your custom criteria.</p>
582
+ </div>
583
+ </div>
584
+
585
+ </div>
586
+
587
+ <script>
588
+ async function sleep(ms) {
589
+ return new Promise(resolve => setTimeout(resolve, ms));
590
+ }
591
+
592
+ async function animateSidebarFields() {
593
+ const annotatedFields = document.querySelectorAll('.sidebar .annotated-field');
594
+ const animationDelay = 3000; // Duration each bubble/highlight stays visible
595
+ const fadeDelay = 500; // Duration of fade transition
596
+
597
+ for (const field of annotatedFields) {
598
+ // Find the input element(s) or container to highlight
599
+ // Include specific inputs within columns/tables
600
+ const highlightTargets = [];
601
+ const directInputs = field.querySelectorAll('input, select, button');
602
+ directInputs.forEach(input => highlightTargets.push(input));
603
+
604
+ const columns = field.querySelector('.st-columns');
605
+ if (columns) highlightTargets.push(columns); // Highlight the container
606
+ const table = field.querySelector('table');
607
+ if (table) highlightTargets.push(table); // Highlight the table container
608
+
609
+
610
+ const bubble = field.querySelector('.speech-bubble');
611
+
612
+
613
+ if (!highlightTargets.length && !bubble) {
614
+ console.warn("Annotated field found without highlight target or bubble:", field);
615
+ continue; // Skip if nothing to highlight or show
616
+ }
617
+
618
+ // Add highlight class(es)
619
+ highlightTargets.forEach(target => {
620
+ // Special handling for checkbox input within the label
621
+ if (target.closest('.st-checkbox')) {
622
+ target.querySelector('input[type="checkbox"]').classList.add('highlight');
623
+ } else {
624
+ target.classList.add('highlight');
625
+ // If it's st-columns, highlight children inputs/selects too
626
+ if (target.classList.contains('st-columns')) {
627
+ target.querySelectorAll('input, select').forEach(childInput => childInput.classList.add('highlight'));
628
+ }
629
+ /*
630
+ // If it's a table, highlight textareas/inputs within td - handled by highlighting the table container itself
631
+ if (target.tagName === 'TABLE') {
632
+ target.querySelectorAll('td textarea, td input[type="number"]').forEach(cellInput => cellInput.classList.add('highlight'));
633
+ }
634
+ */
635
+ }
636
+ });
637
+
638
+
639
+ // Show speech bubble
640
+ if (bubble) {
641
+ bubble.style.opacity = '1';
642
+ bubble.style.visibility = 'visible';
643
+ }
644
+
645
+ // Simulate user interaction delay
646
+ await sleep(animationDelay);
647
+
648
+ // Remove highlight class(es)
649
+ highlightTargets.forEach(target => {
650
+ if (target.closest('.st-checkbox')) {
651
+ target.querySelector('input[type="checkbox"]').classList.remove('highlight');
652
+ } else {
653
+ target.classList.remove('highlight');
654
+ if (target.classList.contains('st-columns')) {
655
+ target.querySelectorAll('input, select').forEach(childInput => childInput.classList.remove('highlight'));
656
+ }
657
+ /*
658
+ // If it's a table, remove highlight from children - Handled by removing from table container
659
+ if (target.tagName === 'TABLE') {
660
+ target.querySelectorAll('td textarea, td input[type="number"]').forEach(cellInput => cellInput.classList.remove('highlight'));
661
+ }
662
+ */
663
+ }
664
+ });
665
+
666
+ // Hide speech bubble
667
+ if (bubble) {
668
+ bubble.style.opacity = '0';
669
+ // No need to set visibility: 'hidden' immediately, transition handles it
670
+ }
671
+
672
+
673
+ await sleep(fadeDelay); // Delay for fade out transition before moving to next field
674
+
675
+ }
676
+
677
+ // Optional: Loop the animation or stop
678
+ // animateSidebarFields(); // Uncomment to loop
679
+ }
680
+
681
+ // Start the animation when the page loads
682
+ window.addEventListener('load', animateSidebarFields);
683
+ </script>
684
+
685
+ </body>
686
+ </html>