@open-mercato/cezar 0.1.5-pr506.357
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/README.md +573 -0
- package/dist/config.d.ts +144 -0
- package/dist/config.js +106 -0
- package/dist/config.js.map +1 -0
- package/dist/core/agent-runner.d.ts +169 -0
- package/dist/core/agent-runner.js +23 -0
- package/dist/core/agent-runner.js.map +1 -0
- package/dist/core/backend-detect.d.ts +16 -0
- package/dist/core/backend-detect.js +118 -0
- package/dist/core/backend-detect.js.map +1 -0
- package/dist/core/claude-cli-runner.d.ts +56 -0
- package/dist/core/claude-cli-runner.js +416 -0
- package/dist/core/claude-cli-runner.js.map +1 -0
- package/dist/core/claude-ui-mapper.d.ts +71 -0
- package/dist/core/claude-ui-mapper.js +567 -0
- package/dist/core/claude-ui-mapper.js.map +1 -0
- package/dist/core/codex-app-server-runner.d.ts +29 -0
- package/dist/core/codex-app-server-runner.js +489 -0
- package/dist/core/codex-app-server-runner.js.map +1 -0
- package/dist/core/codex-ui-mapper.d.ts +63 -0
- package/dist/core/codex-ui-mapper.js +491 -0
- package/dist/core/codex-ui-mapper.js.map +1 -0
- package/dist/core/ndjson.d.ts +6 -0
- package/dist/core/ndjson.js +23 -0
- package/dist/core/ndjson.js.map +1 -0
- package/dist/core/opencode-server-runner.d.ts +30 -0
- package/dist/core/opencode-server-runner.js +488 -0
- package/dist/core/opencode-server-runner.js.map +1 -0
- package/dist/core/opencode-ui-mapper.d.ts +105 -0
- package/dist/core/opencode-ui-mapper.js +588 -0
- package/dist/core/opencode-ui-mapper.js.map +1 -0
- package/dist/core/process-usage.d.ts +63 -0
- package/dist/core/process-usage.js +181 -0
- package/dist/core/process-usage.js.map +1 -0
- package/dist/core/runner-factory.d.ts +8 -0
- package/dist/core/runner-factory.js +22 -0
- package/dist/core/runner-factory.js.map +1 -0
- package/dist/core/tool-display.d.ts +30 -0
- package/dist/core/tool-display.js +156 -0
- package/dist/core/tool-display.js.map +1 -0
- package/dist/core/ui-events.d.ts +308 -0
- package/dist/core/ui-events.js +25 -0
- package/dist/core/ui-events.js.map +1 -0
- package/dist/core/usage.d.ts +11 -0
- package/dist/core/usage.js +15 -0
- package/dist/core/usage.js.map +1 -0
- package/dist/git-worktree.d.ts +88 -0
- package/dist/git-worktree.js +297 -0
- package/dist/git-worktree.js.map +1 -0
- package/dist/handoff.d.ts +62 -0
- package/dist/handoff.js +147 -0
- package/dist/handoff.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +466 -0
- package/dist/index.js.map +1 -0
- package/dist/install-as-command.d.ts +39 -0
- package/dist/install-as-command.js +51 -0
- package/dist/install-as-command.js.map +1 -0
- package/dist/pack-check.d.ts +17 -0
- package/dist/pack-check.js +27 -0
- package/dist/pack-check.js.map +1 -0
- package/dist/paths.d.ts +23 -0
- package/dist/paths.js +34 -0
- package/dist/paths.js.map +1 -0
- package/dist/planner.d.ts +17 -0
- package/dist/planner.js +248 -0
- package/dist/planner.js.map +1 -0
- package/dist/release/snapshot.d.ts +64 -0
- package/dist/release/snapshot.js +75 -0
- package/dist/release/snapshot.js.map +1 -0
- package/dist/release/stable.d.ts +46 -0
- package/dist/release/stable.js +57 -0
- package/dist/release/stable.js.map +1 -0
- package/dist/runs/auto-name.d.ts +75 -0
- package/dist/runs/auto-name.js +168 -0
- package/dist/runs/auto-name.js.map +1 -0
- package/dist/runs/retention.d.ts +60 -0
- package/dist/runs/retention.js +86 -0
- package/dist/runs/retention.js.map +1 -0
- package/dist/runs/review-gate.d.ts +18 -0
- package/dist/runs/review-gate.js +21 -0
- package/dist/runs/review-gate.js.map +1 -0
- package/dist/runs/store.d.ts +408 -0
- package/dist/runs/store.js +526 -0
- package/dist/runs/store.js.map +1 -0
- package/dist/runs/task-refs.d.ts +24 -0
- package/dist/runs/task-refs.js +74 -0
- package/dist/runs/task-refs.js.map +1 -0
- package/dist/runs/ui-event-sink.d.ts +81 -0
- package/dist/runs/ui-event-sink.js +210 -0
- package/dist/runs/ui-event-sink.js.map +1 -0
- package/dist/server/capabilities.d.ts +33 -0
- package/dist/server/capabilities.js +43 -0
- package/dist/server/capabilities.js.map +1 -0
- package/dist/server/forge/github.d.ts +70 -0
- package/dist/server/forge/github.js +375 -0
- package/dist/server/forge/github.js.map +1 -0
- package/dist/server/forge/index.d.ts +24 -0
- package/dist/server/forge/index.js +45 -0
- package/dist/server/forge/index.js.map +1 -0
- package/dist/server/forge/types.d.ts +80 -0
- package/dist/server/forge/types.js +2 -0
- package/dist/server/forge/types.js.map +1 -0
- package/dist/server/git-changes.d.ts +195 -0
- package/dist/server/git-changes.js +497 -0
- package/dist/server/git-changes.js.map +1 -0
- package/dist/server/git.d.ts +26 -0
- package/dist/server/git.js +103 -0
- package/dist/server/git.js.map +1 -0
- package/dist/server/github.d.ts +8 -0
- package/dist/server/github.js +8 -0
- package/dist/server/github.js.map +1 -0
- package/dist/server/launch-key.d.ts +7 -0
- package/dist/server/launch-key.js +33 -0
- package/dist/server/launch-key.js.map +1 -0
- package/dist/server/open-in-app.d.ts +51 -0
- package/dist/server/open-in-app.js +189 -0
- package/dist/server/open-in-app.js.map +1 -0
- package/dist/server/open-in-terminal.d.ts +25 -0
- package/dist/server/open-in-terminal.js +120 -0
- package/dist/server/open-in-terminal.js.map +1 -0
- package/dist/server/pr.d.ts +7 -0
- package/dist/server/pr.js +7 -0
- package/dist/server/pr.js.map +1 -0
- package/dist/server/server.d.ts +41 -0
- package/dist/server/server.js +1390 -0
- package/dist/server/server.js.map +1 -0
- package/dist/server/static-ui.d.ts +49 -0
- package/dist/server/static-ui.js +92 -0
- package/dist/server/static-ui.js.map +1 -0
- package/dist/server/wsl.d.ts +25 -0
- package/dist/server/wsl.js +92 -0
- package/dist/server/wsl.js.map +1 -0
- package/dist/server-install/engine.d.ts +33 -0
- package/dist/server-install/engine.js +314 -0
- package/dist/server-install/engine.js.map +1 -0
- package/dist/server-install/platforms/macosx-ngrok.d.ts +6 -0
- package/dist/server-install/platforms/macosx-ngrok.js +345 -0
- package/dist/server-install/platforms/macosx-ngrok.js.map +1 -0
- package/dist/server-install/platforms/ubuntu-vps.d.ts +39 -0
- package/dist/server-install/platforms/ubuntu-vps.js +746 -0
- package/dist/server-install/platforms/ubuntu-vps.js.map +1 -0
- package/dist/server-install/state.d.ts +26 -0
- package/dist/server-install/state.js +125 -0
- package/dist/server-install/state.js.map +1 -0
- package/dist/server-install/steps.d.ts +109 -0
- package/dist/server-install/steps.js +330 -0
- package/dist/server-install/steps.js.map +1 -0
- package/dist/server-install/strategies.d.ts +4 -0
- package/dist/server-install/strategies.js +20 -0
- package/dist/server-install/strategies.js.map +1 -0
- package/dist/server-install/types.d.ts +597 -0
- package/dist/server-install/types.js +98 -0
- package/dist/server-install/types.js.map +1 -0
- package/dist/server-install/ui.d.ts +42 -0
- package/dist/server-install/ui.js +130 -0
- package/dist/server-install/ui.js.map +1 -0
- package/dist/skills-banner.d.ts +21 -0
- package/dist/skills-banner.js +40 -0
- package/dist/skills-banner.js.map +1 -0
- package/dist/skills-remote.d.ts +35 -0
- package/dist/skills-remote.js +266 -0
- package/dist/skills-remote.js.map +1 -0
- package/dist/skills.d.ts +45 -0
- package/dist/skills.js +182 -0
- package/dist/skills.js.map +1 -0
- package/dist/todos.d.ts +63 -0
- package/dist/todos.js +168 -0
- package/dist/todos.js.map +1 -0
- package/dist/ui-state.d.ts +12 -0
- package/dist/ui-state.js +25 -0
- package/dist/ui-state.js.map +1 -0
- package/dist/update-check.d.ts +12 -0
- package/dist/update-check.js +41 -0
- package/dist/update-check.js.map +1 -0
- package/dist/workflows/load.d.ts +15 -0
- package/dist/workflows/load.js +56 -0
- package/dist/workflows/load.js.map +1 -0
- package/dist/workflows/run.d.ts +281 -0
- package/dist/workflows/run.js +1511 -0
- package/dist/workflows/run.js.map +1 -0
- package/dist/workflows/types.d.ts +307 -0
- package/dist/workflows/types.js +171 -0
- package/dist/workflows/types.js.map +1 -0
- package/package.json +90 -0
- package/scripts/check-pack.mjs +46 -0
- package/scripts/dev.mjs +74 -0
- package/scripts/install-as-command.mjs +120 -0
- package/scripts/mock-claude.mjs +310 -0
- package/scripts/release-snapshot.mjs +130 -0
- package/scripts/release.mjs +119 -0
- package/scripts/test-process-usage.mjs +47 -0
- package/web/dist/assets/arrow-left-BE957rJs.js +1 -0
- package/web/dist/assets/bundle-mjs-DLPpRFyl.js +1 -0
- package/web/dist/assets/centered-state-BddhEEtO.js +43 -0
- package/web/dist/assets/chunk-BO2N2NFS-f5igTtpB.js +131 -0
- package/web/dist/assets/command-CjhFbABo.js +1 -0
- package/web/dist/assets/compare-variants-Cs52IAEG.js +1 -0
- package/web/dist/assets/core-BuMqAF_1.js +12 -0
- package/web/dist/assets/css-BsVw1vtW.js +1 -0
- package/web/dist/assets/dialog-DFvXTkFv.js +1 -0
- package/web/dist/assets/diff-view-C9b8AITq.js +4 -0
- package/web/dist/assets/diff-woXpYk--.js +1 -0
- package/web/dist/assets/dist-FBs4wmIY.js +1 -0
- package/web/dist/assets/dist-o_kVMXjg.js +1 -0
- package/web/dist/assets/engine-javascript-FQvzRocB.js +141 -0
- package/web/dist/assets/file-BVuztAOd.js +1 -0
- package/web/dist/assets/folder-0pJ1NZ_S.js +1 -0
- package/web/dist/assets/git-pull-request-DJkAMT0f.js +1 -0
- package/web/dist/assets/git-toolbar-CwhQdx3J.js +1 -0
- package/web/dist/assets/github-D0rAX4-r.js +1 -0
- package/web/dist/assets/go-rLFTqkRN.js +1 -0
- package/web/dist/assets/highlighted-body-OFNGDK62-DGHHie_q.js +1 -0
- package/web/dist/assets/highlighter-BKVEsACy.js +3 -0
- package/web/dist/assets/html-BY76lXLH.js +1 -0
- package/web/dist/assets/index-CEkI7QxN.css +2 -0
- package/web/dist/assets/index-CO2lH2et.js +11 -0
- package/web/dist/assets/inter-latin-ext-wght-normal-DO1Apj_S.woff2 +0 -0
- package/web/dist/assets/inter-latin-wght-normal-Dx4kXJAl.woff2 +0 -0
- package/web/dist/assets/javascript-BgS3c2Ky.js +1 -0
- package/web/dist/assets/jetbrains-mono-latin-ext-wght-normal-DBQx-q_a.woff2 +0 -0
- package/web/dist/assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2 +0 -0
- package/web/dist/assets/json-qhed-kSA.js +1 -0
- package/web/dist/assets/jsonc-CYpm1nAK.js +1 -0
- package/web/dist/assets/jsx-Bz0zcwM4.js +1 -0
- package/web/dist/assets/lib-CNGa3Dig.js +1 -0
- package/web/dist/assets/loader-circle-BV3DO9mE.js +1 -0
- package/web/dist/assets/markdown-BYOwaDjH.js +1 -0
- package/web/dist/assets/markdown-D4-ADgH9.js +1 -0
- package/web/dist/assets/mermaid-GHXKKRXX-DM2VsGBG.js +1 -0
- package/web/dist/assets/open-mercato-toBr6SOa.svg +11 -0
- package/web/dist/assets/prompt-templates-C7ptKvDd.js +15 -0
- package/web/dist/assets/python-gzcpVVnB.js +1 -0
- package/web/dist/assets/react-dom-Ddtik4qM.js +1 -0
- package/web/dist/assets/refresh-cw-DCa-Rlwz.js +1 -0
- package/web/dist/assets/repo-git-DIhryGDx.js +1 -0
- package/web/dist/assets/run-diff-Dyow8B1q.js +3 -0
- package/web/dist/assets/run-header-jx9-18b8.js +1 -0
- package/web/dist/assets/rust-Cfkwpbl8.js +1 -0
- package/web/dist/assets/search-x-CoCyl7zT.js +1 -0
- package/web/dist/assets/shellscript-CLZ0U2zV.js +1 -0
- package/web/dist/assets/skill-detail-DB7x_FQp.js +1 -0
- package/web/dist/assets/skills-98vCroU8.js +1 -0
- package/web/dist/assets/skills-BKIoqD6K.js +1 -0
- package/web/dist/assets/sql-BsFa4tDR.js +1 -0
- package/web/dist/assets/square-terminal-B6PZX4Qp.js +1 -0
- package/web/dist/assets/tab-link-C5--YMQd.js +1 -0
- package/web/dist/assets/task-changes-ejxPGVJw.js +1 -0
- package/web/dist/assets/task-commits-C6GO5qT-.js +1 -0
- package/web/dist/assets/task-files-CatpCBXa.js +2 -0
- package/web/dist/assets/task-thread-BMbXDM3d.js +5 -0
- package/web/dist/assets/tasks-table-dgezlCcg.js +1 -0
- package/web/dist/assets/trash-2-CDtxmmc8.js +1 -0
- package/web/dist/assets/triangle-alert-6su4Js5O.js +1 -0
- package/web/dist/assets/tsx-udAQXfEw.js +1 -0
- package/web/dist/assets/typescript-bsJCZSQ-.js +1 -0
- package/web/dist/assets/upload-Bp7hQxll.js +1 -0
- package/web/dist/assets/use-desktop-CvTwojOJ.js +3 -0
- package/web/dist/assets/utils-rQGbOrwc.js +1 -0
- package/web/dist/assets/workflows-Dy2c6790.js +11 -0
- package/web/dist/assets/x-Br_jIDBw.js +1 -0
- package/web/dist/assets/yaml-rwi0_p6S.js +1 -0
- package/web/dist/index.html +70 -0
- package/web/open-mercato.svg +11 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,l as t,o as n}from"./bundle-mjs-DLPpRFyl.js";import{Bt as r,D as i,G as a,Ht as o,Lt as s,N as c,P as l,Q as u,W as d,a as f,ct as ee,et as te,ht as ne,i as p,j as re,mt as ie,rt as m,tt as ae,ut as oe}from"./centered-state-BddhEEtO.js";import{n as h,t as g}from"./utils-rQGbOrwc.js";import{n as _,t as se}from"./loader-circle-BV3DO9mE.js";import{n as v,t as y}from"./trash-2-CDtxmmc8.js";import{n as b,t as x}from"./folder-0pJ1NZ_S.js";import{n as S,t as C}from"./tab-link-C5--YMQd.js";import{t as w}from"./square-terminal-B6PZX4Qp.js";import{_ as ce,a as le,h as T,m as ue,u as de}from"./tasks-table-dgezlCcg.js";import{n as fe,t as pe}from"./markdown-D4-ADgH9.js";import{A as E,B as me,D,E as O,H as k,I as A,L as he,M as j,N as M,O as N,T as P,W as F,_ as I,d as L,f as R,g as ge,h as _e,j as ve,k as z,m as ye,n as be,p as xe,r as Se,t as Ce,v as we}from"./index-CO2lH2et.js";var B=h(`archive-restore`,[[`rect`,{width:`20`,height:`5`,x:`2`,y:`3`,rx:`1`,key:`1wp1u1`}],[`path`,{d:`M4 8v11a2 2 0 0 0 2 2h2`,key:`tvwodi`}],[`path`,{d:`M20 8v11a2 2 0 0 1-2 2h-2`,key:`1gkqxj`}],[`path`,{d:`m9 15 3-3 3 3`,key:`1pd0qc`}],[`path`,{d:`M12 12v9`,key:`192myk`}]]),Te=h(`boxes`,[[`path`,{d:`M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z`,key:`lc1i9w`}],[`path`,{d:`m7 16.5-4.74-2.85`,key:`1o9zyk`}],[`path`,{d:`m7 16.5 5-3`,key:`va8pkn`}],[`path`,{d:`M7 16.5v5.17`,key:`jnp8gn`}],[`path`,{d:`M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z`,key:`8zsnat`}],[`path`,{d:`m17 16.5-5-3`,key:`8arw3v`}],[`path`,{d:`m17 16.5 4.74-2.85`,key:`8rfmw`}],[`path`,{d:`M17 16.5v5.17`,key:`k6z78m`}],[`path`,{d:`M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z`,key:`1xygjf`}],[`path`,{d:`M12 8 7.26 5.15`,key:`1vbdud`}],[`path`,{d:`m12 8 4.74-2.85`,key:`3rx089`}],[`path`,{d:`M12 13.5V8`,key:`1io7kd`}]]),Ee=h(`braces`,[[`path`,{d:`M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1`,key:`ezmyqa`}],[`path`,{d:`M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1`,key:`e1hn23`}]]),De=h(`circle-check`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),V=h(`circle-stop`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`rect`,{x:`9`,y:`9`,width:`6`,height:`6`,rx:`1`,key:`1ssd4o`}]]),Oe=h(`circle-x`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]]),ke=h(`code`,[[`path`,{d:`m16 18 6-6-6-6`,key:`eg8j8`}],[`path`,{d:`m8 6-6 6 6 6`,key:`ppft3o`}]]),Ae=h(`cpu`,[[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M17 20v2`,key:`1rnc9c`}],[`path`,{d:`M17 2v2`,key:`11trls`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M2 17h2`,key:`7oei6x`}],[`path`,{d:`M2 7h2`,key:`asdhe0`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`M20 17h2`,key:`1fpfkl`}],[`path`,{d:`M20 7h2`,key:`1o8tra`}],[`path`,{d:`M7 20v2`,key:`4gnj0m`}],[`path`,{d:`M7 2v2`,key:`1i4yhu`}],[`rect`,{x:`4`,y:`4`,width:`16`,height:`16`,rx:`2`,key:`1vbyd7`}],[`rect`,{x:`8`,y:`8`,width:`8`,height:`8`,rx:`1`,key:`z9xiuo`}]]),je=h(`diamond`,[[`path`,{d:`M2.7 10.3a2.41 2.41 0 0 0 0 3.41l7.59 7.59a2.41 2.41 0 0 0 3.41 0l7.59-7.59a2.41 2.41 0 0 0 0-3.41l-7.59-7.59a2.41 2.41 0 0 0-3.41 0Z`,key:`1f1r0c`}]]),Me=h(`feather`,[[`path`,{d:`M12.67 19a2 2 0 0 0 1.416-.588l6.154-6.172a6 6 0 0 0-8.49-8.49L5.586 9.914A2 2 0 0 0 5 11.328V18a1 1 0 0 0 1 1z`,key:`18jl4k`}],[`path`,{d:`M16 8 2 22`,key:`vp34q`}],[`path`,{d:`M17.5 15H9`,key:`1oz8nu`}]]),H=h(`file-text`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]),Ne=h(`gem`,[[`path`,{d:`M10.5 3 8 9l4 13 4-13-2.5-6`,key:`b3dvk1`}],[`path`,{d:`M17 3a2 2 0 0 1 1.6.8l3 4a2 2 0 0 1 .013 2.382l-7.99 10.986a2 2 0 0 1-3.247 0l-7.99-10.986A2 2 0 0 1 2.4 7.8l2.998-3.997A2 2 0 0 1 7 3z`,key:`7w4byz`}],[`path`,{d:`M2 9h20`,key:`16fsjt`}]]),U=h(`globe`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]),Pe=h(`hammer`,[[`path`,{d:`m15 12-9.373 9.373a1 1 0 0 1-3.001-3L12 9`,key:`1hayfq`}],[`path`,{d:`m18 15 4-4`,key:`16gjal`}],[`path`,{d:`m21.5 11.5-1.914-1.914A2 2 0 0 1 19 8.172v-.344a2 2 0 0 0-.586-1.414l-1.657-1.657A6 6 0 0 0 12.516 3H9l1.243 1.243A6 6 0 0 1 12 8.485V10l2 2h1.172a2 2 0 0 1 1.414.586L18.5 14.5`,key:`15ts47`}]]),Fe=h(`hexagon`,[[`path`,{d:`M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z`,key:`yt0hxn`}]]),Ie=h(`mouse-pointer-2`,[[`path`,{d:`M4.037 4.688a.495.495 0 0 1 .651-.651l16 6.5a.5.5 0 0 1-.063.947l-6.124 1.58a2 2 0 0 0-1.438 1.435l-1.579 6.126a.5.5 0 0 1-.947.063z`,key:`edeuup`}]]),Le=h(`rocket`,[[`path`,{d:`M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5`,key:`qeys4`}],[`path`,{d:`M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09`,key:`u4xsad`}],[`path`,{d:`M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z`,key:`676m9`}],[`path`,{d:`M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05`,key:`92ym6u`}]]),Re=h(`shapes`,[[`path`,{d:`M8.3 10a.7.7 0 0 1-.626-1.079L11.4 3a.7.7 0 0 1 1.198-.043L16.3 8.9a.7.7 0 0 1-.572 1.1Z`,key:`1bo67w`}],[`rect`,{x:`3`,y:`14`,width:`7`,height:`7`,rx:`1`,key:`1bkyp8`}],[`circle`,{cx:`17.5`,cy:`17.5`,r:`3.5`,key:`w3z12y`}]]),ze=h(`smartphone`,[[`rect`,{width:`14`,height:`20`,x:`5`,y:`2`,rx:`2`,ry:`2`,key:`1yt0o3`}],[`path`,{d:`M12 18h.01`,key:`mhygvu`}]]),Be=h(`waves-horizontal`,[[`path`,{d:`M2 12q2.5 2 5 0t5 0 5 0 5 0`,key:`8ddzzs`}],[`path`,{d:`M2 19q2.5 2 5 0t5 0 5 0 5 0`,key:`1wj4st`}],[`path`,{d:`M2 5q2.5 2 5 0t5 0 5 0 5 0`,key:`69x50u`}]]),W=t(n(),1);function G(e){return e===`running`||e===`queued`||e===`waiting`}function K(e){return[...e.steps].reverse().find(e=>e.sessionId)?.sessionId}function Ve(e,t){switch(e){case`codex`:return`codex resume ${t}`;case`opencode`:return`opencode --session ${t}`;default:return`claude --resume ${t}`}}function He(e){if(G(e.status))return;let t=K(e);if(t===void 0)return;let n=Ve(e.runner,t);return e.worktreePath?`cd ${e.worktreePath} && ${n}`:n}function q(e){let t=G(e.status),n=K(e)!==void 0;return{finish:e.status===`waiting`||e.status===`review`,continueRun:!t&&n,terminal:!t&&n,notes:!0,archive:!t,cancel:t,deleteRun:!t}}function J(e){return e===`review`?`Accept the changes without a PR`:`Close the session`}function Ue(e,t){let n=e.filter(e=>!e.archived&&e.status===`queued`).sort((e,t)=>e.createdAt.localeCompare(t.createdAt)).findIndex(e=>e.id===t);return n>=0?n+1:void 0}var Y=e();function X(e){switch(e){case`done`:return`done`;case`running`:case`waiting`:case`review`:return`active`;case`failed`:case`cancelled`:return`failed`;case`pending`:case`skipped`:return`pending`}}function We(e){if(e.length===0)return 0;let t=new Set([`done`,`failed`,`cancelled`,`skipped`]),n=new Set([`running`,`waiting`,`review`]),r=0;for(let i of e)t.has(i.status)?r+=1:n.has(i.status)&&(r+=.5);return r/e.length}function Ge({steps:e}){if(e.length===0)return null;let t=We(e)*100;return(0,Y.jsxs)(`div`,{"data-slot":`step-rail`,className:`flex min-w-0 flex-col gap-1`,children:[e.map((t,n)=>(0,Y.jsxs)(`div`,{"data-slot":`step-row`,"data-visual":X(t.status),className:`flex min-h-[22px] min-w-0 items-center gap-2 text-[13px] text-muted-foreground`,children:[(0,Y.jsx)(Ke,{visual:X(t.status)}),(0,Y.jsx)(`span`,{className:`min-w-0 truncate font-medium text-foreground`,children:t.name}),t.iterations>1?(0,Y.jsxs)(`span`,{"data-slot":`step-iterations`,className:`shrink-0 text-xs text-soft-foreground tabular-nums`,children:[`×`,t.iterations]}):null,(0,Y.jsxs)(`span`,{className:`ml-auto shrink-0 pl-2 text-[11.5px] text-soft-foreground tabular-nums`,children:[t.kind,` · step `,n+1,` of `,e.length]})]},t.id)),(0,Y.jsx)(`div`,{"data-slot":`step-progress`,className:`mt-1 h-0.5 overflow-hidden rounded-full bg-muted`,children:(0,Y.jsx)(`div`,{className:`h-full rounded-full bg-pending`,style:{width:`${t}%`}})})]})}function Ke({visual:e}){let t=`size-[13px] shrink-0`;switch(e){case`done`:return(0,Y.jsx)(De,{"aria-hidden":!0,className:g(t,`text-success`)});case`active`:return(0,Y.jsx)(se,{role:`status`,"aria-label":`Step running`,className:g(t,`animate-spin stroke-pending motion-reduce:animate-none`)});case`failed`:return(0,Y.jsx)(Oe,{"aria-hidden":!0,className:g(t,`text-danger`)});case`pending`:return(0,Y.jsx)(me,{"aria-hidden":!0,className:g(t,`text-soft-foreground`)})}}function Z(e){let t=o();return r({mutationFn:()=>oe(e),onSuccess:()=>t.invalidateQueries({queryKey:i.runs.all}),onError:e=>p(e.message,{tone:`danger`})})}function qe({run:e,planTally:t,tab:n=`session`}){let r=ce(e),i=q(e),o=He(e),[s,c]=(0,W.useState)(!1),l=Ze(e),u=a(),d=e.status===`queued`?ue(u.data??[]).get(e.id):void 0;return(0,Y.jsxs)(`header`,{"data-slot":`run-header`,className:`sticky top-0 z-20 border-b border-border bg-background/95 px-4 pt-3 backdrop-blur md:px-6`,children:[(0,Y.jsxs)(`div`,{className:`mx-auto w-full max-w-[820px]`,children:[(0,Y.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,Y.jsx)($,{run:e}),(0,Y.jsxs)(`span`,{className:`ml-auto flex shrink-0 items-center gap-2.5`,children:[t?(0,Y.jsxs)(`span`,{"data-slot":`plan-mirror`,className:`text-[11px] text-soft-foreground tabular-nums`,children:[`Plan `,t.done,`/`,t.total]}):null,(0,Y.jsxs)(Ce,{dot:r.tone,pulse:r.pulse,children:[r.label,d===void 0?``:` #${d}`]}),(0,Y.jsx)(et,{run:e,actions:l,onToggleNotes:()=>c(e=>!e)})]})]}),(0,Y.jsx)(Qe,{run:e}),(0,Y.jsxs)(`div`,{"data-slot":`run-tabs`,className:`mt-2.5 flex items-end gap-1`,children:[(0,Y.jsx)(C,{to:`/tasks/${e.id}`,active:n===`session`,children:`Session`}),(0,Y.jsx)(C,{to:`/tasks/${e.id}/changes`,active:n===`changes`,children:`Changes`}),(0,Y.jsx)(C,{to:`/tasks/${e.id}/commits`,active:n===`commits`,children:`Commits`}),(0,Y.jsx)(C,{to:`/tasks/${e.id}/files`,active:n===`files`,children:`Files`}),(0,Y.jsxs)(`div`,{"data-slot":`run-actions`,className:`ml-auto hidden items-center gap-1 pb-1 md:flex`,children:[i.finish?(0,Y.jsxs)(f,{variant:`outline`,size:`sm`,title:J(e.status),onClick:()=>l.finish.mutate(),children:[(0,Y.jsx)(_,{"aria-hidden":`true`}),`Finish`]}):null,i.continueRun?(0,Y.jsxs)(f,{variant:`outline`,size:`sm`,title:`Reopen the session`,onClick:()=>l.continueRun.mutate(),children:[(0,Y.jsx)(A,{"aria-hidden":`true`}),`Continue`]}):null,(0,Y.jsx)(Xe,{run:e,canResume:i.terminal,onResume:()=>l.terminal.mutate()}),(0,Y.jsxs)(f,{variant:`ghost`,size:`sm`,title:`Handoff notes — what the agent did and what's left`,"aria-expanded":s,onClick:()=>c(e=>!e),children:[(0,Y.jsx)(H,{"aria-hidden":`true`}),`Notes`]}),i.archive?(0,Y.jsxs)(f,{variant:`ghost`,size:`sm`,onClick:()=>l.archive.mutate(),children:[e.archived?(0,Y.jsx)(B,{"aria-hidden":`true`}):(0,Y.jsx)(F,{"aria-hidden":`true`}),e.archived?`Unarchive`:`Archive`]}):null,i.cancel?(0,Y.jsxs)(f,{variant:`danger-ghost`,size:`sm`,onClick:()=>l.setConfirming(`cancel`),children:[(0,Y.jsx)(V,{"aria-hidden":`true`}),`Cancel`]}):null,i.deleteRun?(0,Y.jsxs)(f,{variant:`danger-ghost`,size:`sm`,onClick:()=>l.setConfirming(`delete`),children:[(0,Y.jsx)(y,{"aria-hidden":`true`}),`Delete`]}):null]})]}),e.steps.length>0?(0,Y.jsx)(`div`,{className:`border-t border-border pt-2.5 pb-1`,children:(0,Y.jsx)(Ge,{steps:e.steps})}):null,o?(0,Y.jsx)(nt,{hint:o}):null,s?(0,Y.jsx)(rt,{runId:e.id}):null]}),(0,Y.jsx)(tt,{run:e,actions:l})]})}var Je={folder:x,terminal:w,vscode:ke,cursor:Ie,zed:j,windsurf:Be,sublime:Me,idea:je,pycharm:Fe,webstorm:U,goland:Re,rubymine:Ne,phpstorm:Ee,clion:Ae,rider:Te,"android-studio":ze,xcode:Pe,warp:Le,claude:k,codex:M,opencode:k};function Ye(e){return e.icon&&Je[e.icon]||S}function Xe({run:e,canResume:t,onResume:n}){let i=c(),a=r({mutationFn:t=>ie(e.id,t),onError:e=>p(e.message,{tone:`danger`})}),o=e.worktreePath?i.data?.targets??[]:[];return!t&&o.length===0?null:(0,Y.jsxs)(P,{children:[(0,Y.jsx)(E,{asChild:!0,children:(0,Y.jsxs)(f,{variant:`ghost`,size:`sm`,title:`Resume in a terminal, or open the worktree locally`,children:[(0,Y.jsx)(S,{"aria-hidden":`true`}),`Open in…`]})}),(0,Y.jsxs)(O,{align:`end`,children:[t?(0,Y.jsxs)(D,{"data-target":`terminal-resume`,onSelect:n,children:[(0,Y.jsx)(w,{"aria-hidden":`true`}),`Terminal (resume session)`]}):null,t&&o.length>0?(0,Y.jsx)(z,{}):null,o.map(e=>{let t=Ye(e);return(0,Y.jsxs)(D,{"data-target":e.id,onSelect:()=>a.mutate(e.id),children:[(0,Y.jsx)(t,{"aria-hidden":`true`}),e.label]},e.id)}),e.worktreePath?(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(z,{}),(0,Y.jsxs)(D,{onSelect:()=>{let t=e.worktreePath;t&&navigator.clipboard.writeText(t).then(()=>p(`Worktree path copied`)).catch(()=>p(`Path: ${t}`))},children:[(0,Y.jsx)(v,{"aria-hidden":`true`}),`Copy worktree path`]})]}):null]})]})}function Ze(e){let t=o(),n=s(),[a,c]=(0,W.useState)(null),l=()=>t.invalidateQueries({queryKey:i.runs.all}),d=e=>p(e.message,{tone:`danger`});return{finish:Z(e.id),continueRun:r({mutationFn:()=>m(e.id),onSuccess:l,onError:d}),archive:r({mutationFn:()=>te(e.id,!e.archived),onSuccess:l,onError:d}),cancel:r({mutationFn:()=>ae(e.id),onSuccess:l,onError:d}),delete:r({mutationFn:()=>ee(e.id),onSuccess:()=>{l(),n(`/`)},onError:d}),terminal:r({mutationFn:()=>ne(e.id),onError:e=>{if(e instanceof u&&e.command){Q(e.command,`No terminal found — command copied to clipboard.`);return}d(e)}}),confirming:a,setConfirming:c}}async function Q(e,t){try{await navigator.clipboard.writeText(e),p(t)}catch{p(`Run manually: ${e}`)}}function $({run:e}){let t=l(e.id),n=T(e),r=Se(n,e=>t.mutate({title:e},{onError:e=>p(e.message,{tone:`danger`})}));return r.editing?(0,Y.jsx)(be,{editor:r,className:`flex-1 text-[15px] font-semibold`}):(0,Y.jsxs)(`span`,{className:`group flex min-w-0 items-center gap-1`,children:[(0,Y.jsx)(`h1`,{className:`min-w-0 truncate text-[15px] font-semibold`,title:e.task,children:n}),(0,Y.jsx)(`button`,{type:`button`,"aria-label":`Rename task`,onClick:r.begin,className:`shrink-0 rounded-sm p-1 text-soft-foreground opacity-0 transition-opacity group-hover:opacity-100 hover:bg-muted hover:text-foreground focus-visible:opacity-100 focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-none`,children:(0,Y.jsx)(he,{className:`size-3.5`,"aria-hidden":`true`})})]})}function Qe({run:e}){let t=[(0,Y.jsx)(`span`,{children:de(e)},`workflow`)];e.branch&&t.push((0,Y.jsx)(`span`,{"data-slot":`branch-chip`,className:`rounded-sm border border-border bg-card px-1.5 py-px font-mono text-[11px] font-medium`,children:e.branch},`branch`)),e.diffStat&&t.push((0,Y.jsx)(ve,{stat:e.diffStat},`diff`));let n=[];return e.tokensUsed>0&&n.push((0,Y.jsxs)(`span`,{className:`tabular-nums`,children:[fe(e.tokensUsed),` tokens`]},`tokens`)),e.costUsd&&n.push((0,Y.jsx)(`span`,{className:`tabular-nums`,children:le(e.costUsd)},`cost`)),(0,Y.jsxs)(`div`,{"data-slot":`run-meta`,className:`mt-1.5 flex flex-wrap items-center gap-x-2 gap-y-1 text-xs text-muted-foreground`,children:[t.map((e,t)=>(0,Y.jsxs)(W.Fragment,{children:[t>0?(0,Y.jsx)(`span`,{className:`text-soft-foreground`,"aria-hidden":`true`,children:`·`}):null,e]},t)),(0,Y.jsxs)(`span`,{className:`ml-auto flex shrink-0 items-center gap-1.5`,children:[n.map((e,t)=>(0,Y.jsxs)(W.Fragment,{children:[t>0?(0,Y.jsx)(`span`,{className:`text-soft-foreground`,"aria-hidden":`true`,children:`·`}):null,e]},t)),(0,Y.jsx)($e,{run:e})]})]})}function $e({run:e}){let t=re(),n=e.runner??t.data?.defaultRunner??`claude`,r=e.model??`auto`;return(0,Y.jsxs)(P,{children:[(0,Y.jsx)(E,{asChild:!0,children:(0,Y.jsx)(`button`,{type:`button`,"data-slot":`agent-badge`,title:`${n} · ${r}`,"aria-label":`Agent: ${n}, model ${r}`,className:`flex shrink-0 items-center justify-center rounded-sm p-1 text-soft-foreground hover:bg-muted hover:text-foreground focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-none`,children:(0,Y.jsx)(k,{className:`size-3.5`,"aria-hidden":`true`})})}),(0,Y.jsxs)(O,{align:`end`,className:`min-w-[9rem]`,children:[(0,Y.jsxs)(N,{className:`font-mono text-[11px] font-normal text-muted-foreground`,children:[`runner: `,n]}),(0,Y.jsxs)(N,{className:`font-mono text-[11px] font-normal text-muted-foreground`,children:[`model: `,r]})]})]})}function et({run:e,actions:t,onToggleNotes:n}){let r=q(e);return(0,Y.jsxs)(P,{children:[(0,Y.jsx)(E,{asChild:!0,children:(0,Y.jsx)(f,{variant:`ghost`,size:`icon-sm`,"aria-label":`Run actions`,className:`md:hidden`,children:(0,Y.jsx)(b,{"aria-hidden":`true`})})}),(0,Y.jsxs)(O,{align:`end`,"data-slot":`run-actions-menu`,children:[r.finish?(0,Y.jsxs)(D,{onSelect:()=>t.finish.mutate(),children:[(0,Y.jsx)(_,{"aria-hidden":`true`}),` Finish`]}):null,r.continueRun?(0,Y.jsxs)(D,{onSelect:()=>t.continueRun.mutate(),children:[(0,Y.jsx)(A,{"aria-hidden":`true`}),` Continue`]}):null,r.terminal?(0,Y.jsxs)(D,{onSelect:()=>t.terminal.mutate(),children:[(0,Y.jsx)(w,{"aria-hidden":`true`}),` Terminal`]}):null,(0,Y.jsxs)(D,{onSelect:n,children:[(0,Y.jsx)(H,{"aria-hidden":`true`}),` Notes`]}),r.archive?(0,Y.jsxs)(D,{onSelect:()=>t.archive.mutate(),children:[e.archived?(0,Y.jsx)(B,{"aria-hidden":`true`}):(0,Y.jsx)(F,{"aria-hidden":`true`}),e.archived?`Unarchive`:`Archive`]}):null,r.cancel||r.deleteRun?(0,Y.jsx)(z,{}):null,r.cancel?(0,Y.jsxs)(D,{variant:`destructive`,onSelect:()=>t.setConfirming(`cancel`),children:[(0,Y.jsx)(V,{"aria-hidden":`true`}),` Cancel`]}):null,r.deleteRun?(0,Y.jsxs)(D,{variant:`destructive`,onSelect:()=>t.setConfirming(`delete`),children:[(0,Y.jsx)(y,{"aria-hidden":`true`}),` Delete`]}):null]})]})}function tt({run:e,actions:t}){let n=t.confirming;return(0,Y.jsx)(L,{open:n!==null,onOpenChange:e=>!e&&t.setConfirming(null),children:(0,Y.jsxs)(ye,{children:[(0,Y.jsxs)(I,{children:[(0,Y.jsx)(we,{children:n===`delete`?`Delete this task?`:`Cancel this task?`}),(0,Y.jsx)(_e,{children:n===`delete`?(0,Y.jsxs)(Y.Fragment,{children:[`This removes the run, its transcript, its worktree and its branch. There is no undo.`,(0,Y.jsx)(`span`,{className:`mt-1 block truncate font-medium text-foreground`,title:T(e),children:T(e)})]}):`The agent is stopped and the run completes as cancelled. The worktree stays.`})]}),(0,Y.jsxs)(ge,{children:[(0,Y.jsx)(xe,{children:`Keep it`}),(0,Y.jsx)(R,{className:`bg-danger text-danger-foreground hover:brightness-[0.96]`,onClick:()=>{n===`delete`?t.delete.mutate():t.cancel.mutate(),t.setConfirming(null)},children:n===`delete`?`Delete`:`Cancel the run`})]})]})})}function nt({hint:e}){return(0,Y.jsxs)(`button`,{type:`button`,"data-slot":`resume-hint`,title:`Copy the command`,onClick:()=>void Q(e,`Command copied to clipboard.`),className:`mb-2 flex w-full min-w-0 items-center gap-1.5 rounded-sm px-1 py-0.5 text-left font-mono text-[11px] text-soft-foreground hover:bg-muted hover:text-foreground`,children:[(0,Y.jsx)(v,{className:`size-3 shrink-0`,"aria-hidden":`true`}),(0,Y.jsxs)(`span`,{className:`truncate`,children:[`take over interactively: `,e]})]})}function rt({runId:e}){let t=d(e);return(0,Y.jsx)(`div`,{"data-slot":`notes-panel`,className:`mb-3 max-h-72 overflow-y-auto rounded-md border border-border bg-card px-4 py-3`,children:t.isPending?(0,Y.jsx)(`p`,{className:`text-xs text-soft-foreground`,children:`Loading notes…`}):t.isError?(0,Y.jsx)(`p`,{className:`text-xs text-danger`,children:t.error.message}):t.data.trim().length>0?(0,Y.jsx)(pe,{children:t.data}):(0,Y.jsx)(`p`,{className:`text-xs text-soft-foreground`,children:`No notes yet — the handoff file is seeded when the task starts.`})})}export{K as a,U as c,G as i,H as l,Z as n,Ue as o,J as r,q as s,qe as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=[Object.freeze(JSON.parse(`{"displayName":"Rust","name":"rust","patterns":[{"begin":"(<)(\\\\[)","beginCaptures":{"1":{"name":"punctuation.brackets.angle.rust"},"2":{"name":"punctuation.brackets.square.rust"}},"end":">","endCaptures":{"0":{"name":"punctuation.brackets.angle.rust"}},"patterns":[{"include":"#block-comments"},{"include":"#comments"},{"include":"#gtypes"},{"include":"#lvariables"},{"include":"#lifetimes"},{"include":"#punctuation"},{"include":"#types"}]},{"captures":{"1":{"name":"keyword.operator.macro.dollar.rust"},"3":{"name":"keyword.other.crate.rust"},"4":{"name":"entity.name.type.metavariable.rust"},"6":{"name":"keyword.operator.key-value.rust"},"7":{"name":"variable.other.metavariable.specifier.rust"}},"match":"(\\\\$)((crate)|([A-Z]\\\\w*))(\\\\s*(:)\\\\s*(block|expr(?:_2021)?|ident|item|lifetime|literal|meta|pat(?:_param)?|path|stmt|tt|ty|vis)\\\\b)?","name":"meta.macro.metavariable.type.rust","patterns":[{"include":"#keywords"}]},{"captures":{"1":{"name":"keyword.operator.macro.dollar.rust"},"2":{"name":"variable.other.metavariable.name.rust"},"4":{"name":"keyword.operator.key-value.rust"},"5":{"name":"variable.other.metavariable.specifier.rust"}},"match":"(\\\\$)([a-z]\\\\w*)(\\\\s*(:)\\\\s*(block|expr(?:_2021)?|ident|item|lifetime|literal|meta|pat(?:_param)?|path|stmt|tt|ty|vis)\\\\b)?","name":"meta.macro.metavariable.rust","patterns":[{"include":"#keywords"}]},{"captures":{"1":{"name":"entity.name.function.macro.rules.rust"},"3":{"name":"entity.name.function.macro.rust"},"4":{"name":"entity.name.type.macro.rust"},"5":{"name":"punctuation.brackets.curly.rust"}},"match":"\\\\b(macro_rules!)\\\\s+(([0-9_a-z]+)|([A-Z][0-9_a-z]*))\\\\s+(\\\\{)","name":"meta.macro.rules.rust"},{"captures":{"1":{"name":"storage.type.rust"},"2":{"name":"entity.name.module.rust"}},"match":"(mod)\\\\s+((?:r#(?!crate|[Ss]elf|super))?[a-z][0-9A-Z_a-z]*)"},{"begin":"\\\\b(extern)\\\\s+(crate)","beginCaptures":{"1":{"name":"storage.type.rust"},"2":{"name":"keyword.other.crate.rust"}},"end":";","endCaptures":{"0":{"name":"punctuation.semi.rust"}},"name":"meta.import.rust","patterns":[{"include":"#block-comments"},{"include":"#comments"},{"include":"#keywords"},{"include":"#punctuation"}]},{"begin":"\\\\b(use)\\\\s","beginCaptures":{"1":{"name":"keyword.other.rust"}},"end":";","endCaptures":{"0":{"name":"punctuation.semi.rust"}},"name":"meta.use.rust","patterns":[{"include":"#block-comments"},{"include":"#comments"},{"include":"#keywords"},{"include":"#namespaces"},{"include":"#punctuation"},{"include":"#types"},{"include":"#lvariables"}]},{"include":"#block-comments"},{"include":"#comments"},{"include":"#attributes"},{"include":"#lvariables"},{"include":"#constants"},{"include":"#gtypes"},{"include":"#functions"},{"include":"#types"},{"include":"#keywords"},{"include":"#lifetimes"},{"include":"#macros"},{"include":"#namespaces"},{"include":"#punctuation"},{"include":"#strings"},{"include":"#variables"}],"repository":{"attributes":{"begin":"(#)(!?)(\\\\[)","beginCaptures":{"1":{"name":"punctuation.definition.attribute.rust"},"3":{"name":"punctuation.brackets.attribute.rust"}},"end":"]","endCaptures":{"0":{"name":"punctuation.brackets.attribute.rust"}},"name":"meta.attribute.rust","patterns":[{"include":"#block-comments"},{"include":"#comments"},{"include":"#keywords"},{"include":"#lifetimes"},{"include":"#punctuation"},{"include":"#strings"},{"include":"#gtypes"},{"include":"#types"}]},"block-comments":{"patterns":[{"match":"/\\\\*\\\\*/","name":"comment.block.rust"},{"begin":"/\\\\*\\\\*","end":"\\\\*/","name":"comment.block.documentation.rust","patterns":[{"include":"#block-comments"}]},{"begin":"/\\\\*(?!\\\\*)","end":"\\\\*/","name":"comment.block.rust","patterns":[{"include":"#block-comments"}]}]},"comments":{"patterns":[{"captures":{"1":{"name":"punctuation.definition.comment.rust"}},"match":"(///).*$","name":"comment.line.documentation.rust"},{"captures":{"1":{"name":"punctuation.definition.comment.rust"}},"match":"(//).*$","name":"comment.line.double-slash.rust"}]},"constants":{"patterns":[{"match":"\\\\b[A-Z]{2}[0-9A-Z_]*\\\\b","name":"constant.other.caps.rust"},{"captures":{"1":{"name":"storage.type.rust"},"2":{"name":"constant.other.caps.rust"}},"match":"\\\\b(const)\\\\s+([A-Z][0-9A-Z_a-z]*)\\\\b"},{"captures":{"1":{"name":"punctuation.separator.dot.decimal.rust"},"2":{"name":"keyword.operator.exponent.rust"},"3":{"name":"keyword.operator.exponent.sign.rust"},"4":{"name":"constant.numeric.decimal.exponent.mantissa.rust"},"5":{"name":"entity.name.type.numeric.rust"}},"match":"\\\\b\\\\d[_\\\\d]*(\\\\.?)[_\\\\d]*(?:([Ee])([-+]?)([_\\\\d]+))?(f32|f64|i128|i16|i32|i64|i8|isize|u128|u16|u32|u64|u8|usize)?\\\\b","name":"constant.numeric.decimal.rust"},{"captures":{"1":{"name":"entity.name.type.numeric.rust"}},"match":"\\\\b0x[A-F_a-f\\\\d]+(i128|i16|i32|i64|i8|isize|u128|u16|u32|u64|u8|usize)?\\\\b","name":"constant.numeric.hex.rust"},{"captures":{"1":{"name":"entity.name.type.numeric.rust"}},"match":"\\\\b0o[0-7_]+(i128|i16|i32|i64|i8|isize|u128|u16|u32|u64|u8|usize)?\\\\b","name":"constant.numeric.oct.rust"},{"captures":{"1":{"name":"entity.name.type.numeric.rust"}},"match":"\\\\b0b[01_]+(i128|i16|i32|i64|i8|isize|u128|u16|u32|u64|u8|usize)?\\\\b","name":"constant.numeric.bin.rust"},{"match":"\\\\b(true|false)\\\\b","name":"constant.language.bool.rust"}]},"escapes":{"captures":{"1":{"name":"constant.character.escape.backslash.rust"},"2":{"name":"constant.character.escape.bit.rust"},"3":{"name":"constant.character.escape.unicode.rust"},"4":{"name":"constant.character.escape.unicode.punctuation.rust"},"5":{"name":"constant.character.escape.unicode.punctuation.rust"}},"match":"(\\\\\\\\)(?:(x[0-7][A-Fa-f\\\\d])|(u(\\\\{)[A-Fa-f\\\\d]{4,6}(}))|.)","name":"constant.character.escape.rust"},"functions":{"patterns":[{"captures":{"1":{"name":"keyword.other.rust"},"2":{"name":"punctuation.brackets.round.rust"}},"match":"\\\\b(pub)(\\\\()"},{"begin":"\\\\b(fn)\\\\s+((?:r#(?!crate|[Ss]elf|super))?[0-9A-Z_a-z]+)((\\\\()|(<))","beginCaptures":{"1":{"name":"keyword.other.fn.rust"},"2":{"name":"entity.name.function.rust"},"4":{"name":"punctuation.brackets.round.rust"},"5":{"name":"punctuation.brackets.angle.rust"}},"end":"(\\\\{)|(;)","endCaptures":{"1":{"name":"punctuation.brackets.curly.rust"},"2":{"name":"punctuation.semi.rust"}},"name":"meta.function.definition.rust","patterns":[{"include":"#block-comments"},{"include":"#comments"},{"include":"#keywords"},{"include":"#lvariables"},{"include":"#constants"},{"include":"#gtypes"},{"include":"#functions"},{"include":"#lifetimes"},{"include":"#macros"},{"include":"#namespaces"},{"include":"#punctuation"},{"include":"#strings"},{"include":"#types"},{"include":"#variables"}]},{"begin":"((?:r#(?!crate|[Ss]elf|super))?[0-9A-Z_a-z]+)(\\\\()","beginCaptures":{"1":{"name":"entity.name.function.rust"},"2":{"name":"punctuation.brackets.round.rust"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.brackets.round.rust"}},"name":"meta.function.call.rust","patterns":[{"include":"#block-comments"},{"include":"#comments"},{"include":"#attributes"},{"include":"#keywords"},{"include":"#lvariables"},{"include":"#constants"},{"include":"#gtypes"},{"include":"#functions"},{"include":"#lifetimes"},{"include":"#macros"},{"include":"#namespaces"},{"include":"#punctuation"},{"include":"#strings"},{"include":"#types"},{"include":"#variables"}]},{"begin":"((?:r#(?!crate|[Ss]elf|super))?[0-9A-Z_a-z]+)(?=::<.*>\\\\()","beginCaptures":{"1":{"name":"entity.name.function.rust"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.brackets.round.rust"}},"name":"meta.function.call.rust","patterns":[{"include":"#block-comments"},{"include":"#comments"},{"include":"#attributes"},{"include":"#keywords"},{"include":"#lvariables"},{"include":"#constants"},{"include":"#gtypes"},{"include":"#functions"},{"include":"#lifetimes"},{"include":"#macros"},{"include":"#namespaces"},{"include":"#punctuation"},{"include":"#strings"},{"include":"#types"},{"include":"#variables"}]}]},"gtypes":{"patterns":[{"match":"\\\\b(Some|None)\\\\b","name":"entity.name.type.option.rust"},{"match":"\\\\b(Ok|Err)\\\\b","name":"entity.name.type.result.rust"}]},"interpolations":{"captures":{"1":{"name":"punctuation.definition.interpolation.rust"},"2":{"name":"punctuation.definition.interpolation.rust"}},"match":"(\\\\{)[^\\"{}]*(})","name":"meta.interpolation.rust"},"keywords":{"patterns":[{"match":"\\\\b(await|break|continue|do|else|for|if|loop|match|return|try|while|yield)\\\\b","name":"keyword.control.rust"},{"match":"\\\\b(extern|let|macro|mod)\\\\b","name":"keyword.other.rust storage.type.rust"},{"match":"\\\\b(const)\\\\b","name":"storage.modifier.rust"},{"match":"\\\\b(type)\\\\b","name":"keyword.declaration.type.rust storage.type.rust"},{"match":"\\\\b(enum)\\\\b","name":"keyword.declaration.enum.rust storage.type.rust"},{"match":"\\\\b(trait)\\\\b","name":"keyword.declaration.trait.rust storage.type.rust"},{"match":"\\\\b(struct)\\\\b","name":"keyword.declaration.struct.rust storage.type.rust"},{"match":"\\\\b(abstract|static)\\\\b","name":"storage.modifier.rust"},{"match":"\\\\b(as|async|become|box|dyn|move|final|gen|impl|in|override|priv|pub|ref|typeof|union|unsafe|unsized|use|virtual|where)\\\\b","name":"keyword.other.rust"},{"match":"\\\\bfn\\\\b","name":"keyword.other.fn.rust"},{"match":"\\\\bcrate\\\\b","name":"keyword.other.crate.rust"},{"match":"\\\\bmut\\\\b","name":"storage.modifier.mut.rust"},{"match":"([\\\\^|]|\\\\|\\\\||&&|<<|>>|!)(?!=)","name":"keyword.operator.logical.rust"},{"match":"&(?![\\\\&=])","name":"keyword.operator.borrow.and.rust"},{"match":"((?:[-%\\\\&*+/^|]|<<|>>)=)","name":"keyword.operator.assignment.rust"},{"match":"(?<![<>])=(?![=>])","name":"keyword.operator.assignment.equal.rust"},{"match":"(=(=)?(?!>)|!=|<=|(?<!=)>=)","name":"keyword.operator.comparison.rust"},{"match":"(([%+]|(\\\\*(?!\\\\w)))(?!=))|(-(?!>))|(/(?!/))","name":"keyword.operator.math.rust"},{"captures":{"1":{"name":"punctuation.brackets.round.rust"},"2":{"name":"punctuation.brackets.square.rust"},"3":{"name":"punctuation.brackets.curly.rust"},"4":{"name":"keyword.operator.comparison.rust"},"5":{"name":"punctuation.brackets.round.rust"},"6":{"name":"punctuation.brackets.square.rust"},"7":{"name":"punctuation.brackets.curly.rust"}},"match":"(?:\\\\b|(?:(\\\\))|(])|(})))[\\\\t ]+([<>])[\\\\t ]+(?:\\\\b|(?:(\\\\()|(\\\\[)|(\\\\{)))"},{"match":"::","name":"keyword.operator.namespace.rust"},{"captures":{"1":{"name":"keyword.operator.dereference.rust"}},"match":"(\\\\*)(?=\\\\w+)"},{"match":"@","name":"keyword.operator.subpattern.rust"},{"match":"\\\\.(?!\\\\.)","name":"keyword.operator.access.dot.rust"},{"match":"\\\\.{2}([.=])?","name":"keyword.operator.range.rust"},{"match":":(?!:)","name":"keyword.operator.key-value.rust"},{"match":"->|<-","name":"keyword.operator.arrow.skinny.rust"},{"match":"=>","name":"keyword.operator.arrow.fat.rust"},{"match":"\\\\$","name":"keyword.operator.macro.dollar.rust"},{"match":"\\\\?","name":"keyword.operator.question.rust"}]},"lifetimes":{"patterns":[{"captures":{"1":{"name":"punctuation.definition.lifetime.rust"},"2":{"name":"entity.name.type.lifetime.rust"}},"match":"(')([A-Z_a-z][0-9A-Z_a-z]*)(?!')\\\\b"},{"captures":{"1":{"name":"keyword.operator.borrow.rust"},"2":{"name":"punctuation.definition.lifetime.rust"},"3":{"name":"entity.name.type.lifetime.rust"}},"match":"(&)(')([A-Z_a-z][0-9A-Z_a-z]*)(?!')\\\\b"}]},"lvariables":{"patterns":[{"match":"\\\\b[Ss]elf\\\\b","name":"variable.language.self.rust"},{"match":"\\\\bsuper\\\\b","name":"variable.language.super.rust"}]},"macros":{"patterns":[{"captures":{"2":{"name":"entity.name.function.macro.rust"},"3":{"name":"entity.name.type.macro.rust"}},"match":"(([_a-z][0-9A-Z_a-z]*!)|([A-Z_][0-9A-Z_a-z]*!))","name":"meta.macro.rust"}]},"namespaces":{"patterns":[{"captures":{"1":{"name":"entity.name.namespace.rust"},"2":{"name":"keyword.operator.namespace.rust"}},"match":"(?<![0-9A-Z_a-z])([0-9A-Z_a-z]+)((?<!s(?:uper|elf))::)"}]},"punctuation":{"patterns":[{"match":",","name":"punctuation.comma.rust"},{"match":"[{}]","name":"punctuation.brackets.curly.rust"},{"match":"[()]","name":"punctuation.brackets.round.rust"},{"match":";","name":"punctuation.semi.rust"},{"match":"[]\\\\[]","name":"punctuation.brackets.square.rust"},{"match":"(?<!=)[<>]","name":"punctuation.brackets.angle.rust"}]},"strings":{"patterns":[{"begin":"(b?)(\\")","beginCaptures":{"1":{"name":"string.quoted.byte.raw.rust"},"2":{"name":"punctuation.definition.string.rust"}},"end":"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.rust"}},"name":"string.quoted.double.rust","patterns":[{"include":"#escapes"},{"include":"#interpolations"}]},{"begin":"(b?r)(#*)(\\")","beginCaptures":{"1":{"name":"string.quoted.byte.raw.rust"},"2":{"name":"punctuation.definition.string.raw.rust"},"3":{"name":"punctuation.definition.string.rust"}},"end":"(\\")(\\\\2)","endCaptures":{"1":{"name":"punctuation.definition.string.rust"},"2":{"name":"punctuation.definition.string.raw.rust"}},"name":"string.quoted.double.rust"},{"begin":"(b)?(')","beginCaptures":{"1":{"name":"string.quoted.byte.raw.rust"},"2":{"name":"punctuation.definition.char.rust"}},"end":"'","endCaptures":{"0":{"name":"punctuation.definition.char.rust"}},"name":"string.quoted.single.char.rust","patterns":[{"include":"#escapes"}]}]},"types":{"patterns":[{"captures":{"1":{"name":"entity.name.type.numeric.rust"}},"match":"(?<![A-Za-z])(f32|f64|i128|i16|i32|i64|i8|isize|u128|u16|u32|u64|u8|usize)\\\\b"},{"begin":"\\\\b(_?[A-Z][0-9A-Z_a-z]*)(<)","beginCaptures":{"1":{"name":"entity.name.type.rust"},"2":{"name":"punctuation.brackets.angle.rust"}},"end":">","endCaptures":{"0":{"name":"punctuation.brackets.angle.rust"}},"patterns":[{"include":"#block-comments"},{"include":"#comments"},{"include":"#keywords"},{"include":"#lvariables"},{"include":"#lifetimes"},{"include":"#punctuation"},{"include":"#types"},{"include":"#variables"}]},{"match":"\\\\b(bool|char|str)\\\\b","name":"entity.name.type.primitive.rust"},{"captures":{"1":{"name":"keyword.declaration.trait.rust storage.type.rust"},"2":{"name":"entity.name.type.trait.rust"}},"match":"\\\\b(trait)\\\\s+(_?[A-Z][0-9A-Z_a-z]*)\\\\b"},{"captures":{"1":{"name":"keyword.declaration.struct.rust storage.type.rust"},"2":{"name":"entity.name.type.struct.rust"}},"match":"\\\\b(struct)\\\\s+(_?[A-Z][0-9A-Z_a-z]*)\\\\b"},{"captures":{"1":{"name":"keyword.declaration.enum.rust storage.type.rust"},"2":{"name":"entity.name.type.enum.rust"}},"match":"\\\\b(enum)\\\\s+(_?[A-Z][0-9A-Z_a-z]*)\\\\b"},{"captures":{"1":{"name":"keyword.declaration.type.rust storage.type.rust"},"2":{"name":"entity.name.type.declaration.rust"}},"match":"\\\\b(type)\\\\s+(_?[A-Z][0-9A-Z_a-z]*)\\\\b"},{"match":"\\\\b_?[A-Z][0-9A-Z_a-z]*\\\\b(?!!)","name":"entity.name.type.rust"}]},"variables":{"patterns":[{"match":"\\\\b(?<!(?<!\\\\.)\\\\.)(?:r#(?!(crate|[Ss]elf|super)))?[0-9_a-z]+\\\\b","name":"variable.other.rust"}]}},"scopeName":"source.rust","aliases":["rs"]}`))];export{e as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./utils-rQGbOrwc.js";var t=e(`search-x`,[[`path`,{d:`m13.5 8.5-5 5`,key:`1cs55j`}],[`path`,{d:`m8.5 8.5 5 5`,key:`a8mexj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}],[`path`,{d:`m21 21-4.3-4.3`,key:`1qie3q`}]]);export{t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=[Object.freeze(JSON.parse(`{"displayName":"Shell","name":"shellscript","patterns":[{"include":"#initial_context"}],"repository":{"alias_statement":{"begin":"[\\\\t ]*+(alias)[\\\\t ]*+((?:((?<!\\\\w)-\\\\w+)\\\\b[\\\\t ]*+)*)[\\\\t ]*+((?<!\\\\w)[-0-9A-Z_a-z]+(?!\\\\w))(?:(\\\\[)((?:(?:\\\\$?(?<!\\\\w)[-0-9A-Z_a-z]+(?!\\\\w)|@)|\\\\*)|(-?\\\\d+))(]))?(?:(?:(=)|(\\\\+=))|(-=))","beginCaptures":{"1":{"name":"storage.type.alias.shell"},"2":{"patterns":[{"match":"(?<!\\\\w)-\\\\w+\\\\b","name":"string.unquoted.argument.shell constant.other.option.shell"}]},"3":{"name":"string.unquoted.argument.shell constant.other.option.shell"},"4":{"name":"variable.other.assignment.shell"},"5":{"name":"punctuation.definition.array.access.shell"},"6":{"name":"variable.other.assignment.shell"},"7":{"name":"constant.numeric.shell constant.numeric.integer.shell"},"8":{"name":"punctuation.definition.array.access.shell"},"9":{"name":"keyword.operator.assignment.shell"},"10":{"name":"keyword.operator.assignment.compound.shell"},"11":{"name":"keyword.operator.assignment.compound.shell"}},"end":"(?=[\\\\t ]|$)|(?:(?:(?:(;)|(&&))|(\\\\|\\\\|))|(&))","endCaptures":{"1":{"name":"punctuation.terminator.statement.semicolon.shell"},"2":{"name":"punctuation.separator.statement.and.shell"},"3":{"name":"punctuation.separator.statement.or.shell"},"4":{"name":"punctuation.separator.statement.background.shell"}},"name":"meta.expression.assignment.alias.shell","patterns":[{"include":"#normal_context"}]},"argument":{"begin":"[\\\\t ]++(?![\\\\n#\\\\&(\\\\[|]|$|;)","beginCaptures":{},"end":"(?=[\\\\t \\\\&;|]|$|[\\\\n)\`])","endCaptures":{},"name":"meta.argument.shell","patterns":[{"include":"#argument_context"},{"include":"#line_continuation"}]},"argument_context":{"patterns":[{"captures":{"1":{"name":"string.unquoted.argument.shell","patterns":[{"match":"\\\\*","name":"variable.language.special.wildcard.shell"},{"include":"#variable"},{"include":"#numeric_literal"},{"captures":{"1":{"name":"constant.language.$1.shell"}},"match":"(?<!\\\\w)\\\\b(true|false)\\\\b(?!\\\\w)"}]}},"match":"[\\\\t ]*+([^\\\\t\\\\n \\"$\\\\&-);<>\\\\\\\\\`|]+(?!>))"},{"include":"#normal_context"}]},"arithmetic_double":{"patterns":[{"begin":"\\\\(\\\\(","beginCaptures":{"0":{"name":"punctuation.section.arithmetic.double.shell"}},"end":"\\\\)\\\\s*\\\\)","endCaptures":{"0":{"name":"punctuation.section.arithmetic.double.shell"}},"name":"meta.arithmetic.shell","patterns":[{"include":"#math"},{"include":"#string"}]}]},"arithmetic_no_dollar":{"patterns":[{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.section.arithmetic.single.shell"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.arithmetic.single.shell"}},"name":"meta.arithmetic.shell","patterns":[{"include":"#math"},{"include":"#string"}]}]},"array_access_inline":{"captures":{"1":{"name":"punctuation.section.array.shell"},"2":{"patterns":[{"include":"#special_expansion"},{"include":"#string"},{"include":"#variable"}]},"3":{"name":"punctuation.section.array.shell"}},"match":"(\\\\[)([^]\\\\[]+)(])"},"array_value":{"begin":"[\\\\t ]*+((?<!\\\\w)[-0-9A-Z_a-z]+(?!\\\\w))(?:(\\\\[)((?:(?:\\\\$?(?<!\\\\w)[-0-9A-Z_a-z]+(?!\\\\w)|@)|\\\\*)|(-?\\\\d+))(]))?(?:(?:(=)|(\\\\+=))|(-=))[\\\\t ]*+(\\\\()","beginCaptures":{"1":{"name":"variable.other.assignment.shell"},"2":{"name":"punctuation.definition.array.access.shell"},"3":{"name":"variable.other.assignment.shell"},"4":{"name":"constant.numeric.shell constant.numeric.integer.shell"},"5":{"name":"punctuation.definition.array.access.shell"},"6":{"name":"keyword.operator.assignment.shell"},"7":{"name":"keyword.operator.assignment.compound.shell"},"8":{"name":"keyword.operator.assignment.compound.shell"},"9":{"name":"punctuation.definition.array.shell"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.array.shell"}},"patterns":[{"include":"#comment"},{"captures":{"1":{"name":"variable.other.assignment.array.shell entity.other.attribute-name.shell"},"2":{"name":"keyword.operator.assignment.shell punctuation.definition.assignment.shell"}},"match":"((?<!\\\\w)[-0-9A-Z_a-z]+(?!\\\\w))(=)"},{"captures":{"1":{"name":"punctuation.definition.bracket.named-array.shell"},"2":{"name":"string.unquoted.shell entity.other.attribute-name.bracket.shell"},"3":{"name":"punctuation.definition.bracket.named-array.shell"},"4":{"name":"punctuation.definition.assignment.shell"}},"match":"(\\\\[)(.+?)(])(=)"},{"include":"#normal_context"},{"include":"#simple_unquoted"}]},"assignment_statement":{"patterns":[{"include":"#array_value"},{"include":"#modified_assignment_statement"},{"include":"#normal_assignment_statement"}]},"basic_command_name":{"captures":{"1":{"name":"storage.modifier.$1.shell"},"2":{"name":"entity.name.function.call.shell entity.name.command.shell","patterns":[{"match":"(?<!\\\\w)(?:continue|return|break)(?!\\\\w)","name":"keyword.control.$0.shell"},{"match":"(?<!\\\\w)(?:unfunction|continue|autoload|unsetopt|bindkey|builtin|getopts|command|declare|unalias|history|unlimit|typeset|suspend|source|printf|unhash|disown|ulimit|return|which|alias|break|false|print|shift|times|umask|unset|read|type|exec|eval|wait|echo|dirs|jobs|kill|hash|stat|exit|test|trap|true|let|set|pwd|cd|fg|bg|fc|[.:])(?!/)(?!\\\\w)(?!-)","name":"support.function.builtin.shell"},{"include":"#variable"}]}},"match":"(?![\\\\n!#\\\\&()<>\\\\[{|]|$|[\\\\t ;])(?!nocorrect |nocorrect\\\\t|nocorrect$|readonly |readonly\\\\t|readonly$|function |function\\\\t|function$|foreach |foreach\\\\t|foreach$|coproc |coproc\\\\t|coproc$|logout |logout\\\\t|logout$|export |export\\\\t|export$|select |select\\\\t|select$|repeat |repeat\\\\t|repeat$|pushd |pushd\\\\t|pushd$|until |until\\\\t|until$|while |while\\\\t|while$|local |local\\\\t|local$|case |case\\\\t|case$|done |done\\\\t|done$|elif |elif\\\\t|elif$|else |else\\\\t|else$|esac |esac\\\\t|esac$|popd |popd\\\\t|popd$|then |then\\\\t|then$|time |time\\\\t|time$|for |for\\\\t|for$|end |end\\\\t|end$|fi |fi\\\\t|fi$|do |do\\\\t|do$|in |in\\\\t|in$|if |if\\\\t|if$)(?:((?<=^|[\\\\t \\\\&;])(?:readonly|declare|typeset|export|local)(?=[\\\\t \\\\&;]|$))|((?![\\"']|\\\\\\\\\\\\n?$)[^\\\\t\\\\n\\\\r !\\"'<>]+?))(?:(?=[\\\\t ])|(?=[\\\\n\\\\&);\`{|}]|[\\\\t ]*#|])(?<!\\\\\\\\))","name":"meta.statement.command.name.basic.shell"},"block_comment":{"begin":"\\\\s*+(/\\\\*)","beginCaptures":{"1":{"name":"punctuation.definition.comment.begin.shell"}},"end":"\\\\*/","endCaptures":{"0":{"name":"punctuation.definition.comment.end.shell"}},"name":"comment.block.shell"},"boolean":{"match":"\\\\b(?:true|false)\\\\b","name":"constant.language.$0.shell"},"case_statement":{"begin":"\\\\b(case)\\\\b[\\\\t ]*+(.+?)[\\\\t ]*+\\\\b(in)\\\\b","beginCaptures":{"1":{"name":"keyword.control.case.shell"},"2":{"patterns":[{"include":"#initial_context"}]},"3":{"name":"keyword.control.in.shell"}},"end":"\\\\besac\\\\b","endCaptures":{"0":{"name":"keyword.control.esac.shell"}},"name":"meta.case.shell","patterns":[{"include":"#comment"},{"captures":{"1":{"name":"keyword.operator.pattern.case.default.shell"}},"match":"[\\\\t ]*+(\\\\* *\\\\))"},{"begin":"(?<!\\\\))(?![\\\\t ]*+(?:esac\\\\b|$))","beginCaptures":{},"end":"(?=\\\\besac\\\\b)|(\\\\))","endCaptures":{"1":{"name":"keyword.operator.pattern.case.shell"}},"name":"meta.case.entry.pattern.shell","patterns":[{"include":"#case_statement_context"}]},{"begin":"(?<=\\\\))","beginCaptures":{},"end":"(;;)|(?=\\\\besac\\\\b)","endCaptures":{"1":{"name":"punctuation.terminator.statement.case.shell"}},"name":"meta.case.entry.body.shell","patterns":[{"include":"#typical_statements"},{"include":"#initial_context"}]}]},"case_statement_context":{"patterns":[{"match":"\\\\*","name":"variable.language.special.quantifier.star.shell keyword.operator.quantifier.star.shell punctuation.definition.arbitrary-repetition.shell punctuation.definition.regex.arbitrary-repetition.shell"},{"match":"\\\\+","name":"variable.language.special.quantifier.plus.shell keyword.operator.quantifier.plus.shell punctuation.definition.arbitrary-repetition.shell punctuation.definition.regex.arbitrary-repetition.shell"},{"match":"\\\\?","name":"variable.language.special.quantifier.question.shell keyword.operator.quantifier.question.shell punctuation.definition.arbitrary-repetition.shell punctuation.definition.regex.arbitrary-repetition.shell"},{"match":"@","name":"variable.language.special.at.shell keyword.operator.at.shell punctuation.definition.regex.at.shell"},{"match":"\\\\|","name":"keyword.operator.orvariable.language.special.or.shell keyword.operator.alternation.ruby.shell punctuation.definition.regex.alternation.shell punctuation.separator.regex.alternation.shell"},{"match":"\\\\\\\\.","name":"constant.character.escape.shell"},{"match":"(?<=\\\\tin| in|[\\\\t ]|;;)\\\\(","name":"keyword.operator.pattern.case.shell"},{"begin":"(?<=\\\\S)(\\\\()","beginCaptures":{"1":{"name":"punctuation.definition.group.shell punctuation.definition.regex.group.shell"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.group.shell punctuation.definition.regex.group.shell"}},"name":"meta.parenthese.shell","patterns":[{"include":"#case_statement_context"}]},{"begin":"\\\\[","beginCaptures":{"0":{"name":"punctuation.definition.character-class.shell"}},"end":"]","endCaptures":{"0":{"name":"punctuation.definition.character-class.shell"}},"name":"string.regexp.character-class.shell","patterns":[{"match":"\\\\\\\\.","name":"constant.character.escape.shell"}]},{"include":"#string"},{"match":"[^\\\\t\\\\n )*?@\\\\[|]","name":"string.unquoted.pattern.shell string.regexp.unquoted.shell"}]},"command_name_range":{"begin":"\\\\G","beginCaptures":{},"end":"(?=[\\\\t \\\\&;|]|$|[\\\\n)\`])|(?=<)","endCaptures":{},"name":"meta.statement.command.name.shell","patterns":[{"match":"(?<!\\\\w)(?:continue|return|break)(?!\\\\w)","name":"entity.name.function.call.shell entity.name.command.shell keyword.control.$0.shell"},{"match":"(?<!\\\\w)(?:unfunction|continue|autoload|unsetopt|bindkey|builtin|getopts|command|declare|unalias|history|unlimit|typeset|suspend|source|printf|unhash|disown|ulimit|return|which|alias|break|false|print|shift|times|umask|unset|read|type|exec|eval|wait|echo|dirs|jobs|kill|hash|stat|exit|test|trap|true|let|set|pwd|cd|fg|bg|fc|[.:])(?!/)(?!\\\\w)(?!-)","name":"entity.name.function.call.shell entity.name.command.shell support.function.builtin.shell"},{"include":"#variable"},{"captures":{"1":{"name":"entity.name.function.call.shell entity.name.command.shell"}},"match":"(?<!\\\\w)(?<=\\\\G|[\\"')}])([^\\\\t\\\\n\\\\r \\"\\\\&');->\`{|]+)"},{"begin":"(?:\\\\G|(?<![\\\\t\\\\n #\\\\&;{|]))(\\\\$?)((\\")|('))","beginCaptures":{"1":{"name":"meta.statement.command.name.quoted.shell punctuation.definition.string.shell entity.name.function.call.shell entity.name.command.shell"},"2":{},"3":{"name":"meta.statement.command.name.quoted.shell string.quoted.double.shell punctuation.definition.string.begin.shell entity.name.function.call.shell entity.name.command.shell"},"4":{"name":"meta.statement.command.name.quoted.shell string.quoted.single.shell punctuation.definition.string.begin.shell entity.name.function.call.shell entity.name.command.shell"}},"end":"(?<!\\\\G)(?<=\\\\2)","endCaptures":{},"patterns":[{"include":"#continuation_of_single_quoted_command_name"},{"include":"#continuation_of_double_quoted_command_name"}]},{"include":"#line_continuation"},{"include":"#simple_unquoted"}]},"command_statement":{"begin":"[\\\\t ]*+(?![\\\\n!#\\\\&()<>\\\\[{|]|$|[\\\\t ;])(?!nocorrect |nocorrect\\\\t|nocorrect$|readonly |readonly\\\\t|readonly$|function |function\\\\t|function$|foreach |foreach\\\\t|foreach$|coproc |coproc\\\\t|coproc$|logout |logout\\\\t|logout$|export |export\\\\t|export$|select |select\\\\t|select$|repeat |repeat\\\\t|repeat$|pushd |pushd\\\\t|pushd$|until |until\\\\t|until$|while |while\\\\t|while$|local |local\\\\t|local$|case |case\\\\t|case$|done |done\\\\t|done$|elif |elif\\\\t|elif$|else |else\\\\t|else$|esac |esac\\\\t|esac$|popd |popd\\\\t|popd$|then |then\\\\t|then$|time |time\\\\t|time$|for |for\\\\t|for$|end |end\\\\t|end$|fi |fi\\\\t|fi$|do |do\\\\t|do$|in |in\\\\t|in$|if |if\\\\t|if$)(?!\\\\\\\\\\\\n?$)","beginCaptures":{},"end":"(?=[\\\\n\\\\&);\`{|}]|[\\\\t ]*#|])(?<!\\\\\\\\)","endCaptures":{},"name":"meta.statement.command.shell","patterns":[{"include":"#command_name_range"},{"include":"#line_continuation"},{"include":"#option"},{"include":"#argument"},{"include":"#string"},{"include":"#heredoc"}]},"comment":{"captures":{"1":{"name":"comment.line.number-sign.shell meta.shebang.shell"},"2":{"name":"punctuation.definition.comment.shebang.shell"},"3":{"name":"comment.line.number-sign.shell"},"4":{"name":"punctuation.definition.comment.shell"}},"match":"(?:^|[\\\\t ]++)(?:((#!).*)|((#).*))"},"comments":{"patterns":[{"include":"#block_comment"},{"include":"#line_comment"}]},"compound-command":{"patterns":[{"begin":"\\\\[","beginCaptures":{"0":{"name":"punctuation.definition.logical-expression.shell"}},"end":"]","endCaptures":{"0":{"name":"punctuation.definition.logical-expression.shell"}},"name":"meta.scope.logical-expression.shell","patterns":[{"include":"#logical-expression"},{"include":"#initial_context"}]},{"begin":"(?<=\\\\s|^)\\\\{(?=\\\\s|$)","beginCaptures":{"0":{"name":"punctuation.definition.group.shell"}},"end":"(?<=^|;)\\\\s*(})","endCaptures":{"1":{"name":"punctuation.definition.group.shell"}},"name":"meta.scope.group.shell","patterns":[{"include":"#initial_context"}]}]},"continuation_of_double_quoted_command_name":{"begin":"\\\\G(?<=\\")","beginCaptures":{},"contentName":"meta.statement.command.name.continuation string.quoted.double entity.name.function.call entity.name.command","end":"\\"","endCaptures":{"0":{"name":"string.quoted.double.shell punctuation.definition.string.end.shell entity.name.function.call.shell entity.name.command.shell"}},"patterns":[{"match":"\\\\\\\\[\\\\n\\"$\\\\\\\\\`]","name":"constant.character.escape.shell"},{"include":"#variable"},{"include":"#interpolation"}]},"continuation_of_single_quoted_command_name":{"begin":"\\\\G(?<=')","beginCaptures":{},"contentName":"meta.statement.command.name.continuation string.quoted.single entity.name.function.call entity.name.command","end":"'","endCaptures":{"0":{"name":"string.quoted.single.shell punctuation.definition.string.end.shell entity.name.function.call.shell entity.name.command.shell"}}},"custom_command_names":{"patterns":[]},"custom_commands":{"patterns":[]},"double_quote_context":{"patterns":[{"match":"\\\\\\\\[\\\\n\\"$\\\\\\\\\`]","name":"constant.character.escape.shell"},{"include":"#variable"},{"include":"#interpolation"}]},"double_quote_escape_char":{"match":"\\\\\\\\[\\\\n\\"$\\\\\\\\\`]","name":"constant.character.escape.shell"},"floating_keyword":{"patterns":[{"match":"(?<=^|[\\\\t \\\\&;])(?:then|elif|else|done|end|do|if|fi)(?=[\\\\t \\\\&;]|$)","name":"keyword.control.$0.shell"}]},"for_statement":{"patterns":[{"begin":"\\\\b(for)\\\\b[\\\\t ]*+((?<!\\\\w)[-0-9A-Z_a-z]+(?!\\\\w))[\\\\t ]*+\\\\b(in)\\\\b","beginCaptures":{"1":{"name":"keyword.control.for.shell"},"2":{"name":"variable.other.for.shell"},"3":{"name":"keyword.control.in.shell"}},"end":"(?=[\\\\n\\\\&);\`{|}]|[\\\\t ]*#|])(?<!\\\\\\\\)","endCaptures":{},"name":"meta.for.in.shell","patterns":[{"include":"#string"},{"include":"#simple_unquoted"},{"include":"#normal_context"}]},{"begin":"\\\\b(for)\\\\b","beginCaptures":{"1":{"name":"keyword.control.for.shell"}},"end":"(?=[\\\\n\\\\&);\`{|}]|[\\\\t ]*#|])(?<!\\\\\\\\)","endCaptures":{},"name":"meta.for.shell","patterns":[{"include":"#arithmetic_double"},{"include":"#normal_context"}]}]},"function_definition":{"applyEndPatternLast":1,"begin":"[\\\\t ]*+(?:\\\\b(function)\\\\b[\\\\t ]*+([^\\\\t\\\\n\\\\r \\"'()=]+)(?:(\\\\()[\\\\t ]*+(\\\\)))?|([^\\\\t\\\\n\\\\r \\"'()=]+)[\\\\t ]*+(\\\\()[\\\\t ]*+(\\\\)))","beginCaptures":{"1":{"name":"storage.type.function.shell"},"2":{"name":"entity.name.function.shell"},"3":{"name":"punctuation.definition.arguments.shell"},"4":{"name":"punctuation.definition.arguments.shell"},"5":{"name":"entity.name.function.shell"},"6":{"name":"punctuation.definition.arguments.shell"},"7":{"name":"punctuation.definition.arguments.shell"}},"end":"(?<=[)}])","endCaptures":{},"name":"meta.function.shell","patterns":[{"match":"\\\\G[\\\\t\\\\n ]"},{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.group.shell punctuation.section.function.definition.shell"}},"end":"}","endCaptures":{"0":{"name":"punctuation.definition.group.shell punctuation.section.function.definition.shell"}},"name":"meta.function.body.shell","patterns":[{"include":"#initial_context"}]},{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.definition.group.shell punctuation.section.function.definition.shell"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.group.shell punctuation.section.function.definition.shell"}},"name":"meta.function.body.shell","patterns":[{"include":"#initial_context"}]},{"include":"#initial_context"}]},"heredoc":{"patterns":[{"begin":"((?<!<)<<-)[\\\\t ]*+([\\"'])[\\\\t ]*+([^\\"']+?)(?=[\\"\\\\&';<\\\\s])(\\\\2)(.*)","beginCaptures":{"1":{"name":"keyword.operator.heredoc.shell"},"2":{"name":"punctuation.definition.string.heredoc.quote.shell"},"3":{"name":"punctuation.definition.string.heredoc.delimiter.shell"},"4":{"name":"punctuation.definition.string.heredoc.quote.shell"},"5":{"patterns":[{"include":"#redirect_fix"},{"include":"#typical_statements"}]}},"contentName":"string.quoted.heredoc.indent.$3","end":"^\\\\t*\\\\3(?=[\\\\&;\\\\s]|$)","endCaptures":{"0":{"name":"punctuation.definition.string.heredoc.$0.shell"}},"patterns":[]},{"begin":"((?<!<)<<(?!<))[\\\\t ]*+([\\"'])[\\\\t ]*+([^\\"']+?)(?=[\\"\\\\&';<\\\\s])(\\\\2)(.*)","beginCaptures":{"1":{"name":"keyword.operator.heredoc.shell"},"2":{"name":"punctuation.definition.string.heredoc.quote.shell"},"3":{"name":"punctuation.definition.string.heredoc.delimiter.shell"},"4":{"name":"punctuation.definition.string.heredoc.quote.shell"},"5":{"patterns":[{"include":"#redirect_fix"},{"include":"#typical_statements"}]}},"contentName":"string.quoted.heredoc.no-indent.$3","end":"^\\\\3(?=[\\\\&;\\\\s]|$)","endCaptures":{"0":{"name":"punctuation.definition.string.heredoc.delimiter.shell"}},"patterns":[]},{"begin":"((?<!<)<<-)[\\\\t ]*+([^\\\\t \\"']+)(?=[\\"\\\\&';<\\\\s])(.*)","beginCaptures":{"1":{"name":"keyword.operator.heredoc.shell"},"2":{"name":"punctuation.definition.string.heredoc.delimiter.shell"},"3":{"patterns":[{"include":"#redirect_fix"},{"include":"#typical_statements"}]}},"contentName":"string.unquoted.heredoc.indent.$2","end":"^\\\\t*\\\\2(?=[\\\\&;\\\\s]|$)","endCaptures":{"0":{"name":"punctuation.definition.string.heredoc.delimiter.shell"}},"patterns":[{"include":"#double_quote_escape_char"},{"include":"#variable"},{"include":"#interpolation"}]},{"begin":"((?<!<)<<(?!<))[\\\\t ]*+([^\\\\t \\"']+)(?=[\\"\\\\&';<\\\\s])(.*)","beginCaptures":{"1":{"name":"keyword.operator.heredoc.shell"},"2":{"name":"punctuation.definition.string.heredoc.delimiter.shell"},"3":{"patterns":[{"include":"#redirect_fix"},{"include":"#typical_statements"}]}},"contentName":"string.unquoted.heredoc.no-indent.$2","end":"^\\\\2(?=[\\\\&;\\\\s]|$)","endCaptures":{"0":{"name":"punctuation.definition.string.heredoc.delimiter.shell"}},"patterns":[{"include":"#double_quote_escape_char"},{"include":"#variable"},{"include":"#interpolation"}]}]},"herestring":{"patterns":[{"begin":"(<<<)\\\\s*(('))","beginCaptures":{"1":{"name":"keyword.operator.herestring.shell"},"2":{"name":"string.quoted.single.shell"},"3":{"name":"punctuation.definition.string.begin.shell"}},"contentName":"string.quoted.single.shell","end":"(')","endCaptures":{"0":{"name":"string.quoted.single.shell"},"1":{"name":"punctuation.definition.string.end.shell"}},"name":"meta.herestring.shell"},{"begin":"(<<<)\\\\s*((\\"))","beginCaptures":{"1":{"name":"keyword.operator.herestring.shell"},"2":{"name":"string.quoted.double.shell"},"3":{"name":"punctuation.definition.string.begin.shell"}},"contentName":"string.quoted.double.shell","end":"(\\")","endCaptures":{"0":{"name":"string.quoted.double.shell"},"1":{"name":"punctuation.definition.string.end.shell"}},"name":"meta.herestring.shell","patterns":[{"include":"#double_quote_context"}]},{"captures":{"1":{"name":"keyword.operator.herestring.shell"},"2":{"name":"string.unquoted.herestring.shell","patterns":[{"include":"#initial_context"}]}},"match":"(<<<)\\\\s*(([^)\\\\\\\\\\\\s]|\\\\\\\\.)+)","name":"meta.herestring.shell"}]},"initial_context":{"patterns":[{"include":"#comment"},{"include":"#pipeline"},{"include":"#normal_statement_seperator"},{"include":"#logical_expression_double"},{"include":"#logical_expression_single"},{"include":"#assignment_statement"},{"include":"#case_statement"},{"include":"#for_statement"},{"include":"#loop"},{"include":"#function_definition"},{"include":"#line_continuation"},{"include":"#arithmetic_double"},{"include":"#misc_ranges"},{"include":"#variable"},{"include":"#interpolation"},{"include":"#heredoc"},{"include":"#herestring"},{"include":"#redirection"},{"include":"#pathname"},{"include":"#floating_keyword"},{"include":"#alias_statement"},{"include":"#normal_statement"},{"include":"#string"},{"include":"#support"}]},"inline_comment":{"captures":{"1":{"name":"comment.block.shell punctuation.definition.comment.begin.shell"},"2":{"name":"comment.block.shell"},"3":{"patterns":[{"match":"\\\\*/","name":"comment.block.shell punctuation.definition.comment.end.shell"},{"match":"\\\\*","name":"comment.block.shell"}]}},"match":"(/\\\\*)((?:[^*]|\\\\*++[^/])*+(\\\\*++/))"},"interpolation":{"patterns":[{"include":"#arithmetic_dollar"},{"include":"#subshell_dollar"},{"begin":"\`","beginCaptures":{"0":{"name":"punctuation.definition.evaluation.backticks.shell"}},"end":"\`","endCaptures":{"0":{"name":"punctuation.definition.evaluation.backticks.shell"}},"name":"string.interpolated.backtick.shell","patterns":[{"match":"\\\\\\\\[$\\\\\\\\\`]","name":"constant.character.escape.shell"},{"begin":"(?<=\\\\W)(?=#)(?!#\\\\{)","beginCaptures":{"1":{"name":"punctuation.whitespace.comment.leading.shell"}},"end":"(?!\\\\G)","patterns":[{"begin":"#","beginCaptures":{"0":{"name":"punctuation.definition.comment.shell"}},"end":"(?=\`)","name":"comment.line.number-sign.shell"}]},{"include":"#initial_context"}]}]},"keyword":{"patterns":[{"match":"(?<=^|[\\\\&;\\\\s])(then|else|elif|fi|for|in|do|done|select|continue|esac|while|until|return)(?=[\\\\&;\\\\s]|$)","name":"keyword.control.shell"},{"match":"(?<=^|[\\\\&;\\\\s])(?:export|declare|typeset|local|readonly)(?=[\\\\&;\\\\s]|$)","name":"storage.modifier.shell"}]},"line_comment":{"begin":"\\\\s*+(//)","beginCaptures":{"1":{"name":"punctuation.definition.comment.shell"}},"end":"(?<=\\\\n)(?<!\\\\\\\\\\\\n)","endCaptures":{},"name":"comment.line.double-slash.shell","patterns":[{"include":"#line_continuation_character"}]},"line_continuation":{"match":"\\\\\\\\(?=\\\\n)","name":"constant.character.escape.line-continuation.shell"},"logical-expression":{"patterns":[{"include":"#arithmetic_no_dollar"},{"match":"=[=~]?|!=?|[<>]|&&|\\\\|\\\\|","name":"keyword.operator.logical.shell"},{"match":"(?<!\\\\S)-(nt|ot|ef|eq|ne|l[et]|g[et]|[GLNOSa-hknopr-uwxz])\\\\b","name":"keyword.operator.logical.shell"}]},"logical_expression_context":{"patterns":[{"include":"#regex_comparison"},{"include":"#arithmetic_no_dollar"},{"include":"#logical-expression"},{"include":"#logical_expression_single"},{"include":"#logical_expression_double"},{"include":"#comment"},{"include":"#boolean"},{"include":"#redirect_number"},{"include":"#numeric_literal"},{"include":"#pipeline"},{"include":"#normal_statement_seperator"},{"include":"#string"},{"include":"#variable"},{"include":"#interpolation"},{"include":"#heredoc"},{"include":"#herestring"},{"include":"#pathname"},{"include":"#floating_keyword"},{"include":"#support"}]},"logical_expression_double":{"begin":"\\\\[\\\\[","beginCaptures":{"0":{"name":"punctuation.definition.logical-expression.shell"}},"end":"]]","endCaptures":{"0":{"name":"punctuation.definition.logical-expression.shell"}},"name":"meta.scope.logical-expression.shell","patterns":[{"include":"#logical_expression_context"}]},"logical_expression_single":{"begin":"\\\\[","beginCaptures":{"0":{"name":"punctuation.definition.logical-expression.shell"}},"end":"]","endCaptures":{"0":{"name":"punctuation.definition.logical-expression.shell"}},"name":"meta.scope.logical-expression.shell","patterns":[{"include":"#logical_expression_context"}]},"loop":{"patterns":[{"begin":"(?<=^|[\\\\&;\\\\s])(for)\\\\s+(.+?)\\\\s+(in)(?=[\\\\&;\\\\s]|$)","beginCaptures":{"1":{"name":"keyword.control.shell"},"2":{"name":"variable.other.loop.shell","patterns":[{"include":"#string"}]},"3":{"name":"keyword.control.shell"}},"end":"(?<=^|[\\\\&;\\\\s])done(?=[\\\\&;\\\\s]|$|\\\\))","endCaptures":{"0":{"name":"keyword.control.shell"}},"name":"meta.scope.for-in-loop.shell","patterns":[{"include":"#initial_context"}]},{"begin":"(?<=^|[\\\\&;\\\\s])(while|until)(?=[\\\\&;\\\\s]|$)","beginCaptures":{"1":{"name":"keyword.control.shell"}},"end":"(?<=^|[\\\\&;\\\\s])done(?=[\\\\&;\\\\s]|$|\\\\))","endCaptures":{"0":{"name":"keyword.control.shell"}},"name":"meta.scope.while-loop.shell","patterns":[{"include":"#initial_context"}]},{"begin":"(?<=^|[\\\\&;\\\\s])(select)\\\\s+((?:[^\\\\\\\\\\\\s]|\\\\\\\\.)+)(?=[\\\\&;\\\\s]|$)","beginCaptures":{"1":{"name":"keyword.control.shell"},"2":{"name":"variable.other.loop.shell"}},"end":"(?<=^|[\\\\&;\\\\s])(done)(?=[\\\\&;\\\\s]|$|\\\\))","endCaptures":{"1":{"name":"keyword.control.shell"}},"name":"meta.scope.select-block.shell","patterns":[{"include":"#initial_context"}]},{"begin":"(?<=^|[\\\\&;\\\\s])if(?=[\\\\&;\\\\s]|$)","beginCaptures":{"0":{"name":"keyword.control.if.shell"}},"end":"(?<=^|[\\\\&;\\\\s])fi(?=[\\\\&;\\\\s]|$)","endCaptures":{"0":{"name":"keyword.control.fi.shell"}},"name":"meta.scope.if-block.shell","patterns":[{"include":"#initial_context"}]}]},"math":{"patterns":[{"include":"#variable"},{"match":"\\\\+{1,2}|-{1,2}|[!~]|\\\\*{1,2}|[%/]|<[<=]?|>[=>]?|==|!=|^|\\\\|{1,2}|&{1,2}|[,:=?]|[-%\\\\&*+/^|]=|<<=|>>=","name":"keyword.operator.arithmetic.shell"},{"match":"0[Xx]\\\\h+","name":"constant.numeric.hex.shell"},{"match":";","name":"punctuation.separator.semicolon.range"},{"match":"0\\\\d+","name":"constant.numeric.octal.shell"},{"match":"\\\\d{1,2}#[0-9@-Z_a-z]+","name":"constant.numeric.other.shell"},{"match":"\\\\d+","name":"constant.numeric.integer.shell"},{"match":"(?<!\\\\w)[0-9A-Z_a-z]+(?!\\\\w)","name":"variable.other.normal.shell"}]},"math_operators":{"patterns":[{"match":"\\\\+{1,2}|-{1,2}|[!~]|\\\\*{1,2}|[%/]|<[<=]?|>[=>]?|==|!=|^|\\\\|{1,2}|&{1,2}|[,:=?]|[-%\\\\&*+/^|]=|<<=|>>=","name":"keyword.operator.arithmetic.shell"},{"match":"0[Xx]\\\\h+","name":"constant.numeric.hex.shell"},{"match":"0\\\\d+","name":"constant.numeric.octal.shell"},{"match":"\\\\d{1,2}#[0-9@-Z_a-z]+","name":"constant.numeric.other.shell"},{"match":"\\\\d+","name":"constant.numeric.integer.shell"}]},"misc_ranges":{"patterns":[{"include":"#logical_expression_single"},{"include":"#logical_expression_double"},{"include":"#subshell_dollar"},{"begin":"(?<![^\\\\t ])(\\\\{)(?![$\\\\w])","beginCaptures":{"1":{"name":"punctuation.definition.group.shell"}},"end":"}","endCaptures":{"0":{"name":"punctuation.definition.group.shell"}},"name":"meta.scope.group.shell","patterns":[{"include":"#initial_context"}]}]},"modified_assignment_statement":{"begin":"(?<=^|[\\\\t \\\\&;])(?:readonly|declare|typeset|export|local)(?=[\\\\t \\\\&;]|$)","beginCaptures":{"0":{"name":"storage.modifier.$0.shell"}},"end":"(?=[\\\\n\\\\&);\`{|}]|[\\\\t ]*#|])(?<!\\\\\\\\)","endCaptures":{},"name":"meta.statement.shell meta.expression.assignment.modified.shell","patterns":[{"match":"(?<!\\\\w)-\\\\w+\\\\b","name":"string.unquoted.argument.shell constant.other.option.shell"},{"include":"#array_value"},{"captures":{"1":{"name":"variable.other.assignment.shell"},"2":{"name":"punctuation.definition.array.access.shell"},"3":{"name":"variable.other.assignment.shell"},"4":{"name":"constant.numeric.shell constant.numeric.integer.shell"},"5":{"name":"punctuation.definition.array.access.shell"},"6":{"name":"keyword.operator.assignment.shell"},"7":{"name":"keyword.operator.assignment.compound.shell"},"8":{"name":"keyword.operator.assignment.compound.shell"},"9":{"name":"constant.numeric.shell constant.numeric.hex.shell"},"10":{"name":"constant.numeric.shell constant.numeric.octal.shell"},"11":{"name":"constant.numeric.shell constant.numeric.other.shell"},"12":{"name":"constant.numeric.shell constant.numeric.decimal.shell"},"13":{"name":"constant.numeric.shell constant.numeric.version.shell"},"14":{"name":"constant.numeric.shell constant.numeric.integer.shell"}},"match":"((?<!\\\\w)[-0-9A-Z_a-z]+(?!\\\\w))(?:(\\\\[)((?:(?:\\\\$?(?<!\\\\w)[-0-9A-Z_a-z]+(?!\\\\w)|@)|\\\\*)|(-?\\\\d+))(]))?(?:(?:(=)|(\\\\+=))|(-=))?(?:(?<=[\\\\t =]|^|[(\\\\[{])(?:(?:(?:(?:(?:(0[Xx]\\\\h+)|(0\\\\d+))|(\\\\d{1,2}#[0-9@-Z_a-z]+))|(-?\\\\d+\\\\.\\\\d+))|(-?\\\\d+(?:\\\\.\\\\d+)+))|(-?\\\\d+))(?=[\\\\t ]|$|[);}]))?"},{"include":"#normal_context"}]},"modifiers":{"match":"(?<=^|[\\\\t \\\\&;])(?:readonly|declare|typeset|export|local)(?=[\\\\t \\\\&;]|$)","name":"storage.modifier.$0.shell"},"normal_assignment_statement":{"begin":"[\\\\t ]*+((?<!\\\\w)[-0-9A-Z_a-z]+(?!\\\\w))(?:(\\\\[)((?:(?:\\\\$?(?<!\\\\w)[-0-9A-Z_a-z]+(?!\\\\w)|@)|\\\\*)|(-?\\\\d+))(]))?(?:(?:(=)|(\\\\+=))|(-=))","beginCaptures":{"1":{"name":"variable.other.assignment.shell"},"2":{"name":"punctuation.definition.array.access.shell"},"3":{"name":"variable.other.assignment.shell"},"4":{"name":"constant.numeric.shell constant.numeric.integer.shell"},"5":{"name":"punctuation.definition.array.access.shell"},"6":{"name":"keyword.operator.assignment.shell"},"7":{"name":"keyword.operator.assignment.compound.shell"},"8":{"name":"keyword.operator.assignment.compound.shell"}},"end":"(?=[\\\\n\\\\&);\`{|}]|[\\\\t ]*#|])(?<!\\\\\\\\)","endCaptures":{},"name":"meta.expression.assignment.shell","patterns":[{"include":"#comment"},{"include":"#string"},{"include":"#normal_assignment_statement"},{"begin":"(?<=[\\\\t ])(?![\\\\t ]|\\\\w+=)","beginCaptures":{},"end":"(?=[\\\\n\\\\&);\`{|}]|[\\\\t ]*#|])(?<!\\\\\\\\)","endCaptures":{},"name":"meta.statement.command.env.shell","patterns":[{"include":"#command_name_range"},{"include":"#line_continuation"},{"include":"#option"},{"include":"#argument"},{"include":"#string"}]},{"include":"#simple_unquoted"},{"include":"#normal_context"}]},"normal_context":{"patterns":[{"include":"#comment"},{"include":"#pipeline"},{"include":"#normal_statement_seperator"},{"include":"#misc_ranges"},{"include":"#boolean"},{"include":"#redirect_number"},{"include":"#numeric_literal"},{"include":"#string"},{"include":"#variable"},{"include":"#interpolation"},{"include":"#heredoc"},{"include":"#herestring"},{"include":"#redirection"},{"include":"#pathname"},{"include":"#floating_keyword"},{"include":"#support"},{"include":"#parenthese"}]},"normal_statement":{"begin":"(?!^[\\\\t ]*+$)(?:(?<=(?:^until| until|\\\\tuntil|^while| while|\\\\twhile|^elif| elif|\\\\telif|^else| else|\\\\telse|^then| then|\\\\tthen|^do| do|\\\\tdo|^if| if|\\\\tif) )|(?<=^|[!\\\\&(;\`{|]))[\\\\t ]*+(?!nocorrect\\\\W|nocorrect\\\\$|function\\\\W|function\\\\$|foreach\\\\W|foreach\\\\$|repeat\\\\W|repeat\\\\$|logout\\\\W|logout\\\\$|coproc\\\\W|coproc\\\\$|select\\\\W|select\\\\$|while\\\\W|while\\\\$|pushd\\\\W|pushd\\\\$|until\\\\W|until\\\\$|case\\\\W|case\\\\$|done\\\\W|done\\\\$|elif\\\\W|elif\\\\$|else\\\\W|else\\\\$|esac\\\\W|esac\\\\$|popd\\\\W|popd\\\\$|then\\\\W|then\\\\$|time\\\\W|time\\\\$|for\\\\W|for\\\\$|end\\\\W|end\\\\$|fi\\\\W|fi\\\\$|do\\\\W|do\\\\$|in\\\\W|in\\\\$|if\\\\W|if\\\\$)","beginCaptures":{},"end":"(?=[\\\\n\\\\&);\`{|}]|[\\\\t ]*#|])(?<!\\\\\\\\)","endCaptures":{},"name":"meta.statement.shell","patterns":[{"include":"#typical_statements"}]},"normal_statement_seperator":{"captures":{"1":{"name":"punctuation.terminator.statement.semicolon.shell"},"2":{"name":"punctuation.separator.statement.and.shell"},"3":{"name":"punctuation.separator.statement.or.shell"},"4":{"name":"punctuation.separator.statement.background.shell"}},"match":"(?:(?:(;)|(&&))|(\\\\|\\\\|))|(&)"},"numeric_literal":{"captures":{"1":{"name":"constant.numeric.shell constant.numeric.hex.shell"},"2":{"name":"constant.numeric.shell constant.numeric.octal.shell"},"3":{"name":"constant.numeric.shell constant.numeric.other.shell"},"4":{"name":"constant.numeric.shell constant.numeric.decimal.shell"},"5":{"name":"constant.numeric.shell constant.numeric.version.shell"},"6":{"name":"constant.numeric.shell constant.numeric.integer.shell"}},"match":"(?<=[\\\\t =]|^|[(\\\\[{])(?:(?:(?:(?:(?:(0[Xx]\\\\h+)|(0\\\\d+))|(\\\\d{1,2}#[0-9@-Z_a-z]+))|(-?\\\\d+\\\\.\\\\d+))|(-?\\\\d+(?:\\\\.\\\\d+)+))|(-?\\\\d+))(?=[\\\\t ]|$|[);}])"},"option":{"begin":"[\\\\t ]++(-)((?![\\\\n!#\\\\&()<>\\\\[{|]|$|[\\\\t ;]))","beginCaptures":{"1":{"name":"string.unquoted.argument.shell constant.other.option.dash.shell"},"2":{"name":"string.unquoted.argument.shell constant.other.option.shell"}},"contentName":"string.unquoted.argument constant.other.option","end":"(?=[\\\\t ])|(?=[\\\\n\\\\&);\`{|}]|[\\\\t ]*#|])(?<!\\\\\\\\)","endCaptures":{},"patterns":[{"include":"#option_context"}]},"option_context":{"patterns":[{"include":"#misc_ranges"},{"include":"#string"},{"include":"#variable"},{"include":"#interpolation"},{"include":"#heredoc"},{"include":"#herestring"},{"include":"#redirection"},{"include":"#pathname"},{"include":"#floating_keyword"},{"include":"#support"}]},"parenthese":{"patterns":[{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.section.parenthese.shell"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.parenthese.shell"}},"name":"meta.parenthese.group.shell","patterns":[{"include":"#initial_context"}]}]},"pathname":{"patterns":[{"match":"(?<=[:=\\\\s]|^)~","name":"keyword.operator.tilde.shell"},{"match":"[*?]","name":"keyword.operator.glob.shell"},{"begin":"([!*+?@])(\\\\()","beginCaptures":{"1":{"name":"keyword.operator.extglob.shell"},"2":{"name":"punctuation.definition.extglob.shell"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.extglob.shell"}},"name":"meta.structure.extglob.shell","patterns":[{"include":"#initial_context"}]}]},"pipeline":{"patterns":[{"match":"(?<=^|[\\\\&;\\\\s])(time)(?=[\\\\&;\\\\s]|$)","name":"keyword.other.shell"},{"match":"[!|]","name":"keyword.operator.pipe.shell"}]},"redirect_fix":{"captures":{"1":{"name":"keyword.operator.redirect.shell"},"2":{"name":"string.unquoted.argument.shell"}},"match":"(>>?)[\\\\t ]*+([^\\\\t\\\\n \\"$\\\\&-);<>\\\\\\\\\`|]+)"},"redirect_number":{"captures":{"1":{"name":"keyword.operator.redirect.stdout.shell"},"2":{"name":"keyword.operator.redirect.stderr.shell"},"3":{"name":"keyword.operator.redirect.$3.shell"}},"match":"(?<=[\\\\t ])(?:(1)|(2)|(\\\\d+))(?=>)"},"redirection":{"patterns":[{"begin":"[<>]\\\\(","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.shell"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.string.end.shell"}},"name":"string.interpolated.process-substitution.shell","patterns":[{"include":"#initial_context"}]},{"match":"(?<![<>])(&>|\\\\d*>&\\\\d*|\\\\d*(>>|[<>])|\\\\d*<&|\\\\d*<>)(?![<>])","name":"keyword.operator.redirect.shell"}]},"regex_comparison":{"match":"=~","name":"keyword.operator.logical.regex.shell"},"regexp":{"patterns":[{"match":".+"}]},"simple_options":{"captures":{"0":{"patterns":[{"captures":{"1":{"name":"string.unquoted.argument.shell constant.other.option.dash.shell"},"2":{"name":"string.unquoted.argument.shell constant.other.option.shell"}},"match":"[\\\\t ]++(-)(\\\\w+)"}]}},"match":"(?:[\\\\t ]++-\\\\w+)*"},"simple_unquoted":{"match":"[^\\\\t\\\\n \\"$\\\\&-);<>\\\\\\\\\`|]","name":"string.unquoted.shell"},"special_expansion":{"match":"!|:[-=?]?|[*@]|##?|%%|[%/]","name":"keyword.operator.expansion.shell"},"start_of_command":{"match":"[\\\\t ]*+(?![\\\\n!#\\\\&()<>\\\\[{|]|$|[\\\\t ;])(?!nocorrect |nocorrect\\\\t|nocorrect$|readonly |readonly\\\\t|readonly$|function |function\\\\t|function$|foreach |foreach\\\\t|foreach$|coproc |coproc\\\\t|coproc$|logout |logout\\\\t|logout$|export |export\\\\t|export$|select |select\\\\t|select$|repeat |repeat\\\\t|repeat$|pushd |pushd\\\\t|pushd$|until |until\\\\t|until$|while |while\\\\t|while$|local |local\\\\t|local$|case |case\\\\t|case$|done |done\\\\t|done$|elif |elif\\\\t|elif$|else |else\\\\t|else$|esac |esac\\\\t|esac$|popd |popd\\\\t|popd$|then |then\\\\t|then$|time |time\\\\t|time$|for |for\\\\t|for$|end |end\\\\t|end$|fi |fi\\\\t|fi$|do |do\\\\t|do$|in |in\\\\t|in$|if |if\\\\t|if$)(?!\\\\\\\\\\\\n?$)"},"string":{"patterns":[{"match":"\\\\\\\\.","name":"constant.character.escape.shell"},{"begin":"'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.shell"}},"end":"'","endCaptures":{"0":{"name":"punctuation.definition.string.end.shell"}},"name":"string.quoted.single.shell"},{"begin":"\\\\$?\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.shell"}},"end":"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.shell"}},"name":"string.quoted.double.shell","patterns":[{"match":"\\\\\\\\[\\\\n\\"$\\\\\\\\\`]","name":"constant.character.escape.shell"},{"include":"#variable"},{"include":"#interpolation"}]},{"begin":"\\\\$'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.shell"}},"end":"'","endCaptures":{"0":{"name":"punctuation.definition.string.end.shell"}},"name":"string.quoted.single.dollar.shell","patterns":[{"match":"\\\\\\\\['\\\\\\\\abefnrtv]","name":"constant.character.escape.ansi-c.shell"},{"match":"\\\\\\\\[0-9]{3}\\"","name":"constant.character.escape.octal.shell"},{"match":"\\\\\\\\x\\\\h{2}\\"","name":"constant.character.escape.hex.shell"},{"match":"\\\\\\\\c.\\"","name":"constant.character.escape.control-char.shell"}]}]},"subshell_dollar":{"patterns":[{"begin":"\\\\$\\\\(","beginCaptures":{"0":{"name":"punctuation.definition.subshell.single.shell"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.subshell.single.shell"}},"name":"meta.scope.subshell","patterns":[{"include":"#parenthese"},{"include":"#initial_context"}]}]},"support":{"patterns":[{"match":"(?<=^|[\\\\&;\\\\s])[.:](?=[\\\\&;\\\\s]|$)","name":"support.function.builtin.shell"}]},"typical_statements":{"patterns":[{"include":"#assignment_statement"},{"include":"#case_statement"},{"include":"#for_statement"},{"include":"#while_statement"},{"include":"#function_definition"},{"include":"#command_statement"},{"include":"#line_continuation"},{"include":"#arithmetic_double"},{"include":"#normal_context"}]},"variable":{"patterns":[{"captures":{"1":{"name":"punctuation.definition.variable.shell variable.parameter.positional.all.shell"},"2":{"name":"variable.parameter.positional.all.shell"}},"match":"(\\\\$)(@(?!\\\\w))"},{"captures":{"1":{"name":"punctuation.definition.variable.shell variable.parameter.positional.shell"},"2":{"name":"variable.parameter.positional.shell"}},"match":"(\\\\$)([0-9](?!\\\\w))"},{"captures":{"1":{"name":"punctuation.definition.variable.shell variable.language.special.shell"},"2":{"name":"variable.language.special.shell"}},"match":"(\\\\$)([-!#$*0?_](?!\\\\w))"},{"begin":"(\\\\$)(\\\\{)[\\\\t ]*+(?=\\\\d)","beginCaptures":{"1":{"name":"punctuation.definition.variable.shell variable.parameter.positional.shell"},"2":{"name":"punctuation.section.bracket.curly.variable.begin.shell punctuation.definition.variable.shell variable.parameter.positional.shell"}},"contentName":"meta.parameter-expansion","end":"}","endCaptures":{"0":{"name":"punctuation.section.bracket.curly.variable.end.shell punctuation.definition.variable.shell variable.parameter.positional.shell"}},"patterns":[{"include":"#special_expansion"},{"include":"#array_access_inline"},{"match":"[0-9]+","name":"variable.parameter.positional.shell"},{"match":"(?<!\\\\w)[-0-9A-Z_a-z]+(?!\\\\w)","name":"variable.other.normal.shell"},{"include":"#variable"},{"include":"#string"}]},{"begin":"(\\\\$)(\\\\{)","beginCaptures":{"1":{"name":"punctuation.definition.variable.shell"},"2":{"name":"punctuation.section.bracket.curly.variable.begin.shell punctuation.definition.variable.shell"}},"contentName":"meta.parameter-expansion","end":"}","endCaptures":{"0":{"name":"punctuation.section.bracket.curly.variable.end.shell punctuation.definition.variable.shell"}},"patterns":[{"include":"#special_expansion"},{"include":"#array_access_inline"},{"match":"(?<!\\\\w)[-0-9A-Z_a-z]+(?!\\\\w)","name":"variable.other.normal.shell"},{"include":"#variable"},{"include":"#string"}]},{"captures":{"1":{"name":"punctuation.definition.variable.shell variable.other.normal.shell"},"2":{"name":"variable.other.normal.shell"}},"match":"(\\\\$)(\\\\w+(?!\\\\w))"}]},"while_statement":{"patterns":[{"begin":"\\\\b(while)\\\\b","beginCaptures":{"1":{"name":"keyword.control.while.shell"}},"end":"(?=[\\\\n\\\\&);\`{|}]|[\\\\t ]*#|])(?<!\\\\\\\\)","endCaptures":{},"name":"meta.while.shell","patterns":[{"include":"#line_continuation"},{"include":"#math_operators"},{"include":"#option"},{"include":"#simple_unquoted"},{"include":"#normal_context"},{"include":"#string"}]}]}},"scopeName":"source.shell","aliases":["bash","sh","shell","zsh"]}`))];export{e as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e}from"./bundle-mjs-DLPpRFyl.js";import{At as t}from"./centered-state-BddhEEtO.js";import{n,t as r}from"./utils-rQGbOrwc.js";import{i,r as a,s as o,t as s}from"./dialog-DFvXTkFv.js";import{t as c}from"./markdown-D4-ADgH9.js";import{r as l}from"./skills-98vCroU8.js";var u=n(`arrow-right`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),d=n(`workflow`,[[`rect`,{width:`8`,height:`8`,x:`3`,y:`3`,rx:`2`,key:`by2w9f`}],[`path`,{d:`M7 11v4a2 2 0 0 0 2 2h4`,key:`xkn7yn`}],[`rect`,{width:`8`,height:`8`,x:`13`,y:`13`,rx:`2`,key:`1cgmvn`}]]),f=e();function p(e){return(0,f.jsx)(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,"aria-hidden":`true`,...e,children:(0,f.jsx)(`path`,{d:`M12 1.9a10.1 10.1 0 0 0-3.2 19.7c.5.1.7-.2.7-.5v-1.8c-2.8.6-3.4-1.2-3.4-1.2-.5-1.2-1.1-1.5-1.1-1.5-.9-.6.1-.6.1-.6 1 .1 1.5 1 1.5 1 .9 1.6 2.4 1.1 3 .9.1-.7.4-1.1.6-1.4-2.2-.3-4.6-1.1-4.6-5 0-1.1.4-2 1-2.7-.1-.3-.4-1.3.1-2.7 0 0 .9-.3 2.8 1a9.6 9.6 0 0 1 5 0c1.9-1.3 2.8-1 2.8-1 .5 1.4.2 2.4.1 2.7.6.7 1 1.6 1 2.7 0 3.9-2.4 4.7-4.6 5 .4.3.7.9.7 1.9v2.8c0 .3.2.6.7.5A10.1 10.1 0 0 0 12 1.9z`})})}function m({source:e,className:t}){return(0,f.jsx)(`span`,{"data-slot":`skill-source`,"data-source":e,className:r(`shrink-0 rounded-full border border-border px-2 py-px font-mono text-[10.5px]`,l({source:e})?`font-semibold text-foreground`:`text-soft-foreground`,t),children:e})}function h({skill:e,usedBy:t,heading:n=`h2`}){return(0,f.jsxs)(`div`,{"data-slot":`skill-detail`,className:`min-w-0`,children:[(0,f.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-center gap-2.5`,children:[(0,f.jsx)(n,{className:`min-w-0 font-mono text-lg font-semibold break-all`,children:e.name}),(0,f.jsx)(m,{source:e.source})]}),(0,f.jsxs)(`p`,{"data-slot":`skill-path`,className:`mt-1 font-mono text-[10.5px] break-all text-soft-foreground`,children:[e.path,e.team?` · from ${e.team.repo}`:``]}),e.description?(0,f.jsx)(`p`,{"data-slot":`skill-description`,className:`mt-2.5 text-[13px] text-muted-foreground`,children:e.description}):null,t===void 0?null:(0,f.jsxs)(`section`,{"data-slot":`skill-used-by`,className:`mt-5`,children:[(0,f.jsx)(`h3`,{className:`text-[11px] font-semibold tracking-[.04em] text-soft-foreground uppercase`,children:`Used by`}),t.length>0?(0,f.jsx)(`ul`,{className:`mt-1.5 flex flex-col gap-1`,children:t.map(e=>(0,f.jsxs)(`li`,{className:`flex items-center gap-1.5 font-mono text-xs text-muted-foreground`,children:[(0,f.jsx)(u,{"aria-hidden":`true`,className:`size-3 shrink-0 text-soft-foreground`}),e]},e))}):(0,f.jsx)(`p`,{className:`mt-1.5 text-xs text-soft-foreground`,children:`Not referenced by any workflow yet — quick-task picks it up when the task mentions it.`})]}),(0,f.jsxs)(`section`,{className:`mt-5`,children:[(0,f.jsx)(`h3`,{className:`text-[11px] font-semibold tracking-[.04em] text-soft-foreground uppercase`,children:`Content`}),(0,f.jsx)(`div`,{"data-slot":`skill-body`,className:`mt-2 text-sm`,children:(0,f.jsx)(c,{children:e.body})})]})]})}function g({skill:e,onClose:n}){return(0,f.jsx)(s,{open:e!==null,onOpenChange:e=>e?void 0:n(),children:(0,f.jsx)(a,{"data-slot":`skill-preview`,className:`block max-h-[80dvh] overflow-y-auto sm:max-w-2xl`,children:e?(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(o,{className:`sr-only`,children:e.name}),(0,f.jsx)(i,{className:`sr-only`,children:`Read-only skill preview`}),(0,f.jsx)(h,{skill:e,heading:`h3`}),(0,f.jsx)(`p`,{className:`mt-5`,children:(0,f.jsx)(t,{to:`/skills?skill=${encodeURIComponent(e.name)}`,"data-slot":`skill-preview-manage`,onClick:n,className:`text-xs font-semibold text-violet hover:underline`,children:`Open in the Skills catalog`})})]}):null})})}export{d as a,p as i,g as n,m as r,h as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=new Set([`ai`,`cezar`,`agents`]);function t(t){return e.has(t.source)}function n(e){return[...e].sort((e,n)=>Number(!t(e))-Number(!t(n)))}function r(e,n){let r=new Map;n.forEach((e,t)=>{r.has(e)||r.set(e,t)});let i=e=>r.get(e.name)??2**53-1;return[...e].sort((e,n)=>Number(!t(e))-Number(!t(n))||i(e)-i(n))}function i(e,t){if(t===``)return!0;let n=e.toLowerCase(),r=t.toLowerCase(),i=0;for(let e of r){if(i=n.indexOf(e,i),i===-1)return!1;i+=1}return!0}function a(e,t){let n=[];for(let r of e)for(let e of r.steps??[])e.skill===t&&n.push(`${r.name} › ${e.name??e.id}`);return n}var o=/[\s\-/_.]/;function s(e,t){let n=0;for(let r=e.indexOf(t);r!==-1;r=e.indexOf(t,r+1)){let i=1,a=e[r-1];if(r===0||a!==void 0&&o.test(a)){let n=e[r+t.length];i=n===void 0||o.test(n)?3:2}if(i>n&&(n=i),n===3)break}return n}function c(e,t,n){let r=t.toLowerCase().split(/\s+/).filter(Boolean);if(r.length===0)return 1;let i=[e,...n??[]].join(` `).toLowerCase(),a=0;for(let e of r){let t=s(i,e);if(t===0)return 0;a+=t}return a/(r.length*3)}function l(e,t){if(t===``)return 1;let n=e.toLowerCase(),r=t.toLowerCase();if(n===r)return 6;if(n.startsWith(r))return 5;let a=n.indexOf(r);if(a>0){let e=n[a-1];return e!==void 0&&o.test(e)?4:3}return+!!i(n,r)}function u(e,t){let n=e.split(`-`).filter(Boolean);return t?[...n,t]:n}var d=10;function f(e,t,n){let r=n.toLowerCase().split(/\s+/).filter(Boolean);if(r.length===0)return 1;let i=0;for(let n of r){let r=l(e,n),a=t?l(t,n):0;if(r===0&&a===0)return 0;i+=r>0?r+d:a}return i}function p(e,t){return t.trim()===``?[...e]:e.map((e,n)=>({item:e,index:n,score:f(e.name,e.description,t)})).filter(e=>e.score>0).sort((e,t)=>t.score-e.score||e.index-t.index).map(e=>e.item)}function m(e,t){return p(e,t)}function h(e,t){return p(e,t)}function g(e,t){return p(n(e),t)}export{n as a,h as c,c as i,u as l,i as n,r as o,t as r,m as s,g as t,a as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,l as t,o as n}from"./bundle-mjs-DLPpRFyl.js";import{At as r,Bt as i,D as a,Ht as o,X as s,i as c,q as l,t as u,wt as d,zt as f}from"./centered-state-BddhEEtO.js";import{t as p}from"./utils-rQGbOrwc.js";import{t as m}from"./arrow-left-BE957rJs.js";import{r as h,t as g}from"./skill-detail-DB7x_FQp.js";import{t as _}from"./refresh-cw-DCa-Rlwz.js";import{t as v}from"./triangle-alert-6su4Js5O.js";import{a as y,r as b,t as x,u as S}from"./skills-98vCroU8.js";import{M as C,N as w,i as T,u as E}from"./index-CO2lH2et.js";var D=t(n(),1),O=e(),k=`__bm`;function A(){return(0,O.jsxs)(`div`,{"data-route":`skills`,className:`flex min-h-full flex-col`,children:[(0,O.jsxs)(`header`,{className:`sticky top-0 z-10 hidden h-14 shrink-0 items-center gap-3 border-b border-border bg-background px-5 md:flex`,children:[(0,O.jsx)(`h1`,{className:`text-base font-semibold`,children:`Skills`}),(0,O.jsx)(`p`,{className:`text-[13px] text-muted-foreground`,children:`Markdown playbooks agents can follow.`})]}),(0,O.jsx)(j,{})]})}function j(){let e=l(),t=s(),[n]=f(),[h,b]=(0,D.useState)(``),A=o(),j=i({mutationFn:()=>d(),onSuccess:e=>{A.setQueryData(a.skills,e),c(`Team skills refreshed.`)},onError:e=>c(e.message,{tone:`danger`})});if(e.isError)return(0,O.jsx)(u,{icon:(0,O.jsx)(v,{}),tone:`danger`,heading:`h2`,title:`Could not load skills`,subtitle:e.error.message});let N=y(e.data??[]),P=n.get(`skill`),F=P===k?k:P!==null&&N.some(e=>e.name===P)?P:N[0]?.name??k,I=N.find(e=>e.name===F)??null,L=x(N,h);return(0,O.jsxs)(`div`,{"data-slot":`skills-section`,className:`flex min-h-full flex-1 items-stretch`,children:[(0,O.jsxs)(`section`,{"data-slot":`skills-list`,className:p(`w-full flex-col border-border md:flex md:w-[320px] md:shrink-0 md:border-r`,`md:sticky md:top-14 md:max-h-[calc(100dvh-(var(--spacing)*14))]`,P===null?`flex`:`hidden md:flex`),children:[(0,O.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2 p-3 pb-2`,children:[(0,O.jsx)(E,{"data-slot":`skills-filter`,placeholder:`Filter skills…`,"aria-label":`Filter skills`,value:h,onChange:e=>b(e.target.value),className:`h-8 text-[13px]`}),(0,O.jsxs)(`button`,{type:`button`,"data-slot":`skills-refresh`,title:`git fetch the team skills repos`,disabled:j.isPending,onClick:()=>j.mutate(),className:`flex h-8 shrink-0 items-center gap-1.5 rounded-md border border-border bg-card px-2.5 text-xs font-medium text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:opacity-55`,children:[(0,O.jsx)(_,{"aria-hidden":`true`,className:p(`size-3`,j.isPending&&`motion-safe:animate-spin`)}),`Refresh`]})]}),(0,O.jsx)(`ul`,{"data-slot":`skill-rows`,className:`min-h-0 flex-1 overflow-y-auto px-2 pb-2`,children:e.isPending?(0,O.jsx)(`li`,{className:`px-2.5 py-2 text-[13px] text-soft-foreground`,children:`Loading…`}):L.length>0?L.map(e=>(0,O.jsx)(M,{skill:e,active:F===e.name},e.path)):(0,O.jsx)(`li`,{className:`px-2.5 py-2 text-xs leading-relaxed text-soft-foreground`,children:N.length>0?`(no skills match)`:(0,O.jsxs)(O.Fragment,{children:[`No skills yet. Drop Markdown files into `,(0,O.jsx)(`span`,{className:`font-mono`,children:`.ai/skills/`}),` or`,` `,(0,O.jsx)(`span`,{className:`font-mono`,children:`.ai/cezar/skills/`}),` — optional frontmatter:`,` `,(0,O.jsx)(`span`,{className:`font-mono`,children:`name`}),`, `,(0,O.jsx)(`span`,{className:`font-mono`,children:`description`}),`. Team skills from your skills repo appear here too — try Refresh.`]})})}),(0,O.jsx)(`div`,{className:`shrink-0 border-t border-border p-2`,children:(0,O.jsxs)(r,{to:`/skills?skill=${k}`,"data-slot":`bookmarklets-row`,"aria-current":F===k?`page`:void 0,className:p(`flex flex-col gap-0.5 rounded-md px-2.5 py-2 transition-colors hover:bg-muted`,F===k&&`bg-muted`),children:[(0,O.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[(0,O.jsx)(C,{"aria-hidden":`true`,className:`size-3.5 shrink-0 text-primary`}),(0,O.jsx)(`span`,{className:`min-w-0 truncate text-[13px] font-medium`,children:`Run from GitHub`}),(0,O.jsx)(`span`,{className:`ml-auto shrink-0 rounded-full border border-border px-2 py-px font-mono text-[10.5px] text-soft-foreground`,children:`bookmarklets`})]}),(0,O.jsx)(`span`,{className:`pl-[22px] text-xs text-soft-foreground`,children:`One-click skill launch from any GitHub PR or issue.`})]})})]}),(0,O.jsx)(`section`,{"data-slot":`skills-detail`,className:p(`min-w-0 flex-1 flex-col`,P===null?`hidden md:flex`:`flex`),children:(0,O.jsxs)(`div`,{className:`min-w-0 flex-1 px-4 py-4 md:px-7 md:py-5`,children:[(0,O.jsxs)(r,{to:`/skills`,"data-slot":`skills-back`,className:`mb-3 inline-flex items-center gap-1.5 text-xs font-medium text-muted-foreground hover:text-foreground md:hidden`,children:[(0,O.jsx)(m,{"aria-hidden":`true`,className:`size-3.5`}),`Back to the list`]}),F===k?(0,O.jsx)(T,{skills:N}):I?(0,O.jsx)(g,{skill:I,usedBy:S(t.data?.workflows??[],I.name)}):e.isPending?null:(0,O.jsx)(u,{icon:(0,O.jsx)(w,{}),tone:`neutral`,heading:`h2`,title:`No skill selected`,subtitle:`Pick a skill from the catalog.`})]})})]})}function M({skill:e,active:t}){let n=b(e);return(0,O.jsx)(`li`,{children:(0,O.jsxs)(r,{to:`/skills?skill=${encodeURIComponent(e.name)}`,"data-slot":`skill-row`,"data-skill":e.name,"data-project":n?`true`:void 0,"aria-current":t?`page`:void 0,className:p(`flex flex-col gap-0.5 rounded-md px-2.5 py-2 transition-colors hover:bg-muted`,t&&`bg-muted`),children:[(0,O.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[(0,O.jsx)(w,{"aria-hidden":`true`,className:p(`size-3.5 shrink-0`,n?`text-violet`:`text-soft-foreground`)}),(0,O.jsx)(`span`,{className:p(`min-w-0 truncate font-mono text-[13px]`,n?`font-semibold text-foreground`:`font-medium text-muted-foreground`),children:e.name}),(0,O.jsx)(h,{source:e.source,className:`ml-auto`})]}),e.description?(0,O.jsx)(`span`,{className:`line-clamp-2 pl-[22px] text-xs text-soft-foreground`,children:e.description}):null]})})}export{A as SkillsRoute};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=[Object.freeze(JSON.parse(`{"displayName":"SQL","name":"sql","patterns":[{"match":"((?<!@)@)\\\\b(\\\\w+)\\\\b","name":"text.variable"},{"match":"(\\\\[)[^]]*(])","name":"text.bracketed"},{"include":"#comments"},{"captures":{"1":{"name":"keyword.other.create.sql"},"2":{"name":"keyword.other.sql"},"5":{"name":"entity.name.function.sql"}},"match":"(?i:^\\\\s*(create(?:\\\\s+or\\\\s+replace)?)\\\\s+(aggregate|conversion|database|domain|function|group|(unique\\\\s+)?index|language|operator class|operator|rule|schema|sequence|table|tablespace|trigger|type|user|view)\\\\s+)([\\"'\`]?)(\\\\w+)\\\\4","name":"meta.create.sql"},{"captures":{"1":{"name":"keyword.other.create.sql"},"2":{"name":"keyword.other.sql"}},"match":"(?i:^\\\\s*(drop)\\\\s+(aggregate|conversion|database|domain|function|group|index|language|operator class|operator|rule|schema|sequence|table|tablespace|trigger|type|user|view))","name":"meta.drop.sql"},{"captures":{"1":{"name":"keyword.other.create.sql"},"2":{"name":"keyword.other.table.sql"},"3":{"name":"entity.name.function.sql"},"4":{"name":"keyword.other.cascade.sql"}},"match":"(?i:\\\\s*(drop)\\\\s+(table)\\\\s+(\\\\w+)(\\\\s+cascade)?\\\\b)","name":"meta.drop.sql"},{"captures":{"1":{"name":"keyword.other.create.sql"},"2":{"name":"keyword.other.table.sql"}},"match":"(?i:^\\\\s*(alter)\\\\s+(aggregate|conversion|database|domain|function|group|index|language|operator class|operator|proc(edure)?|rule|schema|sequence|table|tablespace|trigger|type|user|view)\\\\s+)","name":"meta.alter.sql"},{"captures":{"1":{"name":"storage.type.sql"},"2":{"name":"storage.type.sql"},"3":{"name":"constant.numeric.sql"},"4":{"name":"storage.type.sql"},"5":{"name":"constant.numeric.sql"},"6":{"name":"storage.type.sql"},"7":{"name":"constant.numeric.sql"},"8":{"name":"constant.numeric.sql"},"9":{"name":"storage.type.sql"},"10":{"name":"constant.numeric.sql"},"11":{"name":"storage.type.sql"},"12":{"name":"storage.type.sql"},"13":{"name":"storage.type.sql"},"14":{"name":"constant.numeric.sql"},"15":{"name":"storage.type.sql"}},"match":"(?i)\\\\b(bigint|bigserial|bit|boolean|box|bytea|cidr|circle|date|double\\\\sprecision|inet|int|integer|line|lseg|macaddr|money|oid|path|point|polygon|real|serial|smallint|sysdate|text)\\\\b|\\\\b(bit\\\\svarying|character\\\\s(?:varying)?|tinyint|var\\\\schar|float|interval)\\\\((\\\\d+)\\\\)|\\\\b(char|number|varchar\\\\d?)\\\\b(?:\\\\((\\\\d+)\\\\))?|\\\\b(numeric|decimal)\\\\b(?:\\\\((\\\\d+),(\\\\d+)\\\\))?|\\\\b(times?)\\\\b(?:\\\\((\\\\d+)\\\\))?(\\\\swith(?:out)?\\\\stime\\\\szone\\\\b)?|\\\\b(timestamp)(s|tz)?\\\\b(?:\\\\((\\\\d+)\\\\))?(\\\\s(with(?:|out))\\\\stime\\\\szone\\\\b)?"},{"match":"(?i:\\\\b((?:primary|foreign)\\\\s+key|references|on\\\\s+(delete|update)(\\\\s+cascade)?|nocheck|check|constraint|collate|default)\\\\b)","name":"storage.modifier.sql"},{"match":"\\\\b\\\\d+\\\\b","name":"constant.numeric.sql"},{"match":"(?i:\\\\b(select(\\\\s+(all|distinct))?|insert\\\\s+(ignore\\\\s+)?into|update|delete|from|set|where|group\\\\s+by|or|like|and|union(\\\\s+all)?|having|order\\\\s+by|limit|cross\\\\s+join|join|straight_join|(inner|(left|right|full)(\\\\s+outer)?)\\\\s+join|natural(\\\\s+(inner|(left|right|full)(\\\\s+outer)?))?\\\\s+join)\\\\b)","name":"keyword.other.DML.sql"},{"match":"(?i:\\\\b(on|off|((is\\\\s+)?not\\\\s+)?null)\\\\b)","name":"keyword.other.DDL.create.II.sql"},{"match":"(?i:\\\\bvalues\\\\b)","name":"keyword.other.DML.II.sql"},{"match":"(?i:\\\\b(begin(\\\\s+work)?|start\\\\s+transaction|commit(\\\\s+work)?|rollback(\\\\s+work)?)\\\\b)","name":"keyword.other.LUW.sql"},{"match":"(?i:\\\\b(grant(\\\\swith\\\\sgrant\\\\soption)?|revoke)\\\\b)","name":"keyword.other.authorization.sql"},{"match":"(?i:\\\\bin\\\\b)","name":"keyword.other.data-integrity.sql"},{"match":"(?i:^\\\\s*(comment\\\\s+on\\\\s+(table|column|aggregate|constraint|database|domain|function|index|operator|rule|schema|sequence|trigger|type|view))\\\\s+)","name":"keyword.other.object-comments.sql"},{"match":"(?i)\\\\bAS\\\\b","name":"keyword.other.alias.sql"},{"match":"(?i)\\\\b(DESC|ASC)\\\\b","name":"keyword.other.order.sql"},{"match":"\\\\*","name":"keyword.operator.star.sql"},{"match":"[!<>]?=|<>|[<>]","name":"keyword.operator.comparison.sql"},{"match":"[-+/]","name":"keyword.operator.math.sql"},{"match":"\\\\|\\\\|","name":"keyword.operator.concatenator.sql"},{"captures":{"1":{"name":"support.function.aggregate.sql"}},"match":"(?i)\\\\b(approx_count_distinct|approx_percentile_cont|approx_percentile_disc|avg|checksum_agg|count|count_big|group|grouping|grouping_id|max|min|sum|stdevp??|varp??)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.analytic.sql"}},"match":"(?i)\\\\b(cume_dist|first_value|lag|last_value|lead|percent_rank|percentile_cont|percentile_disc)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.bitmanipulation.sql"}},"match":"(?i)\\\\b((?:bit_coun|get_bi|left_shif|right_shif|set_bi)t)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.conversion.sql"}},"match":"(?i)\\\\b(cast|convert|parse|try_cast|try_convert|try_parse)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.collation.sql"}},"match":"(?i)\\\\b(collationproperty|tertiary_weights)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.cryptographic.sql"}},"match":"(?i)\\\\b(asymkey_id|asymkeyproperty|certproperty|cert_id|crypt_gen_random|decryptbyasymkey|decryptbycert|decryptbykey|decryptbykeyautoasymkey|decryptbykeyautocert|decryptbypassphrase|encryptbyasymkey|encryptbycert|encryptbykey|encryptbypassphrase|hashbytes|is_objectsigned|key_guid|key_id|key_name|signbyasymkey|signbycert|symkeyproperty|verifysignedbycert|verifysignedbyasymkey)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.cursor.sql"}},"match":"(?i)\\\\b(cursor_status)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.datetime.sql"}},"match":"(?i)\\\\b(sysdatetime|sysdatetimeoffset|sysutcdatetime|current_time(stamp)?|getdate|getutcdate|datename|datepart|day|month|year|datefromparts|datetime2fromparts|datetimefromparts|datetimeoffsetfromparts|smalldatetimefromparts|timefromparts|datediff|dateadd|datetrunc|eomonth|switchoffset|todatetimeoffset|isdate|date_bucket)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.datatype.sql"}},"match":"(?i)\\\\b(datalength|ident_current|ident_incr|ident_seed|identity|sql_variant_property)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.expression.sql"}},"match":"(?i)\\\\b(coalesce|nullif)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.globalvar.sql"}},"match":"(?<!@)@@(?i)\\\\b(cursor_rows|connections|cpu_busy|datefirst|dbts|error|fetch_status|identity|idle|io_busy|langid|language|lock_timeout|max_connections|max_precision|nestlevel|options|packet_errors|pack_received|pack_sent|procid|remserver|rowcount|servername|servicename|spid|textsize|timeticks|total_errors|total_read|total_write|trancount|version)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.json.sql"}},"match":"(?i)\\\\b(json|isjson|json_object|json_array|json_value|json_query|json_modify|json_path_exists)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.logical.sql"}},"match":"(?i)\\\\b(choose|iif|greatest|least)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.mathematical.sql"}},"match":"(?i)\\\\b(abs|acos|asin|atan|atn2|ceiling|cos|cot|degrees|exp|floor|log|log10|pi|power|radians|rand|round|sign|sin|sqrt|square|tan)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.metadata.sql"}},"match":"(?i)\\\\b(app_name|applock_mode|applock_test|assemblyproperty|col_length|col_name|columnproperty|database_principal_id|databasepropertyex|db_id|db_name|file_id|file_idex|file_name|filegroup_id|filegroup_name|filegroupproperty|fileproperty|fulltextcatalogproperty|fulltextserviceproperty|index_col|indexkey_property|indexproperty|object_definition|object_id|object_name|object_schema_name|objectproperty|objectpropertyex|original_db_name|parsename|schema_id|schema_name|scope_identity|serverproperty|stats_date|type_id|type_name|typeproperty)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.ranking.sql"}},"match":"(?i)\\\\b(rank|dense_rank|ntile|row_number)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.rowset.sql"}},"match":"(?i)\\\\b(generate_series|opendatasource|openjson|openrowset|openquery|openxml|predict|string_split)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.security.sql"}},"match":"(?i)\\\\b(certencoded|certprivatekey|current_user|database_principal_id|has_perms_by_name|is_member|is_rolemember|is_srvrolemember|original_login|permissions|pwdcompare|pwdencrypt|schema_id|schema_name|session_user|suser_id|suser_sid|suser_sname|system_user|suser_name|user_id|user_name)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.string.sql"}},"match":"(?i)\\\\b(ascii|char|charindex|concat|difference|format|left|len|lower|ltrim|nchar|nodes|patindex|quotename|replace|replicate|reverse|right|rtrim|soundex|space|str|string_agg|string_escape|string_split|stuff|substring|translate|trim|unicode|upper)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.system.sql"}},"match":"(?i)\\\\b(binary_checksum|checksum|compress|connectionproperty|context_info|current_request_id|current_transaction_id|decompress|error_line|error_message|error_number|error_procedure|error_severity|error_state|formatmessage|get_filestream_transaction_context|getansinull|host_id|host_name|isnull|isnumeric|min_active_rowversion|newid|newsequentialid|rowcount_big|session_context|session_id|xact_state)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.textimage.sql"}},"match":"(?i)\\\\b(patindex|textptr|textvalid)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.vector.sql"}},"match":"(?i)\\\\b(vector_(?:distance|norm|normalize))\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"constant.other.database-name.sql"},"2":{"name":"constant.other.table-name.sql"}},"match":"(\\\\w+?)\\\\.(\\\\w+)"},{"include":"#strings"},{"include":"#regexps"},{"match":"\\\\b(?i)(abort|abort_after_wait|absent|absolute|accent_sensitivity|acceptable_cursopt|acp|action|activation|add|address|admin|aes_128|aes_192|aes_256|affinity|after|aggregate|algorithm|all_constraints|all_errormsgs|all_indexes|all_levels|all_results|allow_connections|allow_dup_row|allow_encrypted_value_modifications|allow_page_locks|allow_row_locks|allow_snapshot_isolation|alter|altercolumn|always|anonymous|ansi_defaults|ansi_null_default|ansi_null_dflt_off|ansi_null_dflt_on|ansi_nulls|ansi_padding|ansi_warnings|appdomain|append|application|apply|arithabort|arithignore|array|assembly|asymmetric|asynchronous_commit|at|atan2|atomic|attach|attach_force_rebuild_log|attach_rebuild_log|audit|auth_realm|authentication|auto|auto_cleanup|auto_close|auto_create_statistics|auto_drop|auto_shrink|auto_update_statistics|auto_update_statistics_async|automated_backup_preference|automatic|autopilot|availability|availability_mode|backup|backup_priority|base64|basic|batches|batchsize|before|between|bigint|binary|binding|bit|block|blockers|blocksize|bmk|both|break|broker|broker_instance|bucket_count|buffer|buffercount|bulk_logged|by|call|caller|card|case|catalog|catch|cert|certificate|change_retention|change_tracking|change_tracking_context|changes|char|character|character_set|check_expiration|check_policy|checkconstraints|checkindex|checkpoint|checksum|cleanup_policy|clear|clear_port|close|clustered|codepage|collection|column_encryption_key|column_master_key|columnstore|columnstore_archive|colv_80_to_100|colv_100_to_80|commit_differential_base|committed|compatibility_level|compress_all_row_groups|compression|compression_delay|concat_null_yields_null|concatenate|configuration|connect|connection|containment|continue|continue_after_error|contract|contract_name|control|conversation|conversation_group_id|conversation_handle|copy|copy_only|count_rows|counter|create(\\\\\\\\s+or\\\\\\\\s+alter)?|credential|cross|cryptographic|cryptographic_provider|cube|cursor|cursor_close_on_commit|cursor_default|data|data_compression|data_flush_interval_seconds|data_mirroring|data_purity|data_source|database|database_name|database_snapshot|datafiletype|date_correlation_optimization|date|datefirst|dateformat|date_format|datetime2??|datetimeoffset|day(s)?|db_chaining|dbid|dbidexec|dbo_only|deadlock_priority|deallocate|dec|decimal|declare|decrypt|decrypt_a|decryption|default_database|default_fulltext_language|default_language|default_logon_domain|default_schema|definition|delay|delayed_durability|delimitedtext|density_vector|dependent|des|description|desired_state|desx|differential|digest|disable|disable_broker|disable_def_cnst_chk|disabled|disk|distinct|distributed|distribution|drop|drop_existing|dts_buffers|dump|durability|dynamic|edition|elements|else|emergency|empty|enable|enable_broker|enabled|encoding|encrypted|encrypted_value|encryption|encryption_type|end|endpoint|endpoint_url|enhancedintegrity|entry|error_broker_conversations|errorfile|estimateonly|event|except|exec|executable|execute|exists|expand|expiredate|expiry_date|explicit|external|external_access|failover|failover_mode|failure_condition_level|fast|fast_forward|fastfirstrow|federated_service_account|fetch|field_terminator|fieldterminator|file|filelistonly|filegroup|filegrowth|filename|filestream|filestream_log|filestream_on|filetable|file_format|filter|first_row|fips_flagger|fire_triggers|first|firstrow|float|flush_interval_seconds|fmtonly|following|for|force|force_failover_allow_data_loss|force_service_allow_data_loss|forced|forceplan|formatfile|format_options|format_type|formsof|forward_only|free_cursors|free_exec_context|fullscan|fulltext|fulltextall|fulltextkey|function|generated|get|geography|geometry|global|go|goto|governor|guid|hadoop|hardening|hash|hashed|header_limit|headeronly|health_check_timeout|hidden|hierarchyid|histogram|histogram_steps|hits_cursors|hits_exec_context|hour(s)?|http|identity|identity_value|if|ifnull|ignore|ignore_constraints|ignore_dup_key|ignore_dup_row|ignore_triggers|image|immediate|implicit_transactions|include|include_null_values|incremental|index|inflectional|init|initiator|insensitive|insert|instead|int|integer|integrated|intersect|intermediate|interval_length_minutes|into|inuse_cursors|inuse_exec_context|io|is|isabout|iso_week|isolation|job_tracker_location|json|keep|keep_nulls|keep_replication|keepdefaults|keepfixed|keepidentity|keepnulls|kerberos|key|key_path|key_source|key_store_provider_name|keyset|kill|kilobytes_per_batch|labelonly|langid|language|last|lastrow|leading|legacy_cardinality_estimation|length|level|lifetime|lineage_80_to_100|lineage_100_to_80|listener_ip|listener_port|load|loadhistory|lob_compaction|local|local_service_name|locate|location|lock_escalation|lock_timeout|lockres|log|login|login_type|loop|manual|mark_in_use_for_removal|masked|master|match|matched|max_queue_readers|max_duration|max_outstanding_io_per_volume|maxdop|maxerrors|maxlength|maxtransfersize|max_plans_per_query|max_storage_size_mb|mediadescription|medianame|mediapassword|memogroup|memory_optimized|merge|message|message_forward_size|message_forwarding|microsecond|millisecond|minute(s)?|mirror_address|misses_cursors|misses_exec_context|mixed|modify|money|month|move|multi_user|must_change|name|namespace|nanosecond|native|native_compilation|nchar|ncharacter|nested_triggers|never|new_account|new_broker|newname|next|no|no_browsetable|no_checksum|no_compression|no_infomsgs|no_triggers|no_truncate|nocount|noexec|noexpand|noformat|noinit|nolock|nonatomic|nonclustered|nondurable|none|norecompute|norecovery|noreset|norewind|noskip|not|notification|nounload|now|nowait|ntext|ntlm|nulls|numeric|numeric_roundabort|nvarchar|object|objid|oem|offline|old_account|online|operation_mode|open|openjson|optimistic|option|orc|out|outer|output|over|override|owner|ownership|pad_index|page|page_checksum|page_verify|pagecount|paglock|param|parameter_sniffing|parameter_type_expansion|parameterization|parquet|parseonly|partial|partition|partner|password|path|pause|percentage|permission_set|persisted|period|physical_only|plan_forcing_mode|policy|pool|population|ports|preceding|precision|predicate|presume_abort|primary|primary_role|print|prior|priority |priority_level|private|proc(edure)?|procedure_name|profile|provider|quarter|query_capture_mode|query_governor_cost_limit|query_optimizer_hotfixes|query_store|queue|quoted_identifier|raiserror|range|raw|rcfile|rc2|rc4|rc4_128|rdbms|read_committed_snapshot|read|read_only|read_write|readcommitted|readcommittedlock|readonly|readpast|readuncommitted|readwrite|real|rebuild|receive|recmodel_70backcomp|recompile|reconfigure|recovery|recursive|recursive_triggers|redo_queue|reject_sample_value|reject_type|reject_value|relative|remote|remote_data_archive|remote_proc_transactions|remote_service_name|remove|removed_cursors|removed_exec_context|reorganize|repeat|repeatable|repeatableread|replace|replica|replicated|replnick_100_to_80|replnickarray_80_to_100|replnickarray_100_to_80|required|required_cursopt|resample|reset|resource|resource_manager_location|respect|restart|restore|restricted_user|resume|retaindays|retention|return|revert|rewind|rewindonly|returns|robust|role|rollup|root|round_robin|route|row|rowdump|rowguidcol|rowlock|row_terminator|rows|rows_per_batch|rowsets_only|rowterminator|rowversion|rsa_1024|rsa_2048|rsa_3072|rsa_4096|rsa_512|safe|safety|sample|save|scalar|schema|schemabinding|scoped|scroll|scroll_locks|sddl|second|secexpr|seconds|secondary|secondary_only|secondary_role|secret|security|securityaudit|selective|self|send|sent|sequence|serde_method|serializable|server|service|service_broker|service_name|service_objective|session_timeout|sessions??|seterror|setopts|sets|shard_map_manager|shard_map_name|sharded|shared_memory|shortest_path|show_statistics|showplan_all|showplan_text|showplan_xml|showplan_xml_with_recompile|shrinkdb|shutdown|sid|signature|simple|single_blob|single_clob|single_nclob|single_user|singleton|site|size|size_based_cleanup_mode|skip|smalldatetime|smallint|smallmoney|snapshot|snapshot_import|snapshotrestorephase|soap|softnuma|sort_in_tempdb|sorted_data|sorted_data_reorg|spatial|sql|sql_bigint|sql_binary|sql_bit|sql_char|sql_date|sql_decimal|sql_double|sql_float|sql_guid|sql_handle|sql_longvarbinary|sql_longvarchar|sql_numeric|sql_real|sql_smallint|sql_time|sql_timestamp|sql_tinyint|sql_tsi_day|sql_tsi_frac_second|sql_tsi_hour|sql_tsi_minute|sql_tsi_month|sql_tsi_quarter|sql_tsi_second|sql_tsi_week|sql_tsi_year|sql_type_date|sql_type_time|sql_type_timestamp|sql_varbinary|sql_varchar|sql_variant|sql_wchar|sql_wlongvarchar|ssl|ssl_port|standard|standby|start|start_date|started|stat_header|state|statement|static|statistics|statistics_incremental|statistics_norecompute|statistics_only|statman|stats|stats_stream|status|stop|stop_on_error|stopat|stopatmark|stopbeforemark|stoplist|stopped|string_delimiter|subject|supplemental_logging|supported|suspend|symmetric|synchronous_commit|synonym|sysname|system|system_time|system_versioning|table|tableresults|tablockx??|take|tape|target|target_index|target_partition|target_recovery_time|tcp|temporal_history_retention|text|textimage_on|then|thesaurus|throw|time|timeout|timestamp|tinyint|top??|torn_page_detection|track_columns_updated|trailing|tran|transaction|transfer|transform_noise_words|triple_des|triple_des_3key|truncate|trustworthy|try|tsql|two_digit_year_cutoff|type|type_desc|type_warning|tzoffset|uid|unbounded|uncommitted|unique|uniqueidentifier|unlimited|unload|unlock|unsafe|updlock|url|use|useplan|useroptions|use_type_default|using|utcdatetime|valid_xml|validation|values??|varbinary|varchar|vector|verbose|verifyonly|version|view_metadata|virtual_device|visiblity|wait_at_low_priority|waitfor|webmethod|week|weekday|weight|well_formed_xml|when|while|widechar|widechar_ansi|widenative|windows??|with|within|within group|witness|without|without_array_wrapper|workload|wsdl|xact_abort|xlock|xml|xmlschema|xquery|xsinil|year|zone)\\\\b","name":"keyword.other.sql"},{"captures":{"1":{"name":"punctuation.section.scope.begin.sql"},"2":{"name":"punctuation.section.scope.end.sql"}},"match":"(\\\\()(\\\\))","name":"meta.block.sql"}],"repository":{"comment-block":{"begin":"/\\\\*","captures":{"0":{"name":"punctuation.definition.comment.sql"}},"end":"\\\\*/","name":"comment.block","patterns":[{"include":"#comment-block"}]},"comments":{"patterns":[{"begin":"(^[\\\\t ]+)?(?=--)","beginCaptures":{"1":{"name":"punctuation.whitespace.comment.leading.sql"}},"end":"(?!\\\\G)","patterns":[{"begin":"--","beginCaptures":{"0":{"name":"punctuation.definition.comment.sql"}},"end":"\\\\n","name":"comment.line.double-dash.sql"}]},{"begin":"(^[\\\\t ]+)?(?=#)","beginCaptures":{"1":{"name":"punctuation.whitespace.comment.leading.sql"}},"end":"(?!\\\\G)","patterns":[]},{"include":"#comment-block"}]},"regexps":{"patterns":[{"begin":"/(?=\\\\S.*/)","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.sql"}},"end":"/","endCaptures":{"0":{"name":"punctuation.definition.string.end.sql"}},"name":"string.regexp.sql","patterns":[{"include":"#string_interpolation"},{"match":"\\\\\\\\/","name":"constant.character.escape.slash.sql"}]},{"begin":"%r\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.sql"}},"end":"}","endCaptures":{"0":{"name":"punctuation.definition.string.end.sql"}},"name":"string.regexp.modr.sql","patterns":[{"include":"#string_interpolation"}]}]},"string_escape":{"match":"\\\\\\\\.","name":"constant.character.escape.sql"},"string_interpolation":{"captures":{"1":{"name":"punctuation.definition.string.begin.sql"},"3":{"name":"punctuation.definition.string.end.sql"}},"match":"(#\\\\{)([^}]*)(})","name":"string.interpolated.sql"},"strings":{"patterns":[{"captures":{"2":{"name":"punctuation.definition.string.begin.sql"},"3":{"name":"punctuation.definition.string.end.sql"}},"match":"(?:(?<![0-9A-Z_a-z])(N))?(')[^']*(')","name":"string.quoted.single.sql"},{"begin":"'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.sql"}},"end":"'","endCaptures":{"0":{"name":"punctuation.definition.string.end.sql"}},"name":"string.quoted.single.sql","patterns":[{"include":"#string_escape"}]},{"captures":{"1":{"name":"punctuation.definition.string.begin.sql"},"2":{"name":"punctuation.definition.string.end.sql"}},"match":"(\`)[^\\\\\\\\\`]*(\`)","name":"string.quoted.other.backtick.sql"},{"begin":"\`","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.sql"}},"end":"\`","endCaptures":{"0":{"name":"punctuation.definition.string.end.sql"}},"name":"string.quoted.other.backtick.sql","patterns":[{"include":"#string_escape"}]},{"captures":{"1":{"name":"punctuation.definition.string.begin.sql"},"2":{"name":"punctuation.definition.string.end.sql"}},"match":"(\\")[^\\"#]*(\\")","name":"string.quoted.double.sql"},{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.sql"}},"end":"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.sql"}},"name":"string.quoted.double.sql","patterns":[{"include":"#string_interpolation"}]},{"begin":"%\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.sql"}},"end":"}","endCaptures":{"0":{"name":"punctuation.definition.string.end.sql"}},"name":"string.other.quoted.brackets.sql","patterns":[{"include":"#string_interpolation"}]}]}},"scopeName":"source.sql"}`))];export{e as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./utils-rQGbOrwc.js";var t=e(`square-terminal`,[[`path`,{d:`m7 11 2-2-2-2`,key:`1lz0vl`}],[`path`,{d:`M11 13h4`,key:`1p7l4v`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}]]);export{t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e}from"./bundle-mjs-DLPpRFyl.js";import{At as t}from"./centered-state-BddhEEtO.js";import{n,t as r}from"./utils-rQGbOrwc.js";var i=n(`external-link`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]),a=e();function o({to:e,active:n=!1,onClick:i,children:o}){return(0,a.jsx)(t,{to:e,"aria-current":n?`page`:void 0,onClick:i,className:r(`-mb-px flex h-8 items-center rounded-t-md border-b-2 px-3 text-[13px] font-medium`,n?`border-foreground font-semibold text-foreground`:`border-transparent text-muted-foreground hover:bg-muted hover:text-foreground`),children:o})}export{i as n,o as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,l as t,o as n}from"./bundle-mjs-DLPpRFyl.js";import{Bt as r,D as i,Ht as a,Q as o,R as s,Rt as c,a as l,bt as u,ht as d,i as f,j as p,nt as m,ot as h,pt as g,t as _,z as v}from"./centered-state-BddhEEtO.js";import{a as y,i as b,t as x}from"./run-header-jx9-18b8.js";import{a as S,i as C,n as w,r as T}from"./git-toolbar-CwhQdx3J.js";import{a as E,n as D,t as O}from"./use-desktop-CvTwojOJ.js";import{h as k}from"./tasks-table-dgezlCcg.js";import{a as A,i as j,o as M,r as N,s as P,t as F}from"./dialog-DFvXTkFv.js";import{b as I,o as L,s as R,x as z}from"./index-CO2lH2et.js";var B=t(n(),1),V=e=>e===`running`||e===`queued`||e===`waiting`,H=`no worktree — this task ran directly in the repo working tree`;function U(e){let t=e=>({id:`commit`,label:`Commit`,enabled:!1,reason:e});return e.hasWorktree?e.status===`running`?t(`Commit unavailable — the agent is still working in this worktree`):e.changedFiles===void 0?t(`Commit unavailable — changes are still loading`):e.changedFiles===0?t(`Commit unavailable — no changes to commit`):{id:`commit`,label:`Commit`,enabled:!0}:t(`Commit unavailable — ${H}`)}function W(e){let t=e=>({id:`push`,label:`Push`,enabled:!1,reason:e});return e.hasWorktree?e.remote===void 0?t(`Push unavailable — no remote configured`):e.branch===void 0?t(`Push unavailable — the run has no branch to push`):e.status===`running`?t(`Push unavailable — the agent is still working in this worktree`):{id:`push`,label:`Push`,enabled:!0}:t(`Push unavailable — ${H}`)}function G(e){let t=e=>({id:`create-pr`,label:`Create PR`,enabled:!1,reason:e});return!e.hasWorktree||e.branch===void 0?t(`Create PR unavailable — ${H}`):e.forge===null?t(`Create PR unavailable — no supported forge remote (GitHub) detected`):e.forge.available?V(e.status)?t(`Create PR unavailable — the run is still active; wait for the review gate`):{id:`create-pr`,label:`Create PR`,enabled:!0}:t(`Create PR unavailable — ${e.forge.reason??`the forge is unreachable`}`)}function K(e){let t=e.prUrl?{id:`view-pr`,label:`View PR`,enabled:!0,href:e.prUrl}:U(e),n=e.prUrl?[U(e),W(e)]:[W(e),G(e)],r=[];if(e.localHandoff){let t=e.hasSession?V(e.status)?{id:`open-terminal`,label:`Open in terminal`,enabled:!1,reason:`Terminal unavailable — the session is still active in the engine`}:{id:`open-terminal`,label:`Open in terminal`,enabled:!0}:{id:`open-terminal`,label:`Open in terminal`,enabled:!1,reason:`Terminal unavailable — no agent session to resume`};r.push(t)}return{primary:t,secondary:n,menu:r}}var q=e();function J({run:e,open:t,onOpenChange:n}){let o=a(),[s,c]=(0,B.useState)(``),u=k(e),d=(0,B.useRef)(u);d.current=u,(0,B.useEffect)(()=>{t&&c(d.current)},[t]);let p=r({mutationFn:t=>m(e.id,t),onSuccess:t=>{f(`Committed ${t.sha.slice(0,7)}`),n(!1),o.invalidateQueries({queryKey:i.runs.changes(e.id)}),o.invalidateQueries({queryKey:i.runs.all})},onError:e=>f(e.message,{tone:`danger`})}),h=()=>{let e=s.trim();e.length===0||p.isPending||p.mutate(e)};return(0,q.jsx)(F,{open:t,onOpenChange:n,children:(0,q.jsxs)(N,{"data-slot":`commit-dialog`,children:[(0,q.jsxs)(M,{children:[(0,q.jsx)(P,{children:`Commit changes`}),(0,q.jsxs)(j,{children:[`Stages everything in the task's worktree (git add -A) and commits to`,` `,e.branch?(0,q.jsx)(`span`,{className:`font-mono`,children:e.branch}):`its branch`,`.`]})]}),(0,q.jsx)(z,{"data-slot":`commit-message`,"aria-label":`Commit message`,rows:3,value:s,onChange:e=>c(e.target.value),onKeyDown:e=>{I({key:e.key,shiftKey:e.shiftKey,metaKey:e.metaKey,ctrlKey:e.ctrlKey,altKey:e.altKey,repeat:e.repeat,isComposing:e.nativeEvent.isComposing})&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),h())}}),(0,q.jsxs)(A,{children:[(0,q.jsx)(l,{variant:`outline`,onClick:()=>n(!1),children:`Cancel`}),(0,q.jsx)(l,{"data-slot":`commit-confirm`,disabled:s.trim().length===0||p.isPending,onClick:h,children:p.isPending?`Committing…`:`Commit`})]})]})})}function Y(){let{id:e}=c(),t=s(e);return t.isPending?(0,q.jsx)(R,{tab:`changes`}):t.isError?(0,q.jsx)(L,{tab:`changes`,error:t.error}):(0,q.jsx)(X,{run:t.data})}function X({run:e}){let t=p(),n=v(e.id,b(e.status)),s=O(),[c,l]=(0,B.useState)(`unified`),[m,g]=(0,B.useState)(!1),[k,A]=(0,B.useState)(null),[j,M]=(0,B.useState)(!1),N=a(),P=()=>N.invalidateQueries({queryKey:i.runs.all}),F=e=>f(e.message,{tone:`danger`}),I=r({mutationFn:()=>u(e.id),onSuccess:e=>f(e.upstreamSet?`Pushed ${e.branch} to ${e.remote} (upstream set)`:`Pushed ${e.branch} to ${e.remote}`),onError:F}),L=r({mutationFn:()=>h(e.id),onSuccess:e=>{f(`Draft PR created — ${e.url}`),P()},onError:F}),R=r({mutationFn:()=>d(e.id),onError:e=>{if(e instanceof o&&e.command){navigator.clipboard.writeText(e.command).then(()=>f(`No terminal found — command copied to clipboard.`)).catch(()=>f(`Run manually: ${e.command}`));return}F(e)}}),z=n.isError&&n.error instanceof o&&n.error.status===409,V=K({status:e.status,hasWorktree:!!e.worktreePath&&!z,branch:e.branch,changedFiles:n.data?.stat.files,remote:t.data?.repo?.remote,forge:t.data?.forge??null,localHandoff:t.data?.capabilities.localHandoff??!1,hasSession:y(e)!==void 0,prUrl:e.pullRequestUrl}),H=e=>{switch(e){case`commit`:M(!0);break;case`push`:I.mutate();break;case`create-pr`:L.mutate();break;case`open-terminal`:R.mutate();break;case`view-pr`:break}},U=n.data?.files??[],W=(0,B.useMemo)(()=>T(U),[U]),G=s?c:`unified`,Y=!s||m;return(0,q.jsxs)(`div`,{"data-route":`task-changes`,className:`flex min-h-full flex-col`,children:[(0,q.jsx)(x,{run:e,tab:`changes`}),(0,q.jsx)(w,{bar:V,branch:e.branch,stat:n.data?.stat,mode:G,wrap:Y,onModeChange:l,onWrapChange:g,onAction:H}),n.isPending?(0,q.jsx)(`p`,{"data-slot":`changes-loading`,className:`px-4 py-6 text-center text-xs text-soft-foreground md:px-6`,children:`Loading changes…`}):n.isError?(0,q.jsx)(_,{icon:z?(0,q.jsx)(S,{}):(0,q.jsx)(E,{}),tone:z?`neutral`:`danger`,heading:`h2`,title:z?`No changes to show`:`Could not load the changes`,subtitle:n.error.message}):U.length===0?(0,q.jsx)(_,{icon:(0,q.jsx)(S,{}),tone:`neutral`,heading:`h2`,title:`No changes yet`,subtitle:`The worktree matches its base branch. Changes appear here as the agent works.`}):(0,q.jsxs)(`div`,{className:`flex min-h-0 flex-1 items-start gap-5 px-4 py-4 [--diff-sticky-top:10rem] md:px-6`,children:[(0,q.jsx)(`aside`,{className:`sticky top-40 hidden w-60 shrink-0 md:block lg:w-72`,children:(0,q.jsx)(C,{root:W,selected:k,onSelect:e=>{A(e),document.querySelector(`[data-slot="diff-file"][data-path="${CSS.escape(e)}"]`)?.scrollIntoView?.({block:`start`,behavior:`smooth`})}})}),(0,q.jsx)(D,{files:U,mode:G,wrap:Y,loadFileText:t=>Z(e.id,t),className:`min-w-0 flex-1`})]}),(0,q.jsx)(J,{run:e,open:j,onOpenChange:M})]})}async function Z(e,t){try{let n=await g(e,t);return n.type!==`file`||n.binary||n.tooLarge?null:n.content??null}catch{return null}}export{Y as TaskChangesRoute};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,l as t,o as n}from"./bundle-mjs-DLPpRFyl.js";import{At as r,B as i,Q as a,R as o,Rt as s,V as c,a as l,t as u}from"./centered-state-BddhEEtO.js";import{i as d,t as f}from"./run-header-jx9-18b8.js";import{t as p}from"./arrow-left-BE957rJs.js";import{a as m,i as h,n as g,t as _}from"./use-desktop-CvTwojOJ.js";import{t as v}from"./search-x-CoCyl7zT.js";import{t as y}from"./triangle-alert-6su4Js5O.js";import{j as b,o as x,s as S}from"./index-CO2lH2et.js";var C=t(n(),1),w=e();function T(){let{id:e}=s(),t=o(e);return t.isPending?(0,w.jsx)(S,{tab:`changes`}):t.isError?(0,w.jsx)(x,{tab:`changes`,error:t.error}):(0,w.jsx)(E,{run:t.data})}function E({run:e}){let{sha:t}=s(),n=c(e.id,d(e.status));return(0,w.jsxs)(`div`,{"data-route":`task-commits`,className:`flex min-h-full flex-col`,children:[(0,w.jsx)(f,{run:e,tab:`commits`}),t?(0,w.jsx)(D,{runId:e.id,sha:t}):n.isPending?(0,w.jsx)(`p`,{"data-slot":`commits-loading`,className:`px-4 py-6 text-center text-xs text-soft-foreground md:px-6`,children:`Loading commits…`}):n.isError?(0,w.jsx)(u,{icon:(0,w.jsx)(m,{}),tone:n.error instanceof a&&n.error.status===409?`neutral`:`danger`,heading:`h2`,title:n.error instanceof a&&n.error.status===409?`No commits to show`:`Could not load the commits`,subtitle:n.error.message}):n.data.commits.length===0?(0,w.jsx)(u,{icon:(0,w.jsx)(m,{}),tone:`neutral`,heading:`h2`,title:`No commits yet`,subtitle:`This task hasn't committed anything on its branch. Autosave commits and any the agent makes appear here.`}):(0,w.jsx)(`ul`,{"data-slot":`task-commits`,className:`mx-auto flex w-full max-w-[820px] flex-col divide-y divide-border px-2 py-1 md:px-4`,children:n.data.commits.map(t=>(0,w.jsx)(`li`,{children:(0,w.jsxs)(r,{"data-slot":`commit-row`,"data-sha":t.sha,to:`/tasks/${e.id}/commits/${t.sha}`,className:`flex min-w-0 items-baseline gap-3 rounded-sm px-2 py-2.5 hover:bg-muted`,children:[(0,w.jsx)(`span`,{className:`shrink-0 font-mono text-[11px] text-muted-foreground`,children:t.sha.slice(0,8)}),(0,w.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-[13px] font-medium`,children:t.subject}),(0,w.jsxs)(`span`,{className:`hidden shrink-0 text-[11px] text-soft-foreground sm:inline`,children:[t.author,` · `,t.when]})]})},t.sha))})]})}function D({runId:e,sha:t}){let n=i(e,t),o=_(),[s,c]=(0,C.useState)(`unified`),[d,f]=(0,C.useState)(!1),x=n.isError&&n.error instanceof a&&n.error.status===409,S=o?s:`unified`,T=!o||d;return(0,w.jsxs)(`section`,{"data-slot":`task-commit`,"data-sha":t,className:`mx-auto flex min-h-0 w-full max-w-[820px] flex-1 flex-col`,children:[(0,w.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-2.5 gap-y-1.5 border-b border-border px-4 py-2 md:px-6`,children:[(0,w.jsx)(l,{asChild:!0,variant:`ghost`,size:`sm`,"data-slot":`commit-back`,children:(0,w.jsxs)(r,{to:`/tasks/${e}/commits`,children:[(0,w.jsx)(p,{"aria-hidden":`true`}),`All commits`]})}),n.data?(0,w.jsx)(b,{stat:n.data.stat}):null,(0,w.jsx)(`span`,{className:`ml-auto hidden items-center gap-1 md:flex`,children:(0,w.jsx)(h,{mode:s,wrap:d,onModeChange:c,onWrapChange:f})})]}),n.isPending?(0,w.jsx)(`p`,{"data-slot":`commit-loading`,className:`px-4 py-6 text-center text-xs text-soft-foreground md:px-6`,children:`Loading commit…`}):n.isError?(0,w.jsx)(u,{icon:x?(0,w.jsx)(v,{}):(0,w.jsx)(y,{}),tone:x?`neutral`:`danger`,heading:`h2`,title:x?`Commit not found`:`Could not load the commit`,subtitle:n.error.message}):(0,w.jsxs)(w.Fragment,{children:[(0,w.jsxs)(`div`,{"data-slot":`commit-meta`,className:`border-b border-border px-4 py-3 md:px-6`,children:[(0,w.jsx)(`h2`,{className:`text-sm font-semibold`,children:n.data.subject}),(0,w.jsxs)(`p`,{className:`mt-0.5 text-[11px] text-soft-foreground`,children:[n.data.author,` · `,n.data.when,` ·`,` `,(0,w.jsx)(`span`,{className:`font-mono select-all`,children:n.data.sha})]})]}),n.data.files.length===0?(0,w.jsx)(u,{icon:(0,w.jsx)(m,{}),tone:`neutral`,heading:`h2`,title:`No file changes`,subtitle:`This commit carries no diff of its own — a merge commit's changes live on the commits it merged.`}):(0,w.jsx)(`div`,{className:`px-4 py-4 [--diff-sticky-top:10rem] md:px-6`,children:(0,w.jsx)(g,{files:n.data.files,mode:S,wrap:T,className:`min-w-0`})})]})]})}export{T as TaskCommitsRoute};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as e,l as t,o as n}from"./bundle-mjs-DLPpRFyl.js";import{Dt as r,Q as i,R as a,Rt as o,U as s,t as c}from"./centered-state-BddhEEtO.js";import{n as l,t as u}from"./utils-rQGbOrwc.js";import{t as d}from"./run-header-jx9-18b8.js";import{t as f}from"./folder-0pJ1NZ_S.js";import{t as p}from"./file-BVuztAOd.js";import{t as m}from"./triangle-alert-6su4Js5O.js";import{i as h,n as g,r as _}from"./highlighter-BKVEsACy.js";import{V as v,o as y,s as b}from"./index-CO2lH2et.js";var x=l(`file-exclamation-point`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),S=l(`file-question-mark`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}],[`path`,{d:`M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3`,key:`mhlwft`}]]),C=l(`file-x`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`m14.5 12.5-5 5`,key:`b62r18`}],[`path`,{d:`m9.5 12.5 5 5`,key:`1rk7el`}]]),w=l(`folder-tree`,[[`path`,{d:`M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z`,key:`hod4my`}],[`path`,{d:`M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.9a1 1 0 0 1-.88-.55l-.42-.85a1 1 0 0 0-.92-.6H13a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z`,key:`w4yl2u`}],[`path`,{d:`M3 5a2 2 0 0 0 2 2h3`,key:`f2jnh7`}],[`path`,{d:`M3 3v13a2 2 0 0 0 2 2h3`,key:`k8epm1`}]]),T=l(`image`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}]]),E=l(`mouse-pointer-click`,[[`path`,{d:`M14 4.1 12 6`,key:`ita8i4`}],[`path`,{d:`m5.1 8-2.9-.8`,key:`1go3kf`}],[`path`,{d:`m6 12-1.9 2`,key:`mnht97`}],[`path`,{d:`M7.2 2.2 8 5.1`,key:`1cfko1`}],[`path`,{d:`M9.037 9.69a.498.498 0 0 1 .653-.653l11 4.5a.5.5 0 0 1-.074.949l-4.349 1.041a1 1 0 0 0-.74.739l-1.04 4.35a.5.5 0 0 1-.95.074z`,key:`s0h3yz`}]]),D=t(n(),1),O=new Set([`png`,`jpg`,`jpeg`,`gif`,`webp`,`svg`,`bmp`,`ico`,`avif`]);function k(e){let t=e.slice(e.lastIndexOf(`/`)+1),n=t.lastIndexOf(`.`);return n<=0?!1:O.has(t.slice(n+1).toLowerCase())}function A(e){return e.tooLarge?`too-large`:k(e.path)?`image`:e.binary?`binary`:`text`}function j(e){return e>=1024**2?`${(e/1024**2).toFixed(1)} MB`:e>=1024?`${(e/1024).toFixed(1)} kB`:`${e} B`}var M=e();function N({runId:e,path:t,className:n}){let r=s(e,t??void 0);if(t===null)return(0,M.jsx)(F,{className:n,children:(0,M.jsx)(c,{icon:(0,M.jsx)(E,{}),tone:`neutral`,heading:`h2`,title:`Select a file`,subtitle:`Pick a file from the tree to preview it here.`})});if(r.isPending)return(0,M.jsx)(F,{className:n,children:(0,M.jsxs)(`p`,{"data-slot":`file-preview-loading`,className:`px-4 py-6 text-center text-xs text-soft-foreground`,children:[`Loading `,t,`…`]})});if(r.isError){let e=r.error instanceof i&&r.error.status===409;return(0,M.jsx)(F,{className:n,children:(0,M.jsx)(c,{icon:e?(0,M.jsx)(C,{}):(0,M.jsx)(m,{}),tone:e?`neutral`:`danger`,heading:`h2`,title:e?`Cannot preview this file`:`Could not load this file`,subtitle:r.error.message})})}return r.data.type===`file`?(0,M.jsx)(P,{runId:e,entry:r.data,className:n}):null}function P({runId:e,entry:t,className:n}){let i=A(t);return(0,M.jsxs)(F,{className:n,children:[(0,M.jsxs)(`header`,{"data-slot":`file-preview-head`,className:`flex items-center gap-2 border-b border-border bg-muted/40 px-4 py-2 text-xs`,children:[(0,M.jsx)(`span`,{className:`min-w-0 truncate font-mono font-medium`,children:t.path}),(0,M.jsx)(`span`,{className:`ml-auto shrink-0 tabular-nums text-soft-foreground`,children:j(t.size)})]}),i===`image`?(0,M.jsx)(`div`,{className:`flex justify-center p-4`,children:(0,M.jsx)(`img`,{"data-slot":`file-preview-image`,src:r(e,t.path),alt:t.path,className:`max-h-[70vh] max-w-full rounded-sm`})}):i===`too-large`?(0,M.jsx)(c,{icon:(0,M.jsx)(x,{}),tone:`neutral`,heading:`h2`,title:`Too large to preview`,subtitle:`${j(t.size)} — past the preview cap. Open it in your editor instead.`}):i===`binary`?(0,M.jsx)(c,{icon:(0,M.jsx)(S,{}),tone:`neutral`,heading:`h2`,title:`Binary file`,subtitle:`${j(t.size)} of binary data — no text preview.`}):(0,M.jsx)(R,{path:t.path,text:t.content??``})]})}function F({className:e,children:t}){return(0,M.jsx)(`section`,{"data-slot":`file-preview`,className:u(`overflow-hidden rounded-lg border border-border bg-card`,e),children:t})}var I=1500;function L(e,t){let n=(0,D.useMemo)(()=>t.split(`
|
|
2
|
+
`).map(e=>[{content:e}]),[t]),r=(0,D.useMemo)(()=>h(e),[e]),i=n.length>I,[a,o]=(0,D.useState)(null);return(0,D.useEffect)(()=>{if(r===null||i)return;let n=!1;return g(t,r).then(r=>{n||o({key:`${e}\0${t}`,tokens:r.tokens})}),()=>{n=!0}},[e,t,r,i]),r===null||i?n:a?.key===`${e}\0${t}`?a.tokens:_(t,r)?.tokens??n}function R({path:e,text:t}){let n=L(e,t);return(0,M.jsx)(`div`,{"data-slot":`file-preview-code`,"data-lang":h(e)??`plaintext`,className:`overflow-x-auto py-2 font-mono text-xs leading-[1.7]`,children:n.map((e,t)=>(0,M.jsxs)(`div`,{className:`flex px-4`,children:[(0,M.jsx)(`span`,{className:`w-10 shrink-0 select-none pr-3 text-right tabular-nums text-soft-foreground`,children:t+1}),(0,M.jsx)(`span`,{className:`min-w-0 flex-1 whitespace-pre pr-4`,children:e.map((e,t)=>(0,M.jsx)(`span`,{style:e.color===void 0?void 0:{color:e.color},children:e.content},t))})]},t))})}function z({runId:e,selected:t,onSelect:n}){return(0,M.jsx)(`nav`,{"data-slot":`files-tree`,"aria-label":`Worktree files`,className:`min-w-0 text-[13px]`,children:(0,M.jsx)(`ul`,{className:`flex flex-col gap-px`,children:(0,M.jsx)(B,{runId:e,path:``,depth:0,selected:t,onSelect:n})})})}function B({runId:e,path:t,depth:n,selected:r,onSelect:i}){let a=s(e,t);return a.isPending?(0,M.jsx)(`li`,{"data-slot":`files-tree-loading`,className:`px-1.5 py-1 text-xs text-soft-foreground`,style:{paddingLeft:`${24+n*14}px`},children:`Loading…`}):a.isError?(0,M.jsx)(`li`,{"data-slot":`files-tree-error`,className:`px-1.5 py-1 text-xs text-danger`,style:{paddingLeft:`${24+n*14}px`},children:a.error.message}):a.data.type===`dir`?a.data.entries.length===0?(0,M.jsx)(`li`,{"data-slot":`files-tree-empty`,className:`px-1.5 py-1 text-xs text-soft-foreground`,style:{paddingLeft:`${24+n*14}px`},children:`Empty directory`}):(0,M.jsx)(M.Fragment,{children:a.data.entries.map(a=>a.type===`dir`?(0,M.jsx)(V,{runId:e,name:a.name,path:t===``?a.name:`${t}/${a.name}`,depth:n,selected:r,onSelect:i},a.name):(0,M.jsx)(H,{name:a.name,path:t===``?a.name:`${t}/${a.name}`,size:a.size,depth:n,selected:r,onSelect:i},a.name))}):null}function V({runId:e,name:t,path:n,depth:r,selected:i,onSelect:a}){let[o,s]=(0,D.useState)(!1);return(0,M.jsxs)(`li`,{children:[(0,M.jsxs)(`button`,{type:`button`,"data-slot":`files-dir`,"data-path":n,"data-state":o?`open`:`closed`,"aria-expanded":o,onClick:()=>s(e=>!e),className:`flex w-full min-w-0 items-center gap-1.5 rounded-sm px-1.5 py-1 text-left text-muted-foreground hover:bg-muted hover:text-foreground`,style:{paddingLeft:`${6+r*14}px`},children:[(0,M.jsx)(v,{"aria-hidden":`true`,className:u(`size-3.5 shrink-0 transition-transform`,o&&`rotate-90`)}),(0,M.jsx)(f,{"aria-hidden":`true`,className:`size-3.5 shrink-0`}),(0,M.jsx)(`span`,{className:`min-w-0 truncate font-medium`,children:t})]}),o?(0,M.jsx)(`ul`,{className:`flex flex-col gap-px`,children:(0,M.jsx)(B,{runId:e,path:n,depth:r+1,selected:i,onSelect:a})}):null]})}function H({name:e,path:t,size:n,depth:r,selected:i,onSelect:a}){let o=i===t,s=k(t)?T:p;return(0,M.jsx)(`li`,{children:(0,M.jsxs)(`button`,{type:`button`,"data-slot":`files-file`,"data-path":t,"aria-current":o?`true`:void 0,onClick:()=>a(t),className:u(`flex w-full min-w-0 items-center gap-1.5 rounded-sm px-1.5 py-1 text-left hover:bg-muted`,o?`bg-muted font-medium text-foreground`:`text-muted-foreground hover:text-foreground`),style:{paddingLeft:`${24+r*14}px`},children:[(0,M.jsx)(s,{"aria-hidden":`true`,className:`size-3.5 shrink-0`}),(0,M.jsx)(`span`,{className:`min-w-0 truncate`,children:e}),n===void 0?null:(0,M.jsx)(`span`,{className:`ml-auto shrink-0 pl-2 font-mono text-[11px] tabular-nums text-soft-foreground`,children:j(n)})]})})}function U(){let{id:e}=o(),t=a(e);return t.isPending?(0,M.jsx)(b,{tab:`files`}):t.isError?(0,M.jsx)(y,{tab:`files`,error:t.error}):(0,M.jsx)(W,{run:t.data})}function W({run:e}){let t=s(e.id,``),[n,r]=(0,D.useState)(null),a=t.isError&&t.error instanceof i&&t.error.status===409;return(0,M.jsxs)(`div`,{"data-route":`task-files`,className:`flex min-h-full flex-col`,children:[(0,M.jsx)(d,{run:e,tab:`files`}),t.isPending?(0,M.jsx)(`p`,{"data-slot":`files-loading`,className:`px-4 py-6 text-center text-xs text-soft-foreground md:px-6`,children:`Loading files…`}):t.isError?(0,M.jsx)(c,{icon:a?(0,M.jsx)(w,{}):(0,M.jsx)(m,{}),tone:a?`neutral`:`danger`,heading:`h2`,title:a?`No files to browse`:`Could not load the files`,subtitle:t.error.message}):(0,M.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col items-stretch gap-5 px-4 py-4 md:flex-row md:items-start md:px-6`,children:[(0,M.jsx)(`aside`,{className:`w-full shrink-0 md:sticky md:top-28 md:w-60 lg:w-72`,children:(0,M.jsx)(z,{runId:e.id,selected:n,onSelect:r})}),(0,M.jsx)(N,{runId:e.id,path:n,className:`min-w-0 flex-1`})]})]})}export{U as TaskFilesRoute};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{a as e,l as t,o as n}from"./bundle-mjs-DLPpRFyl.js";import{t as r}from"./react-dom-Ddtik4qM.js";import{At as i,Bt as a,D as o,Ft as s,G as c,Ht as l,K as u,Q as d,R as f,Rt as p,a as m,i as h,n as g,ot as _,rt as v,t as y}from"./centered-state-BddhEEtO.js";import{n as b,t as x}from"./utils-rQGbOrwc.js";import{c as S,l as C,n as w,o as T,r as E,s as D,t as O}from"./run-header-jx9-18b8.js";import{n as ee,t as te}from"./loader-circle-BV3DO9mE.js";import{d as k,u as ne}from"./command-CjhFbABo.js";import{n as re,t as ie}from"./trash-2-CDtxmmc8.js";import{n as ae}from"./tab-link-C5--YMQd.js";import{d as oe,f as se}from"./prompt-templates-C7ptKvDd.js";import{t as ce}from"./git-pull-request-DJkAMT0f.js";import{t as le}from"./search-x-CoCyl7zT.js";import{t as ue}from"./square-terminal-B6PZX4Qp.js";import{c as de,y as fe}from"./tasks-table-dgezlCcg.js";import{i as A,n as j,r as M,t as pe}from"./run-diff-Dyow8B1q.js";import{t as me}from"./markdown-D4-ADgH9.js";import{H as he,I as ge,U as _e,V as N,a as ve,b as ye,x as be,y as xe}from"./index-CO2lH2et.js";var Se=b(`brain`,[[`path`,{d:`M12 18V5`,key:`adv99a`}],[`path`,{d:`M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4`,key:`1e3is1`}],[`path`,{d:`M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5`,key:`1gqd8o`}],[`path`,{d:`M17.997 5.125a4 4 0 0 1 2.526 5.77`,key:`iwvgf7`}],[`path`,{d:`M18 18a4 4 0 0 0 2-7.464`,key:`efp6ie`}],[`path`,{d:`M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517`,key:`1gq6am`}],[`path`,{d:`M6 18a4 4 0 0 1-2-7.464`,key:`k1g0md`}],[`path`,{d:`M6.003 5.125a4 4 0 0 0-2.526 5.77`,key:`q97ue3`}]]),Ce=b(`corner-up-left`,[[`path`,{d:`M20 20v-7a4 4 0 0 0-4-4H4`,key:`1nkjon`}],[`path`,{d:`M9 14 4 9l5-5`,key:`102s5s`}]]),we=b(`folder-input`,[[`path`,{d:`M2 9V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-1`,key:`fm4g5t`}],[`path`,{d:`M2 13h10`,key:`pgb2dq`}],[`path`,{d:`m9 16 3-3-3-3`,key:`6m91ic`}]]),Te=b(`list-todo`,[[`path`,{d:`M13 5h8`,key:`a7qcls`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`rect`,{x:`3`,y:`4`,width:`6`,height:`6`,rx:`1`,key:`cif1o7`}]]),Ee=b(`message-square-text`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}],[`path`,{d:`M7 11h10`,key:`1twpyw`}],[`path`,{d:`M7 15h6`,key:`d9of3u`}],[`path`,{d:`M7 7h8`,key:`af5zfr`}]]),De=b(`square-pen`,[[`path`,{d:`M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7`,key:`1m0v6g`}],[`path`,{d:`M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z`,key:`ohrbg2`}]]),Oe=b(`wrench`,[[`path`,{d:`M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z`,key:`1ngwbx`}]]),P=t(n(),1),ke=[`run-event`,`ui-event`];function Ae(e){let t;try{t=JSON.parse(e)}catch{return null}if(typeof t!=`object`||!t||Array.isArray(t))return null;let{seq:n,type:r}=t;return typeof n!=`number`||typeof r!=`string`||r===``?null:t}function je(e){let[t,n]=(0,P.useState)([]);return(0,P.useEffect)(()=>{if(n([]),!e)return;let t=globalThis.EventSource;if(typeof t!=`function`)return;let r=0,i=null,a,o=!1,s=Date.now(),c,l=e=>{s=Date.now();let t=Ae(e.data);!t||!(t.seq>r)||(r=t.seq,n(e=>[...e,t]))},u=()=>{s=Date.now()},d=()=>{o||a!==void 0||(a=setTimeout(()=>{a=void 0,o||f()},1500))},f=()=>{i?.close(),s=Date.now(),i=new t(`/api/runs/${encodeURIComponent(e)}/events`);for(let e of ke)i.addEventListener(e,l);i.addEventListener(`ping`,u),i.addEventListener(`error`,()=>{i?.readyState===2&&d()})},p=()=>{document.visibilityState===`visible`&&(!i||i.readyState===2)&&(clearTimeout(a),a=void 0,f())},m=()=>{clearTimeout(a),a=void 0,i?.close()},h=e=>{e.persisted&&f()};return c=setInterval(()=>{o||document.visibilityState!==`visible`||Date.now()-s<=4e4||(clearTimeout(a),a=void 0,f())},1e4),document.addEventListener(`visibilitychange`,p),window.addEventListener(`pagehide`,m),window.addEventListener(`pageshow`,h),f(),()=>{o=!0,clearTimeout(a),clearInterval(c),document.removeEventListener(`visibilitychange`,p),window.removeEventListener(`pagehide`,m),window.removeEventListener(`pageshow`,h),i?.close()}},[e]),t}var Me=t(r(),1),F=e();function Ne({src:e,alt:t=``,className:n,...r}){let[i,a]=(0,P.useState)(!1);return(0,P.useEffect)(()=>{if(!i)return;let e=e=>{e.key===`Escape`&&a(!1)};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[i]),(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`img`,{...r,src:e,alt:t,loading:`lazy`,onClick:()=>a(!0),className:x(`cursor-zoom-in`,n)}),i?(0,Me.createPortal)((0,F.jsx)(`div`,{role:`dialog`,"aria-modal":`true`,"aria-label":`Image preview`,"data-slot":`image-lightbox`,onClick:()=>a(!1),className:`fixed inset-0 z-[100] flex cursor-zoom-out items-center justify-center bg-black/80 p-4 backdrop-blur-sm`,children:(0,F.jsx)(`img`,{src:e,alt:t,className:`max-h-full max-w-full rounded-md object-contain shadow-2xl`})}),document.body):null]})}var I=e=>e.kind===`tool`,Pe=e=>(e.toolKind===`read`||e.toolKind===`search`)&&e.status===`completed`,Fe=(e,t,n)=>`${e} ${e===1?t:n}`;function Ie(e,t){let n=[];return e>0&&n.push(Fe(e,`file`,`files`)),t>0&&n.push(Fe(t,`search`,`searches`)),`Explored ${n.join(` · `)}`}function Le(e){return`${e} earlier tool call${e===1?``:`s`}`}var Re=[`Web search`,`Ran`,`Edit`,`Write`,`Read`,`Search`,`Fetch`,`Task:`];function ze(e){for(let t of Re)if(e.startsWith(`${t} `)&&e.length>t.length+1)return{verb:t===`Task:`?`Task`:t,detail:e.slice(t.length+1)};return{verb:e}}function Be(e){let t=e.filter(e=>!(e.kind===`tool`&&e.toolKind===`plan`)),n=new Set(t.filter(I).map(e=>e.id)),r=new Map,i=[];for(let e of t){let t=(e.kind===`message`||e.kind===`reasoning`||e.kind===`tool`)&&e.parentItemId!==void 0&&e.parentItemId!==e.id&&n.has(e.parentItemId)?e.parentItemId:void 0;if(t===void 0)i.push(e);else{let n=r.get(t);n?n.push(e):r.set(t,[e])}}let a=[],o=[],s=()=>{if(o.length>=2){let e=o.filter(e=>e.toolKind===`read`).length;a.push({kind:`context-group`,id:`group:${o[0].id}`,tools:o,files:e,searches:o.length-e,label:Ie(e,o.length-e)})}else for(let e of o)a.push({kind:`tool-card`,id:e.id,item:e,children:r.get(e.id)??[]});o=[]};for(let e of i)I(e)&&Pe(e)&&!r.has(e.id)?o.push(e):(s(),I(e)?a.push({kind:`tool-card`,id:e.id,item:e,children:r.get(e.id)??[]}):a.push({kind:`entry`,id:e.id,entry:e}));s();let c=e=>e.kind===`context-group`||e.kind===`tool-card`&&e.item.status===`completed`,l=e=>e.kind===`context-group`?e.tools.length:1,u=[],d=[],f=()=>{if(d.length>3){let e=d.slice(0,d.length-3);u.push({kind:`streak`,id:`streak:${e[0].id}`,count:e.reduce((e,t)=>e+l(t),0),blocks:e}),u.push(...d.slice(d.length-3))}else u.push(...d);d=[]};for(let e of a)c(e)?d.push(e):(f(),u.push(e));return f(),u}var L=new Map,Ve=(0,P.createContext)(null);function He(){return(0,P.useContext)(Ve)}function Ue({runId:e,children:t}){let n=(0,P.useMemo)(()=>({get:t=>L.get(e)?.get(t),set:(t,n)=>{let r=L.get(e)??new Map;r.set(t,n),L.set(e,r)}}),[e]);return(0,F.jsx)(Ve.Provider,{value:n,children:t})}function We(e,t=24){return e.scrollHeight-e.scrollTop-e.clientHeight<t}function Ge(e,t){let n=new URLSearchParams(e).get(`thread`);return n===`flat`||n===`virtual`?n:t>300?`virtual`:`flat`}var Ke=new Map;function qe(e,t){Ke.set(e,t)}function Je(e){return Ke.get(e)}var Ye=new Map;function Xe(e,t){Ye.set(e,t)}function Ze(e,t){let n=Ye.get(e);return n!==void 0&&n.rows===t?n.cache:void 0}function Qe({text:e,imageCount:t=0,images:n=[]}){let r=t-n.length;return(0,F.jsxs)(`div`,{"data-slot":`user-bubble`,className:`max-w-[78%] self-end rounded-2xl rounded-br-md bg-muted px-[15px] py-2.5 text-[13.5px] leading-[1.55] whitespace-pre-wrap md:max-w-[70%]`,children:[e,n.length>0?(0,F.jsx)(`span`,{"data-slot":`user-images`,className:`mt-2 flex flex-wrap justify-end gap-1.5`,children:n.map(e=>(0,F.jsx)(Ne,{src:e,alt:`attached`,className:`max-h-40 max-w-[220px] rounded-md border border-border object-contain`},e))}):null,r>0?(0,F.jsxs)(`span`,{className:`mt-1 block text-xs text-soft-foreground`,children:[r,` image`,r>1?`s`:``,` attached`]}):null]})}function $e({text:e}){return(0,F.jsx)(`div`,{"data-slot":`assistant-message`,className:`min-w-0 text-[15px] leading-[1.65]`,children:(0,F.jsx)(me,{children:e})})}function et({note:e}){return(0,F.jsxs)(`div`,{"data-slot":`note-line`,"data-tone":e.tone,className:x(`px-0.5 text-xs`,e.tone===`danger`?`text-danger`:`text-soft-foreground`),children:[e.tone===`danger`?`✗ `:`· `,e.text]})}function tt({text:e}){let t=e.split(`
|
|
2
|
+
`,1)[0]??``,n=t.length<e.length;return(0,F.jsxs)(j,{"data-slot":`reasoning`,className:`min-w-0`,children:[(0,F.jsxs)(A,{className:`group flex w-full items-center gap-1.5 rounded-md p-0.5 text-left text-[13px] text-soft-foreground hover:text-muted-foreground`,children:[(0,F.jsx)(N,{"aria-hidden":!0,className:`size-3.5 shrink-0 transition-transform group-data-[state=open]:rotate-90`}),(0,F.jsxs)(`span`,{className:`min-w-0 truncate`,children:[`Thinking — `,(0,F.jsx)(`em`,{className:`text-muted-foreground not-italic`,children:t}),n?`…`:``]})]}),(0,F.jsx)(M,{children:(0,F.jsx)(`div`,{className:`px-6 py-1.5 text-[13px] leading-[1.6] whitespace-pre-wrap text-soft-foreground`,children:e})})]})}var nt={read:C,edit:De,delete:ie,move:we,search:ne,execute:ue,think:Se,fetch:S,task:he,plan:Te,other:Oe},rt=e=>e.split(`
|
|
3
|
+
`).length;function it({text:e,streaming:t}){let[n,r]=(0,P.useState)(!1),i=(0,P.useRef)(null),a=(0,P.useRef)(!0);(0,P.useEffect)(()=>{let e=i.current;t&&e&&a.current&&(e.scrollTop=e.scrollHeight)},[e,t]);let o=rt(e),s=!t&&!n&&o>12;return(0,F.jsxs)(`div`,{"data-slot":`tool-output`,"data-clamped":s?`true`:void 0,children:[(0,F.jsxs)(`div`,{className:`relative`,children:[(0,F.jsx)(`div`,{ref:i,onScroll:t?e=>{a.current=We(e.currentTarget)}:void 0,className:x(`overflow-x-auto`,t&&`max-h-[216px] overflow-y-auto`,s&&`max-h-[216px] overflow-y-hidden`),children:(0,F.jsx)(`pre`,{className:`px-4 py-3 font-mono text-xs leading-[1.7] whitespace-pre text-muted-foreground`,children:e})}),s?(0,F.jsx)(`div`,{"data-slot":`tool-output-fade`,"aria-hidden":!0,className:`pointer-events-none absolute inset-x-0 bottom-0 h-14 bg-gradient-to-b from-transparent to-card-2`}):null]}),!t&&o>12?(0,F.jsx)(`button`,{type:`button`,"data-slot":`tool-output-toggle`,onClick:()=>r(e=>!e),className:`block w-full border-t border-border/50 px-4 py-1.5 text-left text-[11px] font-medium text-soft-foreground hover:text-foreground`,children:n?`Show less`:`Show all ${o} lines`}):null]})}function at({diffs:e}){return(0,F.jsx)(F.Fragment,{children:e.map((e,t)=>(0,F.jsxs)(`div`,{"data-slot":`diff-preview`,className:`min-w-0`,children:[(0,F.jsx)(`div`,{className:`border-b border-border/50 px-4 py-1.5 font-mono text-[11px] text-soft-foreground`,children:e.path}),(0,F.jsx)(`pre`,{className:`overflow-x-auto py-2 font-mono text-xs leading-[1.7] whitespace-pre`,children:e.unified===void 0?[...ot(e.oldText).map((e,t)=>(0,F.jsxs)(`span`,{className:`block bg-diff-del px-4 text-muted-foreground`,children:[`- `,e]},`old-${t}`)),...ot(e.newText).map((e,t)=>(0,F.jsxs)(`span`,{className:`block bg-diff-add px-4`,children:[`+ `,e]},`new-${t}`))]:e.unified.split(`
|
|
4
|
+
`).map((e,t)=>(0,F.jsx)(st,{text:e},t))})]},`${e.path}:${t}`))})}function ot(e){return e==null||e===``?[]:e.replace(/\n$/,``).split(`
|
|
5
|
+
`)}function st({text:e}){return(0,F.jsx)(`span`,{className:x(`block px-4`,e.startsWith(`+`)&&`bg-diff-add`,e.startsWith(`-`)&&`bg-diff-del text-muted-foreground`,e.startsWith(`@@`)&&`text-soft-foreground`),children:e})}function ct(e){return e.status===`failed`||e.toolKind===`execute`&&e.status===`running`&&e.output!==void 0}function R({item:e,nested:t=[],cacheKey:n}){let r=He(),[i,a]=(0,P.useState)(()=>n===void 0?null:r?.get(n)??null),o=e=>{n!==void 0&&r?.set(n,e),a(e)},s=e.status===`running`||e.status===`pending`,c=e.output!==void 0&&e.output!==``||e.error!==void 0&&e.error!==``||e.diffs!==void 0&&e.diffs.length>0||t.length>0,l=c&&(i??ct(e)),{verb:u,detail:d}=ze(e.title),f=nt[e.toolKind]??Oe;return(0,F.jsxs)(j,{"data-slot":`tool-card`,"data-status":e.status,"data-kind":e.toolKind,open:l,onOpenChange:o,className:x(`min-w-0 overflow-hidden rounded-md border bg-card`,e.status===`failed`?`border-danger/40`:`border-border`),children:[(0,F.jsxs)(A,{disabled:!c,className:`group flex min-h-[28px] w-full items-center gap-1.5 px-2.5 py-0.5 text-left text-[13px] enabled:hover:bg-muted`,children:[(0,F.jsx)(N,{"aria-hidden":!0,className:x(`size-3 shrink-0 text-soft-foreground transition-transform group-data-[state=open]:rotate-90`,!c&&`invisible`)}),(0,F.jsx)(f,{"aria-hidden":!0,className:x(`size-3.5 shrink-0`,e.status===`failed`?`text-danger`:`text-muted-foreground`)}),(0,F.jsx)(`span`,{className:x(`shrink-0 font-semibold`,s&&`shimmer`,e.status===`failed`&&`text-danger`,e.status===`declined`&&`text-muted-foreground`),children:u}),d===void 0?null:(0,F.jsx)(`code`,{className:`min-w-0 truncate font-mono text-xs text-muted-foreground`,children:d}),(0,F.jsxs)(`span`,{className:`ml-auto flex shrink-0 items-center gap-2 pl-2`,children:[s?(0,F.jsx)(te,{role:`status`,"aria-label":`Running`,className:`size-3.5 animate-spin text-soft-foreground`}):null,e.status===`failed`?(0,F.jsx)(`span`,{className:`text-xs text-danger`,children:`failed`}):null,e.status===`declined`?(0,F.jsx)(`span`,{className:`text-xs text-soft-foreground`,children:`declined`}):null,e.toolKind===`execute`&&typeof e.exitCode==`number`?(0,F.jsx)(`span`,{"data-slot":`tool-exit`,className:x(`rounded-full px-2 py-px font-mono text-[10.5px] font-semibold`,e.exitCode===0?`bg-success/10 text-success`:`bg-danger/10 text-danger`),children:e.exitCode}):null]})]}),(0,F.jsx)(M,{children:(0,F.jsxs)(`div`,{className:`border-t border-border bg-card-2`,children:[e.error!==void 0&&e.error!==``?(0,F.jsx)(`div`,{"data-slot":`tool-error`,className:`px-4 py-3 font-mono text-xs leading-[1.7] whitespace-pre-wrap text-danger`,children:e.error}):null,e.diffs!==void 0&&e.diffs.length>0?(0,F.jsx)(at,{diffs:e.diffs}):null,e.output!==void 0&&e.output!==``?(0,F.jsx)(it,{text:e.output,streaming:s}):null,t.length>0?(0,F.jsx)(`div`,{"data-slot":`tool-nested`,className:`flex flex-col gap-2 border-l-2 border-border py-2.5 pr-3 pl-3 ml-4 my-2`,children:t.map(e=>(0,F.jsx)(lt,{entry:e,scope:n},e.id))}):null]})})]})}function lt({entry:e,scope:t}){switch(e.kind){case`message`:return(0,F.jsx)($e,{text:e.text});case`reasoning`:return(0,F.jsx)(tt,{text:e.text});case`tool`:return(0,F.jsx)(R,{item:e,cacheKey:t===void 0?void 0:`${t}:${e.id}`});case`note`:return(0,F.jsx)(et,{note:e});case`image`:return(0,F.jsx)(ft,{image:e})}}function ut({group:e,scope:t}){return(0,F.jsxs)(j,{"data-slot":`ctx-group`,className:`min-w-0`,children:[(0,F.jsxs)(A,{className:`group flex h-[34px] w-full items-center gap-2 rounded-md px-2 -mx-2 text-left text-[13px] font-medium text-muted-foreground hover:bg-muted hover:text-foreground`,children:[(0,F.jsx)(N,{"aria-hidden":!0,className:`size-3.5 shrink-0 text-soft-foreground transition-transform group-data-[state=open]:rotate-90`}),e.label]}),(0,F.jsx)(M,{children:(0,F.jsx)(`div`,{className:`flex flex-col gap-1.5 pt-1.5 pl-4`,children:e.tools.map(e=>(0,F.jsx)(R,{item:e,cacheKey:t===void 0?void 0:`${t}:${e.id}`},e.id))})})]})}function dt({count:e,children:t}){return(0,F.jsxs)(j,{"data-slot":`tool-streak`,className:`min-w-0`,children:[(0,F.jsxs)(A,{className:`group flex items-center gap-1.5 rounded-md p-0.5 text-left text-xs text-soft-foreground hover:text-muted-foreground`,children:[(0,F.jsx)(N,{"aria-hidden":!0,className:`size-3.5 shrink-0 transition-transform group-data-[state=open]:rotate-90`}),Le(e)]}),(0,F.jsx)(M,{children:(0,F.jsx)(`div`,{className:`flex flex-col gap-2 pt-2`,children:t})})]})}function ft({image:e}){return(0,F.jsx)(Ne,{"data-slot":`thread-image`,src:e.url,alt:e.name??`image from the agent session`,className:`max-h-72 max-w-full self-start rounded-lg border border-border`})}var pt=new Map;function mt(){return typeof window.matchMedia!=`function`||window.matchMedia(`(min-width: 768px)`).matches}function ht(e){return{done:e.filter(e=>e.status===`completed`).length,total:e.filter(e=>e.status!==`cancelled`).length}}function gt(e){return e.find(e=>e.status===`in_progress`)??e.find(e=>e.status===`pending`)}function _t({runId:e,entries:t}){let[n,r]=(0,P.useState)(()=>pt.get(e)??mt());if(t.length===0)return null;let{done:i,total:a}=ht(t),o=gt(t);return(0,F.jsxs)(`section`,{"data-slot":`plan-dock`,"data-state":n?`open`:`collapsed`,className:`min-w-0 overflow-hidden rounded-lg border border-border bg-card shadow-xs`,children:[(0,F.jsx)(`div`,{"aria-hidden":!0,"data-slot":`grad-edge`,className:`h-[3px]`,style:{background:`var(--grad)`}}),(0,F.jsxs)(`button`,{type:`button`,onClick:()=>r(t=>(pt.set(e,!t),!t)),"aria-expanded":n,className:x(`flex w-full items-center gap-2 px-3.5 text-left text-[13px]`,n?`pt-2 pb-1.5`:`py-2`),children:[(0,F.jsx)(`span`,{className:`shrink-0 font-semibold`,children:`Plan`}),(0,F.jsxs)(`span`,{"data-slot":`plan-count`,className:`shrink-0 text-muted-foreground tabular-nums`,children:[`· `,i,`/`,a]}),!n&&o!==void 0?(0,F.jsxs)(`span`,{"data-slot":`plan-current`,className:`min-w-0 truncate text-muted-foreground`,children:[`— `,o.activeForm??o.content]}):null,(0,F.jsx)(k,{"aria-hidden":!0,className:x(`ml-auto size-3.5 shrink-0 text-soft-foreground transition-transform`,!n&&`rotate-180`)})]}),n?(0,F.jsx)(`ul`,{"data-slot":`plan-list`,className:`flex flex-col gap-[7px] px-3.5 pb-3`,children:t.map((e,t)=>(0,F.jsx)(vt,{entry:e},`${t}:${e.content}`))}):null]})}function vt({entry:e}){return(0,F.jsxs)(`li`,{"data-slot":`plan-item`,"data-status":e.status,className:x(`flex min-h-5 min-w-0 items-center gap-2.5 text-[13px]`,e.status===`completed`&&`text-soft-foreground line-through`,e.status===`in_progress`&&`font-medium`,e.status===`pending`&&`text-muted-foreground`,e.status===`cancelled`&&`text-soft-foreground/70 line-through`),children:[(0,F.jsx)(yt,{status:e.status}),(0,F.jsx)(`span`,{className:`min-w-0 truncate`,children:e.content}),e.status===`in_progress`?(0,F.jsx)(`span`,{"data-slot":`plan-tag`,className:`ml-auto shrink-0 rounded-full bg-muted px-2 py-0.5 text-[10.5px] font-semibold tracking-[0.05em] text-muted-foreground uppercase`,children:`in progress`}):null]})}function yt({status:e}){return e===`cancelled`?(0,F.jsxs)(`svg`,{"aria-hidden":!0,className:`size-[15px] shrink-0 text-soft-foreground/70`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,children:[(0,F.jsx)(`circle`,{cx:`12`,cy:`12`,r:`8.5`,opacity:`.5`}),(0,F.jsx)(`path`,{d:`m8.5 15.5 7-7`})]}):e===`completed`?(0,F.jsxs)(`svg`,{"aria-hidden":!0,className:`size-[15px] shrink-0 text-success`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,F.jsx)(`circle`,{cx:`12`,cy:`12`,r:`9`,opacity:`.35`}),(0,F.jsx)(`path`,{d:`m8.5 12.2 2.4 2.4 4.6-5`})]}):e===`in_progress`?(0,F.jsxs)(`svg`,{"aria-hidden":!0,className:`size-[15px] shrink-0 animate-pulse motion-reduce:animate-none`,viewBox:`0 0 24 24`,fill:`none`,children:[(0,F.jsx)(`circle`,{className:`stroke-pending`,cx:`12`,cy:`12`,r:`8.5`,strokeWidth:`2`}),(0,F.jsx)(`path`,{className:`fill-pending`,d:`M12 3.5 A8.5 8.5 0 0 1 12 20.5 Z`})]}):(0,F.jsx)(`svg`,{"aria-hidden":!0,className:`size-[15px] shrink-0 text-soft-foreground`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,children:(0,F.jsx)(`circle`,{cx:`12`,cy:`12`,r:`8.5`})})}function bt({run:e}){return(0,F.jsxs)(`section`,{"data-slot":`review-panel`,"aria-label":`Review the changes`,className:`flex flex-col gap-3`,children:[(0,F.jsxs)(`div`,{"data-slot":`review-banner`,className:`flex items-center gap-2.5 rounded-md border border-violet/30 bg-violet/10 px-3.5 py-2.5`,children:[(0,F.jsx)(se,{className:`size-4 shrink-0 text-violet`,"aria-hidden":`true`}),(0,F.jsxs)(`p`,{className:`min-w-0 text-[13px]`,children:[(0,F.jsx)(`span`,{className:`font-semibold`,children:`Review the changes before anything lands.`}),` `,(0,F.jsx)(`span`,{className:`text-muted-foreground`,children:`Read the diff, send notes back, draft a PR — or accept. Nothing merges on its own.`})]})]}),(0,F.jsx)(pe,{runId:e.id}),(0,F.jsx)(xt,{run:e})]})}function xt({run:e}){let t=l(),n=(0,P.useRef)(null),[r,i]=(0,P.useState)(``),[s,c]=(0,P.useState)(null),u=w(e.id),f=()=>t.invalidateQueries({queryKey:o.runs.all}),p=a({mutationFn:t=>v(e.id,`Review feedback:\n${t}`),onSuccess:()=>{i(``),f()},onError:e=>h(e.message,{tone:`danger`})}),g=a({mutationFn:()=>_(e.id),onSuccess:e=>{h(`Draft PR created — ${e.url}`),f()},onError:e=>{e instanceof d&&e.manual!==void 0&&c(e.manual),h(e.message,{tone:`danger`})}}),y=()=>{let e=r.trim();if(e.length===0){h(`Write what to change first.`),n.current?.focus();return}p.mutate(e)};return(0,F.jsxs)(`div`,{"data-slot":`review-actions`,className:`flex flex-col gap-2`,children:[(0,F.jsx)(be,{ref:n,"data-slot":`review-notes`,"aria-label":`Notes for the agent`,placeholder:`Notes for the agent — what should change?`,rows:2,value:r,onChange:e=>i(e.target.value),onKeyDown:e=>{ye({key:e.key,shiftKey:e.shiftKey,metaKey:e.metaKey,ctrlKey:e.ctrlKey,altKey:e.altKey,repeat:e.repeat,isComposing:e.nativeEvent.isComposing})&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),y())},className:`min-h-[52px] text-[13px]`}),(0,F.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,F.jsxs)(m,{"data-slot":`review-send-back`,variant:`outline`,size:`sm`,title:`Send the notes back into the agent's session`,disabled:p.isPending,onClick:y,children:[(0,F.jsx)(Ce,{"aria-hidden":`true`}),`Send back`]}),e.pullRequestUrl===void 0?(0,F.jsxs)(m,{"data-slot":`review-draft-pr`,variant:`outline`,size:`sm`,title:`Push the branch and open a draft PR`,disabled:g.isPending,onClick:()=>g.mutate(),children:[(0,F.jsx)(ce,{"aria-hidden":`true`}),`Draft PR`]}):(0,F.jsx)(m,{asChild:!0,variant:`outline`,size:`sm`,children:(0,F.jsxs)(`a`,{"data-slot":`pr-link`,href:e.pullRequestUrl,target:`_blank`,rel:`noopener noreferrer`,title:`The PR for this task is already open`,children:[(0,F.jsx)(ae,{"aria-hidden":`true`}),`PR ↗`]})}),(0,F.jsxs)(m,{"data-slot":`review-accept`,variant:`contrast`,size:`sm`,className:`ml-auto`,title:E(`review`),disabled:u.isPending,onClick:()=>u.mutate(),children:[(0,F.jsx)(ee,{"aria-hidden":`true`}),`Accept`]})]}),s===null?null:(0,F.jsx)(St,{command:s})]})}function St({command:e}){return(0,F.jsxs)(`button`,{type:`button`,"data-slot":`review-manual`,title:`Copy the command`,onClick:()=>{navigator.clipboard.writeText(e).then(()=>h(`Command copied to clipboard.`)).catch(()=>h(`Run manually: ${e}`))},className:`flex w-full min-w-0 items-center gap-1.5 rounded-sm px-1 py-0.5 text-left font-mono text-[11px] text-soft-foreground hover:bg-muted hover:text-foreground`,children:[(0,F.jsx)(re,{className:`size-3 shrink-0`,"aria-hidden":`true`}),(0,F.jsxs)(`span`,{className:`truncate`,children:[`manual path: `,e]})]})}function Ct(){return typeof window<`u`&&typeof window.matchMedia==`function`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}var wt=1500;function Tt({status:e}){let t=(0,P.useRef)(e),[n,r]=(0,P.useState)(!1);return(0,P.useEffect)(()=>{let n=t.current;if(t.current=e,n!==`review`||e!==`done`||Ct())return;r(!0);let i=setTimeout(()=>r(!1),wt);return()=>clearTimeout(i)},[e]),n?(0,F.jsxs)(`div`,{"data-slot":`accept-celebration`,"aria-hidden":`true`,className:`pointer-events-none fixed inset-0 isolate z-40`,children:[(0,F.jsx)(g,{}),(0,F.jsx)(`div`,{className:`flex justify-center pt-24`,children:(0,F.jsx)(`span`,{className:`rounded-full border border-violet/30 bg-violet/15 px-4 py-1.5 text-[13px] font-medium text-violet shadow-modal`,children:`✓ Changes accepted`})})]}):null}var z=null,{min:B,max:V,abs:Et,floor:Dt}=Math,Ot=(e,t,n)=>B(n,V(t,e)),kt=e=>[...e].sort((e,t)=>e-t),At=typeof queueMicrotask==`function`?queueMicrotask:e=>{Promise.resolve().then(e)},H=()=>{let e;return[new Promise(t=>{e=t}),e]},jt=e=>{let t;return()=>(e&&=(t=e(),void 0),t)},U=(e,t,n)=>{let r=n?`unshift`:`push`;for(let n=0;n<t;n++)e[r](-1);return e},Mt=(e,t)=>{let n=e.t[t];return n===-1?e.o:n},Nt=(e,t,n)=>{let r=e.t[t]===-1;return e.t[t]=n,e.i=B(t,e.i),r},W=(e,t)=>{if(!e.l)return 0;if(e.i>=t)return e.u[t];e.i<0&&(e.u[0]=0,e.i=0);let n=e.i,r=e.u[n];for(;n<t;)r+=Mt(e,n),e.u[++n]=r;return e.i=t,r},G=(e,t,n=0,r=e.l-1)=>{let i=n;for(;n<=r;){let a=Dt((n+r)/2);W(e,a)<=t?(i=a,n=a+1):r=a-1}return Ot(i,0,e.l-1)},Pt=(e,t,n)=>{let r=t-e.l;return e.i=n?-1:B(t-1,e.i),e.l=t,r>0?(U(e.u,r),U(e.t,r,n),e.o*r):(e.u.splice(r),(n?e.t.splice(0,-r):e.t.splice(r)).reduce((t,n)=>t-(n===-1?e.o:n),0))},Ft=typeof window<`u`,It=e=>e.documentElement,Lt=e=>e.ownerDocument,Rt=e=>e.defaultView,zt=jt(()=>!!/iP(hone|od|ad)/.test(navigator.userAgent)||navigator.platform===`MacIntel`&&navigator.maxTouchPoints>0),Bt=jt(()=>`scrollBehavior`in It(document).style),Vt=e=>V(e.h(),e.p()),Ht=(e,t=40,n=0,r,i=!1)=>{let a=!!n,o=1,s=0,c=0,l=0,u=0,d=0,f=0,p=0,m=0,h=z,g=[0,a?V(n-1,0):-1],_=0,v=!1,y=((e,t,n)=>({o:t,t:n?U(n.slice(0,B(e,n.length)),V(0,e-n.length)):U([],e),l:e,i:-1,u:U([],e+1)}))(e,r?r[1]:t,r&&r[0]),b=new Set,x=()=>l-c,S=()=>x()+d+u,C=(e,t)=>((e,t,n,r)=>{if(r=B(r,e.l-1),W(e,r)<=t){let i=G(e,n,r);return[G(e,t,r,i),i]}{let i=G(e,t,void 0,r);return[i,G(e,n,i)]}})(y,e,t,g[0]),w=()=>W(y,y.l),T=(e,t)=>{let n=W(y,e)-d;return t?w()-n-E(e):n},E=e=>Mt(y,e),D=(e,t=-1)=>y.t[e]===t,O=e=>{e&&(zt()&&p!==0||h&&m===1?d+=e:u+=e)};return{v:()=>{b.clear()},m:()=>o,_:()=>(e=>[e.t.slice(),e.o])(y),S:(e=200)=>{if(!v||a)return g;let t,n;if(f)[t,n]=g;else{let r=V(0,S()),a=r+s;i||(e=V(0,e),p!==1&&(r-=e),p!==2&&(a+=e)),[t,n]=g=C(V(0,r),V(0,a)),h&&(t=B(t,h[0]),n=V(n,h[1]))}return[V(t,0),B(n,y.l-1)]},$:e=>G(y,e-c),I:D,k:T,R:E,T:()=>y.l,C:()=>l,M:()=>p!==0,p:()=>s,O:()=>c,h:w,H:()=>(f=u,u=0,[f,m===2]),W:(e,t)=>{let n=[e,t];return b.add(n),()=>{b.delete(n)}},B:(e,t)=>{let n,r,g=0;switch(e){case 1:{if(t===l&&m===0)break;let e=f;f=0;let n=t-l,i=Et(n);e&&i<Et(e)+1||m!==0||(p=n<0?2:1),a&&=!1,l=t,g=4;let o=x();o>=-s&&o<=w()&&(g+=1,r=i>s);break}case 2:g=8,p!==0&&(n=!0,g+=1),p=0,m=0,h=z;break;case 3:{let e=t.filter(([e,t])=>!D(e,t));if(!e.length)break;O(e.reduce((e,[t,n])=>{let r;if(m===2)r=!0;else if(h&&m===1)r=t<h[0];else{let e=x(),n=T(t),i=E(t);r=p!==1&&m===0?n+i<=e:n<e&&n+i<e+s}return r&&(e+=n-E(t)),e},0));for(let[t,n]of e){let e=E(t),r=Nt(y,t,n);i&&(_+=r?n:n-e)}i&&s&&_>s&&(O(((e,t)=>{let n=0,r=[];e.t.forEach((e,i)=>{e!==-1&&(r.push(e),i<t&&n++)}),e.i=-1;let i=kt(r),a=i.length,o=a/2|0,s=a%2==0?(i[o-1]+i[o])/2:i[o],c=e.o;return((e.o=s)-c)*V(t-n,0)})(y,G(y,S()))),i=!1),g=3,r=!0;break}case 4:s!==t&&(s||(v=r=!0),s=t,g=3);break;case 5:t[1]?(O(Pt(y,t[0],!0)),m=2,g=1):(Pt(y,t[0]),g=1);break;case 6:c=t;break;case 7:m=1;break;case 8:h=C(t,t+s),g=1}g&&(o=1+(2147483647&o),n&&d&&(u+=d,d=0),b.forEach(([e,t])=>{g&e&&t(r)}))}}},K=setTimeout,Ut=(e,t)=>t?-e:e,Wt=(e,t,n,r,i,a)=>{let o=Date.now,s=0,c=!1,l=!1,u=!1,d=!1,f=(()=>{let t,n=()=>{t!=z&&clearTimeout(t)},r=()=>{n(),t=K(()=>{t=z,(()=>{if(c||l)return c=!1,void f();u=!1,e.B(2)})()},150)};return r.J=n,r})(),p=()=>{s=o(),u&&(d=!0),a&&e.B(6,a()),e.B(1,r()),f()},m=t=>{if(c||!e.M()||t.ctrlKey)return;let r=o()-s;150>r&&50<r&&(n?t.deltaX:t.deltaY)&&(c=!0)},h=()=>{l=!0,u=d=!1},g=()=>{l=!1,zt()&&(u=!0)};return t.addEventListener(`scroll`,p),t.addEventListener(`wheel`,m,{passive:!0}),t.addEventListener(`touchstart`,h,{passive:!0}),t.addEventListener(`touchend`,g,{passive:!0}),{A:()=>{t.removeEventListener(`scroll`,p),t.removeEventListener(`wheel`,m),t.removeEventListener(`touchstart`,h),t.removeEventListener(`touchend`,g),f.J()},L:()=>{let[t,n]=e.H();t&&(i(t,n,d),d=!1,n&&e.p()>e.h()&&e.B(1,r()))}}},Gt=(e,t,n)=>{let r;return[async(i,a)=>{if(!await t())return;r&&r();let o=()=>{let[t,n]=H();return r=()=>{n(!1)},e.p()&&K(r,150),[t,e.W(2,()=>{n(!0)})]};if(a&&Bt())e.B(8,i()),At(async()=>{for(;;){let t=!0;for(let[n,r]=e.S();n<=r;n++)if(e.I(n)){t=!1;break}if(t)break;let[n,r]=o();try{if(!await n)return}finally{r()}}e.B(7),n(i(),a)});else for(;;){let[t,r]=o();try{if(e.B(7),n(i()),!await t)return}finally{r()}}},()=>{r&&r()}]},Kt=(e,t)=>{let n,r,i=H(),a=!1,o=t?`scrollLeft`:`scrollTop`,s=t?`overflowX`:`overflowY`,[c,l]=Gt(e,()=>i[0],(e,r)=>{e=Ut(e,a),r?n.scrollTo({[t?`left`:`top`]:e,behavior:`smooth`}):n[o]=e});return{N(c,u){n=u,t&&(a=getComputedStyle(u).direction===`rtl`),r=Wt(e,u,t,()=>Ut(u[o],a),(t,n,r)=>{if(r){let e=u.style,t=e[s];e[s]=`hidden`,K(()=>{e[s]=t})}u[o]=Ut(e.C()+t,a),n&&l()}),i[1](!0)},v(){r&&r.A(),i[1](!1),i=H()},P:()=>a,V(e){c(()=>e)},X(t){t+=e.C(),c(()=>t)},Y(t,{align:n,smooth:r,offset:i=0}={}){if(t=Ot(t,0,e.T()-1),n===`nearest`){let r=e.k(t),i=e.C();if(r<i)n=`start`;else{if(!(r+e.R(t)>i+e.p()))return;n=`end`}}c(()=>i+e.O()+e.k(t)+(n===`end`?e.R(t)-e.p():n===`center`?(e.R(t)-e.p())/2:0),r)},q:()=>{r&&r.L()}}},qt=e=>{let t;return{j(n){(t||=new(Rt(Lt(n))).ResizeObserver(e)).observe(n)},D(e){t.unobserve(e)},A(){t&&t.disconnect()}}},Jt=(e,t)=>{let n,r=t?`width`:`height`,i=new WeakMap,a=qt(t=>{let a=[];for(let{target:o,contentRect:s}of t)if(o.offsetParent)if(o===n)e.B(4,s[r]);else{let e=i.get(o);e!=z&&a.push([e,s[r]])}a.length&&e.B(3,a)});return{G(e){a.j(n=e)},U:(e,t)=>(i.set(e,t),a.j(e),()=>{i.delete(e),a.D(e)}),v:a.A}},q=Ft?P.useLayoutEffect:P.useEffect,J=`current`,Yt=(e,t)=>{if(Array.isArray(e))for(let n of e)Yt(n,t);else e==null||typeof e==`boolean`||t.push(e)},Xt=(e,t)=>e.key??`_`+t,Zt=e=>{let t=(0,P.useRef)(null);return t[J]||(t[J]=e())},Qt=e=>{let t=(0,P.useRef)(e);return q(()=>{t[J]=e},[e]),t},$t=(0,P.memo)(({Z:e,ee:t,te:n,oe:r,ne:i,re:a,se:o,ie:s})=>{let c=(0,P.useRef)(null);q(()=>t(c[J],n),[n]);let l=(0,P.useMemo)(()=>{let e={contain:`layout style`,position:i&&s?void 0:`absolute`,[o?`height`:`width`]:`100%`,[o?`top`:`left`]:0,[o?`left`:`top`]:r,visibility:!i||s?void 0:`hidden`};return o&&(e.display=`inline-flex`),e},[r,i,s,o]);return(0,F.jsx)(a,typeof a==`string`?{ref:c,style:l,children:e}:{ref:c,style:l,index:n,children:e})}),en=(e,t)=>(0,P.useMemo)(()=>{if(typeof e==`function`)return[n=>e(t[n],n),t.length];let n=(e=>{let t=[];return Yt(e,t),t})(e);return[e=>n[e],n.length]},[e,t]),tn=(0,P.forwardRef)(({children:e,data:t,bufferSize:n,itemSize:r,shift:i,horizontal:a,keepMounted:o,cache:s,startMargin:c=0,ssrCount:l,as:u=`div`,item:d=`div`,scrollRef:f,onScroll:p,onScrollEnd:m},h)=>{let[g,_]=en(e,t),v=(0,P.useRef)(null),y=(0,P.useRef)(!!l),b=Qt(p),x=Qt(m),[S,C,w,T]=Zt(()=>{let e=!!a,t=Ht(_,r,l,s,!r);return[t,Jt(t,e),Kt(t,e),e]});_!==S.T()&&S.B(5,[_,i]),c!==S.O()&&S.B(6,c);let[E,D]=(0,P.useReducer)(S.m,void 0,S.m),O=S.M(),ee=S.h(),te=w.P(),k=[],ne=e=>{let t=g(e);return(0,F.jsx)($t,{ee:C.U,te:e,oe:S.k(e,te),ne:S.I(e),re:d,Z:t,se:T,ie:y[J]},Xt(t,e))};if(q(()=>{y[J]=!1,S.W(1,e=>{e?(0,Me.flushSync)(D):D()}),S.W(4,()=>{b[J]&&b[J](S.C())}),S.W(8,()=>{x[J]&&x[J]()});let e=v[J],t=t=>{C.G(t),w.N(e,t)};return f?At(()=>{f[J]&&t(f[J])}):t(e.parentElement),()=>{S.v(),C.v(),w.v()}},[]),q(()=>{w.q()},[E]),(0,P.useImperativeHandle)(h,()=>({get cache(){return S._()},get scrollOffset(){return S.C()},get scrollSize(){return Vt(S)},get viewportSize(){return S.p()},findItemIndex:S.$,getItemOffset:S.k,getItemSize:S.R,scrollToIndex:w.Y,scrollTo:w.V,scrollBy:w.X}),[]),o){let e=new Set(o);for(let[t,r]=S.S(n);t<=r;t++)e.add(t);kt([...e]).forEach(e=>{k.push(ne(e))})}else for(let[e,t]=S.S(n);e<=t;e++)k.push(ne(e));return(0,F.jsx)(u,{ref:v,style:{contain:`size style`,overflowAnchor:`none`,flex:`none`,position:`relative`,width:T?ee:`100%`,height:T?`100%`:ee,pointerEvents:O?`none`:void 0},children:k})});function nn(e){let t=(0,P.useRef)(null),[n,r]=(0,P.useState)(null),[i,a]=(0,P.useState)(!1),o=(0,P.useRef)(!0),s=(0,P.useRef)(null),c=(0,P.useRef)(null),l=(0,P.useRef)(null),u=(0,P.useCallback)(e=>{r(e),e&&(t.current=e.closest(`[data-slot="main"]`))},[]),d=(0,P.useCallback)(e=>{let n=t.current;if(!n)return;let r=l.current;r?r.scrollTo(e):n.scrollTop=e},[]),f=(0,P.useCallback)(()=>{let e=t.current;e&&d(e.scrollHeight-e.clientHeight)},[d]),p=(0,P.useCallback)(()=>{o.current&&f()},[f]),m=(0,P.useCallback)(()=>{let e=t.current;e&&(s.current=null,o.current=!0,e.scrollTo({top:e.scrollHeight-e.clientHeight,behavior:`smooth`}))},[]);return(0,P.useEffect)(()=>{let r=t.current,i=n;if(!r||!i)return;if(c.current!==e){c.current=e;let t=Je(e);t&&!t.atBottom?(o.current=!1,s.current=t.top,r.scrollTop=t.top):(o.current=!0,f())}let l=0,u=null,p=()=>{s.current=null,o.current=!1,l=0},m=()=>{l=Date.now()},h=e=>{e.deltaY<0?p():m()},g=e=>{[`ArrowUp`,`PageUp`,`Home`].includes(e.key)?p():[`ArrowDown`,`PageDown`,`End`].includes(e.key)&&m()},_=()=>{We(r,80)||(p(),m())},v=e=>{u=e.touches[0]?.clientY??null},y=e=>{let t=e.touches[0]?.clientY;t!==void 0&&(u!==null&&t>u+1?p():u!==null&&t<u-1&&m(),u=t)},b=()=>{let t=We(r,80);t&&s.current===null&&(o.current||Date.now()-l<2e3)&&(o.current=!0),a(!t),s.current===null&&qe(e,{top:r.scrollTop,atBottom:t})};r.addEventListener(`scroll`,b,{passive:!0}),r.addEventListener(`wheel`,h,{passive:!0}),r.addEventListener(`touchstart`,v,{passive:!0}),r.addEventListener(`touchmove`,y,{passive:!0}),r.addEventListener(`pointerdown`,_,{passive:!0}),r.addEventListener(`keydown`,g);let x;return typeof ResizeObserver<`u`&&(x=new ResizeObserver(()=>{let e=s.current;if(e!==null){let t=r.scrollHeight-r.clientHeight;d(Math.min(e,t)),t>=e&&(s.current=null)}else o.current&&f()}),x.observe(i)),()=>{r.removeEventListener(`scroll`,b),r.removeEventListener(`wheel`,h),r.removeEventListener(`touchstart`,v),r.removeEventListener(`touchmove`,y),r.removeEventListener(`pointerdown`,_),r.removeEventListener(`keydown`,g),x?.disconnect()}},[e,n,d,f]),{attachContent:u,scrollElRef:t,virtualizerRef:l,pillVisible:i,jumpToLatest:m,restickIfStuck:p}}function rn({runId:e,rows:t,mode:n,controls:r}){return n===`virtual`?(0,F.jsx)(an,{runId:e,rows:t,controls:r}):(0,F.jsx)(`div`,{ref:r.attachContent,"data-slot":`thread-rows`,"data-virtualized":`false`,children:t.map(e=>(0,F.jsx)(`div`,{"data-slot":`thread-row`,className:`flex flex-col pb-2.5 [contain-intrinsic-block-size:auto_3rem] [content-visibility:auto]`,children:e.node},e.key))})}function an({runId:e,rows:t,controls:n}){let r=(0,P.useRef)(null),[i]=(0,P.useState)(()=>Ze(e,t.length)),a=(0,P.useRef)(t.length);a.current=t.length;let o=(0,P.useRef)(null),s=(0,P.useCallback)(t=>{n.virtualizerRef.current=t,t?o.current=t:o.current&&=(Xe(e,{rows:a.current,cache:o.current.cache}),null)},[e,n.virtualizerRef]),[c,l]=(0,P.useState)(0);return(0,P.useLayoutEffect)(()=>{let e=()=>{let e=r.current,t=n.scrollElRef.current;!e||!t||l(Math.max(0,Math.round(e.getBoundingClientRect().top-t.getBoundingClientRect().top+t.scrollTop)))};return e(),window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[n.scrollElRef]),(0,F.jsx)(`div`,{ref:e=>{r.current=e,n.attachContent(e)},"data-slot":`thread-rows`,"data-virtualized":`true`,children:(0,F.jsx)(tn,{ref:s,scrollRef:n.scrollElRef,startMargin:c,...i===void 0?{}:{cache:i},children:t.map(e=>(0,F.jsx)(`div`,{"data-slot":`thread-row`,className:`flex flex-col pb-2.5`,children:e.node},e.key))})})}function on({onJump:e}){return(0,F.jsxs)(`button`,{type:`button`,"data-slot":`jump-to-latest`,onClick:e,className:`pointer-events-auto inline-flex min-h-8 items-center gap-1.5 rounded-full border border-border bg-background px-3.5 text-xs font-medium text-muted-foreground shadow-modal hover:text-foreground`,children:[(0,F.jsx)(_e,{"aria-hidden":!0,className:`size-3.5`}),`Jump to latest`]})}var sn=120;function Y(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function X(e){let t=e.replace(/\s+/g,` `).trim();return t.length>sn?`${t.slice(0,sn-1)}…`:t}function Z(e,...t){if(Y(e))for(let n of t){let t=e[n];if(typeof t==`string`&&t.trim()!==``)return X(t)}}function cn(e){if(!Y(e))return;let t=e.command;if(typeof t==`string`&&t.trim()!==``)return X(t);if(Array.isArray(t)){let e=t.filter(e=>typeof e==`string`);if(e.length>0)return X(e.join(` `))}}function ln(e){if(!Y(e)||!Array.isArray(e.changes))return[];let t=[];for(let n of e.changes)Y(n)&&typeof n.path==`string`&&n.path.trim()!==``&&t.push(n.path);return t}function un(e){return Z(e,`description`,`query`,`url`,`filePath`,`file_path`,`path`,`pattern`,`name`)}function Q(e,t){return t?`${e} ${t}`:e}function dn(e,t){let n=typeof e==`string`?e.toLowerCase():``;switch(n){case`bash`:case`commandexecution`:return{toolKind:`execute`,title:Q(`Ran`,cn(t)),subtitle:Z(t,`description`)};case`edit`:case`multiedit`:return{toolKind:`edit`,title:Q(`Edit`,Z(t,`file_path`,`filePath`,`path`))};case`write`:return{toolKind:`edit`,title:Q(`Write`,Z(t,`file_path`,`filePath`,`path`))};case`notebookedit`:return{toolKind:`edit`,title:Q(`Edit`,Z(t,`notebook_path`,`notebookPath`,`file_path`,`filePath`,`path`))};case`filechange`:{let e=ln(t);return{toolKind:`edit`,title:Q(`Edit`,e.length===1?e[0]:e.length>1?`${e.length} files`:void 0)}}case`read`:return{toolKind:`read`,title:Q(`Read`,Z(t,`file_path`,`filePath`,`path`))};case`glob`:case`grep`:return{toolKind:`search`,title:Q(`Search`,Z(t,`pattern`,`query`)),subtitle:Z(t,`path`)};case`webfetch`:return{toolKind:`fetch`,title:Q(`Fetch`,Z(t,`url`))};case`websearch`:return{toolKind:`fetch`,title:Q(`Web search`,Z(t,`query`))};case`task`:{let e=Z(t,`description`,`prompt`);return{toolKind:`task`,title:e?`Task: ${e}`:`Task`,subtitle:Z(t,`subagent_type`,`subagentType`)}}case`todowrite`:case`todolist`:case`plan`:case`taskcreate`:case`taskupdate`:case`tasklist`:return{toolKind:`plan`,title:`Update plan`};case`mcptoolcall`:{let e=Z(t,`server`),n=Z(t,`tool`);return e&&n?{toolKind:`other`,title:`${e}.${n}`}:{toolKind:`other`,title:`MCP tool`,subtitle:un(t)}}}if(n.startsWith(`mcp__`)){let t=e.split(`__`).filter(e=>e!==``);if(t.length>=3)return{toolKind:`other`,title:`${t[1]}.${t.slice(2).join(`__`)}`}}return{toolKind:`other`,title:typeof e==`string`&&e.trim()!==``?X(e):`Tool`,subtitle:un(t)}}function fn(e){for(let t=e.turns.length-1;t>=0;--t){let n=e.turns[t].planEntries;if(n!==void 0)return n}}function pn(e){let t=[];for(let n of e.turns)for(let e of n.items)if(e.kind===`tool`){for(let n of e.locations??[])t.push(n.path);for(let n of e.diffs??[])t.push(n.path)}let n=[];for(let e=t.length-1;e>=0;--e)n.includes(t[e])||n.push(t[e]);return n}function mn(e,t){switch(e){case`waiting`:return{state:`waiting`};case`failed`:return{state:`closed`,tone:`danger`,label:t?`Session failed — ${t}`:`Session failed`};case`review`:return{state:`closed`,tone:`dim`,label:`Session closed — waiting for your review`};case`done`:case`cancelled`:return{state:`closed`,tone:`dim`,label:`Session closed`};default:return null}}function hn(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function $(e){return typeof e==`string`?e:void 0}function gn(e){return e.replace(/\s*CEZ:DONE\s*$/,``).replace(/\s*CEZ:MONITORING\s*$/,``)}function _n(e){if(typeof e==`string`)return e;if(e==null)return``;try{return JSON.stringify(e)}catch{return String(e)}}var vn=e=>e.kind===`message`||e.kind===`reasoning`||e.kind===`tool`,yn=new Set([`pending`,`in_progress`,`completed`,`cancelled`]);function bn(e){if(!hn(e)||!Array.isArray(e.todos))return;let t=[];for(let n of e.todos){if(!hn(n)||typeof n.content!=`string`)return;t.push({content:n.content,status:yn.has(n.status)?n.status:`pending`,...typeof n.activeForm==`string`?{activeForm:n.activeForm}:{}})}return t}function xn(e){let t=[],n=new Map,r,i=0,a=()=>{i+=1;let e={id:`turn-${i}`,entries:[],v2Items:!1};return t.push(e),e},o=()=>t.at(-1)??a(),s=(e,t)=>{let r={...t};if(!e.v2Items){e.v2Items=!0;for(let t of e.entries)t.origin===`v1`&&vn(t.entry)&&n.delete(t.entry.id);e.entries=e.entries.filter(e=>!(e.origin===`v1`&&vn(e.entry)))}let i=n.get(r.id);if(i&&i.turn===e){i.entry.entry=r,n.set(r.id,i);return}let a={origin:`v2`,entry:r};e.entries.push(a),n.set(r.id,{turn:e,entry:a})};for(let i of e)switch(i.type){case`user-message`:{let e=a();e.userMessage={text:$(i.text)??``,imageCount:typeof i.imageCount==`number`?i.imageCount:0,images:Array.isArray(i.images)?i.images.filter(e=>typeof e==`string`):[]};break}case`turn.started`:{let e=$(i.turnId),n=t.at(-1);n&&n.turnId===void 0&&!n.v2Items?n.turnId=e:a().turnId=e;break}case`turn.completed`:{let e=$(i.turnId),n;for(let r=t.length-1;r>=0&&!n;--r)t[r].turnId===e&&(n=t[r]);let r=n??t.at(-1);r&&(r.completed={stopReason:$(i.stopReason)??`end_turn`,...typeof i.costUsd==`number`?{costUsd:i.costUsd}:{}});break}case`item.started`:case`item.updated`:case`item.completed`:{if(!hn(i.item))break;let e=i.item.kind,t=i.item.id;if(e!==`message`&&e!==`reasoning`&&e!==`tool`||typeof t!=`string`||t===``)break;let r=i.item;s(n.get(r.id)?.turn??o(),r);break}case`item.delta`:{let e=n.get($(i.itemId)??``),t=$(i.delta)??``;if(!e||t===``||!vn(e.entry.entry))break;let r=e.entry.entry;i.field===`output`&&r.kind===`tool`?r.output=(r.output??``)+t:i.field!==`output`&&r.kind!==`tool`&&(r.text+=t);break}case`text`:{let e=o();if(e.v2Items)break;let t=$(i.text)??``;if(t===``)break;e.entries.push({origin:`v1`,entry:{kind:`message`,id:`v1:${i.seq}`,role:`assistant`,text:t}});break}case`tool-call`:{let e=o();if(e.v2Items)break;let t=$(i.tool)??`Tool`,r=dn(t,i.input);if(r.toolKind===`plan`){let t=bn(i.input);t!==void 0&&(e.planEntries=t)}let a={kind:`tool`,id:$(i.id)??`v1:${i.seq}`,name:t,toolKind:r.toolKind,title:r.title,status:`running`,input:i.input},s={origin:`v1`,entry:a};e.entries.push(s),n.set(a.id,{turn:e,entry:s});break}case`tool-result`:{let e=n.get($(i.toolCallId)??``);if(!e||e.turn.v2Items||e.entry.origin!==`v1`)break;let t=e.entry.entry;if(t.kind!==`tool`)break;t.status=`completed`,t.output=_n(i.result);break}case`note`:case`lifecycle`:{let e=$(i.message)??``;if(e===``)break;o().entries.push({origin:`meta`,entry:{kind:`note`,id:`v1:${i.seq}`,text:e,tone:`dim`}});break}case`error`:{let e=$(i.message)??``;if(e===``)break;o().entries.push({origin:`meta`,entry:{kind:`note`,id:`v1:${i.seq}`,text:e,tone:`danger`}});break}case`session.error`:{let e=$(i.message)??``;if(e===``)break;o().entries.push({origin:`meta`,entry:{kind:`note`,id:`v2:${i.seq}`,text:e,tone:`danger`}});break}case`step-end`:{if(i.status!==`failed`)break;let e=$(i.error)?` — ${$(i.error)}`:``;o().entries.push({origin:`meta`,entry:{kind:`note`,id:`v1:${i.seq}`,text:`step ${$(i.stepId)??`?`} failed${e}`,tone:`danger`}});break}case`check-output`:{let e=$(i.command)??`check`,t=typeof i.exitCode==`number`?i.exitCode:-1,n={kind:`tool`,id:`v1:${i.seq}`,name:`check`,toolKind:`execute`,title:`Ran ${e}`,status:t===0?`completed`:`failed`,output:$(i.text)??``,exitCode:t};o().entries.push({origin:`meta`,entry:n});break}case`image`:{let e=$(i.url);if(e===void 0)break;let t={kind:`image`,id:`v1:${i.seq}`,url:e},n=$(i.name);n!==void 0&&(t.name=n),o().entries.push({origin:`meta`,entry:t});break}case`plan.updated`:Array.isArray(i.entries)&&(o().planEntries=i.entries);break;case`session.ended`:r={reason:$(i.reason)??`end_turn`,...$(i.message)===void 0?{}:{message:$(i.message)}};break;case`step-start`:case`token-usage`:case`cost`:case`turn-end`:case`done`:case`session`:break;default:break}return{turns:t.map(e=>({id:e.id,...e.turnId===void 0?{}:{turnId:e.turnId},...e.userMessage===void 0?{}:{userMessage:e.userMessage},...e.planEntries===void 0?{}:{planEntries:e.planEntries},...e.completed===void 0?{}:{completed:e.completed},items:e.entries.map(({entry:e})=>e.kind===`message`&&e.role===`assistant`?{...e,text:gn(e.text)}:e)})),...r===void 0?{}:{sessionEnded:r}}}function Sn(){let{id:e}=p(),t=f(e),n=je(e),r=(0,P.useMemo)(()=>xn(n),[n]);if(t.isPending)return(0,F.jsx)(ve,{});if(t.isError){let e=t.error instanceof d&&t.error.status===404;return(0,F.jsx)(`div`,{"data-route":`task-thread`,className:`flex min-h-full flex-col`,children:(0,F.jsx)(y,{icon:e?(0,F.jsx)(le,{}):(0,F.jsx)(Ee,{}),tone:e?`neutral`:`danger`,title:e?`Task not found`:`Could not load this task`,subtitle:e?`No run has this id. It may have been deleted, or the link is from another machine.`:t.error.message,actions:(0,F.jsx)(m,{asChild:!0,variant:`outline`,children:(0,F.jsx)(i,{to:`/`,children:`Back to tasks`})})})})}return(0,F.jsx)(wn,{run:t.data,thread:r})}function Cn(e,t){let n=[];e.task&&n.push({key:`task`,node:(0,F.jsx)(Qe,{text:e.task,images:e.taskImages??[]})});for(let e of t.turns){e.userMessage&&n.push({key:`${e.id}:user`,node:(0,F.jsx)(Qe,{text:e.userMessage.text,imageCount:e.userMessage.imageCount,images:e.userMessage.images})});for(let t of Be(e.items))n.push({key:`${e.id}:${t.id}`,node:(0,F.jsx)(Dn,{block:t,scope:e.id})})}return n}function wn({run:e,thread:t}){let n=mn(e.status,e.error),r=fn(t),i=r!==void 0&&r.length>0?ht(r):void 0,a=e.status===`running`||e.status===`waiting`,o=u(e.id),c=(0,P.useMemo)(()=>Cn(e,t),[e,t]),{search:l}=s(),d=Ge(l,c.length),f=nn(e.id);return oe(f.restickIfStuck),(0,F.jsxs)(`div`,{"data-route":`task-thread`,className:`flex min-h-full flex-col`,children:[(0,F.jsx)(O,{run:e,planTally:i}),(0,F.jsxs)(`div`,{className:`mx-auto flex w-full max-w-[820px] flex-1 flex-col gap-3.5 px-4 py-5 md:px-6`,children:[(0,F.jsx)(Ue,{runId:e.id,children:(0,F.jsx)(rn,{runId:e.id,rows:c,mode:d,controls:f})}),t.turns.length===0?e.status===`queued`?(0,F.jsx)(En,{run:e}):(0,F.jsx)(`p`,{"data-slot":`thread-empty`,className:`py-6 text-center text-xs text-soft-foreground`,children:`No session events yet.`}):null,n&&n.state===`closed`?(0,F.jsxs)(`div`,{"data-slot":`thread-footer`,"data-state":n.state,className:x(`mt-auto flex items-center gap-2 border-t border-border pt-3 text-xs`,n.tone===`danger`?`text-danger`:`text-soft-foreground`),children:[n.label,de(e)?(0,F.jsx)(`a`,{"data-slot":`pr-link`,href:de(e),target:`_blank`,rel:`noopener noreferrer`,className:`font-medium text-foreground underline-offset-2 hover:underline`,children:`PR ↗`}):null]}):null,e.status===`review`?(0,F.jsx)(bt,{run:e}):null]}),(0,F.jsx)(Tt,{status:e.status}),(0,F.jsxs)(`div`,{"data-slot":`thread-dock`,className:`sticky bottom-[var(--kb,0px)] z-10 bg-background px-4 pt-1.5 pb-3 max-md:border-t max-md:border-border md:px-6 md:pb-4`,children:[f.pillVisible?(0,F.jsx)(`div`,{className:`pointer-events-none absolute inset-x-0 -top-12 flex justify-center`,children:(0,F.jsx)(on,{onJump:f.jumpToLatest})}):null,(0,F.jsxs)(`div`,{className:`mx-auto flex w-full max-w-[820px] flex-col gap-2.5`,children:[r!==void 0&&r.length>0?(0,F.jsx)(_t,{runId:e.id,entries:r},e.id):null,e.status===`waiting`?(0,F.jsxs)(`div`,{"data-slot":`paused-hint`,className:`flex items-center gap-2 px-1 text-xs text-muted-foreground`,children:[(0,F.jsx)(fe,{tone:`pending`,pulse:!0}),`The agent is paused, waiting for your reply`]}):null,(0,F.jsx)(xe,{onSubmit:(e,t)=>o.mutateAsync({text:e,images:t}),disabled:!a,disabledReason:`Session closed — Continue to reopen.`,disabledAction:(0,F.jsx)(Tn,{run:e}),placeholder:e.status===`waiting`?`Reply — / for skills, @ for files…`:`Message the agent — / for skills, @ for files…`,autocompleteSkills:!0,quickReplies:!0,getMentionCandidates:()=>pn(t)})]})]})]})}function Tn({run:e}){let t=l(),n=a({mutationFn:()=>v(e.id),onSuccess:()=>t.invalidateQueries({queryKey:o.runs.all}),onError:e=>h(e.message,{tone:`danger`})});return D(e).continueRun?(0,F.jsxs)(m,{type:`button`,variant:`outline`,size:`sm`,disabled:n.isPending,onClick:()=>n.mutate(),children:[(0,F.jsx)(ge,{"aria-hidden":`true`,className:`size-3.5`}),`Continue`]}):null}function En({run:e}){let t=T(c().data??[],e.id);return(0,F.jsxs)(`div`,{"data-slot":`queued-state`,className:`flex flex-col items-center gap-1.5 py-10 text-center`,children:[(0,F.jsx)(fe,{tone:`pending`,pulse:!0}),(0,F.jsxs)(`p`,{className:`text-[13px] font-medium`,children:[`Waiting for a free agent slot`,t===void 0?``:` — #${t} in queue`]}),(0,F.jsxs)(`p`,{className:`text-xs text-soft-foreground`,children:[e.workflow,` · starts automatically when a slot frees up`]})]})}function Dn({block:e,scope:t}){switch(e.kind){case`entry`:return(0,F.jsx)(On,{entry:e.entry,scope:t});case`tool-card`:return(0,F.jsx)(R,{item:e.item,nested:e.children,cacheKey:`${t}:${e.id}`});case`context-group`:return(0,F.jsx)(ut,{group:e,scope:t});case`streak`:return(0,F.jsx)(dt,{count:e.count,children:e.blocks.map(e=>(0,F.jsx)(Dn,{block:e,scope:t},e.id))})}}function On({entry:e,scope:t}){switch(e.kind){case`message`:return e.role===`assistant`?(0,F.jsx)($e,{text:e.text}):(0,F.jsx)(Qe,{text:e.text});case`reasoning`:return(0,F.jsx)(tt,{text:e.text});case`tool`:return(0,F.jsx)(R,{item:e,cacheKey:`${t}:${e.id}`});case`note`:return(0,F.jsx)(et,{note:e});case`image`:return(0,F.jsx)(ft,{image:e})}}export{Sn as TaskThreadRoute};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,o as t}from"./bundle-mjs-DLPpRFyl.js";import{E as n}from"./centered-state-BddhEEtO.js";import{t as r}from"./utils-rQGbOrwc.js";t();var i=e(),a=n(`inline-block size-[7px] shrink-0 rounded-full`,{variants:{tone:{success:`bg-success`,pending:`bg-pending`,danger:`bg-danger`,violet:`bg-violet`,neutral:`bg-soft-foreground`},pulse:{true:`animate-pulse`,false:``}},defaultVariants:{tone:`neutral`,pulse:!1}});function o({className:e,tone:t=`neutral`,pulse:n=!1,...o}){return(0,i.jsx)(`span`,{"data-slot":`status-dot`,"data-tone":t,className:r(a({tone:t,pulse:n,className:e})),...o})}var s={permission:0,error:1,waiting:2,running:3,unseen:4,none:5};function c(e){return!1}function l(e){return!1}function u(e){return c(e)?{bucket:`permission`,tone:`violet`,pulse:!0,label:`needs permission`}:e.status===`failed`?{bucket:`error`,tone:`danger`,pulse:!1,label:`failed`}:e.status===`waiting`?{bucket:`waiting`,tone:`pending`,pulse:!0,label:`needs you`}:e.status===`review`?{bucket:`waiting`,tone:`violet`,pulse:!0,label:`needs review`}:e.status===`running`&&e.activity===`monitoring`?{bucket:`running`,tone:`violet`,pulse:!0,label:`monitoring`}:e.status===`running`?{bucket:`running`,tone:`violet`,pulse:!0,label:`running`}:l(e)?{bucket:`unseen`,tone:`violet`,pulse:!1,label:`unseen`}:e.status===`queued`?{bucket:`none`,tone:`neutral`,pulse:!1,label:`queued`}:e.status===`done`?{bucket:`none`,tone:`success`,pulse:!1,label:`done`}:{bucket:`none`,tone:`neutral`,pulse:!1,label:`cancelled`}}function d(e){return s[u(e).bucket]<=s.waiting}var f=[`Needs you`,`Working`,`Recent`,`Archived`],p={waiting:0,review:1,running:2,queued:3},m=e=>p[e.status]??9;function h(e,t){return t===`archived`?`Archived`:e.status===`waiting`||e.status===`review`?`Needs you`:e.status===`running`||e.status===`queued`?`Working`:`Recent`}function g(e){return e.titleSummary??e.title}function _(e){return e.title.replace(/ \([A-C]\)$/,``)}function v(e){let t=e.filter(e=>!e.archived&&e.status===`queued`).sort((e,t)=>e.createdAt.localeCompare(t.createdAt));return new Map(t.map((e,t)=>[e.id,t+1]))}function y(e,t){return e.filter(e=>t===`archived`?e.archived:!e.archived).sort((e,t)=>{let n=m(e)-m(t);return n===0?t.createdAt.localeCompare(e.createdAt):n})}function b(e,t){let n=v(e),r=y(e,t),i=new Map,a=(e,t)=>{let n=i.get(e);n?n.push(t):i.set(e,[t])},o=new Set;for(let e of r){if(e.groupId){if(o.has(e.groupId))continue;o.add(e.groupId);let n=r.filter(t=>t.groupId===e.groupId).sort((e,t)=>(e.variant??``).localeCompare(t.variant??``));if(n.length>1){a(h(e,t),{kind:`group`,groupId:e.groupId,title:_(e),members:n});continue}}a(h(e,t),{kind:`run`,run:e,queuePosition:n.get(e.id)??null})}return f.filter(e=>i.has(e)).map(e=>({label:e,rows:i.get(e)}))}function x(e){let t=0,n=0,r=0;for(let i of e){if(i.archived){n+=1;continue}t+=1,(i.status===`waiting`||i.status===`review`)&&(r+=1)}return{active:t,archived:n,waiting:r}}var S=new Set([`running`,`waiting`]),C=new Set([`done`,`failed`,`review`,`cancelled`]),w=new Set([`done`,`failed`,`cancelled`]);function T(e){return e?e>=1024**3?`${(e/1024**3).toFixed(1)} GB`:e>=1024**2?`${Math.round(e/1024**2)} MB`:`${Math.round(e/1024)} kB`:``}function E(e){return e?`$${e>=10?e.toFixed(0):e.toFixed(2)}`:``}function D(e){if(e.workflow===`(planned)`||e.workflow===`(inbox)`){let t=e.steps.find(e=>e.kind===`agent`);if(t?.name)return t.name}return e.workflow}function O(e,t){let n=t.trim().toLowerCase();return n?e.filter(e=>[g(e),e.branch??``,e.workflow,D(e)].some(e=>e.toLowerCase().includes(n))):[...e]}function k(e){return e.filter(e=>!e.archived&&w.has(e.status)).length}function A(e){return e.pullRequestUrl??e.referencedPullRequestUrl}function j(e){let t=e.split(`/`).pop()??``;return/^\d+$/.test(t)?t:null}function M(e,t){let n=S.has(e.status)?t:void 0;if(n)return{cpu:{text:`${n.cpuPct.toFixed(0)}%`,kind:`live`},mem:{text:T(n.rssBytes),kind:`live`}};let r=T(e.peakRssBytes);return{cpu:{text:``,kind:`none`},mem:r?{text:`peak ${r}`,kind:`peak`,title:`peak — run finished${e.peakProcCount?` · ${e.peakProcCount} procs`:``}`}:{text:``,kind:`none`}}}function N(e,t){let n=e.filter(e=>t===`archived`?e.archived:!e.archived),r=new Map;for(let e of n){if(!e.groupId)continue;let t=r.get(e.groupId);t?t.push(e):r.set(e.groupId,[e])}return[...r.entries()].flatMap(([e,t])=>{let n=t[0];return!n||t.length<2||!t.every(e=>C.has(e.status))?[]:[{groupId:e,title:_(n),count:t.length}]})}export{u as _,E as a,A as c,b as d,_ as f,y as g,g as h,k as i,M as l,v as m,N as n,T as o,x as p,O as r,j as s,C as t,D as u,d as v,o as y};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./utils-rQGbOrwc.js";var t=e(`copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),n=e(`trash-2`,[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]);export{t as n,n as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./utils-rQGbOrwc.js";var t=e(`triangle-alert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]);export{t};
|