qpilot 0.11.0 → 0.13.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/.next/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/app-build-manifest.json +16 -16
- package/.next/standalone/.next/app-path-routes-manifest.json +3 -3
- package/.next/standalone/.next/build-manifest.json +2 -2
- package/.next/standalone/.next/prerender-manifest.json +12 -12
- package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_not-found.html +1 -1
- package/.next/standalone/.next/server/app/_not-found.rsc +1 -1
- package/.next/standalone/.next/server/app/api/run/[id]/answer/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/run/[id]/pause/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/run/[id]/shot/[num]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/run/[id]/stream/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/run/route.js +58 -68
- package/.next/standalone/.next/server/app/api/run/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/runs/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/settings/models/route.js +1 -1
- package/.next/standalone/.next/server/app/api/settings/models/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/settings/route.js +1 -1
- package/.next/standalone/.next/server/app/api/settings/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/index.html +1 -1
- package/.next/standalone/.next/server/app/index.rsc +2 -2
- package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/run/[id]/page.js +1 -1
- package/.next/standalone/.next/server/app/run/[id]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/settings.html +1 -1
- package/.next/standalone/.next/server/app/settings.rsc +2 -2
- package/.next/standalone/.next/server/app-paths-manifest.json +3 -3
- package/.next/standalone/.next/server/chunks/12.js +1 -1
- package/.next/standalone/.next/server/chunks/864.js +1 -1
- package/.next/standalone/.next/server/functions-config-manifest.json +4 -4
- package/.next/standalone/.next/server/middleware-manifest.json +1 -1
- package/.next/standalone/.next/server/pages/404.html +1 -1
- package/.next/standalone/.next/server/pages/500.html +1 -1
- package/.next/standalone/.next/static/chunks/677-25363eac0e2b4fd1.js +1 -0
- package/.next/standalone/.next/static/chunks/app/run/[id]/page-6a54cc9b02a39151.js +1 -0
- package/.next/standalone/package.json +1 -1
- package/.next/static/chunks/677-25363eac0e2b4fd1.js +1 -0
- package/.next/static/chunks/app/run/[id]/page-6a54cc9b02a39151.js +1 -0
- package/README.md +3 -0
- package/package.json +1 -1
- package/.next/standalone/.next/static/chunks/677-f779c1efc6740046.js +0 -1
- package/.next/standalone/.next/static/chunks/app/run/[id]/page-f257e38c4222e3f4.js +0 -1
- package/.next/static/chunks/677-f779c1efc6740046.js +0 -1
- package/.next/static/chunks/app/run/[id]/page-f257e38c4222e3f4.js +0 -1
- /package/.next/standalone/.next/static/{Qhl1G-NOwSotT_4T7tz8a → bkJayQnTQRf05bk-k7JdG}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{Qhl1G-NOwSotT_4T7tz8a → bkJayQnTQRf05bk-k7JdG}/_ssgManifest.js +0 -0
- /package/.next/static/{Qhl1G-NOwSotT_4T7tz8a → bkJayQnTQRf05bk-k7JdG}/_buildManifest.js +0 -0
- /package/.next/static/{Qhl1G-NOwSotT_4T7tz8a → bkJayQnTQRf05bk-k7JdG}/_ssgManifest.js +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[677],{2391:(e,n,t)=>{t.d(n,{jd:()=>o});let a={back:"Back",newRun:"New run",notFound:"Run not found — it may have finished and been cleared from memory.",steps:"steps",passedCount:"passed",warnCount:"warn",failedCount:"failed",waitingForPlan:"waiting for plan…",noSteps:"no steps were run",pause:"Pause",resume:"Resume",waitingToStart:"waiting for agent to start…",endedBeforePlan:"The run ended before the agent produced a plan.",seeReason:"See the reason below.",summary:"Summary",expected:"Expected",actual:"Actual",consoleErrors:"Console errors during this step",mockUnverified:"The mocked response was made up without a real one to compare with — its structure may not match what the page expects.",infoNewTab:"A new tab opened",infoTabClosed:"The tab was closed, back to",infoDialog:"Browser dialog",infoAccepted:"OK pressed",infoDismissed:"Cancel pressed",showReasoning:"Show agent reasoning",hideReasoning:"Hide agent reasoning",copyReport:"Copy report",copied:"Copied",downloadReport:"Download report",runAgain:"Run again",editAndRun:"Edit test case",reportTitle:"Test run report",reportResult:"Result",reportDuration:"Duration",reportScreenshot:"Screenshot",testCase:"Test case",attached:"Attached",noEvents:"no events for this step",runFinished:"Run finished",stepLabel:"Step",asking:"Asking",userAnswered:"User answered",needInput:"Agent needs input",submit:"Submit",sending:"Sending…",secretPlaceholder:"OTP / password",answerPlaceholder:"answer",status:{running:{label:"Running",sub:"agent is executing steps"},waiting:{label:"Waiting",sub:"agent needs your input"},paused:{label:"Paused",sub:"run is paused"},passed:{label:"Passed",sub:"all steps passed"},failed:{label:"Failed",sub:"some steps failed"},error:{label:"Error",sub:"agent crashed"}},home:{tagline:"Paste a test case. Watch it run.",chooseFolder:"Choose folder",uploadMd:"Upload .md",files:"files",clearList:"Clear file list",selectAll:"Select all",selected:"selected",run:"Run",runN:"Run",withPreview:"With preview",runPreview:"Run with preview",running:"Running…",stop:"Stop",example:"Example",placeholder:"Paste your test case here…",expand:"Expand",collapse:"Collapse",batchRun:"Batch run",recentRuns:"Recent runs",attach:"Attach files",addFile:"Add file",attachHint:"optional — images, CSV or documents the test needs to upload",remove:"Remove",settings:"Settings"},stepStatus:{queued:"queued",pass:"pass",warn:"warn",fail:"fail",skipped:"skipped",running:"running"},settings:{title:"Settings",back:"Back",model:"Model",provider:"Provider",anthropic:"Anthropic (Claude)",custom:"OpenAI-compatible",apiKey:"Anthropic API key",apiToken:"API token",keySaved:"Saved key {hint} — leave empty to keep it",keyFromEnv:"Using {hint} from the environment — leave empty to keep it",keyRebind:"Re-enter the key for this address — the saved key is only sent to the base URL it was saved with",modelLabel:"Model",modelHintAnthropic:"Loaded live from Anthropic: every model your key can use.",modelHintCustom:"Loaded from the endpoint's /models list. The model must support tool calling.",modelsLoading:"Loading models…",modelsNeedKey:"Enter the API key to load the models",refreshModels:"Reload the list",modelSearch:"Find a model or type its id…",noModels:"No matching models",useTyped:"Use “{id}”",chooseModel:"Choose a model",defaultTag:"default",baseUrl:"Base URL",baseUrlHintAnthropic:"Only to reach Claude through a corporate proxy. Leave empty for api.anthropic.com.",baseUrlHintCustom:"The endpoint's OpenAI-compatible root, usually ending in /v1.",optional:"optional",appearance:"Appearance",theme:"Theme",themeSystem:"System",themeLight:"Light",themeDark:"Dark",save:"Save",saving:"Saving…",saved:"Saved",storedIn:"Stored in {path}",welcome:"Connect a model to get started",welcomeSub:"qpilot drives the browser with an AI model. Add your API key below — you can change it here any time."},action:{opening:"Opening",readingPage:"Reading page",readingBlock:"Reading block",clicking:"Clicking",clickingElement:"Clicking element",filling:"Filling",selecting:"Selecting",hovering:"Hovering",hoveringElement:"Hovering element",scrollingTo:"Scrolling to",scrolling:"Scrolling",inside:"inside",pressing:"Pressing",closingOverlay:"Closing overlay",waiting:"Waiting",askingUser:"Asking user",uploading:"Uploading",to:"to",down:"down",up:"up",right:"right",left:"left",switchingTab:"Switching to tab",nextDialog:"Next dialog:",dialogAccept:"OK",dialogDismiss:"Cancel",mocking:"Mocking",mockAbort:"network error",mockPatch:"patch the real response",mockDelay:"delay",clearingMocks:"Removing mocks",goingOffline:"Turning the network off",goingOnline:"Turning the network on",readingRequests:"Reading network requests",readingConsole:"Reading console errors"}},i={en:a,ru:{back:"Назад",newRun:"Новый прогон",notFound:"Прогон не найден — возможно, он завершился и был вытеснен из памяти.",steps:"шагов",passedCount:"успешно",warnCount:"предупреждений",failedCount:"провалено",waitingForPlan:"ждём план…",noSteps:"шаги не выполнялись",pause:"Пауза",resume:"Продолжить",waitingToStart:"ждём запуска агента…",endedBeforePlan:"Прогон завершился до того, как агент составил план.",seeReason:"Причина — ниже.",summary:"Итог",expected:"Ожидалось",actual:"Фактически",consoleErrors:"Ошибки в консоли на этом шаге",mockUnverified:"Подменённый ответ придуман без сверки с настоящим — его структура может не совпадать с тем, что ждёт страница.",infoNewTab:"Открылась новая вкладка",infoTabClosed:"Вкладка закрыта, возврат на",infoDialog:"Диалог браузера",infoAccepted:"нажато OK",infoDismissed:"нажата \xabОтмена\xbb",showReasoning:"Показать рассуждения агента",hideReasoning:"Скрыть рассуждения агента",copyReport:"Скопировать отчёт",copied:"Скопировано",downloadReport:"Скачать отчёт",runAgain:"Запустить снова",editAndRun:"Изменить кейс",reportTitle:"Отчёт о прогоне",reportResult:"Результат",reportDuration:"Длительность",reportScreenshot:"Скриншот",testCase:"Тест-кейс",attached:"Вложения",noEvents:"событий по этому шагу нет",runFinished:"Прогон завершён",stepLabel:"Шаг",asking:"Спрашивает",userAnswered:"Пользователь ответил",needInput:"Агенту нужен ввод",submit:"Отправить",sending:"Отправка…",secretPlaceholder:"код / пароль",answerPlaceholder:"ответ",status:{running:{label:"Выполняется",sub:"агент проходит шаги"},waiting:{label:"Ожидание",sub:"агенту нужен ваш ввод"},paused:{label:"Пауза",sub:"прогон приостановлен"},passed:{label:"Успешно",sub:"все шаги пройдены"},failed:{label:"Провален",sub:"часть шагов не прошла"},error:{label:"Ошибка",sub:"агент упал"}},home:{tagline:"Вставьте тест-кейс. Смотрите, как он проходит.",chooseFolder:"Выбрать папку",uploadMd:"Загрузить .md",files:"файлов",clearList:"Очистить список",selectAll:"Выбрать все",selected:"выбрано",run:"Запустить",runN:"Запустить",withPreview:"С превью",runPreview:"Запустить с превью",running:"Запускаем…",stop:"Остановить",example:"Пример",placeholder:"Вставьте сюда свой тест-кейс…",expand:"Развернуть",collapse:"Свернуть",batchRun:"Пакетный прогон",recentRuns:"Последние прогоны",attach:"Прикрепить файлы",addFile:"Добавить файл",attachHint:"необязательно — картинки, CSV или документы, которые нужно загрузить в тесте",remove:"Убрать",settings:"Настройки"},stepStatus:{queued:"в очереди",pass:"успех",warn:"внимание",fail:"провал",skipped:"пропущен",running:"выполняется"},settings:{title:"Настройки",back:"Назад",model:"Модель",provider:"Провайдер",anthropic:"Anthropic (Claude)",custom:"OpenAI-совместимый",apiKey:"API-ключ Anthropic",apiToken:"API-токен",keySaved:"Сохранён ключ {hint} — оставьте пустым, чтобы не менять",keyFromEnv:"Используется {hint} из переменных окружения — оставьте пустым, чтобы не менять",keyRebind:"Введите ключ заново для этого адреса — сохранённый ключ отправляется только на тот Base URL, с которым его сохранили",modelLabel:"Модель",modelHintAnthropic:"Список загружается из Anthropic: все модели, доступные вашему ключу.",modelHintCustom:"Список берётся из /models на сервере. Модель должна поддерживать tool calling.",modelsLoading:"Загружаю модели…",modelsNeedKey:"Введите API-ключ, чтобы загрузить модели",refreshModels:"Обновить список",modelSearch:"Найти модель или ввести её ID…",noModels:"Подходящих моделей нет",useTyped:"Использовать \xab{id}\xbb",chooseModel:"Выберите модель",defaultTag:"по умолчанию",baseUrl:"Base URL",baseUrlHintAnthropic:"Только для доступа к Claude через корпоративный прокси. Оставьте пустым для api.anthropic.com.",baseUrlHintCustom:"Корень OpenAI-совместимого API, обычно заканчивается на /v1.",optional:"необязательно",appearance:"Внешний вид",theme:"Тема",themeSystem:"Системная",themeLight:"Светлая",themeDark:"Тёмная",save:"Сохранить",saving:"Сохраняю…",saved:"Сохранено",storedIn:"Хранится в {path}",welcome:"Подключите модель, чтобы начать",welcomeSub:"qpilot управляет браузером с помощью ИИ-модели. Укажите API-ключ ниже — поменять его можно здесь в любой момент."},action:{opening:"Открывает",readingPage:"Читает страницу",readingBlock:"Читает блок",clicking:"Кликает",clickingElement:"Кликает по элементу",filling:"Заполняет",selecting:"Выбирает",hovering:"Наводит на",hoveringElement:"Наводит на элемент",scrollingTo:"Скроллит к",scrolling:"Скроллит",inside:"внутри",pressing:"Нажимает",closingOverlay:"Закрывает оверлей",waiting:"Ждёт",askingUser:"Спрашивает пользователя",uploading:"Загружает",to:"в",down:"вниз",up:"вверх",right:"вправо",left:"влево",switchingTab:"Переключение на вкладку",nextDialog:"Следующий диалог:",dialogAccept:"OK",dialogDismiss:"Отмена",mocking:"Подмена запроса",mockAbort:"сетевая ошибка",mockPatch:"правка настоящего ответа",mockDelay:"задержка",clearingMocks:"Снятие подмен",goingOffline:"Отключение сети",goingOnline:"Включение сети",readingRequests:"Чтение сетевых запросов",readingConsole:"Чтение ошибок консоли"}}};function o(e){var n;return null!=(n=i[null!=e?e:"en"])?n:a}},5016:(e,n,t)=>{t.d(n,{a:()=>r,cn:()=>o});var a=t(2821),i=t(5889);function o(){for(var e=arguments.length,n=Array(e),t=0;t<e;t++)n[t]=arguments[t];return(0,i.QP)((0,a.$)(n))}function r(e){let n=Math.max(0,Math.floor(e/1e3));return"".concat(Math.floor(n/60),":").concat(String(n%60).padStart(2,"0"))}},7003:(e,n,t)=>{t.d(n,{$:()=>d});var a=t(5155),i=t(9574),o=t(3101),r=t(5016);let s=(0,o.F)("group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",outline:"border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",xs:"h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",lg:"h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",icon:"size-8","icon-xs":"size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg","icon-lg":"size-9"}},defaultVariants:{variant:"default",size:"default"}});function d(e){let{className:n,variant:t="default",size:o="default",...d}=e;return(0,a.jsx)(i.$,{"data-slot":"button",className:(0,r.cn)(s({variant:t,size:o,className:n})),...d})}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[170],{6170:(e,t,n)=>{"use strict";n.d(t,{p:()=>o});var s=n(5155);n(2115);var a=n(2045),r=n(5016);function o(e){let{className:t,type:n,...o}=e;return(0,s.jsx)(a.p,{type:n,"data-slot":"input",className:(0,r.cn)("h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",t),...o})}},6329:(e,t,n)=>{"use strict";function s(e){return"data:image/svg+xml,".concat(encodeURIComponent(e))}function a(e){let t=document.querySelector('link[rel="icon"]');t||(t=Object.assign(document.createElement("link"),{rel:"icon"}),document.head.appendChild(t)),t.href=e}function r(e){return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">'.concat(e,"</svg>")}n.d(t,{O:()=>u,g:()=>p});let o=Array.from({length:10},(e,t)=>{let n=t/10*Math.PI*2-Math.PI/2,a=.65*Math.PI,o=12+10*Math.cos(n),c=12+10*Math.sin(n),l=12+10*Math.cos(n+a),i=12+10*Math.sin(n+a);return s(r('<circle cx="12" cy="12" r="10" stroke="#38bdf8" stroke-width="2.5" fill="none" opacity="0.15"/>'+'<path d="M'.concat(o.toFixed(3)," ").concat(c.toFixed(3)," A10 10 0 0 1 ").concat(l.toFixed(3)," ").concat(i.toFixed(3),'" stroke="#38bdf8" stroke-width="2.5" fill="none" stroke-linecap="round"/>')))}),c={passed:s(r('<circle cx="12" cy="12" r="10" fill="#22c55e"/><path d="M7 12.5l3.5 3.5 6.5-7" stroke="white" stroke-width="2.2" fill="none" stroke-linecap="round" stroke-linejoin="round"/>')),failed:s(r('<circle cx="12" cy="12" r="10" fill="#ef4444"/><path d="M8 8l8 8M16 8l-8 8" stroke="white" stroke-width="2.2" stroke-linecap="round"/>')),error:s(r('<circle cx="12" cy="12" r="10" fill="#ef4444"/><path d="M8 8l8 8M16 8l-8 8" stroke="white" stroke-width="2.2" stroke-linecap="round"/>')),waiting:s(r('<circle cx="12" cy="12" r="10" fill="#facc15"/><path d="M12 7v5.5l3 3" stroke="white" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round" fill="none"/>')),paused:s(r('<circle cx="12" cy="12" r="10" fill="#64748b"/><path d="M9 8v8M15 8v8" stroke="white" stroke-width="2.2" stroke-linecap="round"/>')),default:s(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="'.concat(e,'" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">').concat('<path d="M12 8V4H8"/><rect width="16" height="12" x="4" y="8" rx="2"/><path d="M2 14h2"/><path d="M20 14h2"/><path d="M15 13v2"/><path d="M9 13v2"/>').concat(t,"</svg>")}("#7c7c8a"))},l=null,i=0;function d(){l&&(clearInterval(l),l=null)}function u(e){var t;if(d(),"running"===e){i=0,a(o[0]),l=setInterval(()=>{a(o[i=(i+1)%10])},100);return}a(null!=(t=c[e])?t:c.default)}function p(){d(),a(c.default)}},8446:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>ea});var s=n(5155),a=n(2115),r=n(2619),o=n.n(r),c=n(63),l=n(3229),i=n(3228),d=n(2638),u=n(3410),p=n(340),x=n(8129),m=n(5352),g=n(7081),h=n(7906),f=n(9746),b=n(8215),v=n(7212),j=n(3916),w=n(8316),N=n(7274),y=n(4788),k=n(6329),S=n(2391),z=n(1083),A=n(2027),C=n(3101),E=n(5016);let M=(0,C.F)("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});function _(e){let{className:t,variant:n="default",render:s,...a}=e;return(0,A.C)({defaultTagName:"span",props:(0,z.v6)({className:(0,E.cn)(M({variant:n}),t)},a),render:s,state:{slot:"badge",variant:n}})}var q=n(7003),R=n(4036),T=n(5949),U=n(4915),O=n(8502),D=n(8905),F=n(989);function P(e){let{...t}=e;return(0,s.jsx)(R.D,{"data-slot":"dialog",...t})}function I(e){let{...t}=e;return(0,s.jsx)(T.Z,{"data-slot":"dialog-portal",...t})}function B(e){let{className:t,...n}=e;return(0,s.jsx)(U.X,{"data-slot":"dialog-overlay",className:(0,E.cn)("fixed inset-0 isolate z-50 bg-black/30 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",t),...n})}function L(e){let{className:t,children:n,showCloseButton:a=!0,...r}=e;return(0,s.jsxs)(I,{children:[(0,s.jsx)(B,{}),(0,s.jsxs)(O.h,{"data-slot":"dialog-content",className:(0,E.cn)("fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",t),...r,children:[n,a&&(0,s.jsxs)(D.H,{"data-slot":"dialog-close",render:(0,s.jsx)(q.$,{variant:"ghost",className:"absolute top-2 right-2",size:"icon-sm"}),children:[(0,s.jsx)(y.A,{}),(0,s.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})}function $(e){let{className:t,...n}=e;return(0,s.jsx)("div",{"data-slot":"dialog-header",className:(0,E.cn)("flex flex-col gap-2",t),...n})}function H(e){let{className:t,...n}=e;return(0,s.jsx)(F.L,{"data-slot":"dialog-title",className:(0,E.cn)("font-heading text-base leading-none font-medium",t),...n})}var W=n(6170),J=n(8521),V=n(2577),G=n(1127);function K(e){let{...t}=e;return(0,s.jsx)(J.N,{"data-slot":"collapsible",...t})}function X(e){let{...t}=e;return(0,s.jsx)(V.R,{"data-slot":"collapsible-trigger",...t})}function Z(e){let{...t}=e;return(0,s.jsx)(G.j,{"data-slot":"collapsible-content",...t})}let Q={pass:"✅",fail:"❌",warn:"⚠️",skipped:"⏭",queued:"⏳"};function Y(e){let t=[];for(let n of e){let e=t[t.length-1];e&&e.title===n.group?e.steps.push(n):t.push({title:n.group,steps:[n]})}return t}function ee(e,t){let n=t=>e.steps.filter(e=>e.status===t).length,s=["".concat(n("pass")," ").concat(t.passedCount)];return n("warn")&&s.push("".concat(n("warn")," ").concat(t.warnCount)),n("fail")&&s.push("".concat(n("fail")," ").concat(t.failedCount)),"".concat(e.steps.length," ").concat(t.steps,": ").concat(s.join(", "))}let et=(e,t)=>{var n,s;return null!=(s=null==(n=t.status[e.status])?void 0:n.label)?s:e.status},en=e=>e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,"""),es={pass:"#15803d",fail:"#b91c1c",warn:"#b45309",skipped:"#6b7280",queued:"#6b7280"};function ea(e){var t,n,r,N,y;let{params:z}=e,{id:A}=(0,a.use)(z),C=(0,c.useRouter)(),[M,_]=(0,a.useState)(null),[R,T]=(0,a.useState)([]),[U,O]=(0,a.useState)(!1),[D,F]=(0,a.useState)(null),[I,B]=(0,a.useState)(()=>Date.now()),[$,H]=(0,a.useState)(!1),[W,J]=(0,a.useState)(!1),[V,G]=(0,a.useState)(!1),[ea,eo]=(0,a.useState)(null),el=(0,a.useRef)(!1);(0,a.useEffect)(()=>{el.current=!1;let e=new EventSource("/api/run/".concat(A,"/stream"));return e.onmessage=e=>{let t=JSON.parse(e.data);if(el.current=!0,t.events?T(t.events):t.event&&T(e=>[...e,t.event]),_({...t.run,events:[]}),!["running","waiting","paused"].includes(t.run.status)){var n,s,a,r,o;let e=null!=(o=null!=(r=null==(n=t.event)?void 0:n.ts)?r:null==(a=t.events)||null==(s=a.at(-1))?void 0:s.ts)?o:Date.now();F(t=>null!=t?t:e)}},e.onerror=()=>{e.close(),el.current||O(!0)},()=>e.close()},[A]);let ei=(0,S.jd)(null==M?void 0:M.language),ed=null!=(n=null==M?void 0:M.status)?n:"running",ep=null!=(r=null==M?void 0:M.steps)?r:[],em=ep.filter(e=>"pass"===e.status).length,eg=ep.filter(e=>"fail"===e.status).length,eh=ep.filter(e=>"warn"===e.status).length,ef="running"===ed||"waiting"===ed,eb=ef||"paused"===ed;async function ev(){eb&&(H(!0),await fetch("/api/run/".concat(A,"/pause"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"paused"===ed?"resume":"pause"})}).catch(()=>{}),H(!1))}async function ej(){if(M)try{await navigator.clipboard.writeText(function(e,t,n){let s=["# ".concat(e.title),"","**".concat(n.reportResult,":** ").concat(et(e,n).toUpperCase()," — ").concat(ee(e,n)),"**".concat(n.reportDuration,":** ").concat((0,E.a)(t)," \xb7 ").concat(new Date(e.createdAt).toLocaleString())];for(let t of Y(e.steps))s.push(""),t.title&&s.push("## ".concat(t.title),""),t.steps.forEach((e,t)=>{var a,r,o;let c=(null!=(r=n.stepStatus[e.status])?r:e.status).toUpperCase();s.push("".concat(t+1,". ").concat(null!=(o=Q[e.status])?o:""," **").concat(c,"** — ").concat(e.description));let l="fail"===e.status||"warn"===e.status;l&&e.expected&&s.push(" - ".concat(n.expected,": ").concat(e.expected)),e.evidence&&s.push(l?" - ".concat(n.actual,": ").concat(e.evidence):" - ".concat(e.evidence)),e.mockUnverified&&s.push(" - ⚠ ".concat(n.mockUnverified)),(null==(a=e.consoleErrors)?void 0:a.length)&&s.push(" - ".concat(n.consoleErrors,": ").concat(e.consoleErrors.join(" | ")))});return e.summary&&s.push("","**".concat(n.summary,":** ").concat(e.summary)),s.join("\n")}(M,ek,ei)),J(!0),setTimeout(()=>J(!1),1500)}catch(e){eo(e instanceof Error?e.message:String(e))}}async function ew(){if(!M)return;let e={};await Promise.all(M.steps.filter(e=>e.screenshot).map(async t=>{try{let n=await (await fetch(t.screenshot)).blob();e[t.num]=await new Promise((e,t)=>{let s=new FileReader;s.onload=()=>e(String(s.result)),s.onerror=()=>t(s.error),s.readAsDataURL(n)})}catch(e){}}));let t=function(e,t,n,s){let a="passed"===e.status?es.pass:es.fail,r=Y(e.steps).map(e=>"".concat(e.title?"<h2>".concat(en(e.title),"</h2>"):"","<ol>").concat(e.steps.map((e,t)=>((e,t)=>{var a,r,o,c;let l="fail"===e.status||"warn"===e.status,i=[];l&&e.expected&&i.push("<dt>".concat(en(n.expected),"</dt><dd>").concat(en(e.expected),"</dd>")),l&&e.evidence&&i.push("<dt>".concat(en(n.actual),'</dt><dd style="color:').concat(es[e.status],'">').concat(en(e.evidence),"</dd>"));let d=(!l&&e.evidence?'<p class="ev">'.concat(en(e.evidence),"</p>"):"")+(e.mockUnverified?'<p class="ev" style="color:'.concat(es.warn,'">⚠ ').concat(en(n.mockUnverified),"</p>"):"");(null==(a=e.consoleErrors)?void 0:a.length)&&i.push("<dt>".concat(en(n.consoleErrors),"</dt><dd>").concat(e.consoleErrors.map(en).join("<br>"),"</dd>"));let u=s[e.num]?'<img src="'.concat(s[e.num],'" alt="').concat(en(n.reportScreenshot)," ").concat(t,'">'):"";return'<li class="step" style="border-left-color:'.concat(null!=(r=es[e.status])?r:"#6b7280",'">\n <div class="head"><span class="badge" style="color:').concat(null!=(o=es[e.status])?o:"#6b7280",'">').concat(en((null!=(c=n.stepStatus[e.status])?c:e.status).toUpperCase()),'</span><span class="num">').concat(String(t).padStart(2,"0"),"</span>").concat(en(e.description),"</div>\n ").concat(d).concat(i.length?"<dl>".concat(i.join(""),"</dl>"):"","\n ").concat(u,"\n</li>")})(e,t+1)).join(""),"</ol>")).join("");return'<!doctype html>\n<html lang="'.concat(e.language,'">\n<head>\n<meta charset="utf-8">\n<meta name="viewport" content="width=device-width, initial-scale=1">\n<title>').concat(en(e.title)," — ").concat(en(n.reportTitle),'</title>\n<style>\n body { font: 14px/1.55 -apple-system, "Segoe UI", Roboto, sans-serif; color: #111827; background: #fff; max-width: 860px; margin: 0 auto; padding: 32px 20px 64px; }\n h1 { font-size: 20px; margin: 0 0 6px; overflow-wrap: anywhere; }\n h2 { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: #6b7280; margin: 28px 0 8px; }\n .meta { color: #4b5563; font-size: 13px; }\n .verdict { font-weight: 700; }\n ol { list-style: none; margin: 0; padding: 0; }\n .step { border: 1px solid #e5e7eb; border-left-width: 3px; border-radius: 8px; padding: 10px 14px; margin: 8px 0; break-inside: avoid; }\n .head { overflow-wrap: anywhere; }\n .badge { font-size: 11px; font-weight: 700; letter-spacing: .06em; margin-right: 8px; }\n .num { color: #9ca3af; font-family: ui-monospace, Menlo, monospace; font-size: 12px; margin-right: 8px; }\n dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 8px 0 0; font-size: 12.5px; }\n dt { color: #6b7280; }\n .ev { margin: 6px 0 0; font: 12.5px/1.5 ui-monospace, Menlo, monospace; color: #374151; overflow-wrap: anywhere; }\n dd { margin: 0; font-family: ui-monospace, Menlo, monospace; overflow-wrap: anywhere; }\n img { display: block; max-width: 100%; margin-top: 10px; border: 1px solid #e5e7eb; border-radius: 6px; }\n .summary, pre { border: 1px solid #e5e7eb; border-radius: 8px; padding: 12px 14px; margin-top: 20px; }\n pre { white-space: pre-wrap; overflow-wrap: anywhere; font: 12px/1.5 ui-monospace, Menlo, monospace; color: #374151; }\n</style>\n</head>\n<body>\n<h1>').concat(en(e.title),'</h1>\n<p class="meta"><span class="verdict" style="color:').concat(a,'">').concat(en(et(e,n).toUpperCase()),"</span> — ").concat(en(ee(e,n))," \xb7 ").concat(en(n.reportDuration),": ").concat(en((0,E.a)(t))," \xb7 ").concat(en(new Date(e.createdAt).toLocaleString()),"</p>\n").concat(r,"\n").concat(e.summary?'<div class="summary"><h2 style="margin-top:0">'.concat(en(n.summary),"</h2>").concat(en(e.summary),"</div>"):"","\n<h2>").concat(en(n.testCase),"</h2>\n<pre>").concat(en(e.testCase),"</pre>\n</body>\n</html>")}(M,ek,ei,e),n=URL.createObjectURL(new Blob([t],{type:"text/html;charset=utf-8"})),s=document.createElement("a");s.href=n,s.download="qpilot-".concat(M.id,".html"),s.click(),URL.revokeObjectURL(n)}async function eN(){if(M){G(!0),eo(null);try{let e=await fetch("/api/run",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({testCase:M.testCase,headless:M.headless})}),t=await e.json();if(!e.ok)throw Error(t.error||"HTTP ".concat(e.status));C.push("/run/".concat(t.id))}catch(e){eo(e instanceof Error?e.message:String(e)),G(!1)}}}let ey=ef&&null!=(N=null==(t=ep.find(e=>"queued"===e.status))?void 0:t.num)?N:null;(0,a.useEffect)(()=>{if(!ef)return;let e=setInterval(()=>B(Date.now()),1e3);return()=>clearInterval(e)},[ef]),(0,a.useEffect)(()=>((0,k.O)(ed),()=>{(0,k.g)()}),[ed]),(0,a.useEffect)(()=>{if(!(null==M?void 0:M.title))return;let e=document.title;return document.title=M.title,()=>{document.title=e}},[null==M?void 0:M.title]),(0,a.useEffect)(()=>{var e;null!=ey&&(null==(e=document.getElementById("step-".concat(ey)))||e.scrollIntoView({behavior:"smooth",block:"center"}))},[ey]);let ek=M?(null!=D?D:I)-M.createdAt:0,eS=ep.filter(e=>"queued"!==e.status).length,ez=ep.length?eS/ep.length*100:0,eA=[];for(let e of ep){let t=eA[eA.length-1];t&&t.title===e.group?t.steps.push(e):eA.push({title:e.group,steps:[e]})}return U?(0,s.jsxs)("main",{className:"flex flex-col items-center justify-center min-h-screen px-6 text-center",children:[(0,s.jsx)("p",{className:"text-6xl font-semibold text-faint mb-4",children:"404"}),(0,s.jsx)("p",{className:"text-sm text-muted-foreground mb-6",children:ei.notFound}),(0,s.jsxs)(o(),{href:"/",className:"inline-flex items-center gap-1.5 text-sm text-foreground/75 hover:text-foreground transition-colors",children:[(0,s.jsx)(l.A,{className:"size-3.5"}),ei.newRun]})]}):(0,s.jsxs)("main",{className:"mx-auto max-w-2xl px-6 pt-10 pb-24",children:[(0,s.jsxs)(o(),{href:"/",className:"inline-flex items-center gap-1.5 text-xs text-muted-foreground hover:text-foreground transition-colors mb-8",children:[(0,s.jsx)(l.A,{className:"size-3.5"}),ei.back]}),(0,s.jsxs)("section",{className:"mb-8",children:[(0,s.jsx)(ec,{status:ed,t:ei}),(0,s.jsx)("h1",{className:"text-lg font-semibold tracking-tight mt-5 break-words text-foreground/90",children:null!=(y=null==M?void 0:M.title)?y:A}),M&&(0,s.jsxs)("div",{className:"flex items-center justify-between gap-3 mt-1.5",children:[(0,s.jsx)("p",{className:"text-xs text-muted-foreground font-mono",children:ep.length>0?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("span",{className:"text-foreground/75",children:[eS,"/",ep.length," ",ei.steps]}),em>0&&(0,s.jsxs)("span",{className:"text-success ml-2",children:["\xb7 ",em," ",ei.passedCount]}),eh>0&&(0,s.jsxs)("span",{className:"text-warning ml-2",children:["\xb7 ",eh," ",ei.warnCount]}),eg>0&&(0,s.jsxs)("span",{className:"text-destructive ml-2",children:["\xb7 ",eg," ",ei.failedCount]})]}):(0,s.jsx)("span",{className:"text-subtle",children:eb?ei.waitingForPlan:ei.noSteps})}),(0,s.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:[eb&&(0,s.jsx)(q.$,{variant:"ghost",size:"sm",onClick:ev,disabled:$||"waiting"===ed,className:"h-7 px-2 text-muted-foreground hover:text-foreground",children:"paused"===ed?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(i.A,{className:"size-3.5 mr-1"}),ei.resume]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(d.A,{className:"size-3.5 mr-1"}),ei.pause]})}),(0,s.jsxs)("span",{className:"inline-flex items-center gap-1 text-xs text-muted-foreground font-mono tabular-nums",children:[(0,s.jsx)(u.A,{className:"size-3"}),(0,E.a)(ek)]})]})]}),ep.length>0&&(0,s.jsx)("div",{className:"relative mt-3 h-[3px] rounded-full bg-surface-hover overflow-hidden",children:(0,s.jsx)("div",{className:(0,E.cn)("absolute inset-y-0 left-0 rounded-full transition-all duration-700 ease-out","failed"===ed||"error"===ed?"bg-destructive":"bg-success"),style:{width:"".concat(ez,"%")}})}),M&&!eb&&(0,s.jsxs)("div",{className:"mt-4 flex flex-wrap items-center gap-1.5",children:[0===M.attachments.length&&(0,s.jsxs)(q.$,{size:"sm",onClick:eN,disabled:V,className:"gap-1.5",children:[(0,s.jsx)(p.A,{className:(0,E.cn)("size-3.5",V&&"animate-spin")}),ei.runAgain]}),(0,s.jsxs)(q.$,{size:"sm",variant:"outline",onClick:function(){if(M){try{sessionStorage.setItem("qpilot:prefill",M.testCase)}catch(e){}C.push("/")}},className:"gap-1.5",children:[(0,s.jsx)(x.A,{className:"size-3.5"}),ei.editAndRun]}),ep.length>0&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(q.$,{size:"sm",variant:"outline",onClick:ej,className:"gap-1.5 sm:ml-auto",children:[W?(0,s.jsx)(m.A,{className:"size-3.5 text-success"}):(0,s.jsx)(g.A,{className:"size-3.5"}),W?ei.copied:ei.copyReport]}),(0,s.jsxs)(q.$,{size:"sm",variant:"outline",onClick:ew,className:"gap-1.5",children:[(0,s.jsx)(h.A,{className:"size-3.5"}),ei.downloadReport]})]})]}),ea&&(0,s.jsx)("p",{className:"mt-2 text-xs text-destructive",children:ea})]}),(0,s.jsxs)("section",{className:"space-y-2",children:[0===ep.length&&(eb?(0,s.jsxs)("div",{className:"flex flex-col items-center justify-center py-16 text-center",children:[(0,s.jsx)(f.A,{className:"size-5 text-faint animate-spin mb-3"}),(0,s.jsx)("p",{className:"text-sm text-subtle",children:ei.waitingToStart})]}):(0,s.jsxs)("div",{className:"flex flex-col items-center justify-center py-16 text-center",children:[(0,s.jsx)(b.A,{className:"size-5 text-faint mb-3"}),(0,s.jsx)("p",{className:"text-sm text-subtle",children:ei.endedBeforePlan}),(0,s.jsx)("p",{className:"text-xs text-subtle mt-1",children:ei.seeReason})]})),eA.map((e,t)=>(0,s.jsxs)("div",{className:"space-y-2",children:[e.title&&(0,s.jsx)("div",{className:"pt-4 first:pt-0 text-[10.5px] font-semibold uppercase tracking-widest text-subtle",children:e.title}),e.steps.map((e,t)=>(0,s.jsx)("div",{id:"step-".concat(e.num),className:"scroll-mt-6",children:(0,s.jsx)(eu,{t:ei,step:e,displayNum:t+1,active:e.num===ey,events:R.filter(t=>t.stepNum===e.num)})},e.num))]},t))]}),(null==M?void 0:M.summary)&&(0,s.jsxs)("div",{className:"mt-6 rounded-xl border border-border bg-card/60 px-4 py-3",children:[(0,s.jsx)("div",{className:"text-[10px] font-semibold uppercase tracking-widest text-subtle mb-1.5",children:ei.summary}),(0,s.jsx)("div",{className:"text-sm leading-relaxed text-foreground/80",children:M.summary})]}),(null==M?void 0:M.testCase)&&(0,s.jsx)(K,{className:"mt-3",children:(0,s.jsxs)("div",{className:"rounded-xl border border-border bg-card/60 overflow-hidden",children:[(0,s.jsxs)(X,{className:"group w-full flex items-center justify-between px-4 py-3 hover:bg-surface transition-colors",children:[(0,s.jsx)("span",{className:"text-[10px] font-semibold uppercase tracking-widest text-subtle",children:ei.testCase}),(0,s.jsx)(v.A,{className:"size-3.5 text-faint group-data-open:hidden"}),(0,s.jsx)(j.A,{className:"size-3.5 text-faint hidden group-data-open:inline"})]}),(0,s.jsx)(Z,{children:(0,s.jsx)("pre",{className:"px-4 pb-4 text-[11.5px] font-mono leading-relaxed text-foreground/75 whitespace-pre-wrap break-words border-t border-border pt-3",children:M.testCase})})]})}),(null==M?void 0:M.attachments)&&M.attachments.length>0&&(0,s.jsxs)("div",{className:"mt-3 flex flex-wrap items-center gap-1.5",children:[(0,s.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-[10px] font-semibold uppercase tracking-widest text-subtle mr-1",children:[(0,s.jsx)(w.A,{className:"size-3"}),ei.attached]}),M.attachments.map(e=>{var t;return(0,s.jsxs)("span",{className:"inline-flex items-center gap-1.5 rounded-lg border border-border bg-surface px-2.5 py-1",children:[(0,s.jsx)("span",{className:"text-[11px] font-mono text-foreground/75 max-w-[200px] truncate",children:e.name}),(0,s.jsx)("span",{className:"text-[10px] tabular-nums text-subtle",children:(t=e.size)<1024?"".concat(t," B"):t<1048576?"".concat(Math.round(t/1024)," KB"):"".concat((t/1024/1024).toFixed(1)," MB")})]},e.name)})]}),("passed"===ed||"failed"===ed)&&(0,s.jsx)(er,{}),(0,s.jsx)(P,{open:!!(null==M?void 0:M.pending),children:(0,s.jsx)(L,{showCloseButton:!1,children:(null==M?void 0:M.pending)&&(0,s.jsx)(ex,{runId:A,question:M.pending,t:ei})})})]})}function er(){return(0,s.jsxs)("a",{href:"https://github.com/broxhq/qpilot",target:"_blank",rel:"noreferrer",className:"group mt-6 flex items-center gap-3 rounded-xl border border-border bg-card/60 px-4 py-3 transition-colors hover:border-warning/30 hover:bg-warning/[0.03]",children:[(0,s.jsx)(N.A,{className:"size-4 shrink-0 text-subtle transition-colors group-hover:text-warning group-hover:fill-warning"}),(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsxs)("div",{className:"text-sm text-foreground/80",children:["Did qpilot save you time?"," ",(0,s.jsx)("span",{className:"text-foreground/95 group-hover:text-warning transition-colors",children:"Star it on GitHub"})]}),(0,s.jsx)("div",{className:"text-xs text-subtle",children:"A ⭐ helps more people find it — takes two seconds."})]})]})}let eo={running:{icon:(0,s.jsx)(f.A,{className:"size-4 animate-spin"}),color:"text-foreground/75",bg:"bg-surface-hover",border:"border-border"},waiting:{icon:(0,s.jsx)(b.A,{className:"size-4"}),color:"text-warning",bg:"bg-warning/10",border:"border-warning/20"},paused:{icon:(0,s.jsx)(d.A,{className:"size-4"}),color:"text-foreground/75",bg:"bg-surface-hover",border:"border-border"},passed:{icon:(0,s.jsx)(m.A,{className:"size-4",strokeWidth:2.5}),color:"text-success",bg:"bg-success/10",border:"border-success/20"},failed:{icon:(0,s.jsx)(y.A,{className:"size-4",strokeWidth:2.5}),color:"text-destructive",bg:"bg-destructive/10",border:"border-destructive/20"},error:{icon:(0,s.jsx)(b.A,{className:"size-4"}),color:"text-destructive",bg:"bg-destructive/10",border:"border-destructive/20"}};function ec(e){var t,n;let{status:a,t:r}=e,o=null!=(t=eo[a])?t:eo.running,c=null!=(n=r.status[a])?n:r.status.running;return(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("div",{className:(0,E.cn)("flex items-center justify-center size-9 rounded-xl border transition-colors",o.bg,o.border,o.color),children:o.icon}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:(0,E.cn)("text-sm font-semibold tracking-tight",o.color),children:c.label}),(0,s.jsx)("div",{className:"text-xs text-muted-foreground",children:c.sub})]})]})}let el={queued:{border:"border-l-border-strong",badge:"bg-surface-hover text-subtle",bg:""},pass:{border:"border-l-success/60",badge:"bg-success/10 text-success",bg:""},warn:{border:"border-l-warning/60",badge:"bg-warning/10 text-warning",bg:""},fail:{border:"border-l-destructive/60",badge:"bg-destructive/10 text-destructive",bg:"bg-destructive/[0.03]"},skipped:{border:"border-l-border-strong",badge:"bg-surface text-faint",bg:""}},ei={border:"border-l-warning/80",badge:"bg-warning/10 text-warning",bg:"bg-warning/[0.03]"};function ed(e){if("action"===e.kind&&("report_step"===e.toolName||"finish"===e.toolName||"set_plan"===e.toolName))return!1;if("observation"===e.kind){var t;let n=null!=(t=e.text)?t:"";return n.startsWith("Error:")||n.startsWith("[debug]")}return!0}function eu(e){var t,n;let{step:r,events:o,active:c,displayNum:l,t:i}=e,d=null!=(t=el[r.status])?t:el.queued,u=c?{...d,...ei}:d,p=o.filter(ed),x=p.filter(e=>"thought"===e.kind).length,[m,g]=(0,a.useState)(!1),h=m?p:p.filter(e=>"thought"!==e.kind),b="fail"===r.status||"warn"===r.status,w=c||"fail"===r.status,[N,y]=(0,a.useState)(w);return(0,a.useEffect)(()=>y(w),[w]),(0,s.jsx)(K,{open:N,onOpenChange:y,children:(0,s.jsxs)("div",{className:(0,E.cn)("rounded-xl border border-border border-l-2 overflow-hidden transition-colors",u.border,u.bg),children:[(0,s.jsxs)(X,{className:"group w-full flex items-center gap-3 px-4 py-3 text-left hover:bg-surface transition-colors",children:[(0,s.jsx)(_,{className:(0,E.cn)("border-0 text-[9.5px] tracking-widest font-semibold shrink-0 gap-1 uppercase rounded-md px-1.5",u.badge),children:c?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(f.A,{className:"size-2.5 animate-spin"}),i.stepStatus.running]}):null!=(n=i.stepStatus[r.status])?n:r.status}),(0,s.jsxs)("span",{className:"flex-1 min-w-0 text-[13px] text-foreground/80",children:[(0,s.jsx)("span",{className:"text-subtle mr-2 font-mono text-[11px]",children:String(null!=l?l:r.num).padStart(2,"0")}),r.description]}),(0,s.jsx)(v.A,{className:"size-3.5 text-faint shrink-0 group-data-open:hidden"}),(0,s.jsx)(j.A,{className:"size-3.5 text-faint shrink-0 hidden group-data-open:inline"})]}),b&&r.expected?(0,s.jsxs)("dl",{className:"px-4 pb-3 -mt-0.5 grid grid-cols-[auto_1fr] gap-x-3 gap-y-1.5 text-[11.5px] leading-relaxed",children:[(0,s.jsx)("dt",{className:"text-subtle",children:i.expected}),(0,s.jsx)("dd",{className:"font-mono text-foreground/80",children:r.expected}),r.evidence&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("dt",{className:"text-subtle",children:i.actual}),(0,s.jsx)("dd",{className:(0,E.cn)("font-mono","fail"===r.status?"text-destructive":"text-warning"),children:r.evidence})]})]}):r.evidence&&(0,s.jsx)("div",{className:"px-4 pb-3 -mt-0.5 text-[11.5px] text-muted-foreground leading-relaxed font-mono",children:r.evidence}),r.mockUnverified&&(0,s.jsxs)("p",{className:"px-4 pb-3 -mt-1 text-[11px] leading-relaxed text-warning/90",children:["⚠ ",i.mockUnverified]}),r.consoleErrors&&r.consoleErrors.length>0&&(0,s.jsxs)("details",{className:"px-4 pb-3 -mt-1 text-[11px] text-warning/90",children:[(0,s.jsxs)("summary",{className:"cursor-pointer select-none",children:[i.consoleErrors,": ",r.consoleErrors.length]}),(0,s.jsx)("ul",{className:"mt-1.5 space-y-1 font-mono text-muted-foreground",children:r.consoleErrors.map((e,t)=>(0,s.jsx)("li",{className:"break-words",children:e},t))})]}),(0,s.jsx)(Z,{children:(0,s.jsxs)("div",{className:"px-4 pb-4 pt-3 space-y-3 border-t border-border",children:[r.screenshot&&(0,s.jsx)("a",{href:r.screenshot,target:"_blank",rel:"noreferrer",className:"block rounded-lg overflow-hidden border border-border hover:border-border-strong transition-colors",children:(0,s.jsx)("img",{src:r.screenshot,alt:"screenshot step ".concat(r.num),className:"max-h-64 w-full object-contain bg-surface"})}),h.length>0?(0,s.jsx)("div",{className:"space-y-0.5",children:h.map((e,t)=>(0,s.jsx)(ep,{event:e,t:i},t))}):0===x&&(0,s.jsx)("div",{className:"text-[11px] text-faint",children:i.noEvents}),x>0&&(0,s.jsx)("button",{type:"button",onClick:()=>g(e=>!e),className:"text-[11px] text-subtle hover:text-foreground transition-colors",children:m?i.hideReasoning:"".concat(i.showReasoning," (").concat(x,")")})]})})]})})}function ep(e){let{event:t,t:n}=e,{icon:a,text:r,cls:o}=function(e,t){var n,s,a,r,o,c,l,i,d,u,p,x,m,g;switch(e.kind){case"action":return{icon:"→",text:function(e,t){var n,s,a,r,o,c,l,i,d,u,p,x;let m=arguments.length>2&&void 0!==arguments[2]?arguments[2]:(0,S.jd)("en"),g=null!=t?t:{},h=m.action;switch(e){case"navigate":return"".concat(h.opening," ").concat(null!=(n=g.url)?n:"");case"snapshot":return g.near?"".concat(h.readingBlock,' "').concat(g.near,'"'):h.readingPage;case"click":return g.name?"".concat(h.clicking,' "').concat(g.name,'"'):h.clickingElement;case"fill":return g.name?"".concat(h.filling,' "').concat(g.name,'" → "').concat(null!=(s=g.value)?s:"",'"'):"".concat(h.filling,' "').concat(null!=(a=g.value)?a:"",'"');case"select":return g.name?"".concat(h.selecting,' "').concat(null!=(r=g.value)?r:"",'" — "').concat(g.name,'"'):"".concat(h.selecting,' "').concat(null!=(o=g.value)?o:"",'"');case"hover":return g.name?"".concat(h.hovering,' "').concat(g.name,'"'):h.hoveringElement;case"scroll_to":return"".concat(h.scrollingTo," ").concat(g.text?'"'.concat(g.text,'"'):null!=(c=g.ref)?c:"");case"scroll":{let e=[Number(g.y)?"".concat(Number(g.y)>0?h.down:h.up," ").concat(Math.abs(Number(g.y)),"px"):"",Number(g.x)?"".concat(Number(g.x)>0?h.right:h.left," ").concat(Math.abs(Number(g.x)),"px"):""].filter(Boolean).join(", "),t=g.ref?" ".concat(h.inside," ").concat(g.ref):"";return"".concat(h.scrolling," ").concat(e||"0px").concat(t)}case"press":return"".concat(h.pressing," ").concat(null!=(l=g.key)?l:"");case"upload_file":return"".concat(h.uploading,' "').concat(null!=(i=g.file)?i:"",'"').concat(g.name?" ".concat(h.to,' "').concat(g.name,'"'):"");case"dismiss":return h.closingOverlay;case"wait":return"".concat(h.waiting," ").concat(null!=(d=g.ms)?d:""," ms");case"ask_user":return h.askingUser;case"switch_tab":return"".concat(h.switchingTab," ").concat(null!=(u=g.index)?u:"");case"handle_dialog":return"".concat(h.nextDialog," ").concat("dismiss"===g.action?h.dialogDismiss:h.dialogAccept);case"mock_request":{let e=g.abort?h.mockAbort:void 0!==g.patch?h.mockPatch:void 0!==g.status||void 0!==g.body?String(null!=(p=g.status)?p:200):"",t=g.delay_ms?"".concat(h.mockDelay," ").concat(g.delay_ms," ms"):"",n="".concat(g.method?"".concat(g.method," "):"").concat(null!=(x=g.url)?x:"");return"".concat(h.mocking," ").concat(n," → ").concat([e,t].filter(Boolean).join(", "))}case"clear_mocks":return h.clearingMocks;case"set_offline":return!1===g.offline?h.goingOnline:h.goingOffline;case"get_requests":return g.url?"".concat(h.readingRequests,' "').concat(g.url,'"'):h.readingRequests;case"get_console":return h.readingConsole;default:return null!=e?e:"action"}}(e.toolName,e.toolInput,t),cls:"text-foreground/75"};case"step":{let o=null!=(a=null==(n=e.step)?void 0:n.status)?a:"",c="pass"===o?"text-success":"fail"===o?"text-destructive":"text-warning";return{icon:"pass"===o?"✓":"fail"===o?"✗":"!",text:"".concat(t.stepLabel," ").concat(null==(s=e.step)?void 0:s.num," — ").concat((null!=(r=t.stepStatus[o])?r:o).toUpperCase()),cls:c}}case"observation":{let t=null!=(o=e.text)?o:"";if(t.startsWith("Error:"))return{icon:"✗",text:t,cls:"text-destructive"};return{icon:"\xb7",text:t,cls:"text-subtle"}}case"info":{let n=e.info;return{icon:"•",text:n?"dialog"===n.type?"".concat(t.infoDialog," (").concat(n.dialog,"): \xab").concat(n.message,"\xbb — ").concat(n.accepted?t.infoAccepted:t.infoDismissed):"".concat("newTab"===n.type?t.infoNewTab:t.infoTabClosed,": ").concat(n.url):null!=(c=e.text)?c:"",cls:"text-warning/90"}}case"question":return{icon:"?",text:"".concat(t.asking,": ").concat(null!=(i=null==(l=e.question)?void 0:l.prompt)?i:""),cls:"text-warning"};case"answer":return{icon:"✎",text:t.userAnswered,cls:"text-foreground/75"};case"thought":return{icon:"›",text:null!=(d=e.text)?d:"",cls:"text-subtle italic"};case"done":return{icon:"■",text:"".concat(t.runFinished," — ").concat(null!=(m=null!=(x=null==(u=t.status[null!=(p=e.status)?p:""])?void 0:u.label)?x:e.status)?m:""),cls:"text-foreground/75"};case"error":return{icon:"✗",text:null!=(g=e.text)?g:"",cls:"text-destructive"};default:return{icon:"\xb7",text:"",cls:"text-faint"}}}(t,n),c=new Date(t.ts).toLocaleTimeString("en-US",{hour12:!1});return(0,s.jsxs)("div",{className:"flex gap-2.5 text-[11.5px] leading-relaxed items-baseline font-mono",children:[(0,s.jsx)("span",{className:"shrink-0 tabular-nums text-faint text-[10px]",children:c}),(0,s.jsx)("span",{className:(0,E.cn)("shrink-0 w-3.5 text-center",o),children:a}),(0,s.jsx)("span",{className:(0,E.cn)("min-w-0 break-words",o),children:r})]})}function ex(e){let{runId:t,question:n,t:r}=e,[o,c]=(0,a.useState)(""),[l,i]=(0,a.useState)(!1),[d,u]=(0,a.useState)(null);async function p(e){if(e.preventDefault(),o){i(!0),u(null);try{let e=await fetch("/api/run/".concat(t,"/answer"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({questionId:n.id,answer:o})});if(!e.ok){let t=await e.json().catch(()=>({}));throw Error(t.error||"HTTP ".concat(e.status))}c("")}catch(e){u(e instanceof Error?e.message:String(e)),i(!1)}}}return(0,s.jsxs)("form",{onSubmit:p,className:"space-y-4",children:[(0,s.jsx)($,{children:(0,s.jsxs)(H,{className:"flex items-center gap-2 text-base",children:[(0,s.jsx)(b.A,{className:"size-4 text-warning shrink-0"}),r.needInput]})}),(0,s.jsx)("p",{className:"text-sm text-muted-foreground leading-relaxed",children:n.prompt}),(0,s.jsx)(W.p,{autoFocus:!0,type:n.secret?"password":"text",value:o,onChange:e=>c(e.target.value),placeholder:n.secret?r.secretPlaceholder:r.answerPlaceholder,className:"font-mono"}),d&&(0,s.jsx)("p",{className:"text-destructive text-xs",children:d}),(0,s.jsx)(q.$,{type:"submit",disabled:!o||l,className:"w-full",children:l?r.sending:r.submit})]})}},9578:(e,t,n)=>{Promise.resolve().then(n.bind(n,8446))}},e=>{e.O(0,[628,777,576,677,441,255,358],()=>e(e.s=9578)),_N_E=e.O()}]);
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|