evals-lab 0.16.1 → 0.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +23 -0
- package/README.md +12 -11
- package/bin/evals-lab.js +5 -1
- package/bin/update.js +65 -0
- package/lab/VERSION +1 -1
- package/lab/demo/CREDITS.md +4 -3
- package/lab/demo/datasets/recorded-replies.json +39 -0
- package/lab/demo/manifest.json +2 -2
- package/lab/demo/pipelines/recorded-replies.json +89 -0
- package/lab/demo/sources/Demo 1/basketball-hoop.jpg +0 -0
- package/lab/demo/sources/Demo 1/blue-boardwalk.jpg +0 -0
- package/lab/demo/sources/Demo 1/busy-beach.jpg +0 -0
- package/lab/demo/sources/Demo 1/butcher-sign.jpg +0 -0
- package/lab/demo/sources/Demo 1/cactus-flower.jpg +0 -0
- package/lab/demo/sources/Demo 1/corner-shop.jpg +0 -0
- package/lab/demo/sources/Demo 1/crosswalk-cyclist-panorama.jpg +0 -0
- package/lab/demo/sources/Demo 1/cyanotype-room.jpg +0 -0
- package/lab/demo/sources/Demo 1/dead-end-sign.jpg +0 -0
- package/lab/demo/sources/Demo 1/dog-in-snow.jpg +0 -0
- package/lab/demo/sources/Demo 1/empty-bedroom.jpg +0 -0
- package/lab/demo/sources/Demo 1/farmers-market-stall.jpg +0 -0
- package/lab/demo/sources/Demo 1/four-jets.jpg +0 -0
- package/lab/demo/sources/Demo 1/german-shepherd.jpg +0 -0
- package/lab/demo/sources/Demo 1/harbour-bridge-dusk.jpg +0 -0
- package/lab/demo/sources/Demo 1/harrow-on-the-hill-sign.jpg +0 -0
- package/lab/demo/sources/Demo 1/hong-kong-street.jpg +0 -0
- package/lab/demo/sources/Demo 1/house-salisbury-street.jpg +0 -0
- package/lab/demo/sources/Demo 1/infrared-orchard.jpg +0 -0
- package/lab/demo/sources/Demo 1/keyboard-desk.jpg +0 -0
- package/lab/demo/sources/Demo 1/lighthouse-dunes.jpg +0 -0
- package/lab/demo/sources/Demo 1/mountain-lake.jpg +0 -0
- package/lab/demo/sources/Demo 1/museum-skeleton.jpg +0 -0
- package/lab/demo/sources/Demo 1/music-room.jpg +0 -0
- package/lab/demo/sources/Demo 1/old-red-car.jpg +0 -0
- package/lab/demo/sources/Demo 1/parked-car-plate.jpg +0 -0
- package/lab/demo/sources/Demo 1/phone-and-wallet.png +0 -0
- package/lab/demo/sources/Demo 1/phone-box.jpg +0 -0
- package/lab/demo/sources/Demo 1/pink-flamingo.jpg +0 -0
- package/lab/demo/sources/Demo 1/postcards.jpg +0 -0
- package/lab/demo/sources/Demo 1/red-roof-church.jpg +0 -0
- package/lab/demo/sources/Demo 1/roadside-mailboxes.jpg +0 -0
- package/lab/demo/sources/Demo 1/rodeo.jpg +0 -0
- package/lab/demo/sources/Demo 1/running-tap.tif +0 -0
- package/lab/demo/sources/Demo 1/snail-on-stem.jpg +0 -0
- package/lab/demo/sources/Demo 1/two-horses-field.jpg +0 -0
- package/lab/demo/sources/Demo 1/university-sign.jpg +0 -0
- package/lab/demo/sources/Demo 1/vegetable-crates.jpg +0 -0
- package/lab/demo/sources/Demo 1/watermarked-car.jpg +0 -0
- package/lab/demo/sources/Demo 1/watermarked-pills.jpg +0 -0
- package/lab/demo/sources/Demo 1/whiteboard-delegate.jpg +0 -0
- package/lab/demo/sources/Demo 1/whiteboard-germ-layers.jpg +0 -0
- package/lab/demo/sources/Demo 2/aerial-city.jpg +0 -0
- package/lab/demo/sources/Demo 2/alligator-pen.jpg +0 -0
- package/lab/demo/sources/Demo 2/arm-tattoo.jpg +0 -0
- package/lab/demo/sources/Demo 2/bed-and-plant.jpg +0 -0
- package/lab/demo/sources/Demo 2/bright-bedroom.jpg +0 -0
- package/lab/demo/sources/Demo 2/car-headlight.jpg +0 -0
- package/lab/demo/sources/Demo 2/child-in-surf.jpg +0 -0
- package/lab/demo/sources/Demo 2/city-highway.jpg +0 -0
- package/lab/demo/sources/Demo 2/corner-bakery.jpg +0 -0
- package/lab/demo/sources/Demo 2/cyclist-yellow-jacket.jpg +0 -0
- package/lab/demo/sources/Demo 2/excavator-street-signs.jpg +0 -0
- package/lab/demo/sources/Demo 2/globe-closeup.jpg +0 -0
- package/lab/demo/sources/Demo 2/harbour-village.jpg +0 -0
- package/lab/demo/sources/Demo 2/high-street-walkers.jpg +0 -0
- package/lab/demo/sources/Demo 2/hillside-rooftops.jpg +0 -0
- package/lab/demo/sources/Demo 2/house-at-night.jpg +0 -0
- package/lab/demo/sources/Demo 2/ivy-leaves.jpg +0 -0
- package/lab/demo/sources/Demo 2/man-with-alligator.jpg +0 -0
- package/lab/demo/sources/Demo 2/orange-mailbox-hedge.jpg +0 -0
- package/lab/demo/sources/Demo 2/pedal-boats.jpg +0 -0
- package/lab/demo/sources/Demo 2/pink-trees-vignette.jpg +0 -0
- package/lab/demo/sources/Demo 2/please-leave-quietly-sign.jpg +0 -0
- package/lab/demo/sources/Demo 2/railroad-crossing-sign.jpg +0 -0
- package/lab/demo/sources/Demo 2/roadworks-sign.jpg +0 -0
- package/lab/demo/sources/Demo 2/roundabout-sign.jpg +0 -0
- package/lab/demo/sources/Demo 2/sea-cave.jpg +0 -0
- package/lab/demo/sources/Demo 2/shadow-on-sand.jpg +0 -0
- package/lab/demo/sources/Demo 2/signpost-a404.jpg +0 -0
- package/lab/demo/sources/Demo 2/street-fruit-cart.jpg +0 -0
- package/lab/demo/sources/Demo 2/street-sign-parnassusweg.jpg +0 -0
- package/lab/demo/sources/Demo 2/two-horses-close.jpg +0 -0
- package/lab/demo/sources/Demo 2/victorian-house.jpg +0 -0
- package/lab/demo/sources/Demo 2/vintage-dashboard.jpg +0 -0
- package/lab/demo/sources/Demo 2/volcano-at-dusk.jpg +0 -0
- package/lab/demo/sources/Demo 2/wall-camera.jpg +0 -0
- package/lab/demo/sources/Demo 2/watch-for-rocks-sign.jpg +0 -0
- package/lab/demo/sources/Demo 2/waterfall.jpg +0 -0
- package/lab/demo/sources/Demo 2/white-domes.jpg +0 -0
- package/lab/demo/sources/Demo 2/whiteboard-meeting-notes.jpg +0 -0
- package/lab/demo/sources/Demo 2/whiteboard-messages.jpg +0 -0
- package/lab/demo/sources/Demo 2/wooden-house-fence.jpg +0 -0
- package/lab/kinds/list.mjs +11 -3
- package/lab/server.py +19 -1
- package/lab/web/dist/assets/dist-BfJnsQb9.js +1 -0
- package/lab/web/dist/assets/gallery-Dv7iXLfa.js +5 -0
- package/lab/web/dist/assets/main-DS76udej.css +1 -0
- package/lab/web/dist/assets/main-DaObzKJz.js +18 -0
- package/lab/web/dist/assets/tokens-z9rSXnjM.js +64 -0
- package/lab/web/dist/gallery.html +2 -2
- package/lab/web/dist/index.html +3 -3
- package/package.json +3 -3
- package/lab/web/dist/assets/dist-DI3ewZYj.js +0 -1
- package/lab/web/dist/assets/gallery-ICJNZQIZ.js +0 -5
- package/lab/web/dist/assets/main-Crw-d4cy.js +0 -18
- package/lab/web/dist/assets/main-Dxf5iQLA.css +0 -1
- package/lab/web/dist/assets/tokens-C5ist-xG.js +0 -64
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{$t as e,Bn as t,Cn as n,Ct as r,Dt as i,En as a,Et as o,Gn as s,Gt as c,In as l,Jn as ee,Kn as te,Kt as u,Mn as d,Mt as f,Nn as ne,Pn as p,Pt as m,Rn as re,Sn as ie,St as ae,Tn as h,Tr as oe,Tt as se,Un as ce,Wn as le,Wt as g,Xt as ue,Yn as de,_t as _,an as fe,bn as pe,cn as v,dn as me,dt as he,en as ge,et as _e,ft as ve,hn as y,it as ye,jt as be,kn as xe,l as Se,ln as b,mn as x,n as Ce,nn as we,on as S,pn as C,pt as Te,qt as Ee,rn as De,s as w,tn as T,un as Oe,vt as ke,wr as Ae,wt as je,xt as Me,yn as E,yt as D,zn as Ne}from"./tokens-C5ist-xG.js";var O=oe(),Pe=Ae(),k=[{id:`text`,label:`Plain text`,settings:[]},{id:`list`,label:`List`,settings:[{key:`parse`,label:`Parse as`,type:`select`,choices:[{value:`csv`,label:`CSV`},{value:`lines`,label:`One a line`},{value:`json`,label:`JSON array`}]}]}],A=[{id:`case`,label:`Case`,accepts:[`list`],options:[{key:`mode`,label:`Mode`,type:`select`,choices:[{value:`LOWER`,label:`lower`},{value:`SENTENCE`,label:`Sentence`},{value:`TITLE`,label:`Title`},{value:`UPPER`,label:`UPPER`},{value:`NONE`,label:`As replied`}]}],defaults:()=>({type:`case`,mode:`LOWER`})},{id:`join`,label:`Join`,accepts:[`list`],options:[{key:`with`,label:`Separator`,type:`text`}],defaults:()=>({type:`join`,with:`, `})}],Fe=[{name:`language`,type:`value`,value:`English UK`},{name:`geo-location`,type:`value`,value:`Hamilton, Waikato, New Zealand`},{name:`geo`,type:`block`,enabled:!1}],Ie=[{path:`group/open`,title:`Group, open`},{path:`group/closed`,title:`Group, closed with a note`},{path:`group/no-menu`,title:`Group without actions`},{path:`group/sub`,title:`Sub-group, level 3`},{path:`group/depth`,title:`Group, three levels deep`},{path:`group/renaming`,title:`Group, renaming`},{path:`menu/disabled`,title:`Menu with a disabled item`},{path:`row/button`,title:`Row actions, one action a button`},{path:`row/menu`,title:`Row actions, two or more in the menu`},{path:`actionbar/states`,title:`Action bar, docked under a header, in its four states`},{path:`tabs/main`,title:`Tab strip, the lab's tabs`},{path:`tabs/section`,title:`Tab strip, a section strip under the lab's`},{path:`header/pipeline`,title:`Context header, an Experiment`},{path:`header/dataset`,title:`Context header, an Eval`},{path:`header/source`,title:`Context header, a Source`},{path:`header/switcher`,title:`Switcher, recent and more`},{path:`header/switcher-detail`,title:`Switcher, with a detail`},{path:`switcher/loading`,title:`Switcher, its choices loading, with the entry field`},{path:`switcher/listed`,title:`Switcher, a choice tapped into the entry field`},{path:`switcher/none`,title:`Switcher, none to choose from`},{path:`switcher/error`,title:`Switcher, the choices failed to load, with Retry`},{path:`picker/fields`,title:`Picker, a profile and a Source`},{path:`multi/closed`,title:`Multi-select, two of three ticked`},{path:`multi/open`,title:`Multi-select, its list open`},{path:`chiplist/words`,title:`Chip-list, words with the input to add more`},{path:`chiplist/empty`,title:`Chip-list, empty with its placeholder`},{path:`workspace/menu`,title:`Workspace trigger and its three-part menu`},{path:`copymove/choose`,title:`Copy or move, a destination chosen`},{path:`copymove/collision`,title:`Copy or move, the name is already taken`},{path:`copymove/confirm`,title:`Copy or move, a Move that breaks a dependency`},{path:`copymove/confirm-pipeline`,title:`Copy or move, an experiment Move that leaves its data behind`},{path:`share/menu`,title:`Share menu, All / some / New workspaces`},{path:`header/long`,title:`Context header, a long name`},{path:`menu/busy`,title:`Menu with a busy item`},{path:`loading/group`,title:`Loading, inside a group`},{path:`loading/error`,title:`Loading failed, with Retry`},{path:`message/tones`,title:`Message, error and info`},{path:`loading/busy-button`,title:`Busy buttons`},{path:`repeater/empty`,title:`Repeater, empty`},{path:`repeater/min`,title:`Repeater at min 1`},{path:`repeater/between`,title:`Repeater, two of four`},{path:`repeater/max`,title:`Repeater at max`},{path:`repeater/locked`,title:`Repeater, a locked row`},{path:`props/controls`,title:`Property table, every control`},{path:`props/required`,title:`Property table, required only`},{path:`props/long`,title:`Property table, long values`},{path:`props/cards`,title:`Property table, a kind chosen by card`},{path:`props/widths`,title:`Property table, a width per value`},{path:`props/affix`,title:`Property table, a fixed suffix and a field's error`},{path:`props/secret`,title:`Property table, a key held and not held`},{path:`props/code`,title:`Property table, an endpoint and a payload`},{path:`table/sortable`,title:`Table, sortable headers and a row menu`},{path:`table/paged`,title:`Table, paged ten at a time`},{path:`table/select`,title:`DataTable with selection`},{path:`table/select-on`,title:`Table, two rows selected`},{path:`table/filter`,title:`Table with a filter bar`},{path:`table/filter-on`,title:`Table, filtered, with a scope`},{path:`edit/form`,title:`Edit modal, a profile`},{path:`edit/plain`,title:`Edit modal, one section and no menu`},{path:`edit/long`,title:`Edit modal, a form that scrolls`},{path:`edit/status`,title:`Edit modal, a status that is a refusal`},{path:`edit/picker`,title:`Dialog with nothing to save, a picker: Cancel`},{path:`edit/viewer`,title:`Dialog with nothing to save, a viewer: Close`},{path:`view/tokens`,title:`Token mappings`},{path:`view/output`,title:`Output with Case`},{path:`view/output-text`,title:`Output, plain text`},{path:`view/output-two`,title:`Output with two modifiers`},{path:`view/output-twice`,title:`Output with the same modifier twice`},{path:`view/output-flow`,title:`Responses with Read as`},{path:`view/field-chip`,title:`Field chips in a variant's words, with a changed word`},{path:`view/field-edit`,title:`The Edited variant's editable prompt, with Insert field and a highlighted diff`},{path:`view/insert-field`,title:`The Edited variant's Insert field menu, open`},{path:`wizard/pill`,title:`Wizard pill, two of four steps done`},{path:`wizard/pill-open`,title:`Wizard pill, its checklist open on the current step`},{path:`switch/off`,title:`Switch, off`},{path:`switch/on`,title:`Switch, on`},{path:`switch/disabled`,title:`Switch, disabled`},{path:`badge/tones`,title:`Badge, in each tone`},{path:`strip/cells`,title:`Item strip, a cell per item: passed, failed, not graded`},{path:`strip/track`,title:`Item strip past 60 items, one notched track`},{path:`trendline/break`,title:`Trend line, a gap and a prompt version's break`},{path:`button/link`,title:`Link button, in a sentence and in a table cell`},{path:`button/destructive`,title:`Destructive button, ghost and filled`},{path:`pills/one`,title:`Pills, one of a few (how a list is shown)`},{path:`pills/some`,title:`Pills, any of a few (which parts of a list show)`},{path:`radiocards/types`,title:`Radio cards, a name and what it does`},{path:`radiocards/detail`,title:`Radio cards, a control in a card`},{path:`radiocards/compact`,title:`Radio cards, compact, with pictures`},{path:`versions/restore`,title:`Restore versions, the dialog`},{path:`versions/table`,title:`Versions table, columns of its own and words to open`},{path:`table/expand`,title:`Table, a row open onto its detail`},{path:`table/pinned`,title:`Table, a pinned row drawn through the columns`},{path:`sync/bar`,title:`Sync bar, a conflict and an offline save`},{path:`why/button`,title:`Why button, disabled with a reason`}],j=pe(),M=()=>{},N=(...e)=>e.map(e=>({label:e,icon:e===`Remove`?E.remove:e===`Clone`?E.clone:E.rename,onSelect:M,destructive:e===`Remove`}));function P({start:e,min:t,max:n,locked:r}){let[i,a]=(0,O.useState)(e);return(0,j.jsx)(ke,{noun:`scenario`,items:i,...t===void 0?{}:{min:t},...n===void 0?{}:{max:n},...r?{locked:r}:{},onAdd:()=>a([...i,`Variant ${String.fromCharCode(65+i.length)}`]),onRemove:e=>a(i.filter((t,n)=>n!==e)),onClone:e=>a([...i.slice(0,e+1),`${i[e]} copy`,...i.slice(e+1)]),onRename:M,empty:`(No variants)`,renderItem:(e,t,n)=>(0,j.jsx)(b,{id:`scenario-${t}`,title:e,level:3,actions:n,children:(0,j.jsx)(`p`,{className:`note`,children:`A connection, a profile and a prompt for each job.`})},`${e}-${t}`)})}function Le(){let[e,t]=(0,O.useState)(Fe),n=(n,r)=>t(e.map(e=>e.name===n?{...e,...r}:e));return(0,j.jsx)(Se,{mappings:e,onValue:(e,t)=>n(e,{value:t}),onEnabled:(e,t)=>n(e,{enabled:t}),onEdit:M,onRemove:n=>t(e.filter(e=>e.name!==n)),onAdd:()=>t([...e,{name:`token${e.length+1}`,type:`value`,value:``}])})}function F({start:e,readAs:t}){let[n,r]=(0,O.useState)(e),[i,a]=(0,O.useState)(t);return(0,j.jsx)(_e,{id:`output`,out:n,readAs:i,outputKinds:k,modifiers:A,onFormat:e=>r({kind:e,modifiers:n.modifiers.filter(t=>A.find(e=>e.id===t.type)?.accepts.includes(e))}),onReadAs:a,onModifier:(e,t)=>r({...n,modifiers:n.modifiers.map((n,r)=>r===e?t:n)}),onAddModifier:e=>r({...n,modifiers:[...n.modifiers,e]}),onRemoveModifier:e=>r({...n,modifiers:n.modifiers.filter((t,n)=>n!==e)})})}function Re(){let[e,t]=(0,O.useState)(`Job 1`),[n,r]=(0,O.useState)(!0);return(0,j.jsx)(b,{id:`renaming`,title:e,actions:[{label:`Rename…`,icon:E.rename,onSelect:()=>r(!0)}],...n?{rename:{value:e,onCommit:n=>{t(n||e),r(!1)},onCancel:()=>r(!1)}}:{},children:(0,j.jsx)(`p`,{className:`note`,children:`Enter or leaving keeps the name; Escape cancels.`})})}function ze(){let[e,t]=(0,O.useState)(`system`);return(0,j.jsx)(`div`,{className:`gallery-row`,style:{justifyContent:`flex-end`},children:(0,j.jsx)(je,{current:{id:`w1`,slug:`work`,name:`Work`},workspaces:[{id:`w1`,slug:`work`,name:`Work`},{id:`w2`,slug:`side-project`,name:`Side project`},{id:`w3`,slug:`client-demos`,name:`Client demos`}],onSwitch:M,onNew:M,onManage:M,theme:e,onTheme:t})})}var Be=[{id:`cur`,slug:`work`,name:`Work`,archived:!1,isDefault:!0,lastUsed:`2026-10-08T09:30:00Z`,createdAt:null,pipelines:4,runs:18},{id:`side`,slug:`side-project`,name:`Side project`,archived:!1,isDefault:!1,lastUsed:`2026-10-07T09:30:00Z`,createdAt:null,pipelines:2,runs:6},{id:`demos`,slug:`client-demos`,name:`Client demos`,archived:!1,isDefault:!1,lastUsed:`2026-10-06T09:30:00Z`,createdAt:null,pipelines:1,runs:0}],Ve={id:`cur`,slug:`work`,name:`Work`},He={undo:null,offer:M,undoNow:M,dismiss:M},Ue=e=>({copyMovePreflight:async()=>({nameTaken:e,suggestedName:`Daily regressions (copy)`}),copyAsset:async()=>({id:`copy`}),moveAsset:async()=>({id:`same`}),forWorkspace:()=>({})});function I({nameTaken:e=!1,confirm:t=!1,subject:n,dependents:r=[]}){return(0,j.jsx)(he,{api:Ue(e),subject:n??{kind:`filter-set`,id:`f1`,name:`Daily regressions`},workspaces:Be,current:Ve,dependents:r,undo:He,onClose:M,defaultDest:`side`,...t?{defaultConfirm:!0}:{}})}function We(){let e=[{id:`w1`,name:`Work`},{id:`w2`,name:`Side project`},{id:`w3`,name:`Client demos`}];return(0,j.jsx)(`div`,{style:{display:`grid`,gap:`var(--s3)`,maxWidth:`20rem`},children:[{label:`All workspaces`,shares:void 0},{label:`Some workspaces`,shares:[`w2`]},{label:`New workspaces`,shares:[Me]},{label:`No workspaces`,shares:[ae]}].map(t=>(0,j.jsx)(r,{label:t.label,workspaces:e,shares:t.shares,onChange:M},t.label))})}function L({sections:e,menu:t,status:n,statusBad:r,outcome:i}){return(0,j.jsx)(g,{title:`Lab Ollama`,...n?{status:n}:{},...r?{statusBad:!0}:{},...t?{menu:t}:{},sections:e,actions:[{label:`Test connection`,icon:ne,onSelect:M,outcome:i?{label:i,onOpen:M}:void 0}],onClose:M})}var R=()=>[{key:`name`,label:`Name`,width:`full`,required:!0,control:{type:`text`,value:`Lab Ollama`,onChange:M}},{key:`slug`,label:`Slug`,width:`full`,required:!0,control:{type:`text`,value:`lab-ollama`,onChange:M}},{key:`type`,label:`Type`,required:!0,control:{type:`select`,value:`ollama`,onChange:M,options:[{value:`ollama`,label:`Ollama (Local)`},{value:`anthropic`,label:`Anthropic`}]}},{key:`url`,label:`Address`,width:`full`,control:{type:`text`,value:``,placeholder:`http://127.0.0.1:11434`,onChange:M}},{key:`key`,label:`Key`,control:{type:`secret`,value:``,onChange:M}},{key:`model`,label:`Model`,width:`full`,control:{type:`text`,value:`minicpm-v4.6:latest`,onChange:M}}],z=()=>[{key:`seed`,label:`Seed`,control:{type:`text`,value:``,placeholder:`1234`,onChange:M}},{key:`nPredict`,label:`Response tokens`,width:`quarter`,control:{type:`text`,value:``,onChange:M}},{key:`temperature`,label:`Temperature`,control:{type:`text`,value:`0.3`,onChange:M}},{key:`repeatPenalty`,label:`Repeat penalty`,width:`quarter`,control:{type:`text`,value:``,onChange:M}}],B=()=>[{key:`endpoint`,label:`Endpoint`,required:!0,control:{type:`code`,text:`http://127.0.0.1:11434/api/chat`}},{key:`prompt`,label:`Prompt`,required:!0,control:{type:`static`,text:`(prompt)`}},{key:`model`,label:`model`,control:{type:`code`,text:`minicpm-v4.6:latest`}},{key:`options`,label:`options`,control:{type:`code`,text:`{"seed":1234,"temperature":0.3}`}}],V={key:`kind`,label:`Response Format`,required:!0,control:{type:`select`,value:`list`,onChange:M,options:k.map(e=>({value:e.id,label:e.label}))}};function H({actions:e}){return(0,j.jsx)(b,{id:`g`,title:`Actions`,children:(0,j.jsx)(m,{label:`Actions`,rows:[{name:`Ask_Claude`}],rowKey:e=>e.name,columns:[{key:`name`,header:`Name`,role:`title`,cell:e=>e.name},{key:`menu`,header:``,role:`menu`,sort:null,cell:()=>(0,j.jsx)(Oe,{label:`Ask_Claude actions`,actions:e})}]})})}var Ge=[[`home`,`Home`,Ne],[`runs`,`Experiments`,s],[`history`,`History`,t],[`library`,`Library`,re],[`setup`,`Setup`,xe]],Ke=[[`datasets`,`Evals`,de],[`prompts`,`Prompts`,l],[`sources`,`Sources`,le]],U=e=>(0,j.jsx)(T,{label:`Lab`,current:e,items:Ge.map(([e,t,n])=>({key:e,label:t,icon:n,href:`#/${e}`}))}),W=e=>(0,j.jsx)(T,{label:`Library`,level:`section`,current:e,items:Ke.map(([e,t,n])=>({key:e,label:t,icon:n,href:`#/library/${e}`}))}),G=({section:e,children:t})=>(0,j.jsxs)(`div`,{children:[U(e?`library`:`runs`),e&&W(e),t]}),K=(...e)=>e.map(e=>({label:e,icon:e===`Delete`?E.remove:e===`Clone`?E.clone:E.rename,onSelect:M,destructive:e===`Delete`})),qe={"header/pipeline":()=>(0,j.jsx)(G,{children:(0,j.jsx)(e,{kind:`Experiment`,name:`Experiment 1`,onPick:M,meta:`2 jobs, 3 variants`,primary:{label:`New experiment`,icon:d,onSelect:M},actions:K(`Rename…`,`Clone`,`Export YAML`,`Import YAML…`,`Restore…`,`Delete`)})}),"header/dataset":()=>(0,j.jsx)(G,{section:`datasets`,children:(0,j.jsx)(e,{kind:`Eval`,name:`Demo 1`,onPick:M,meta:`62 eval cases, 19 graded`,primary:{label:`New eval`,icon:d,onSelect:M},actions:K(`Rename…`,`Clone`,`Import JSON…`,`Export JSON`,`Restore…`,`Delete`)})}),"header/switcher":()=>(0,j.jsx)(i,{kind:`Experiment`,value:`p5`,onPick:M,onClose:M,recent:[`p7`,`p6`,`p5`,`p4`,`p3`],options:Array.from({length:13},(e,t)=>({id:`p${t}`,label:[`Demo 1`,`Demo 2`,`Receipts`,`Menus`,`Street signs`,`Labels`,`Plates`,`Posters`,`Packaging`,`Whiteboards`,`Book spines`,`Shop fronts`,`Timetables`][t],used:t<8?{at:`2026-10-0${t+1}T09:30:00Z`,label:_(`2026-10-0${t+1}T09:30:00Z`)}:null}))}),"header/switcher-detail":()=>(0,j.jsx)(i,{kind:`Connection`,value:`c1`,onPick:M,onClose:M,detailLabel:`Model`,recent:[`c3`,`c1`],options:[[`Lab Ollama gemma3 4b`,`gemma3:4b`],[`Lab Ollama minicpm`,`minicpm-v`],[`Anthropic`,`claude-sonnet-4-5`],[`Dell llama`,`qwen2.5vl:7b`],[`OpenAI`,`gpt-5`],[`Docker llama`,`qwen2.5vl:7b`]].map(([e,t],n)=>({id:`c${n}`,label:e,detail:t,used:n<4?{at:`2026-10-1${n}T09:30:00Z`,label:_(`2026-10-1${n}T09:30:00Z`)}:null}))}),"switcher/loading":()=>(0,j.jsx)(i,{kind:`Model`,value:`llama3.2:3b`,options:[],loading:!0,entry:Q,onPick:M,onClose:M}),"switcher/listed":()=>(0,j.jsx)(ct,{}),"switcher/none":()=>(0,j.jsx)(i,{kind:`Model`,value:`llama3.2:3b`,options:[],entry:Q,onPick:M,onClose:M}),"switcher/error":()=>(0,j.jsx)(i,{kind:`Model`,value:`llama3.2:3b`,options:[],error:`http://localhost:11434/v1/models: Connection refused`,onRetry:M,entry:Q,onPick:M,onClose:M}),"picker/fields":()=>(0,j.jsx)(b,{id:`g`,title:`Variant A`,children:(0,j.jsx)(c,{label:`Variant A setup`,rows:[{key:`profile`,label:`Profile`,control:{type:`picker`,kind:`Profile`,value:`p2`,usedLabel:`Last changed`,onChange:M,recent:[`p5`,`p4`,`p3`,`p2`,`p1`],options:[{id:`#echo`,label:`Echo`,fixed:!0},...[`Lab Ollama`,`Anthropic`,`Cloud vision`,`Local llama`,`OpenRouter`,`Bench`,`Vision`].map((e,t)=>({id:`p${t}`,label:e,used:t<6?{at:`2026-10-0${t+1}T09:30:00Z`,label:_(`2026-10-0${t+1}T09:30:00Z`)}:null}))]}},{key:`source`,label:`Source`,control:{type:`picker`,kind:`Source`,value:`gone`,usedLabel:`Last changed`,onChange:M,options:[{id:``,label:`Any`,fixed:!0},{id:`gone`,label:`Shoot 3 (missing)`,missing:!0},{id:`s1`,label:`Receipts`}]}}]})}),"header/source":()=>(0,j.jsx)(G,{section:`sources`,children:(0,j.jsx)(e,{kind:`Source`,name:`Demo 1 images`,onPick:M,meta:`File Library. 63 files, 48 MB`,primary:{label:`Upload…`,icon:n,onSelect:M},actions:K(`Rename…`,`Delete`)})}),"workspace/menu":()=>(0,j.jsx)(ze,{}),"copymove/choose":()=>(0,j.jsx)(I,{}),"copymove/collision":()=>(0,j.jsx)(I,{nameTaken:!0}),"copymove/confirm":()=>(0,j.jsx)(I,{confirm:!0,dependents:[{kind:`pipeline`,id:`w1`,name:`Nightly regression`,href:`#/runs`}]}),"copymove/confirm-pipeline":()=>(0,j.jsx)(I,{confirm:!0,subject:{kind:`pipeline`,id:`w1`,name:`Nightly regression`},dependents:[{kind:`eval-group`,id:`g1`,name:`Receipts, 62 eval cases`,href:`#/library/datasets/g1`},{kind:`source`,id:`s1`,name:`Receipt images`,href:`#/library/sources`}]}),"share/menu":()=>(0,j.jsx)(We,{}),"header/long":()=>(0,j.jsx)(G,{children:(0,j.jsx)(e,{kind:`Experiment`,name:`Receipts and handwritten menus, second pass with the tighter prompt and a Contains metric`,onPick:M,meta:`12 jobs, 8 variants`,primary:{label:`New experiment`,icon:d,onSelect:M},actions:K(`Rename…`,`Clone`,`Delete`)})}),"actionbar/states":()=>(0,j.jsxs)(`div`,{children:[U(`runs`),(0,j.jsx)(e,{kind:`Experiment`,name:`Demo 1`,onPick:M,meta:`1 job, 2 variants`,docked:!0,primary:{label:`New experiment`,icon:d,onSelect:M},actions:K(`Rename…`,`Delete`)}),(0,j.jsx)(D,{primary:{label:`Run`,icon:p,onSelect:M},status:(0,j.jsx)(`b`,{children:`Ready to run`})}),(0,j.jsxs)(`div`,{style:{display:`grid`,gap:`var(--s4)`,marginTop:`var(--s5)`},children:[(0,j.jsx)(D,{primary:{label:`Run`,icon:p,onSelect:M,disabled:!0},status:(0,j.jsxs)(j.Fragment,{children:[`Connection "Vision" not found. `,(0,j.jsxs)(`a`,{href:`#/setup`,style:{whiteSpace:`nowrap`},children:[`Open`,`\xA0`,`Setup`]})]})}),(0,j.jsx)(D,{primary:{label:`Run`,icon:p,onSelect:M,disabled:!0},status:(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(`b`,{children:`Running`}),` 12 of 42`]}),secondary:{label:`Stop`,icon:a,onSelect:M},progress:28,progressLabel:`Run progress`}),(0,j.jsx)(D,{primary:{label:`Run`,icon:p,onSelect:M},status:(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(`b`,{children:`Done`}),` 42 in 2m`]})})]})]}),"tabs/main":()=>U(`runs`),"tabs/section":()=>(0,j.jsxs)(`div`,{children:[U(`library`),W(`datasets`)]}),"group/open":()=>(0,j.jsx)(b,{id:`g`,title:`Evals`,actions:N(`Change…`,`Remove`),children:(0,j.jsx)(`p`,{className:`note`,children:`The graded set.`})}),"group/closed":()=>(0,j.jsx)(b,{id:`g`,title:`Content`,open:!1,note:`Sample library, 63 files`,actions:N(`Change…`,`Remove`)}),"group/no-menu":()=>(0,j.jsx)(b,{id:`g`,title:`Mapping`,children:(0,j.jsx)(`p`,{className:`note`,children:`Nothing to do to it.`})}),"group/sub":()=>(0,j.jsx)(b,{id:`g`,title:`Job 1`,actions:N(`Rename…`,`Remove`),children:(0,j.jsx)(b,{id:`g-sub`,title:`Scenarios`,level:3,actions:N(`Clear`),children:(0,j.jsx)(`p`,{className:`note`,children:`Inside a pane.`})})}),"group/depth":()=>(0,j.jsxs)(b,{id:`g`,title:`Job 1`,actions:N(`Rename…`,`Remove`),children:[(0,j.jsxs)(b,{id:`g-scenarios`,title:`Scenarios`,level:3,children:[(0,j.jsx)(b,{id:`g-plain`,title:`Plain`,level:3,actions:N(`Rename…`,`Remove`),children:(0,j.jsx)(`p`,{className:`note`,children:`A pane, a section of it, and a thing with a name inside that section.`})}),(0,j.jsx)(b,{id:`g-strict`,title:`Strict`,level:3,actions:N(`Rename…`,`Remove`)})]}),(0,j.jsx)(b,{id:`g-output`,title:`Output`,level:3,children:(0,j.jsx)(`p`,{className:`note`,children:`The next section of the same pane.`})})]}),"group/renaming":()=>(0,j.jsx)(Re,{}),"menu/disabled":()=>(0,j.jsx)(b,{id:`g`,title:`Variant D`,actions:[{label:`Rename…`,icon:E.rename,onSelect:M},{label:`Clone`,icon:E.clone,onSelect:M,disabled:!0},{label:`Remove`,icon:E.remove,onSelect:M,destructive:!0}]}),"row/button":()=>(0,j.jsx)(H,{actions:[{label:`New experiment`,icon:p,onSelect:M}]}),"row/menu":()=>(0,j.jsx)(H,{actions:[{label:`View…`,icon:te,onSelect:M},{label:`Download`,icon:ee,onSelect:M},{label:`Remove`,icon:h,onSelect:M,destructive:!0}]}),"menu/busy":()=>(0,j.jsx)(b,{id:`g`,title:`History`,actions:[{label:`Export JSON`,icon:E.export,onSelect:M,busy:!0},{label:`Clear`,icon:E.clear,onSelect:M,destructive:!0}]}),"loading/group":()=>(0,j.jsx)(b,{id:`g`,title:`History`,actions:N(`Rename…`),children:(0,j.jsx)(C,{label:`Runs`,delay:0})}),"strip/cells":()=>(0,j.jsx)(b,{id:`g`,title:`Latest run`,children:(0,j.jsxs)(`div`,{className:`gallery-stack`,children:[[[`Wording A`,`PPFPPPPFPPPF`],[`Wording B`,`PPPPPPPPPPPF`],[`Not run yet`,`PPFP--------`]].map(([e,t])=>(0,j.jsx)(S,{label:`${e}, as the cells say`,cells:[...t].map((e,t)=>({state:e===`P`?`pass`:e===`F`?`fail`:`none`,title:`Item ${t+1}`}))},e)),(0,j.jsx)(S,{className:`sm`,label:`Small, an item's runs`,cells:[...`FFPFP-PPFF`].map((e,t)=>({state:e===`P`?`pass`:e===`F`?`fail`:`none`,title:`Run ${t+1}`}))})]})}),"strip/track":()=>(0,j.jsx)(b,{id:`g`,title:`Latest run`,children:(0,j.jsx)(S,{label:`500 items, 18 failed`,href:`#/results/r1`,cells:Array.from({length:500},(e,t)=>({state:t*37%97<4?`fail`:`pass`,title:`Item ${t+1}`}))})}),"trendline/break":()=>(0,j.jsx)(b,{id:`g`,title:`Previous performance`,children:(0,j.jsx)(fe,{label:`% passed by run`,max:100,points:[50,58,58,67,75,83,null,92,92,92].map((e,t)=>({value:e,title:`Run ${t+1}`,break:t===5?`v3`:null}))})}),"message/tones":()=>(0,j.jsxs)(b,{id:`g`,title:`Items`,children:[(0,j.jsx)(y,{tone:`info`,children:`Made Reference: 12 eval cases`}),(0,j.jsx)(y,{tone:`error`,children:`Refused 1: the URL has to be an http or https address`}),(0,j.jsx)(y,{tone:`error`,onRetry:M,children:`Items not loaded: server unreachable.`})]}),"loading/error":()=>(0,j.jsx)(b,{id:`g`,title:`History`,children:(0,j.jsx)(C,{label:`Runs`,error:`Runs not loaded: server unreachable.`,onRetry:M})}),"loading/busy-button":()=>(0,j.jsx)(b,{id:`g`,title:`Run`,children:(0,j.jsxs)(`div`,{className:`gallery-row`,children:[(0,j.jsxs)(`button`,{type:`button`,className:`run`,disabled:!0,"aria-busy":!0,children:[(0,j.jsx)(x,{size:16}),`Run`]}),(0,j.jsxs)(`button`,{type:`button`,className:`ghost`,disabled:!0,"aria-busy":!0,children:[(0,j.jsx)(x,{}),`Older`]})]})}),"repeater/empty":()=>(0,j.jsx)(P,{start:[]}),"repeater/min":()=>(0,j.jsx)(P,{start:[`Variant A`],min:1}),"repeater/between":()=>(0,j.jsx)(P,{start:[`Variant A`,`Variant B`],min:1,max:4}),"repeater/max":()=>(0,j.jsx)(P,{start:[`Variant A`,`Variant B`,`Variant C`,`Variant D`],min:1,max:4}),"repeater/locked":()=>(0,j.jsx)(P,{start:[`Response`,`Variant A`],locked:(e,t)=>t===0}),"props/controls":()=>(0,j.jsx)(c,{label:`Controls`,onRename:M,onRemove:M,onAdd:M,addLabel:`Add row`,rows:[V,{key:`language`,label:`{language}`,code:!0,control:{type:`text`,value:`English UK`,onChange:M}},{key:`geo`,label:`{geo}…{/geo}`,code:!0,control:{type:`static`,text:`Block`},enabled:{checked:!0,onChange:M}},{key:`image`,label:`Image`,control:{type:`checkbox`,checked:!0,label:`Send`,onChange:M}}]}),"props/required":()=>(0,j.jsx)(c,{label:`Output`,onRemove:M,rows:[V]}),"props/long":()=>(0,j.jsx)(c,{label:`Long`,onRemove:M,rows:[{key:`geo-location`,label:`{geo-location}`,code:!0,control:{type:`text`,value:`Hamilton, Waikato, New Zealand, Southern Hemisphere, Earth`,onChange:M}},{key:`averylongtokennamethatdoesnotbreak`,label:`{averylongtokennamethatdoesnotbreak}`,code:!0,control:{type:`text`,value:``,onChange:M}}]}),"props/cards":()=>(0,j.jsx)(ot,{}),"props/widths":()=>(0,j.jsx)(c,{label:`Widths`,rows:[{key:`type`,label:`Type`,required:!0,control:{type:`select`,value:`ollama`,onChange:M,options:[{value:`ollama`,label:`Ollama (Local)`},{value:`anthropic`,label:`Anthropic`}]}},{key:`url`,label:`Address`,width:`full`,control:{type:`text`,value:``,placeholder:`http://127.0.0.1:11434`,onChange:M}},{key:`model`,label:`Model`,width:`full`,control:{type:`text`,value:`minicpm-v4.6:latest`,onChange:M}},{key:`seed`,label:`Seed`,control:{type:`text`,value:``,placeholder:`1234`,onChange:M}},{key:`nPredict`,label:`Response tokens`,width:`quarter`,control:{type:`text`,value:``,onChange:M}},{key:`temperature`,label:`Temperature`,control:{type:`text`,value:`0.2`,onChange:M}},{key:`grammar`,label:`Grammar`,control:{type:`textarea`,value:`root ::= item (", " item)*
|
|
2
|
-
item ::= [a-z ]+`,onChange:M}}]}),"props/affix":()=>(0,j.jsx)(c,{label:`Item`,rows:[{key:`name`,label:`Name`,control:{type:`text`,value:`open-meteo-forecast`,suffix:`.txt`,onChange:M}},{key:`taken`,label:`Name`,error:`open-meteo-forecast-storm.txt is taken.`,control:{type:`text`,value:`open-meteo-forecast-storm`,suffix:`.txt`,onChange:M}},{key:`status`,label:`Status`,width:`quarter`,control:{type:`text`,value:`200`,numeric:!0,onChange:M}},{key:`body`,label:`Body`,control:{type:`textarea`,mono:!0,value:`{
|
|
3
|
-
"category": "utilities"
|
|
4
|
-
}`,onChange:M}}]}),"props/secret":()=>(0,j.jsx)(c,{label:`Keys`,rows:[{key:`held`,label:`Key`,control:{type:`secret`,value:`sk-not-a-real-key-0000`,onChange:M}},{key:`empty`,label:`Key`,control:{type:`secret`,value:``,onChange:M}},{key:`server`,label:`Key`,control:{type:`secret`,value:``,held:!0,onChange:M}}]}),"props/code":()=>(0,j.jsx)(c,{label:`Debug`,rows:[{key:`endpoint`,label:`Endpoint`,required:!0,control:{type:`code`,text:`https://api.anthropic.com/v1/messages`}},{key:`prompt`,label:`Prompt`,required:!0,control:{type:`static`,text:`(prompt)`}},{key:`model`,label:`model`,control:{type:`code`,text:`claude-sonnet-4-5-20250929`}},{key:`options`,label:`options`,control:{type:`code`,text:`{"seed":1234,"temperature":0}`}},{key:`stream`,label:`stream`,control:{type:`code`,text:`false`}}]}),"table/sortable":()=>(0,j.jsx)(Z,{count:4}),"table/paged":()=>(0,j.jsx)(Z,{count:35,pageSize:10}),"table/select":()=>(0,j.jsx)(Z,{count:5,picked:[]}),"table/select-on":()=>(0,j.jsx)(Z,{count:5,picked:[1,3]}),"table/filter":()=>(0,j.jsx)(at,{}),"table/filter-on":()=>(0,j.jsx)(at,{search:`IMG_40`,size:`large`}),"edit/form":()=>(0,j.jsx)(L,{outcome:`Connected`,menu:[{label:`Restore…`,icon:E.restore,onSelect:M},{label:`Apply preset: repeat 1.3`,icon:E.preset,onSelect:M}],sections:[{key:`identity`,rows:R()},{key:`settings`,title:`Settings`,rows:z()},{key:`debug`,title:`Debug`,rows:B(),folded:!0}]}),"edit/plain":()=>(0,j.jsx)(g,{title:`A mapping`,sections:[{key:`one`,rows:[V,{key:`with`,label:`Separator`,control:{type:`text`,value:`, `,onChange:M}}]}],onClose:M}),"edit/long":()=>(0,j.jsx)(L,{menu:[{label:`Restore…`,icon:E.restore,onSelect:M,disabled:!0}],sections:[{key:`identity`,rows:R()},{key:`settings`,title:`Settings`,rows:[...z(),{key:`grammar`,label:`Grammar`,control:{type:`textarea`,value:`root ::= item (", " item)*
|
|
5
|
-
item ::= [a-z ]+`,onChange:M}},{key:`imagePosition`,label:`Image position`,control:{type:`select`,value:`after`,onChange:M,options:[{value:`before`,label:`before the prompt`},{value:`after`,label:`after the prompt`}]}},{key:`cachePrompt`,label:`Cache prompt`,control:{type:`select`,value:`off`,onChange:M,options:[{value:`on`,label:`on`},{value:`off`,label:`off`}]}}]},{key:`debug`,title:`Debug`,rows:B(),folded:!0}]}),"edit/status":()=>(0,j.jsx)(L,{status:`the relay could not reach http://127.0.0.1:11434`,statusBad:!0,sections:[{key:`identity`,rows:R()}]}),"edit/picker":()=>(0,j.jsx)(ue,{title:`Link eval`,onClose:M,dismiss:`Cancel`,children:(0,j.jsx)(`div`,{className:`edit-choices`,children:[`Captions`,`Sentiment`,`Weather alerts`].map(e=>(0,j.jsx)(`button`,{type:`button`,className:`ghost`,children:e},e))})}),"edit/viewer":()=>(0,j.jsx)(g,{title:`Test connection`,sections:[{key:`result`,rows:[{key:`time`,label:`Time`,control:{type:`static`,text:`412 ms`}},{key:`result`,label:`Result`,control:{type:`static`,text:`Reached Ollama. 2 models: gemma3:4b, minicpm-v.`}}]}],onClose:M}),"view/tokens":()=>(0,j.jsx)(b,{id:`g`,title:`Token mappings`,level:3,children:(0,j.jsx)(Le,{})}),"view/output":()=>(0,j.jsx)(F,{start:{kind:`list`,parse:`csv`,modifiers:[{type:`case`,mode:`LOWER`}]}}),"view/output-text":()=>(0,j.jsx)(F,{start:{kind:`text`,modifiers:[]}}),"view/output-two":()=>(0,j.jsx)(F,{start:{kind:`list`,parse:`csv`,modifiers:[{type:`case`,mode:`TITLE`},{type:`join`,with:` | `}]}}),"view/output-twice":()=>(0,j.jsx)(F,{start:{kind:`list`,parse:`csv`,modifiers:[{type:`case`,mode:`TITLE`},{type:`case`,mode:`LOWER`}]}}),"view/output-flow":()=>(0,j.jsx)(F,{start:{kind:`text`,modifiers:[]},readAs:`@body('Ask')?['content']?[0]?['text']`}),"view/field-chip":()=>(0,j.jsx)(b,{id:`g`,title:`Edited`,level:3,children:(0,j.jsxs)(`div`,{className:`prompt`,children:[(0,j.jsx)(`span`,{className:`prop-name`,children:`Prompt`}),(0,j.jsx)(w,{words:`Summarise @{triggerBody()?['text']} in two short sentences for @{variables('Audience')}.`,was:`Summarise @{triggerBody()?['text']} in one sentence for @{variables('Audience')}.`})]})}),"view/field-edit":()=>(0,j.jsx)(et,{}),"view/insert-field":()=>(0,j.jsx)(b,{id:`g`,title:`Edited`,level:3,children:(0,j.jsxs)(`div`,{className:`prompt`,children:[(0,j.jsxs)(`div`,{className:`pe-head`,children:[(0,j.jsx)(`span`,{className:`prop-name`,children:`Prompt`}),(0,j.jsx)(De,{fields:$e,onInsert:M,label:`Edited`,defaultOpen:!0})]}),(0,j.jsx)(`textarea`,{"aria-label":`Edited, prompt`,rows:4,defaultValue:Y}),(0,j.jsx)(w,{className:`pe-words`,words:Y,was:Qe,showExprs:!1})]})}),"multi/closed":()=>(0,j.jsx)(tt,{}),"multi/open":()=>(0,j.jsx)(tt,{open:!0}),"chiplist/words":()=>(0,j.jsx)(nt,{start:[`clearly`,`obviously`,`as an AI`]}),"chiplist/empty":()=>(0,j.jsx)(nt,{start:[]}),"wizard/pill":()=>(0,j.jsx)(rt,{}),"wizard/pill-open":()=>(0,j.jsx)(rt,{open:!0}),"switch/off":()=>(0,j.jsx)(Ze,{}),"switch/on":()=>(0,j.jsx)(Ze,{start:!0}),"switch/disabled":()=>(0,j.jsx)(u,{checked:!0,disabled:!0,label:`Fetch now`,onChange:M}),"badge/tones":()=>(0,j.jsxs)(`div`,{className:`gallery-row`,children:[(0,j.jsx)(v,{children:`Latest`}),(0,j.jsx)(v,{tone:`amber`,children:`Default`}),(0,j.jsx)(v,{tone:`sage`,children:`Done`}),(0,j.jsx)(v,{tone:`rust`,children:`Failed`})]}),"button/link":()=>(0,j.jsxs)(b,{id:`g`,title:`Evals`,children:[(0,j.jsxs)(`p`,{className:`note`,children:[`Graded by `,(0,j.jsx)(`button`,{type:`button`,className:`link-btn`,onClick:M,children:`Reference`}),`.`]}),(0,j.jsx)(m,{label:`Evals`,rows:[{id:`reference`,name:`Reference`},{id:`tone`,name:`Tone of voice`}],rowKey:e=>e.id,columns:[{key:`name`,header:`Name`,role:`title`,sort:e=>e.name,cell:e=>(0,j.jsx)(`button`,{type:`button`,className:`link-btn`,onClick:M,children:e.name})}]})]}),"button/destructive":()=>(0,j.jsxs)(`div`,{className:`gallery-row`,children:[(0,j.jsxs)(`button`,{type:`button`,className:`ghost destructive`,onClick:M,children:[(0,j.jsx)(h,{size:14,"aria-hidden":`true`}),` Remove`]}),(0,j.jsxs)(`button`,{type:`button`,className:`destructive`,onClick:M,children:[(0,j.jsx)(h,{size:14,"aria-hidden":`true`}),` Delete`]}),(0,j.jsx)(`button`,{type:`button`,className:`destructive`,disabled:!0,onClick:M,children:`Delete`})]}),"pills/one":()=>(0,j.jsx)(q,{}),"pills/some":()=>(0,j.jsx)(q,{some:!0}),"radiocards/types":()=>(0,j.jsx)(J,{}),"radiocards/detail":()=>(0,j.jsx)(J,{detail:!0}),"radiocards/compact":()=>(0,j.jsx)(J,{compact:!0}),"versions/restore":()=>(0,j.jsx)(ve,{noun:`experiment`,versions:Je,at:e=>e.at,reason:e=>e.reason,onRestore:M,onClose:M}),"versions/table":()=>(0,j.jsx)(b,{id:`versions`,title:`Versions`,children:(0,j.jsx)(Te,{label:`Versions`,versions:Ye,at:e=>e.at,atLabel:`Made`,rowKey:e=>String(e.version),columns:[{key:`version`,header:`Version`,role:`title`,cell:e=>`v${e.version}${e.version===3?` (newest)`:``}`}],current:e=>e.version===3,onRestore:M,expand:{label:(e,t)=>t?`Hide words`:`Show words`,detail:e=>(0,j.jsx)(`p`,{className:`note`,children:e.text})}})}),"table/expand":()=>(0,j.jsx)(Xe,{}),"table/pinned":()=>(0,j.jsx)(b,{id:`profiles`,title:`Connection Profiles`,children:(0,j.jsx)(m,{label:`Profiles`,cards:!0,rows:X(3),rowKey:e=>e.name,pinnedRow:{name:`(Default)`,kb:0},select:{noun:`profile`},columns:[{key:`name`,header:`Profile`,role:`title`,cell:e=>e.name===`(Default)`?(0,j.jsx)(`span`,{className:`note`,children:e.name}):e.name},{key:`size`,header:`Size`,className:`num`,sort:e=>e.kb,cell:e=>e.kb?`${e.kb} KB`:`(Any)`}]})}),"sync/bar":()=>(0,j.jsx)(ye,{lines:[{key:`c`,alert:!0,text:`Data conflict: Reference.`,actions:[{label:`Keep this tab's data`,onSelect:M},{label:`Lose this tab's changes`,onSelect:M}]},{key:`o`,text:`Receipts not saved: the server could not be reached.`,actions:[{label:`Retry`,onSelect:M}]}]}),"why/button":()=>(0,j.jsxs)(`div`,{className:`sacts`,children:[(0,j.jsx)(`button`,{type:`button`,className:`ghost`,children:`Cancel`}),(0,j.jsx)(ge,{why:`Needs a prompt`,disabled:!0,onClick:M,children:`Create`})]})},Je=[{at:`2026-10-13T14:47:00Z`,reason:`run`},{at:`2026-10-13T11:02:00Z`,reason:`idle`},{at:`2026-10-12T09:30:00Z`,reason:`restore`}],Ye=[{version:3,at:`2026-10-13T14:47:00Z`,text:`List what you see, one item a line.`},{version:2,at:`2026-10-12T11:02:00Z`,text:`List what you see.`},{version:1,at:`2026-10-10T09:30:00Z`,text:`Describe it.`}];function q({some:e}){let[t,n]=(0,O.useState)(`thumbs`),[r,i]=(0,O.useState)(new Set([`todo`,`missing`]));return e?(0,j.jsx)(f,{label:`Show`,on:r,onToggle:e=>i(t=>{let n=new Set(t);return n.delete(e)||n.add(e),n}),options:[{value:`graded`,label:`Graded 12`},{value:`todo`,label:`To do 3`},{value:`missing`,label:`Missing 1`}]}):(0,j.jsx)(f,{label:`View`,value:t,onChange:n,options:[{value:`thumbs`,label:`Thumbnails`},{value:`list`,label:`List`}]})}function J({detail:e,compact:t}){let[n,r]=(0,O.useState)(t?`b.jpg`:e?`new`:`drop`),[i,a]=(0,O.useState)(``);return t?(0,j.jsx)(o,{label:`3 items without an eval case`,legend:!0,compact:!0,value:n,onChange:r,options:[`a.jpg`,`b.jpg`,`notes.txt`].map(e=>({value:e,label:e,lead:(0,j.jsx)(`span`,{style:{width:56,height:42,flex:`none`,borderRadius:4,background:`var(--surface2)`,border:`1px solid var(--line)`},"aria-hidden":`true`})}))}):e?(0,j.jsx)(o,{label:`Filter set`,value:n,onChange:r,options:[{value:`new`,label:`New filter set`,children:(0,j.jsx)(`input`,{type:`text`,"aria-label":`Name`,placeholder:`Name`,value:i,onChange:e=>a(e.target.value)})},{value:`existing`,label:`Existing filter set`,about:`Joins the end of its filters.`}]}):(0,j.jsx)(o,{label:`Post-format`,legend:!0,value:n,onChange:r,options:[{value:`drop`,label:`Drop items`,about:`Each item of a list response, dropped when it matches.`},{value:`keep`,label:`Keep first`,about:`Keep the first N items.`},{value:`reject`,label:`Reject response`,about:`The whole answer, refused when it matches.`}]})}function Xe(){let[e,t]=(0,O.useState)(()=>new Set([X(4)[0].name]));return(0,j.jsx)(b,{id:`runs`,title:`Runs`,children:(0,j.jsx)(m,{label:`Runs`,cards:!0,rows:X(4),rowKey:e=>e.name,defaultSort:null,expand:{label:(e,t)=>`${t?`Hide`:`Show`} ${e.name}`,can:(e,t)=>t!==2,open:e,onChange:t,detail:e=>(0,j.jsxs)(`p`,{className:`note`,children:[e.name,` sent 2 requests, `,e.kb,` KB back.`]})},columns:[{key:`name`,header:`Name`,role:`title`,cell:e=>e.name},{key:`size`,header:`Size`,className:`num`,sort:e=>e.kb,cell:e=>`${e.kb} KB`}]})})}function Ze({start:e}){let[t,n]=(0,O.useState)(!!e);return(0,j.jsx)(u,{checked:t,onChange:n,label:`Fetch now`})}var Qe=`Tell me about this location in 1 sentence: @{variables('LocationVar')}`,Y=`Tell me about this location in 2 sentences, for someone visiting for the first time: @{variables('LocationVar')}`,$e=[{name:`LocationVar`,expr:`@{variables('LocationVar')}`},{name:`text`,expr:`@{triggerBody()?['text']}`}];function et(){let[e,t]=(0,O.useState)(Y);return(0,j.jsx)(b,{id:`g`,title:`Edited`,level:3,children:(0,j.jsx)(Ce,{label:`Edited`,asks:[{key:`connection`,label:`Connection`,control:{type:`static`,text:`Anthropic Direct`}}],prompt:e,onPrompt:t,rows:[{key:`model`,label:`Model`,control:{type:`static`,text:`claude-haiku-4-5`}}],request:[{key:`request`,label:`Request`,control:{type:`code`,text:`POST /v1/messages`}},{key:`body`,label:`Body`,control:{type:`code`,text:JSON.stringify({model:`claude-haiku-4-5`,max_tokens:1024,messages:[{role:`user`,content:e}]},null,2)}}],requestId:`story-edited-request`,words:{text:e,was:Qe},fields:$e})})}function tt({open:e=!1}){let[t,n]=(0,O.useState)([`better`,`same`]),r=[{value:`better`,label:`Better`},{value:`same`,label:`Same`},{value:`worse`,label:`Worse`}];return e?(0,j.jsx)(`div`,{style:{minHeight:180},children:(0,j.jsx)(Ee,{value:t,options:r,onChange:n,defaultOpen:!0})}):(0,j.jsx)(c,{label:`Judged against recorded`,rows:[{key:`expected`,label:`Expected`,required:!0,control:{type:`multi`,value:t,options:r,onChange:n}}]})}function nt({start:e}){let[t,n]=(0,O.useState)(e);return(0,j.jsx)(`div`,{style:{maxWidth:360},children:(0,j.jsx)(se,{value:t,onChange:n})})}function rt({open:e}){return(0,j.jsx)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,padding:`var(--s3)`},children:(0,j.jsx)(we,{name:`Test a workflow`,done:2,total:4,current:2,steps:[{title:`Add a workflow Source`,done:!0},{title:`Test an action`,done:!0},{title:`Run the test`,done:!1},{title:`Compare the responses`,done:!1}],onOpen:M,onCancel:M,...e?{defaultOpen:!0}:{}})})}var it=Ie.map(e=>({...e,render:qe[e.path]})),X=e=>Array.from({length:e},(e,t)=>({name:`IMG_${String(4e3+t*7919%97).padStart(4,`0`)}.jpg`,kb:t*37%900+40}));function at({search:e=``,size:t=`all`}){let[n,r]=(0,O.useState)(e),[i,a]=(0,O.useState)(t),[o,s]=(0,O.useState)(`shoot`),c=X(12),l=c.filter(e=>e.name.toLowerCase().includes(n.trim().toLowerCase())&&(i===`all`||i===`large`==e.kb>=400));return(0,j.jsxs)(b,{id:`files`,title:`Files`,children:[(0,j.jsx)(be,{noun:`files`,search:{label:`Name`,placeholder:`Search names`,value:n,onChange:r},count:{shown:l.length,total:c.length},filters:[{key:`source`,label:`Source`,value:o,neutral:null,onChange:s,options:[{value:`shoot`,label:`Tuesday shoot`},{value:`samples`,label:`Sample library`}]},{key:`size`,label:`Size`,value:i,onChange:a,options:[{value:`all`,label:`All`},{value:`small`,label:`Small`},{value:`large`,label:`Large`}]}]}),l.length?(0,j.jsx)(m,{label:`Files`,rows:l,rowKey:e=>e.name,columns:[{key:`name`,header:`Name`,cell:e=>e.name},{key:`size`,header:`Size`,sort:e=>e.kb,cell:e=>`${e.kb} KB`}]}):(0,j.jsx)(`p`,{className:`note`,children:`No files match these filters.`})]})}function Z({count:e,pageSize:t,picked:r}){let i=X(e),[a,o]=(0,O.useState)(i),[s,c]=(0,O.useState)(()=>new Set((r??[]).map(e=>i[e].name)));return(0,j.jsx)(b,{id:`files`,title:`Files`,children:(0,j.jsx)(m,{label:`Files`,cards:!0,rows:a,rowKey:e=>e.name,pageSize:t??null,select:r&&{noun:`file`,selected:s,onChange:c,actions:e=>[{label:`Move…`,icon:E.rename,onSelect:M},{label:`Remove`,icon:E.remove,destructive:!0,onSelect:()=>{o(t=>t.filter(t=>!e.includes(t))),c(new Set)}},{label:`Export`,icon:n,onSelect:M}]},columns:[{key:`name`,header:`Name`,role:`title`,cell:e=>e.name},{key:`size`,header:`Size`,className:`num`,sort:e=>e.kb,cell:e=>`${e.kb} KB`},{key:`menu`,header:``,role:`menu`,sort:null,cell:e=>(0,j.jsx)(me,{label:`${e.name} actions`,actions:[{label:`Rename…`,icon:E.rename,onSelect:M},{label:`Remove`,icon:E.remove,destructive:!0,onSelect:M}]})}]})})}function ot(){let[e,t]=(0,O.useState)(`files`);return(0,j.jsx)(c,{label:`New Source`,rows:[{key:`type`,label:`Type`,control:{type:`cards`,value:e,onChange:t,options:[{value:`files`,label:`File Library`,icon:(0,j.jsx)(ce,{size:16,fill:`currentColor`,"aria-hidden":`true`})},{value:`flow`,label:`Power Automate flow`,icon:(0,j.jsx)(ie,{size:16,fill:`currentColor`,"aria-hidden":`true`})}]}},{key:`name`,label:`Name`,control:{type:`text`,value:``,onChange:M}}]})}var Q={label:`Model`,placeholder:`Model name`},st=[`gemma3:4b`,`llama3.2:3b`,`llama3.2-vision:11b`,`mistral-small3.2:24b`,`qwen3:8b`,`qwen2.5vl:7b`];function ct(){return(0,O.useEffect)(()=>{[...document.querySelectorAll(`.switcher-opt`)].find(e=>e.textContent===`qwen3:8b`)?.click()},[]),(0,j.jsx)(i,{kind:`Model`,value:`llama3.2:3b`,options:st.map(e=>({id:e,label:e})),entry:Q,onPick:M,onClose:M})}var $=()=>decodeURIComponent(location.hash.replace(/^#\/?/,``));function lt(){let[e,t]=(0,O.useState)($);(0,O.useEffect)(()=>{let e=()=>t($());return window.addEventListener(`hashchange`,e),()=>window.removeEventListener(`hashchange`,e)},[]);let n=it.find(t=>t.path===e);return n?(0,j.jsxs)(`main`,{className:`gallery-one`,"data-route":n.path,children:[(0,j.jsxs)(`nav`,{className:`gallery-nav`,children:[(0,j.jsx)(`a`,{href:`#/`,children:`All`}),(0,j.jsx)(`span`,{children:n.title})]}),n.render()]}):(0,j.jsxs)(`main`,{className:`gallery-index`,"data-route":``,children:[(0,j.jsx)(`h1`,{children:`Components`}),(0,j.jsx)(`ul`,{children:it.map(e=>(0,j.jsxs)(`li`,{children:[(0,j.jsx)(`a`,{href:`#/${e.path}`,children:e.title}),` `,(0,j.jsx)(`code`,{children:e.path})]},e.path))})]})}(0,Pe.createRoot)(document.getElementById(`root`)).render((0,j.jsx)(O.StrictMode,{children:(0,j.jsx)(lt,{})}));
|