@rho-workspace/rho 0.5.3 → 0.5.4
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 +24 -5
- package/dist/capabilities.d.ts +27 -0
- package/dist/capabilities.js +73 -1
- package/dist/cli.js +150 -25
- package/dist/contract.generated.d.ts +112 -12
- package/dist/contracts/owners.generated.js +103 -8
- package/dist/conversation-presentation.d.ts +3 -1
- package/dist/conversation-presentation.js +16 -6
- package/dist/conversations.d.ts +10 -6
- package/dist/conversations.js +17 -13
- package/dist/installs.d.ts +11 -0
- package/dist/installs.js +179 -0
- package/dist/project-notes.js +2 -0
- package/dist/protocol.js +7 -5
- package/dist/screen-check-skill.d.ts +2 -0
- package/dist/screen-check-skill.js +39 -0
- package/dist/server.d.ts +2 -0
- package/dist/server.js +50 -7
- package/dist/web/.vite/manifest.json +51 -51
- package/dist/web/assets/{choices-B-y2OYvE.js → choices-DU9kHlyQ.js} +1 -1
- package/dist/web/assets/{console-e1P5qYQ5.js → console-Dbdo-5oO.js} +1 -1
- package/dist/web/assets/{dist-Dd3iAGFy.js → dist-B2V0VDO0.js} +1 -1
- package/dist/web/assets/{dist-CH56yNDn.js → dist-BV3hWfn_.js} +1 -1
- package/dist/web/assets/{dist-CBM2oq6g.js → dist-CLNF2g-E.js} +1 -1
- package/dist/web/assets/{dist-DEorbOW0.js → dist-D25Vn17i.js} +1 -1
- package/dist/web/assets/{explore-in-muWXOGOY.js → explore-in-8Q5ftt-E.js} +1 -1
- package/dist/web/assets/{graph-CK-df5lh.js → graph-hS2kvHTI.js} +1 -1
- package/dist/web/assets/{index-BYuKpyoi.js → index-BHQIaDsx.js} +220 -121
- package/dist/web/assets/index-Cj1_iqyK.css +1 -0
- package/dist/web/assets/{notes-meaning-B3HFbh84.js → notes-meaning-DdPbtNzJ.js} +1 -1
- package/dist/web/assets/{overview-D1Ev2OC_.js → overview-BV6ZO5TO.js} +3 -3
- package/dist/web/assets/{preview-HbmQKUGY.js → preview-n5lOOdjN.js} +1 -1
- package/dist/web/assets/{review-BVh9jWMB.js → review-CmWou4Iv.js} +1 -1
- package/dist/web/assets/{skills-DPaEYkln.js → skills-Dy7n3L9d.js} +1 -1
- package/dist/web/assets/{skills-work-dvjfy_tu.js → skills-work-Cj0W6b-I.js} +1 -1
- package/dist/web/assets/{studio-process-BYm8mjRJ.js → studio-process-QOY_n2_8.js} +1 -1
- package/dist/web/assets/{timeline-events-CDZ7wiJX.js → timeline-events-DmX1BCh3.js} +1 -1
- package/dist/web/assets/{work-turns-BeCt303c.js → work-turns-Co0C71rJ.js} +1 -1
- package/dist/web/assets/{workspace-d5Hw_ClZ.js → workspace-BKFefRfJ.js} +2 -2
- package/dist/web/composition.json +73 -73
- package/dist/web/index.html +2 -2
- package/dist/web/renderer.json +1 -1
- package/docs/FRONTEND.md +30 -14
- package/docs/HEADLESS.md +59 -13
- package/example/pa14-qs/.rho/rho/conversations/c-67f77cfebaba2cea.json +1 -1
- package/example/pa14-qs/.rho/rho/conversations/c-91aa2e46b1ac1a6c.json +1 -1
- package/example/pa14-qs/.rho/rho/conversations/c-fa24dfd80dfe4bcb.json +1 -1
- package/node_modules/@hono/node-server/dist/index.js +11 -0
- package/node_modules/@hono/node-server/dist/index.mjs +11 -0
- package/node_modules/@hono/node-server/dist/listener.js +11 -0
- package/node_modules/@hono/node-server/dist/listener.mjs +11 -0
- package/node_modules/@hono/node-server/dist/request.js +11 -0
- package/node_modules/@hono/node-server/dist/request.mjs +11 -0
- package/node_modules/@hono/node-server/dist/server.js +11 -0
- package/node_modules/@hono/node-server/dist/server.mjs +11 -0
- package/node_modules/@hono/node-server/dist/vercel.js +11 -0
- package/node_modules/@hono/node-server/dist/vercel.mjs +11 -0
- package/node_modules/@hono/node-server/package.json +1 -1
- package/node_modules/@rho-workspace/plugin-agent/README.md +3 -1
- package/node_modules/@rho-workspace/plugin-agent/dist/acp-conversation.js +14 -3
- package/node_modules/@rho-workspace/plugin-agent/dist/conversation.d.ts +1 -0
- package/node_modules/@rho-workspace/plugin-agent/dist/conversation.js +1 -0
- package/node_modules/@rho-workspace/plugin-agent/dist/generic-acp.d.ts +11 -0
- package/node_modules/@rho-workspace/plugin-agent/dist/generic-acp.js +7 -0
- package/node_modules/@rho-workspace/plugin-agent/dist/mcp.js +5 -1
- package/node_modules/@rho-workspace/plugin-agent/package.json +1 -1
- package/node_modules/@rho-workspace/plugin-annotations/package.json +1 -1
- package/node_modules/@rho-workspace/plugin-documents/README.md +4 -0
- package/node_modules/@rho-workspace/plugin-documents/dist/index.d.ts +3 -0
- package/node_modules/@rho-workspace/plugin-documents/dist/index.js +1 -1
- package/node_modules/@rho-workspace/plugin-documents/package.json +1 -1
- package/node_modules/@rho-workspace/plugin-kernel/README.md +71 -10
- package/node_modules/@rho-workspace/plugin-kernel/dist/code.d.ts +2 -0
- package/node_modules/@rho-workspace/plugin-kernel/dist/code.js +4 -1
- package/node_modules/@rho-workspace/plugin-kernel/dist/contract.js +5 -0
- package/node_modules/@rho-workspace/plugin-kernel/dist/index.d.ts +7 -0
- package/node_modules/@rho-workspace/plugin-kernel/dist/index.js +55 -8
- package/node_modules/@rho-workspace/plugin-kernel/dist/lineage.d.ts +9 -6
- package/node_modules/@rho-workspace/plugin-kernel/dist/lineage.js +18 -41
- package/node_modules/@rho-workspace/plugin-kernel/dist/operations.js +5 -2
- package/node_modules/@rho-workspace/plugin-kernel/dist/script-flow.d.ts +39 -0
- package/node_modules/@rho-workspace/plugin-kernel/dist/script-flow.js +661 -0
- package/node_modules/@rho-workspace/plugin-kernel/dist/ui-base.d.ts +3 -0
- package/node_modules/@rho-workspace/plugin-kernel/dist/ui-base.js +10 -0
- package/node_modules/@rho-workspace/plugin-kernel/dist/ui-flow.d.ts +38 -4
- package/node_modules/@rho-workspace/plugin-kernel/dist/ui-flow.js +194 -97
- package/node_modules/@rho-workspace/plugin-kernel/dist/ui-notebook-work.js +1 -2
- package/node_modules/@rho-workspace/plugin-kernel/dist/ui-notebook.d.ts +10 -2
- package/node_modules/@rho-workspace/plugin-kernel/dist/ui-notebook.js +79 -18
- package/node_modules/@rho-workspace/plugin-kernel/dist/ui-styles.js +115 -45
- package/node_modules/@rho-workspace/plugin-kernel/dist/ui.d.ts +1 -1
- package/node_modules/@rho-workspace/plugin-kernel/dist/ui.js +1 -1
- package/node_modules/@rho-workspace/plugin-kernel/dist/value-graph.d.ts +63 -0
- package/node_modules/@rho-workspace/plugin-kernel/dist/value-graph.js +344 -0
- package/node_modules/@rho-workspace/plugin-kernel/package.json +1 -1
- package/node_modules/@rho-workspace/plugin-kernel/runners/runner.R +6 -3
- package/node_modules/@rho-workspace/plugin-kernel/runners/runner.py +6 -3
- package/node_modules/express-rate-limit/dist/index.cjs +1 -1
- package/node_modules/express-rate-limit/dist/index.mjs +1 -1
- package/node_modules/express-rate-limit/package.json +1 -1
- package/node_modules/ip-address/dist/ipv6.js +1 -1
- package/node_modules/ip-address/package.json +1 -1
- package/node_modules/playwright-core/LICENSE +202 -0
- package/node_modules/playwright-core/NOTICE +5 -0
- package/node_modules/playwright-core/ThirdPartyNotices.txt +13 -0
- package/node_modules/playwright-core/bin/install_media_pack.ps1 +5 -0
- package/node_modules/playwright-core/bin/install_webkit_wsl.ps1 +33 -0
- package/node_modules/playwright-core/bin/reinstall_chrome_beta_linux.sh +42 -0
- package/node_modules/playwright-core/bin/reinstall_chrome_beta_mac.sh +13 -0
- package/node_modules/playwright-core/bin/reinstall_chrome_beta_win.ps1 +24 -0
- package/node_modules/playwright-core/bin/reinstall_chrome_stable_linux.sh +42 -0
- package/node_modules/playwright-core/bin/reinstall_chrome_stable_mac.sh +12 -0
- package/node_modules/playwright-core/bin/reinstall_chrome_stable_win.ps1 +24 -0
- package/node_modules/playwright-core/bin/reinstall_msedge_beta_linux.sh +48 -0
- package/node_modules/playwright-core/bin/reinstall_msedge_beta_mac.sh +11 -0
- package/node_modules/playwright-core/bin/reinstall_msedge_beta_win.ps1 +23 -0
- package/node_modules/playwright-core/bin/reinstall_msedge_dev_linux.sh +48 -0
- package/node_modules/playwright-core/bin/reinstall_msedge_dev_mac.sh +11 -0
- package/node_modules/playwright-core/bin/reinstall_msedge_dev_win.ps1 +23 -0
- package/node_modules/playwright-core/bin/reinstall_msedge_stable_linux.sh +48 -0
- package/node_modules/playwright-core/bin/reinstall_msedge_stable_mac.sh +11 -0
- package/node_modules/playwright-core/bin/reinstall_msedge_stable_win.ps1 +24 -0
- package/node_modules/playwright-core/browsers.json +52 -0
- package/node_modules/playwright-core/cli.js +22 -0
- package/node_modules/playwright-core/index.js +17 -0
- package/node_modules/playwright-core/index.mjs +28 -0
- package/node_modules/playwright-core/lib/bootstrap.js +149 -0
- package/node_modules/playwright-core/lib/coreBundle.js +78041 -0
- package/node_modules/playwright-core/lib/entry/cliDaemon.js +5 -0
- package/node_modules/playwright-core/lib/entry/dashboardApp.js +3 -0
- package/node_modules/playwright-core/lib/entry/mcp.js +10 -0
- package/node_modules/playwright-core/lib/entry/oopBrowserDownload.js +3 -0
- package/node_modules/playwright-core/lib/package.js +50 -0
- package/node_modules/playwright-core/lib/server/chromium/appIcon.png +0 -0
- package/node_modules/playwright-core/lib/server/electron/loader.js +123 -0
- package/node_modules/playwright-core/lib/serverRegistry.js +1939 -0
- package/node_modules/playwright-core/lib/serverRegistry.js.LICENSE +65 -0
- package/node_modules/playwright-core/lib/tools/cli-client/channelSessions.js +141 -0
- package/node_modules/playwright-core/lib/tools/cli-client/cli.js +7 -0
- package/node_modules/playwright-core/lib/tools/cli-client/help.json +808 -0
- package/node_modules/playwright-core/lib/tools/cli-client/minimist.js +128 -0
- package/node_modules/playwright-core/lib/tools/cli-client/output.js +352 -0
- package/node_modules/playwright-core/lib/tools/cli-client/program.js +422 -0
- package/node_modules/playwright-core/lib/tools/cli-client/registry.js +180 -0
- package/node_modules/playwright-core/lib/tools/cli-client/session.js +261 -0
- package/node_modules/playwright-core/lib/tools/dashboard/appIcon.png +0 -0
- package/node_modules/playwright-core/lib/tools/utils/extension.js +112 -0
- package/node_modules/playwright-core/lib/tools/utils/socketConnection.js +108 -0
- package/node_modules/playwright-core/lib/utilsBundle.js +86078 -0
- package/node_modules/playwright-core/lib/utilsBundle.js.LICENSE +1890 -0
- package/node_modules/playwright-core/lib/vite/dashboard/assets/codeMirrorModule--QdMvsKi.css +1 -0
- package/node_modules/playwright-core/lib/vite/dashboard/assets/codeMirrorModule-CQ8RZGBm.js +32 -0
- package/node_modules/playwright-core/lib/vite/dashboard/assets/codicon-DCmgc-ay.ttf +0 -0
- package/node_modules/playwright-core/lib/vite/dashboard/assets/firefox-1bWoP6pv.svg +1 -0
- package/node_modules/playwright-core/lib/vite/dashboard/assets/firefox-beta-k3eOH_eK.svg +1 -0
- package/node_modules/playwright-core/lib/vite/dashboard/assets/firefox-nightly-Cp5nfeDT.svg +1 -0
- package/node_modules/playwright-core/lib/vite/dashboard/assets/index-AwgwcYie.css +1 -0
- package/node_modules/playwright-core/lib/vite/dashboard/assets/index-hRvO4yU2.js +12 -0
- package/node_modules/playwright-core/lib/vite/dashboard/assets/safari-na3_-uQk.svg +1 -0
- package/node_modules/playwright-core/lib/vite/dashboard/index.html +29 -0
- package/node_modules/playwright-core/lib/vite/dashboard/playwright-logo.svg +24 -0
- package/node_modules/playwright-core/lib/vite/htmlReport/index.html +16 -0
- package/node_modules/playwright-core/lib/vite/htmlReport/report.css +2 -0
- package/node_modules/playwright-core/lib/vite/htmlReport/report.js +32 -0
- package/node_modules/playwright-core/lib/vite/recorder/assets/codeMirrorModule--QdMvsKi.css +1 -0
- package/node_modules/playwright-core/lib/vite/recorder/assets/codeMirrorModule-DK72OMRi.js +32 -0
- package/node_modules/playwright-core/lib/vite/recorder/assets/codicon-DCmgc-ay.ttf +0 -0
- package/node_modules/playwright-core/lib/vite/recorder/assets/index-BZpYJZ-P.css +1 -0
- package/node_modules/playwright-core/lib/vite/recorder/assets/index-Cn0mmDuv.js +129 -0
- package/node_modules/playwright-core/lib/vite/recorder/index.html +29 -0
- package/node_modules/playwright-core/lib/vite/recorder/playwright-logo.svg +9 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/assets/codeMirrorModule-BEB2e8M3.js +32 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/assets/defaultSettingsView-D-g2vrvf.js +184 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/assets/urlMatch-L3liM589.js +1 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/assets/xtermModule-B794rD2Z.js +7 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/codeMirrorModule.-QdMvsKi.css +1 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/codicon.DCmgc-ay.ttf +0 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/defaultSettingsView.C8BeHuxd.css +1 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/index.B_TqY17P.css +1 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/index.html +44 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/index.oNry3Hjv.js +1 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/manifest.webmanifest +16 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/playwright-logo.svg +9 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/snapshot.B_Jk1wbt.js +1 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/snapshot.html +10 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/sw.bundle.js +4 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/uiMode.CYwC_gH1.js +5 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/uiMode.CyMfwkXJ.css +1 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/uiMode.html +18 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/xtermModule.kHJ-D0s7.css +1 -0
- package/node_modules/playwright-core/lib/webp_codec.LICENSE +173 -0
- package/node_modules/playwright-core/lib/webp_codec.wasm +0 -0
- package/node_modules/playwright-core/lib/xdg-open +1267 -0
- package/node_modules/playwright-core/package.json +34 -0
- package/package.json +10 -6
- package/protocol/index.json +17 -17
- package/protocol/operations/conversation.settings.check.json +147 -4
- package/protocol/operations/conversation.settings.read.json +145 -3
- package/protocol/operations/conversation.settings.update.json +166 -4
- package/protocol/operations/conversation.start.json +2 -1
- package/protocol/operations/kernel.interrupt.json +20 -0
- package/protocol/operations/kernel.read.json +30 -0
- package/protocol/operations/kernel.run.json +36 -1
- package/protocol/operations/kernel.stop.json +10 -0
- package/scripts/browser-checks.mjs +53 -0
- package/scripts/screen-check.mjs +193 -0
- package/vendor/composition.json +102 -102
- package/vendor/rho-workspace-plugin-agent-0.4.28.tgz +0 -0
- package/vendor/rho-workspace-plugin-annotations-0.5.2.tgz +0 -0
- package/vendor/rho-workspace-plugin-documents-0.4.11.tgz +0 -0
- package/vendor/rho-workspace-plugin-kernel-0.5.5.tgz +0 -0
- package/web/theme.css +17 -2
- package/dist/web/assets/index-DBd77u4a.css +0 -1
- package/vendor/rho-workspace-plugin-agent-0.4.27.tgz +0 -0
- package/vendor/rho-workspace-plugin-documents-0.4.10.tgz +0 -0
- package/vendor/rho-workspace-plugin-kernel-0.5.2.tgz +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.settings-menu{min-width:0;max-width:100%;display:inline-flex;position:relative}.settings-menu>.setting-chip>svg{opacity:.7;transition:transform .15s;transform:rotate(90deg)}.settings-menu>.setting-chip[aria-expanded=true]{background:var(--color-hover);color:var(--color-ink)}.settings-menu>.setting-chip[aria-expanded=true]>svg{transform:rotate(-90deg)}.menu-pop{z-index:40;border:1px solid var(--color-hairline);background:var(--color-surface);border-radius:12px;flex-direction:column;width:min(300px,100cqw - 32px);max-height:min(62vh,460px);padding:6px;font-size:13px;display:flex;position:absolute;bottom:calc(100% + 8px);left:0;box-shadow:0 12px 32px #141e1929}.menu-pop.wide{width:min(360px,100cqw - 32px);height:min(62vh,460px)}.menu-row,.menu-choice{width:100%;min-height:36px;color:var(--color-ink);text-align:left;background:0 0;border:0;border-radius:8px;justify-content:flex-start;align-items:center;gap:10px;padding:6px 10px;font-weight:400;display:flex}.menu-row:hover,.menu-row:focus-visible,.menu-choice:hover,.menu-choice:focus-visible{background:var(--color-hover);outline:none}.menu-row:active,.menu-choice:active{background:var(--color-pressed)}.menu-label{flex:none}.menu-value{min-width:0;color:var(--color-meta);white-space:nowrap;flex:1;justify-content:flex-end;align-items:center;gap:6px;display:inline-flex}.menu-value>svg{flex:none}.menu-value>span{text-overflow:ellipsis;min-width:0;overflow:hidden}.menu-row>svg:last-child{color:var(--color-meta);flex:none}.menu-switch{background:var(--color-control-border);border-radius:9px;flex:none;width:30px;height:18px;margin-left:auto;transition:background .15s;position:relative}.menu-switch:after{content:"";background:var(--color-surface);border-radius:50%;width:14px;height:14px;transition:transform .15s;position:absolute;top:2px;left:2px;box-shadow:0 1px 2px #141e1940}.menu-switch.on{background:var(--color-accent)}.menu-switch.on:after{transform:translate(12px)}.menu-divider{background:var(--color-divider);flex:none;height:1px;margin:5px 6px}.menu-head{border-bottom:1px solid var(--color-divider);flex:none;align-items:center;gap:4px;margin:-2px -2px 4px;padding:0 0 6px;font-weight:600;display:flex}.menu-back{width:28px;height:28px;min-height:28px;color:var(--color-muted);background:0 0;border:0;border-radius:7px;flex:none;padding:0}.menu-back:hover,.menu-back:focus-visible{background:var(--color-hover);color:var(--color-ink);outline:none}.menu-choices{overscroll-behavior:contain;flex-direction:column;gap:1px;min-height:0;display:flex;overflow-y:auto}.menu-choice>svg:last-child{color:var(--color-accent);flex:none;margin-left:auto}.menu-choice[aria-checked=true]{font-weight:500}.menu-choice-text{flex-direction:column;gap:1px;min-width:0;display:flex}.menu-choice-text small{color:var(--color-meta);font-size:11.5px;font-weight:400;line-height:1.4}.menu-pop .model-search{border-bottom:1px solid var(--color-divider);flex:none;margin:-2px -2px 4px;padding:4px 8px 8px}.menu-pop .model-list{flex:auto;min-height:0;max-height:none;padding:0}.menu-pop .model-unknown{padding:10px}.outside-agents{flex-direction:column;gap:16px;min-width:0;display:flex;container-type:inline-size}.outside-head h2{letter-spacing:-.1px;font-size:17px;font-weight:650}.outside-head p{max-width:640px;color:var(--color-muted);margin-top:4px;font-size:13.5px;line-height:1.55}.outside-body{border:1px solid var(--color-hairline);background:var(--color-surface);border-radius:14px;grid-template-columns:210px minmax(0,1fr);min-height:320px;display:grid;overflow:hidden}.outside-rail{border-right:1px solid var(--color-divider);background:var(--color-well);flex-direction:column;gap:2px;padding:10px;display:flex}.outside-rail button{min-height:44px;color:var(--color-ink);text-align:left;background:0 0;border:0;border-radius:9px;justify-content:flex-start;align-items:center;gap:10px;padding:8px 10px;font-weight:450;display:flex}.outside-rail button:hover{background:var(--color-hover)}.outside-rail button[aria-selected=true]{background:var(--color-surface);box-shadow:0 1px 2px #141e191a, 0 0 0 1px var(--color-hairline);font-weight:600}.rail-mark{width:16px;height:16px;color:var(--color-muted);justify-content:center;align-items:center;display:inline-flex}.rail-text{flex-direction:column;min-width:0;display:flex}.rail-text small{color:var(--color-meta);font-size:11.5px;font-weight:400}.rail-text small.live{color:var(--color-verified)}.outside-panel{flex-direction:column;gap:12px;min-width:0;padding:26px 30px 28px;display:flex}.connect-steps{flex-direction:column;gap:22px;margin:0;padding:0;list-style:none;display:flex}.connect-step{grid-template-columns:26px minmax(0,1fr);gap:14px;display:grid}.step-mark{border:1.5px solid var(--color-control-border);background:var(--color-surface);width:26px;height:26px;color:var(--color-meta);font-variant-numeric:tabular-nums;border-radius:50%;justify-content:center;align-items:center;font-size:12px;font-weight:600;display:inline-flex}.connect-step.done .step-mark{border-color:var(--color-accent);background:var(--color-accent);color:#fff}.connect-step.next .step-mark{border-color:var(--color-accent);color:var(--color-accent-strong)}.connect-step.warn .step-mark{border-color:var(--color-amber);background:var(--color-amber-soft);color:var(--color-amber)}.step-body{flex-direction:column;gap:8px;min-width:0;padding-top:3px;display:flex}.step-body>strong{font-size:14.5px;font-weight:600}.step-body>p{color:var(--color-muted);font-size:13px;line-height:1.55}.connect-step.waiting .step-body>strong{color:var(--color-muted)}.connect-card{background:var(--color-well);border-radius:11px;align-items:center;gap:16px;padding:14px 16px;display:flex}.connect-card>div{flex-direction:column;flex:1;gap:4px;min-width:0;font-size:13.5px;display:flex}.connect-card small{color:var(--color-meta);font-size:12px}.connect-card code,.command-line code{font-size:12px}.connect-card>button{border-radius:9px;flex:none;gap:7px;min-height:34px;padding:6px 14px}.connect-card>button:not(.primary){background:var(--color-surface)}.folder-chip{border:1px solid var(--color-hairline);background:var(--color-surface);max-width:100%;min-height:28px;color:var(--color-muted);font:12px/1.4 var(--font-mono);border-radius:999px;align-self:flex-start;gap:7px;padding:4px 10px}.folder-chip>span{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.connect-try{flex-direction:column;gap:10px;margin-left:40px;display:flex}.connect-try>p{color:var(--color-muted);font-size:13px}.prompt-pills{flex-wrap:wrap;gap:8px;display:flex}.prompt-pill{border:1px solid var(--color-hairline);background:var(--color-surface);max-width:100%;min-height:34px;color:var(--color-ink);text-align:left;border-radius:999px;gap:8px;padding:6px 14px 6px 12px;font-size:13px;font-weight:400}.prompt-pill:hover{border-color:var(--color-hairline-strong);background:var(--color-hover)}.prompt-pill>svg{color:var(--color-meta);flex:none}.command-line{background:var(--color-well);border-radius:9px;align-items:center;gap:8px;min-width:0;padding:8px 8px 8px 12px;display:flex}.command-line code{overflow-wrap:anywhere;flex:1;min-width:0}.seen-sessions{flex-direction:column;gap:6px;margin:0;padding:0;font-size:13px;list-style:none;display:flex}.seen-sessions span{color:var(--color-meta);margin-left:8px}.outside-others h3{color:var(--color-muted);margin-bottom:8px;font-size:13px;font-weight:600}.outside-others ul{border:1px solid var(--color-hairline);background:var(--color-surface);border-radius:11px;margin:0;padding:0;font-size:13px;list-style:none}.outside-others li{flex-wrap:wrap;align-items:baseline;gap:4px 12px;padding:10px 14px;display:flex}.outside-others li+li{border-top:1px solid var(--color-divider)}.outside-others li>span{color:var(--color-muted)}.outside-others li>small{color:var(--color-meta);margin-left:auto;font-size:12px}.outside-host>summary{color:var(--color-muted);cursor:pointer;font-size:13px}.outside-host[open]>summary{margin-bottom:12px}@container (width<=620px){.outside-body{grid-template-columns:minmax(0,1fr);min-height:0}.outside-rail{border-right:0;border-bottom:1px solid var(--color-divider);grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;padding:8px;display:grid}.outside-rail button{text-align:center;flex-direction:column;justify-content:flex-start;gap:4px;min-width:0;padding:8px 4px}.rail-text{align-items:center}.outside-panel{padding:20px 16px 22px}.connect-card{flex-direction:column;align-items:stretch}.connect-try{margin-left:0}}.agent-page{flex-direction:column;gap:16px;min-width:0;display:flex;container-type:inline-size}.agent-tabs{border-bottom:1px solid var(--color-divider);gap:4px;display:flex}.agent-tabs button{white-space:nowrap;min-height:36px;color:var(--color-muted);background:0 0;border:0;border-bottom:2px solid #0000;border-radius:0;margin-bottom:-1px;padding:6px 12px;font-size:13.5px}.agent-tabs button:hover{color:var(--color-ink);background:0 0}.agent-tabs button[aria-selected=true]{border-bottom-color:var(--color-accent);color:var(--color-ink);font-weight:600}@media (width<=480px){.agent-tabs{gap:0}.agent-tabs button{padding:6px 9px}}.tab-count{background:var(--color-well);color:var(--color-meta);font-variant-numeric:tabular-nums;border-radius:999px;margin-left:2px;padding:0 6px;font-size:11px;font-weight:600}.conversations{flex-direction:column;gap:10px;min-width:0;display:flex}.conv-toolbar{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.conv-search{flex:240px;align-items:center;max-width:380px;display:flex;position:relative}.conv-search svg{color:var(--color-meta);pointer-events:none;position:absolute;top:50%;left:10px;transform:translateY(-50%)}.conv-search input{border:1px solid var(--color-control-border);background:var(--color-surface);border-radius:8px;width:100%;min-height:34px;padding:6px 10px 6px 32px}.conv-filter button{gap:6px}.conv-trash-toggle{color:var(--color-muted);gap:6px;margin-left:auto}.conv-trash-toggle.selected{border-color:var(--color-accent);background:var(--color-accent-soft);color:var(--color-accent-strong)}.conv-notice{background:var(--color-well);border-radius:8px;align-items:center;gap:8px;margin:0;padding:7px 12px;font-size:13px;display:flex}.conv-day{flex-direction:column;gap:6px;display:flex}.conv-day-label{color:var(--color-meta);margin:8px 2px 0;font-size:12px;font-weight:600}.conv-rows{border:1px solid var(--color-hairline);background:var(--color-surface);border-radius:12px;flex-direction:column;margin:0;padding:0;list-style:none;display:flex;overflow:hidden}.conv-row+.conv-row{border-top:1px solid var(--color-divider)}.conv-line{grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:16px;padding:8px 10px 8px 6px;display:grid}.conv-row:not(.open) .conv-line:hover{background:var(--color-hover)}.conv-row.open>.conv-line{background:var(--color-well)}.conv-toggle{text-align:left;background:0 0;border:0;justify-content:flex-start;align-items:flex-start;gap:12px;min-width:0;padding:6px 8px;font-weight:400}.conv-toggle:hover{background:0 0}.conv-toggle.static{cursor:default;display:flex}.conv-toggle .maker-mark{margin-top:1px}.conv-text{flex-direction:column;gap:3px;min-width:0;display:flex}.conv-title{color:var(--color-ink);text-overflow:ellipsis;white-space:nowrap;font-size:14px;font-weight:600;overflow:hidden}.conv-meta{color:var(--color-muted);flex-wrap:wrap;align-items:center;gap:2px 0;font-size:12px;display:flex}.conv-meta>span+span:before{content:"·";color:var(--color-meta);margin:0 6px}.conv-state{align-items:center;gap:5px;font-weight:600;display:inline-flex}.conv-state.running{color:var(--color-accent-strong)}.conv-state.failed,.conv-state.unknown{color:var(--color-failed)}.conv-state.stopped{color:var(--color-amber-text)}.conv-usage{font-variant-numeric:tabular-nums;white-space:nowrap;flex-direction:column;align-items:flex-end;gap:3px;font-size:12.5px;display:flex}.conv-context{color:var(--color-ink);align-items:center;gap:6px;font-weight:600;display:inline-flex}.conv-context small{color:var(--color-meta);margin-left:-4px;font-weight:400}.conv-meter{background:var(--color-hairline);border-radius:2px;width:44px;height:4px;display:inline-block;overflow:hidden}.conv-meter span{background:var(--color-accent);border-radius:2px;height:100%;display:block}.conv-cost{color:var(--color-verified-text);font-weight:600}.conv-actions{align-items:center;gap:2px;display:flex}.conv-continue{min-height:30px;margin-right:4px;padding:4px 12px;font-size:13px}.conv-actions .icon-button{border-radius:7px;width:30px;height:30px;min-height:30px}.conv-actions .icon-button:hover:not(:disabled){background:var(--color-hover);color:var(--color-ink)}.conv-actions .icon-button:disabled{opacity:.35;cursor:default}.conv-chevron svg{transition:transform .15s}.conv-chevron[aria-expanded=true]{background:0 0}.conv-chevron[aria-expanded=true] svg{transform:rotate(90deg)}.conv-details{border-top:1px solid var(--color-divider);grid-template-columns:minmax(240px,340px) minmax(0,1fr);gap:20px;padding:14px 18px 18px 46px;display:grid}.conv-facts{grid-template-columns:74px minmax(0,1fr);align-content:start;gap:7px 12px;margin:0;font-size:12.5px;display:grid}.conv-facts dt{color:var(--color-meta)}.conv-facts dd{overflow-wrap:anywhere;min-width:0;margin:0}.conv-value{color:var(--color-muted);font-family:var(--font-mono);font-size:11.5px}.conv-copy{align-items:center;gap:2px;max-width:100%;display:inline-flex}.conv-copy code{min-width:0;font-family:var(--font-mono);text-overflow:ellipsis;white-space:nowrap;font-size:11.5px;overflow:hidden}.conv-copy .icon-button{width:24px;height:24px;min-height:24px}.conv-work{flex-direction:column;gap:8px;min-width:0;display:flex}.conv-work h4{color:var(--color-meta);margin:0;font-size:12px;font-weight:600}.conv-work .work-turns{margin:0}.conv-trash{flex-direction:column;gap:8px;display:flex}.conv-trash-note{color:var(--color-muted);margin:0;font-size:12.5px}.conv-row.trashed .conv-title{color:var(--color-muted)}.conv-confirm{align-items:center;gap:6px;font-size:12.5px;display:inline-flex}.conv-confirm button{min-height:28px;padding:3px 10px;font-size:12.5px}.conv-confirm .danger{border-color:var(--color-failed)}.agents-panel{flex-direction:column;gap:12px;display:flex}.agents-intro{max-width:76ch;color:var(--color-muted);margin:0;font-size:13px;line-height:1.5}.agent-rows{border:1px solid var(--color-hairline);background:var(--color-surface);border-radius:12px;margin:0;padding:0;list-style:none}.agent-row+.agent-row{border-top:1px solid var(--color-divider)}.agent-row-head{grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:14px;padding:14px 16px;display:grid}.agent-row-mark{background:var(--color-well);border-radius:10px;place-items:center;width:40px;height:40px;display:grid}.agent-row-name{flex-direction:column;gap:3px;min-width:0;display:flex}.agent-row-name>div{flex-wrap:wrap;align-items:baseline;gap:8px;display:flex}.agent-row-name strong{font-size:15px}.agent-row-version{color:var(--color-meta);font-family:var(--font-mono);font-size:11.5px}.agent-default{background:var(--color-accent-soft);color:var(--color-accent-strong);border-radius:999px;align-self:center;padding:1px 8px;font-size:11px;font-weight:600}.agent-row-status{min-width:0;color:var(--color-muted);align-items:center;gap:7px;font-size:12.5px;display:inline-flex}.agent-row-status .status-dot{background:var(--color-hairline-strong);border-radius:50%;flex:none;width:7px;height:7px}.agent-row-status.ready .status-dot{background:var(--color-verified)}.agent-row-status.busy .status-dot{background:var(--color-amber)}.agent-row-status.failed{color:var(--color-failed)}.agent-row-status.failed .status-dot{background:var(--color-failed)}.agent-row-actions{flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:6px;display:flex}.agent-row-actions>button{min-height:32px;padding:4px 11px;font-size:13px}.agent-details-toggle svg{transition:transform .15s}.agent-details-toggle[aria-expanded=true] svg{transform:rotate(90deg)}.agent-row-model .setting-chip{border-radius:8px;justify-content:space-between;min-width:210px;min-height:32px;padding:4px 9px 4px 10px;font-size:13px}.agent-model-value{align-items:center;gap:7px;min-width:0;display:inline-flex}.agent-model-value>span{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.agent-model-value small{color:var(--color-meta);font-size:11px}.agent-details{border-top:1px solid var(--color-divider);flex-direction:column;padding:0 16px 6px 70px;display:flex}.agent-details-empty{color:var(--color-muted);flex-wrap:wrap;align-items:center;gap:10px;margin:0;padding:14px 0;font-size:13px;display:flex}.agent-detail-row{grid-template-columns:128px minmax(0,1fr);gap:14px;padding:13px 0;display:grid}.agent-detail-row+.agent-detail-row{border-top:1px solid var(--color-divider)}.agent-detail-label{color:var(--color-meta);padding-top:5px;font-size:12.5px}.agent-detail-body{flex-direction:column;gap:8px;min-width:0;display:flex}.agent-detail-body.agent-settings-row{flex-direction:row}.agent-detail-note{color:var(--color-muted);margin:0;font-size:12.5px;line-height:1.5}.agent-detail-note .text-button{color:var(--color-accent);margin-left:4px;padding:0;font-size:12.5px;display:inline}.agent-tiers{border:1px solid var(--color-divider);border-radius:8px;flex-direction:column;margin:0;padding:0;list-style:none;display:flex}.agent-tiers li{grid-template-columns:150px minmax(110px,170px) minmax(0,1fr) auto;align-items:center;gap:12px;padding:6px 8px 6px 12px;font-size:12.5px;display:grid}.agent-tiers li+li{border-top:1px solid var(--color-divider)}.agent-tiers li.current{background:var(--color-accent-soft)}.agent-tiers code{color:var(--color-muted);font-family:var(--font-mono);text-overflow:ellipsis;white-space:nowrap;font-size:11.5px;overflow:hidden}.agent-tier-name{font-weight:600}.agent-tier-runs{color:var(--color-muted);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.agent-tiers .small-button.selected{border-color:var(--color-accent);color:var(--color-accent-strong)}.agent-providers{flex-wrap:wrap;gap:6px;display:flex}.agent-provider{border-radius:8px;gap:7px;min-height:30px;padding:3px 10px 3px 7px;font-size:12.5px;position:relative}.agent-provider small{color:var(--color-meta);font-variant-numeric:tabular-nums;font-size:11.5px}.agent-provider.selected{border-color:var(--color-accent);background:var(--color-accent-soft)}.agent-provider.holds:after{content:"";background:var(--color-accent);border-radius:50%;width:5px;height:5px;position:absolute;top:4px;right:4px}.agent-model-list{grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:4px;margin:0;padding:0;list-style:none;display:grid}.agent-model-list button{background:var(--color-well);text-align:left;border-color:#0000;justify-content:flex-start;width:100%;min-height:32px;padding:4px 10px;font-size:12.5px;font-weight:400}.agent-model-list button:hover{border-color:var(--color-control-border)}.agent-model-list button.selected{border-color:var(--color-accent);background:var(--color-accent-soft);font-weight:600}.agent-model-list button>span{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.agent-model-list button small{color:var(--color-meta);margin-left:auto;font-size:11px}.agent-model-list button svg{color:var(--color-accent-strong);flex:none;margin-left:auto}.agent-model-list button small+svg{margin-left:6px}.maker-mark{flex:none;display:block}.provider-mark{--hue-bg:var(--color-hue-moss);--hue-ink:var(--color-hue-moss-ink);background:var(--hue-bg);color:var(--hue-ink);border-radius:5px;flex:none;place-items:center;font-weight:700;line-height:1;display:inline-grid}.provider-mark.hue-iris{--hue-bg:var(--color-hue-iris);--hue-ink:var(--color-hue-iris-ink)}.provider-mark.hue-sky{--hue-bg:var(--color-hue-sky);--hue-ink:var(--color-hue-sky-ink)}.provider-mark.hue-clay{--hue-bg:var(--color-hue-clay);--hue-ink:var(--color-hue-clay-ink)}.provider-mark.hue-rose{--hue-bg:var(--color-hue-rose);--hue-ink:var(--color-hue-rose-ink)}@container (width<=820px){.conv-details{grid-template-columns:minmax(0,1fr);padding-left:18px}}@media (width<=900px){.conv-details{grid-template-columns:minmax(0,1fr);padding-left:18px}.agent-details{padding-left:16px}.agent-tiers li{grid-template-columns:110px minmax(0,1fr) auto}.agent-tier-runs{display:none}}@media (width<=767px){.conv-line{flex-wrap:wrap;align-items:center;gap:4px 8px;display:flex}.conv-toggle{flex:100%}.conv-usage{flex-direction:row;flex:none;align-items:center;gap:10px;padding-left:40px}.conv-actions{margin-left:auto}.conv-meter{display:none}.conv-trash-toggle{margin-left:0}.agent-row-head{grid-template-columns:auto minmax(0,1fr)}.agent-row-actions{grid-column:1/-1;justify-content:flex-start}.agent-row-model .setting-chip{min-width:0}.agent-detail-row{grid-template-columns:minmax(0,1fr);gap:6px}.agent-tiers li{grid-template-columns:minmax(0,1fr) auto}.agent-tiers code{display:none}}@media (prefers-reduced-motion:reduce){.conv-chevron svg,.agent-details-toggle svg{transition:none}}.holds-facts .holds-text{color:var(--color-muted)}.holds-by{color:var(--color-meta);white-space:nowrap;margin-left:6px;font-size:11px}.process-holds.holds{align-items:baseline;display:flex}.process-holds .holds-text{text-overflow:ellipsis;white-space:nowrap;flex:auto;min-width:0;overflow:hidden}.process-holds .holds-by{text-overflow:ellipsis;flex:0 auto;min-width:0;max-width:35%;overflow:hidden}.notes-panel{border-right:1px solid var(--color-hairline);background:var(--color-surface);flex-direction:column;flex:none;width:clamp(300px,30%,420px);min-height:0;display:flex}.notes-head{border-bottom:1px solid var(--color-hairline);align-items:center;gap:8px;min-height:52px;padding:8px 10px 8px 14px;display:flex}.notes-head>svg{color:var(--color-accent);flex:none}.notes-title{white-space:nowrap;flex-direction:column;min-width:0;line-height:1.25;display:flex}.notes-title strong{text-overflow:ellipsis;color:var(--color-ink);font-size:14px;font-weight:650;overflow:hidden}.notes-save{color:var(--color-meta);font-size:11.5px}.notes-save.failed{color:var(--color-failed)}.notes-modes{align-items:center;margin-left:auto;display:flex}.notes-modes .rho-md-modes{margin-right:0}.notes-modes>:not(.rho-md-modes){display:none}.notes-body{flex-direction:column;flex:1;min-height:0;display:flex}.notes-note{color:var(--color-muted);margin:0;padding:14px 16px;font-size:13px;line-height:1.5}.notes-body .notes-note+.shell-owner{border-top:1px solid var(--color-divider)}.notes-body .rho-md-page{padding:14px 18px 48px;font-size:14px;line-height:1.6}.notes-body .rho-md-page h1{font-size:1.35em}.notes-body .rho-md-page h2{scroll-margin-top:8px;font-size:1.15em}.notes-body .rho-md-page h3{color:var(--color-muted);font-size:1em}.notes-body .rho-md-page img{border:1px solid var(--color-hairline);border-radius:8px;max-width:100%;height:auto}.notes-body .rho-md-page h2.notes-current{border-bottom-color:var(--color-accent);color:var(--color-accent-strong)}.notes-body .rho-md-bar{justify-content:flex-start;padding:6px 10px}.project-rail{--rail-ground:#eef1f0;z-index:6;border-right:1px solid var(--color-hairline);background:var(--rail-ground);flex-direction:column;flex:0 0 60px;align-items:stretch;gap:4px;padding:12px 0;display:flex;position:relative}.project-rail button{width:60px;min-height:44px;color:var(--color-muted);background:0 0;border:0;border-radius:0;padding:0;position:relative}.project-rail button:hover,.project-rail button:active{background:0 0}.project-rail button:focus-visible{outline:none}.project-rail button:focus-visible>:first-child{outline:2px solid var(--color-accent);outline-offset:2px}.rail-home{margin-bottom:6px}.rail-home .brand-mark{border-radius:10px;width:34px;height:34px;font-size:27px}.rail-projects{border-top:1px solid var(--color-hairline);flex-direction:column;gap:4px;margin:0;padding:8px 0 0;list-style:none;display:flex}.rail-project .project-avatar{border-radius:10px;width:36px;height:36px;margin:0 auto;font-size:13px;transition:border-radius .15s}.rail-project:hover .project-avatar,.rail-project[aria-current=page] .project-avatar{border-radius:12px}.rail-project:before,.rail-home:before{content:"";background:var(--color-ink);border-radius:0 3px 3px 0;width:4px;height:0;transition:height .15s;position:absolute;top:50%;left:0;transform:translateY(-50%)}.rail-project:hover:before,.rail-home:hover:before{height:10px}.rail-project[aria-current=page]:before,.rail-home[aria-current=page]:before{height:26px}.rail-state{background:var(--color-accent);width:11px;height:11px;box-shadow:0 0 0 2.5px var(--rail-ground);border-radius:50%;position:absolute;bottom:1px;right:9px}.rail-project.waiting .rail-state{background:var(--color-amber)}.rail-project.working .rail-state:after{content:"";background:var(--color-accent);border-radius:50%;animation:1.8s ease-out infinite rail-pulse;position:absolute;inset:0}@keyframes rail-pulse{0%{opacity:.55;transform:scale(1)}to{opacity:0;transform:scale(2.4)}}@media (prefers-reduced-motion:reduce){.rail-project.working .rail-state:after{animation:none}.rail-project .project-avatar,.rail-project:before,.rail-home:before{transition:none}}.rail-add>svg{box-sizing:content-box;border:1px dashed var(--color-control-border);color:var(--color-meta);border-radius:10px;padding:9px}.rail-add:hover>svg{border-style:solid;border-color:var(--color-hairline-strong);color:var(--color-ink)}.rail-access{margin-top:auto}.rail-access>svg{box-sizing:content-box;border-radius:9px;padding:8px}.rail-access:hover>svg,.rail-access[aria-expanded=true]>svg{background:var(--color-hover);color:var(--color-ink)}.project-rail [data-tip]:hover:after,.project-rail [data-tip]:focus-visible:after{content:attr(data-tip);z-index:30;background:var(--color-ink);color:#fff;white-space:nowrap;pointer-events:none;border-radius:6px;padding:5px 9px;font-size:12px;font-weight:500;line-height:1.4;position:absolute;top:50%;left:calc(100% + 2px);transform:translateY(-50%);box-shadow:0 6px 16px #1c2a2433}.drawer:has(.drawer-split){width:min(340px,92vw);padding-left:0}.drawer-split{min-height:100%;display:flex}.drawer-split>.project-rail{flex-basis:60px;margin:-22px 0 -14px;padding-top:22px}.drawer-nav{flex-direction:column;flex:1;min-width:0;padding-left:12px;display:flex}.drawer-split [data-tip]:hover:after,.drawer-split [data-tip]:focus-visible:after{display:none}@media (width<=767px){.app-body>.project-rail{display:none}}:root{--color-canvas:#f6f7f8;--color-surface:#fff;--color-well:#f3f5f5;--color-ink:#202927;--color-muted:#596560;--color-meta:#68736f;--color-hairline:#e1e6e3;--color-divider:#edf0ee;--color-control-border:#cbd3ce;--color-hairline-strong:#bcc8c1;--color-hover:#eef2ef;--color-selected:#e2eee7;--color-pressed:#d5e4dc;--color-accent:#1e6b52;--color-accent-hover:#17553f;--color-accent-strong:#164e3c;--color-accent-soft:#e5f1e9;--color-verified:#328361;--color-verified-text:#246747;--color-verified-soft:#e8f3eb;--color-offline:#75817a;--color-failed:#b13f38;--color-failed-strong:#96362e;--color-amber:#a46b17;--color-amber-text:#7b531a;--color-amber-soft:#fff5e3;--color-amber-line:#ead5ae;--color-hue-moss:#e9f2e6;--color-hue-moss-ink:#3d6743;--color-hue-iris:#edebf7;--color-hue-iris-ink:#554f92;--color-hue-sky:#e6eef7;--color-hue-sky-ink:#3b6288;--color-hue-clay:#f6ece1;--color-hue-clay-ink:#865733;--color-hue-rose:#f8e9ec;--color-hue-rose-ink:#8a4553;--font-ui:-apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;--font-mono:ui-monospace, "SF Mono", Menlo, Consolas, monospace;--text:var(--color-ink);--text-muted:var(--color-muted);--border:var(--color-hairline);--divider:var(--color-divider);--surface:var(--color-surface);--surface-muted:var(--color-well);--accent:var(--color-accent);--agent:var(--color-accent);--agent-wash:var(--color-accent-soft);--waiting:var(--color-amber);--danger:var(--color-failed);--code-keyword:var(--color-hue-iris-ink);--code-string:var(--color-hue-moss-ink);--code-number:var(--color-hue-clay-ink);--code-function:var(--color-hue-sky-ink);--code-comment:var(--color-meta);--code-mark:var(--color-meta);--code-link:var(--color-accent);font:14px/1.5 var(--font-ui);color:var(--color-ink);background:var(--color-surface);font-synthesis:none;-webkit-font-smoothing:antialiased}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit;color:inherit}button{border:1px solid var(--color-control-border);background:var(--color-surface);cursor:pointer;border-radius:7px;justify-content:center;align-items:center;gap:7px;min-height:34px;padding:6px 12px;font-weight:500;display:inline-flex}button:hover{background:var(--color-hover)}button:active{background:var(--color-pressed)}button:disabled{cursor:not-allowed;opacity:.5}button svg{flex:none}:where(button,summary,a,input,select,textarea,[tabindex]):focus-visible{outline:2px solid var(--color-accent);outline-offset:3px}input,select,textarea{border:1px solid var(--color-control-border);background:var(--color-surface);border-radius:7px;min-width:0;padding:9px 11px}input:not([type=checkbox]),textarea{width:100%}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:var(--color-meta)}label{flex-direction:column;gap:7px;font-weight:500;display:flex}h1,h2,h3,p{margin:0}h1{letter-spacing:-.7px;overflow-wrap:anywhere;font-size:28px;font-weight:650;line-height:1.25}h2{font-size:16px;font-weight:600;line-height:1.5}h3{font-size:14px;font-weight:600}strong,b,th{font-weight:600}small{font-size:12px;line-height:1.5}code,pre{font-family:var(--font-mono)}pre{white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px;overflow:auto}a{color:var(--color-accent)}summary{cursor:pointer}dl{grid-template-columns:88px minmax(0,1fr);gap:10px 16px;margin:0;display:grid}dt{color:var(--color-meta)}dd{overflow-wrap:anywhere;margin:0}.primary{background:var(--color-accent);border-color:var(--color-accent);color:#fff}.primary:hover{background:var(--color-accent-hover);border-color:var(--color-accent-hover)}.primary:active{background:var(--color-accent-strong)}.danger,.danger-link{color:var(--color-failed)}.danger-link{background:0 0;border:0;padding:0}.muted,.meta{color:var(--color-muted)}.text-button,.link,.overview-link,.quiet-button{color:var(--color-muted);text-align:left;background:0 0;border:0;padding:4px 6px}.text-button:hover,.link:hover,.overview-link:hover{color:var(--color-accent)}.icon-button{width:34px;height:34px;min-height:34px;color:var(--color-muted);background:0 0;border:0;flex:none;padding:0}.icon-button[aria-expanded=true]{background:var(--color-selected);color:var(--color-accent-strong)}.small-button{min-height:29px;padding:4px 9px;font-size:12px}.visually-hidden{clip-path:inset(50%);white-space:nowrap;width:1px;height:1px;position:absolute;overflow:hidden}.skip-link{z-index:100;background:#fff;padding:10px;position:fixed;top:-100px;left:16px}.skip-link:focus{top:12px}.application{flex-direction:column;min-width:320px;height:100dvh;display:flex}.app-body{flex:1;min-height:0;display:flex}.project-nav{border-right:1px solid var(--color-hairline);background:var(--color-canvas);flex-direction:column;flex:0 0 240px;padding:16px 12px 12px;display:flex;overflow:auto}.brand{letter-spacing:-.5px;background:0 0;border:0;justify-content:flex-start;align-self:flex-start;gap:10px;padding:0 10px;font-size:20px}.brand-mark{background:var(--color-accent);color:#fff;border-radius:9px;place-content:center;width:29px;height:29px;padding-bottom:3px;font:25px/1 Georgia,serif;display:grid}.project-switcher{border-color:var(--color-hairline);background:#fff;justify-content:flex-start;min-height:44px;margin:28px 0 20px;padding:10px}.project-switcher>span{text-overflow:ellipsis;white-space:nowrap;text-align:left;flex:1;overflow:hidden}.nav-group{flex-direction:column;gap:3px;display:flex}.nav-row{width:100%;min-height:38px;color:var(--color-muted);text-align:left;background:0 0;border:0;justify-content:flex-start;gap:11px;padding:9px 10px;font-weight:400;display:flex}.nav-row[aria-current=page]{background:var(--color-surface);color:var(--color-ink);box-shadow:0 0 0 1px var(--color-hairline), 0 1px 2px #20392b0d;font-weight:600}.nav-row:hover:not([aria-current=page]){background:var(--color-hover)}.nav-row.within{color:var(--color-ink);font-weight:600}.nav-row>svg{color:var(--color-muted)}.nav-row[aria-current=page]>svg{color:var(--color-accent)}.nav-row-name{overflow-wrap:anywhere;flex:1;min-width:0}.nav-row-count{color:var(--color-meta);font-size:12px}.nav-workspaces{margin-top:28px}.section-label{color:var(--color-meta);letter-spacing:.04em;text-transform:uppercase;padding:0 10px 9px;font-size:11px;font-weight:600;display:block}.navigation-footer{flex-direction:column;margin-top:auto;padding-top:24px;display:flex}.rho-tok-keyword{color:var(--code-keyword)}.rho-tok-string{color:var(--code-string)}.rho-tok-number{color:var(--code-number)}.rho-tok-comment{color:var(--code-comment);font-style:italic}.rho-tok-function{color:var(--code-function)}.rho-tok-strong{font-weight:650}.rho-tok-emphasis{font-style:italic}.rho-tok-strike{text-decoration:line-through}.rho-tok-link{color:var(--code-link)}.rho-tok-mark{color:var(--code-mark)}.rho-tok-quote{color:var(--text-muted)}.rho-tok-invalid{color:var(--danger)}.nav-back{min-height:30px;color:var(--color-muted);background:0 0;border:0;align-self:flex-start;gap:6px;padding:4px 8px;font-size:13px;font-weight:400}.project-card{margin:14px 0 22px;position:relative}.project-card summary{cursor:pointer;border-radius:10px;align-items:center;gap:11px;padding:8px;list-style:none;display:flex}.project-card summary::-webkit-details-marker{display:none}.project-card summary:hover,.project-card[open] summary{background:var(--color-hover)}.project-card summary>svg{color:var(--color-meta)}.project-avatar{background:var(--color-accent);color:#fff;letter-spacing:.02em;border-radius:10px;flex:none;place-content:center;width:38px;height:38px;font-size:14px;font-weight:650;display:grid}.project-avatar.small{border-radius:7px;width:24px;height:24px;font-size:11px}.project-avatar.moss{background:var(--color-hue-moss-ink)}.project-avatar.iris{background:var(--color-hue-iris-ink)}.project-avatar.sky{background:var(--color-hue-sky-ink)}.project-avatar.clay{background:var(--color-hue-clay-ink)}.project-avatar.rose{background:var(--color-hue-rose-ink)}.project-card-name{flex-direction:column;flex:1;min-width:0;line-height:1.25;display:flex}.project-card-name small{color:var(--color-meta);letter-spacing:.06em;text-transform:uppercase;font-size:10.5px;font-weight:600}.project-card-name strong{text-overflow:ellipsis;white-space:nowrap;font-size:15px;overflow:hidden}.project-menu{z-index:30;background:var(--color-surface);border:1px solid var(--color-hairline);border-radius:10px;flex-direction:column;padding:6px;display:flex;position:absolute;top:calc(100% + 4px);left:0;right:0;box-shadow:0 10px 30px #20392b1f}.project-menu button{text-align:left;background:0 0;border:0;justify-content:flex-start;gap:9px;font-weight:400}.project-menu button>span:last-child{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.nav-sub{border-left:1px solid var(--color-hairline);flex-direction:column;gap:1px;margin:0 0 4px 21px;padding-left:8px;display:flex}.nav-sub-row{min-height:30px;padding:5px 8px;font-size:13px}.nav-badge{white-space:nowrap;border-radius:999px;align-items:center;gap:5px;padding:1px 7px;font-size:11px;font-weight:600;display:inline-flex}.nav-badge.working{background:var(--color-accent-soft);color:var(--color-accent-strong)}.nav-badge.waiting{background:var(--color-amber-soft);color:var(--color-amber-text);border:1px solid var(--color-amber-line)}.nav-sources{margin-top:26px}.nav-heading{justify-content:space-between;align-items:center;padding-right:2px;display:flex}.nav-heading .section-label{padding-bottom:0}.nav-add{width:26px;min-height:26px;color:var(--color-meta);background:0 0;border:0;padding:0}.nav-sources .nav-group{margin-top:6px}.nav-twisty{color:var(--color-meta);flex:none;transition:transform .15s;display:flex}.nav-row[aria-expanded=true] .nav-twisty{transform:rotate(90deg)}.nav-files{border-left:1px solid var(--color-hairline);scrollbar-width:thin;max-height:min(52vh,440px);margin:1px 0 6px 18px;padding:0 0 0 8px;list-style:none;overflow-y:auto}.nav-folder{color:var(--color-meta);text-overflow:ellipsis;white-space:nowrap;padding:7px 8px 2px;font-size:11px;display:block;overflow:hidden}.nav-file{width:100%;min-height:29px;color:var(--color-muted);text-align:left;background:0 0;border:0;border-radius:6px;justify-content:flex-start;gap:7px;padding:4px 8px;font-size:12.5px;font-weight:400;display:flex}.nav-file>span{-webkit-line-clamp:2;overflow-wrap:anywhere;-webkit-box-orient:vertical;min-width:0;line-height:1.35;display:-webkit-box;overflow:hidden}.nav-file>svg{color:var(--color-meta);flex:none;align-self:flex-start;margin-top:2px}.nav-file:hover:not([aria-current=page]){background:var(--color-hover)}.nav-file[aria-current=page]{background:var(--color-surface);color:var(--color-ink);box-shadow:0 0 0 1px var(--color-hairline);font-weight:600}.nav-file[aria-current=page]>svg{color:var(--color-accent)}.nav-files-note{color:var(--color-meta);margin:0 0 6px 26px;padding:3px 8px;font-size:12px}.nav-value{justify-content:space-between;align-items:baseline}.nav-file.nav-value>span{font-family:var(--font-mono);-webkit-line-clamp:1;font-size:12px}.nav-value>small{max-width:50%;color:var(--color-meta);text-overflow:ellipsis;white-space:nowrap;flex:none;font-size:11px;overflow:hidden}div.nav-files-note>.nav-more{margin:4px 0 0 -8px;display:block}.nav-values .nav-files-note.nav-values-none{margin:0;display:block}.nav-more{min-height:28px;color:var(--color-accent-strong);background:0 0;border:0;margin:2px 0;padding:3px 8px;font-size:12px;font-weight:500}.pulse-dot{background:var(--color-verified);border-radius:50%;flex:none;width:7px;height:7px;animation:1.6s ease-out infinite pulse;display:inline-block;box-shadow:0 0 #32836166}.pulse-dot.large{width:12px;height:12px}@keyframes pulse{70%{box-shadow:0 0 0 6px #32836100}to{box-shadow:0 0 #32836100}}.agent-chip{border-radius:999px;gap:8px;max-width:min(420px,38vw);min-height:32px;padding:4px 12px;font-size:12.5px;font-weight:400}.agent-chip strong{white-space:nowrap;font-weight:600}.agent-chip-what{text-overflow:ellipsis;white-space:nowrap;color:var(--color-muted);font-family:var(--font-mono);font-size:11.5px;overflow:hidden}.agent-chip.working{border-color:var(--color-hairline-strong);background:var(--color-surface)}.agent-chip.waiting{border-color:var(--color-amber-line);background:var(--color-amber-soft);color:var(--color-amber-text)}.agent-chip.waiting .pulse-dot{background:var(--color-amber);animation:none}.agent-chip.waiting .agent-chip-what{color:var(--color-amber-text);font-family:var(--font-ui)}.studio-with-notes{flex:1;min-height:0;display:flex}.studio-main{flex-direction:column;flex:1;min-width:0;min-height:0;display:flex;container-type:inline-size}@container (width<=640px){.studio-bar .notes-toggle>span,.studio-bar .view-menu summary>span,.studio-bar .shell-evidence-toggle>span{display:none}}@container (width<=900px){.studio-bar .shell-agent-state{display:none}}@container (width<=760px){.studio-bar:has(.shell-agent) :is(.notes-toggle,.view-menu>summary,.shell-evidence-toggle)>span{display:none}}.studio-bar{border-bottom:1px solid var(--color-hairline);background:var(--color-surface);align-items:center;gap:10px;min-height:52px;padding:8px 14px;display:flex}.studio-title{min-width:56px;color:var(--color-ink);flex:0 auto;align-items:center;gap:8px;margin:0;font-size:14px;font-weight:650;display:flex}.studio-title>span:not(.pulse-dot){text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.studio-title>svg{color:var(--color-accent);flex:none}.studio-bar>.steps-slot{flex:none;max-width:45%}.studio-bar>:is(.studio-title,.steps-slot):not(:has(+.steps-slot)){margin-right:auto}.studio-bar :is(.notes-toggle,.view-menu>summary,.shell-bar button){min-height:30px;color:var(--color-ink);background:0 0;border:0;border-radius:7px;flex:none;gap:6px;padding:4px 9px;font-size:12.5px;font-weight:500}.studio-bar :is(.notes-toggle,.view-menu>summary,.shell-bar button):hover{background:var(--color-hover)}.studio-bar :is(.notes-toggle[aria-pressed=true],.view-menu[open]>summary,.shell-evidence-toggle[aria-expanded=true]){background:var(--color-accent-soft);color:var(--color-accent-strong)}.bar-slot{display:contents}.studio-bar .shell-bar{border:0;flex:auto;gap:2px;min-width:0;min-height:0;padding:0;font-size:12.5px}.studio-bar .shell-bar .shell-agent{max-width:60%}.follow-toggle{border-radius:999px;flex:none;gap:7px;min-height:32px;padding:4px 12px;font-size:12.5px}.follow-toggle.on{border-color:var(--color-accent);background:var(--color-accent-soft);color:var(--color-accent-strong)}.canvas-note{background:var(--color-well);border-bottom:1px solid var(--color-hairline);color:var(--color-muted);align-items:center;gap:12px;padding:8px 16px;font-size:12.5px;display:flex}.canvas-note p{overflow-wrap:anywhere;flex:1;min-width:0}.studio-empty{text-align:center;background:var(--color-canvas);flex-direction:column;flex:1;justify-content:center;align-items:center;gap:12px;padding:40px 24px;display:flex}.studio-empty h2{font-size:17px}.studio-empty p{max-width:460px;color:var(--color-muted);overflow-wrap:anywhere;font-size:13.5px}.source-summary{color:var(--color-meta);font-size:13px}.source-rows{border:1px solid var(--color-hairline);border-radius:12px;margin:0;padding:0;list-style:none;overflow:hidden}.source-rows li+li{border-top:1px solid var(--color-divider)}.source-row{text-align:left;background:0 0;border:0;border-radius:0;justify-content:flex-start;gap:12px;width:100%;padding:10px 14px;font-weight:400}.source-row:hover{background:var(--color-well)}.source-row:focus-visible{outline-offset:-3px}.source-name{flex-direction:column;flex:1;min-width:0;display:flex}.source-name strong{text-overflow:ellipsis;white-space:nowrap;font-weight:550;overflow:hidden}.source-name small{color:var(--color-meta);text-overflow:ellipsis;white-space:nowrap;font-size:12px;overflow:hidden}.source-meta{color:var(--color-meta);flex:none;font-size:12px}.source-list .file-toolbar{margin-bottom:12px}.work-list{flex-direction:column;gap:18px;display:flex}.work-card{border:1px solid var(--color-hairline);background:var(--color-surface);border-radius:12px;flex-direction:column;display:flex;overflow:hidden}.work-head{border-bottom:1px solid var(--color-divider);align-items:center;gap:12px;padding:14px 18px;display:flex}.work-head>div{flex:1;min-width:0}.work-head h2{overflow-wrap:anywhere;font-size:15px;font-weight:650}.work-head p{color:var(--color-meta);margin-top:2px;font-size:12.5px}.work-head>button{flex:none}.work-turns{margin:0;padding:0;list-style:none}.work-turns>li+li{border-top:1px solid var(--color-divider)}.work-earlier{padding:8px 14px}.work-earlier .text-button{font-size:12.5px}.work-turn{flex-direction:column;gap:12px;padding:16px 18px;display:flex}.work-ask{align-items:baseline;gap:12px;display:flex}.work-ask p{background:var(--color-well);min-width:0;color:var(--color-ink);overflow-wrap:anywhere;white-space:pre-wrap;-webkit-line-clamp:4;border-radius:10px;-webkit-box-orient:vertical;flex:1;padding:7px 11px;font-weight:500;display:-webkit-box;overflow:hidden}.work-ask span{color:var(--color-meta);flex:none;font-size:12px}.work-did{flex-direction:column;gap:8px;display:flex}.work-did:empty{display:none}.work-line{align-items:flex-start;gap:10px;display:flex}.work-label{width:74px;color:var(--color-meta);flex:none;padding-top:4px;font-size:12px;font-weight:600}.work-files{flex-wrap:wrap;gap:6px;min-width:0;display:flex}.work-file{border:1px solid var(--color-hairline);background:var(--color-surface);max-width:100%;min-height:28px;color:var(--color-ink);border-radius:7px;gap:6px;padding:3px 9px;font-size:12.5px;font-weight:500}.work-file:hover{border-color:var(--color-hairline-strong);background:var(--color-well)}.work-file>svg{color:var(--color-meta);flex:none}.work-file>span{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.work-file>small{color:var(--color-meta);flex:none;font-size:11.5px;font-weight:400}.work-commands summary{color:var(--color-muted);cursor:pointer;align-items:center;gap:10px;font-size:12.5px;list-style:none;display:flex}.work-commands summary::-webkit-details-marker{display:none}.work-commands summary .work-label{padding-top:0}.work-commands summary:after{content:"";border-bottom:1.5px solid;border-right:1.5px solid;width:6px;height:6px;transition:transform .15s;transform:rotate(-45deg)}.work-commands[open] summary:after{transform:rotate(45deg)}.work-commands ul{flex-direction:column;gap:6px;margin:8px 0 8px 84px;padding:0;list-style:none;display:flex}.work-commands li{align-items:flex-start;gap:8px;min-width:0;display:flex}.work-commands code{background:var(--color-well);min-width:0;font:12px/1.5 var(--font-mono);overflow-wrap:anywhere;white-space:pre-wrap;border-radius:6px;flex:1;padding:4px 8px}.work-commands>.work-files{margin-left:84px}.work-outcome{color:var(--color-meta);flex:none;padding-top:4px;font-size:11.5px}.work-outcome.rejected{color:var(--color-amber-text)}.work-outside{color:var(--color-meta);margin-left:84px;font-size:12px}.work-answer{font-size:14px;position:relative}.work-answer.clamped .turn-text{max-height:9.6em;overflow:hidden;-webkit-mask-image:linear-gradient(#000 60%,#0000);mask-image:linear-gradient(#000 60%,#0000)}.work-more{color:var(--color-accent-strong);margin-top:4px;font-size:12.5px}.work-problem{color:var(--color-failed-strong);overflow-wrap:anywhere;background:#fbefee;border-radius:8px;align-items:flex-start;gap:8px;padding:9px 12px;font-size:13px;display:flex}.work-problem>svg{flex:none;margin-top:2px}.work-ending{color:var(--color-meta);font-size:12px}.work-state.completed{color:var(--color-verified-text)}.work-state.failed{color:var(--color-failed)}.work-state.running{color:var(--color-accent-strong);font-weight:600}.work-older{align-self:flex-start}.agent-empty .empty-symbol{color:var(--color-accent)}.agent-settings{border:1px solid var(--color-hairline);background:var(--color-surface);border-radius:12px;flex-direction:column;gap:10px;padding:14px 16px;display:flex}.agent-settings-head{flex-wrap:wrap;align-items:center;gap:12px;display:flex}.agent-settings-head h2{font-size:13px;font-weight:600}.agent-choice{background:var(--color-well);border-radius:8px;gap:2px;padding:2px;display:inline-flex}.agent-choice button{min-height:26px;color:var(--color-muted);background:0 0;border:0;border-radius:6px;gap:6px;padding:3px 11px;font-size:12px;font-weight:500}.agent-choice button:hover{color:var(--color-ink)}.agent-choice button.selected{background:var(--color-surface);color:var(--color-ink);font-weight:600;box-shadow:0 1px 2px #141e191f}.agent-settings-row,.composer-settings{flex-wrap:wrap;align-items:center;gap:6px;min-width:0;display:flex}.agent-settings-note{color:var(--color-meta);font-size:12px;line-height:1.5}.agent-settings-note .text-button{font-size:12px}.setting-chip{border:1px solid var(--color-control-border);background:var(--color-surface);max-width:100%;min-height:28px;color:var(--color-ink);cursor:pointer;border-radius:7px;flex-direction:row;align-items:center;gap:6px;padding:3px 8px 3px 10px;font-size:12px;font-weight:400;display:inline-flex;position:relative}.setting-chip:hover{background:var(--color-hover)}.setting-chip:disabled{opacity:.55;cursor:default}.setting-select:has(select:disabled){opacity:.55;cursor:default}.setting-chip-label{color:var(--color-meta);flex:none}.setting-chip-value{text-overflow:ellipsis;white-space:nowrap;min-width:0;max-width:220px;overflow:hidden}.setting-select select{opacity:0;cursor:pointer;width:100%;height:100%;position:absolute;inset:0}.setting-select select:disabled{cursor:default}.setting-select:focus-within{outline:2px solid var(--color-accent);outline-offset:1px}.setting-check input{margin:0}.model-picker{min-width:0;max-width:100%;display:inline-flex;position:relative}.model-popover{z-index:30;border:1px solid var(--color-hairline);background:var(--color-surface);border-radius:10px;flex-direction:column;width:min(360px,100vw - 32px);display:flex;position:absolute;left:0;box-shadow:0 12px 32px #141e1929}.model-popover.down{top:calc(100% + 6px)}.model-popover.up{bottom:calc(100% + 6px)}.model-search{border-bottom:1px solid var(--color-divider);color:var(--color-meta);align-items:center;gap:8px;padding:8px 12px;display:flex}.model-search input{min-width:0;box-shadow:none;background:0 0;border:0;outline:none;flex:1;padding:4px 0;font-size:13px}.model-list{overscroll-behavior:contain;flex:auto;min-height:60px;max-height:320px;padding:5px;position:relative;overflow-y:auto}.model-group{color:var(--color-meta);align-items:center;gap:6px;padding:10px 8px 4px;font-size:11px;display:flex}.model-option{cursor:pointer;border-radius:6px;align-items:center;gap:8px;padding:7px 8px;font-size:12.5px;display:flex}.model-option.active{background:var(--color-selected)}.model-option[aria-selected=true] .model-name{font-weight:600}.model-name{text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0;overflow:hidden}.model-meta{color:var(--color-meta);flex:none;font-size:11px}.model-none{color:var(--color-meta);padding:18px 10px;font-size:12px}.model-unknown{flex-direction:column;align-items:flex-start;gap:8px;padding:14px;font-size:12.5px;display:flex}.model-unknown small{color:var(--color-meta);font-size:11px}.turn-model{color:var(--color-meta)}.composer-settings .setting-chip{width:auto;max-width:100%}.setting-summary{white-space:nowrap;align-items:baseline;gap:7px;min-width:0;display:flex;overflow:hidden}.summary-agent,.summary-effort{color:var(--color-meta);flex:none}.summary-agent{align-items:center;gap:5px;display:inline-flex}.summary-model{text-overflow:ellipsis;min-width:0;overflow:hidden}.agent-outside{border-top:1px solid var(--color-hairline);padding-top:14px}.agent-outside>summary{color:var(--color-muted);cursor:pointer;font-size:13px;font-weight:500}.agent-outside[open]>summary{margin-bottom:14px}@media (width<=767px){.work-head,.work-turn{padding-left:14px;padding-right:14px}.work-line{flex-direction:column;gap:4px}.work-label{width:auto;padding-top:0}.work-commands ul,.work-commands>.work-files,.work-outside{margin-left:0}}.file-preview{background:var(--color-canvas);flex-direction:column;flex:1;min-height:0;display:flex}.preview-bar{border-bottom:1px solid var(--color-hairline);background:var(--color-surface);flex-wrap:wrap;align-items:center;gap:8px 12px;min-height:56px;padding:8px 14px;display:flex}.preview-name{flex-direction:column;flex:160px;min-width:0;line-height:1.3;display:flex}.preview-name h1{text-overflow:ellipsis;white-space:nowrap;font-size:15px;font-weight:650;overflow:hidden}.preview-name small{color:var(--color-meta);text-overflow:ellipsis;white-space:nowrap;font-size:12px;overflow:hidden}.preview-owner-header{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.preview-owner-header:empty{display:none}:is(.shell-header-slot,.preview-owner-header,.notes-modes){gap:2px}:is(.shell-header-slot,.preview-owner-header,.notes-modes) button{min-height:28px;color:var(--color-muted);white-space:nowrap;box-shadow:none;background:0 0;border:0;border-radius:6px;align-items:center;gap:5px;padding:4px 8px;font-size:12.5px;font-weight:500;display:inline-flex}:is(.shell-header-slot,.preview-owner-header,.notes-modes) button:hover:not(:disabled){background:var(--color-hover);color:var(--color-ink)}:is(.shell-header-slot,.preview-owner-header,.notes-modes) label:has(>input[type=checkbox]){min-height:28px;color:var(--color-muted);white-space:nowrap;cursor:pointer;border-radius:6px;flex-direction:row;align-items:center;gap:5px;padding:4px 8px;font-size:12.5px;font-weight:500;display:inline-flex}:is(.shell-header-slot,.preview-owner-header,.notes-modes) label:has(>input[type=checkbox]):hover{background:var(--color-hover);color:var(--color-ink)}:is(.shell-header-slot,.preview-owner-header,.notes-modes) button.run-line{color:var(--color-accent-strong);font-weight:600}:is(.shell-header-slot,.preview-owner-header,.notes-modes) [role=group]:has(>button[aria-pressed]){background:var(--color-well);border:0;border-radius:8px;flex:none;gap:0;margin:0 2px;padding:2px;display:inline-flex;overflow:visible}:is(.shell-header-slot,.preview-owner-header,.notes-modes) [role=group]>button[aria-pressed]{min-height:24px;color:var(--color-muted);box-shadow:none;background:0 0;border:0;border-radius:6px;padding:2px 10px;font-size:12px;font-weight:600}:is(.shell-header-slot,.preview-owner-header,.notes-modes) [role=group]>button[aria-pressed=true]{background:var(--color-surface);color:var(--color-ink);box-shadow:0 1px 2px #0000001a}:is(.shell-header-slot,.preview-owner-header,.notes-modes) label>input[type=checkbox]{appearance:none;background:var(--color-hairline-strong);cursor:pointer;border:0;border-radius:2px;flex:none;width:3px;min-width:3px;height:14px;min-height:0;margin:0 2px 0 0;padding:0}:is(.shell-header-slot,.preview-owner-header,.notes-modes) label>input[type=checkbox]:checked{background:var(--agent)}:is(.shell-header-slot,.preview-owner-header,.notes-modes) label:has(>input[type=checkbox]:checked){color:var(--color-ink)}:is(.shell-header-slot,.preview-owner-header,.notes-modes) label>input[type=checkbox]:focus-visible{outline:none}:is(.shell-header-slot,.preview-owner-header,.notes-modes) label:has(>input[type=checkbox]:focus-visible){outline:2px solid var(--color-accent);outline-offset:1px}.preview-nav{border:1px solid var(--color-hairline);border-radius:9px;align-items:center;gap:2px;padding:2px;display:flex}.preview-nav .icon-button{width:30px;height:30px;min-height:30px}.preview-nav .icon-button:disabled{opacity:.35}.preview-position{min-height:30px;color:var(--color-muted);font-variant-numeric:tabular-nums;white-space:nowrap;background:0 0;border:0;padding:2px 8px;font-size:12.5px;font-weight:500}.preview-studio{gap:7px;min-height:34px;padding:4px 12px;font-size:12.5px}@media (width<=767px){.preview-bar{padding:8px 12px}.preview-studio{width:34px;padding:0}.preview-studio>span{display:none}}.preview-body{border:1px solid var(--color-hairline);background:#fff;border-radius:8px;flex-direction:column;flex:1;min-height:0;margin:12px;display:flex;overflow:hidden}.preview-body>*{transition:opacity .12s}.preview-body.switching>*{opacity:.5}.preview-body>.studio-empty,.preview-body>.loading-state{flex:1}.project-heading{flex-direction:column;gap:5px;padding:12px 10px;display:flex}.project-heading>span{color:var(--color-meta);font-size:12px}.app-content{flex-direction:column;flex:1;min-width:0;display:flex}.topbar{border-bottom:1px solid var(--color-hairline);background:var(--color-surface);flex:0 0 57px;align-items:center;gap:10px;padding:0 18px;display:flex}.location{align-items:center;gap:7px;min-width:0;display:flex;overflow:hidden}.location-name{text-overflow:ellipsis;white-space:nowrap;flex:0 auto;min-width:0;font-weight:500;overflow:hidden}.crumb{text-overflow:ellipsis;white-space:nowrap;min-width:2.5em;min-height:26px;color:var(--color-meta);background:0 0;border:0;border-radius:6px;flex:0 4 auto;padding:2px 4px;font-weight:400;display:block;overflow:hidden}.crumb:hover{background:var(--color-hover);color:var(--color-ink)}.crumb-sep{color:var(--color-control-border);flex:none}.topbar-actions{align-items:center;gap:10px;margin-left:auto;display:flex}.command-trigger{border:1px solid var(--color-hairline);background:var(--color-surface);min-height:32px;color:var(--color-meta);border-radius:8px;padding:4px 9px;font-size:12px;font-weight:400}.command-trigger:hover{background:var(--color-well)}kbd{border:1px solid var(--color-hairline);min-width:20px;font:11px/1.5 var(--font-ui);color:var(--color-meta);border-radius:4px;justify-content:center;align-items:center;padding:1px 5px;display:inline-flex}.connection{white-space:nowrap;color:var(--color-meta);align-items:center;gap:6px;font-size:12px;display:flex}.status-dot{background:var(--color-offline);border-radius:50%;flex:none;width:6px;height:6px;display:inline-block}.live .status-dot,.status-dot.live{background:var(--color-verified)}.offline .status-dot{background:var(--color-amber)}.agent-toggle{border:1px solid var(--color-accent);background:var(--color-accent);color:#fff;border-radius:8px;gap:6px;min-height:32px;padding:4px 12px 4px 10px;font-size:12.5px;font-weight:600}.agent-toggle:hover{border-color:var(--color-accent-hover);background:var(--color-accent-hover)}.agent-toggle[aria-expanded=true]{border-color:var(--color-accent);background:var(--color-accent-soft);color:var(--color-accent-strong)}.read-only{background:var(--color-well);border-radius:4px;align-items:center;gap:4px;padding:2px 6px;font-size:11px;display:flex}.content-row{flex:1;min-height:0;display:flex;position:relative}.main{flex:1;min-width:0;overflow:auto}.main:focus{outline:none}.workspace-main{flex-direction:column;display:flex;overflow:hidden}.workspace-tools{border-bottom:1px solid var(--color-hairline);align-items:center;gap:14px;min-height:48px;padding:9px 16px;display:flex}.workspace-tools>.text-button svg{transform:rotate(180deg)}.workspace-question{white-space:nowrap;text-overflow:ellipsis;flex:1;min-width:0;font-size:13px;overflow:hidden}.view-menu{flex:none;position:relative}.view-menu summary{border-radius:6px;align-items:center;gap:6px;padding:6px 8px;font-size:12px;display:flex}.view-menu summary:hover{background:var(--color-hover)}.view-menu>div{z-index:15;border:1px solid var(--color-hairline);background:#fff;border-radius:9px;min-width:220px;padding:6px;position:absolute;top:100%;right:0;box-shadow:0 8px 28px #20392b1a}.view-menu button{background:0 0;border:0;justify-content:flex-start;width:100%}.offline-bar,.inline-error{background:var(--color-amber-soft);color:var(--color-amber-text);align-items:center;gap:12px;padding:12px 18px;display:flex}.offline-bar p,.inline-error p{overflow-wrap:anywhere;flex:1;min-width:0}.inline-error{border-radius:7px;font-size:13px}.loading-state{color:var(--color-meta);justify-content:center;align-items:center;gap:12px;padding:80px 24px;display:flex}.loading-dot{background:var(--color-accent);border-radius:50%;width:8px;height:8px;animation:1.2s ease-in-out infinite alternate breathe}@keyframes breathe{to{opacity:.25}}.loading-inline{color:var(--color-meta);padding:12px 0}.home,.project-page,.page-section{width:100%;max-width:1160px;margin:0 auto;padding:44px clamp(20px,4vw,56px) 72px}.home-column{flex-direction:column;gap:20px;display:flex}.home-header,.page-heading{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:16px 24px;display:flex}.home-header h1,.page-heading h1{letter-spacing:-1px;font-size:30px}.page-heading p{color:var(--color-meta);margin-top:7px;font-size:13px}.home-actions{flex-wrap:wrap;gap:8px;display:flex}.home-actions button{min-height:36px}.home-toolbar{align-items:center;gap:12px;display:flex}.search-field{border:1px solid var(--color-hairline);color:var(--color-meta);background:var(--color-surface);border-radius:9px;flex-direction:row;align-items:center;gap:8px;padding:0 11px;font-weight:400;display:flex}.search-field:focus-within{border-color:var(--color-accent)}.search-field input{background:0 0;border:0;outline:none;padding:9px 0}.project-search{width:min(320px,100%)}.project-list{border:1px solid var(--color-hairline);background:var(--color-surface);border-radius:14px;flex-direction:column;display:flex;overflow:hidden}.project-row{border:0;border-bottom:1px solid var(--color-divider);text-align:left;border-radius:0;justify-content:flex-start;align-items:center;gap:14px;min-height:76px;padding:14px 18px;font-weight:400;display:flex}.project-row:last-child{border-bottom:0}.project-row:hover{background:var(--color-well)}.project-row:active{background:var(--color-hover)}.project-row:focus-visible{outline-offset:-3px}.project-symbol{background:var(--color-well);width:44px;height:44px;color:var(--color-muted);border-radius:12px;flex:none;place-content:center;display:grid}.project-symbol.moss{background:var(--color-hue-moss);color:var(--color-hue-moss-ink)}.project-symbol.iris{background:var(--color-hue-iris);color:var(--color-hue-iris-ink)}.project-symbol.sky{background:var(--color-hue-sky);color:var(--color-hue-sky-ink)}.project-symbol.clay{background:var(--color-hue-clay);color:var(--color-hue-clay-ink)}.project-symbol.rose{background:var(--color-hue-rose);color:var(--color-hue-rose-ink)}.project-row-name{overflow-wrap:anywhere;flex-direction:column;flex:1;gap:3px;min-width:0;display:flex}.project-row-name strong{font-size:15px}.project-row-name small{color:var(--color-meta);text-overflow:ellipsis;white-space:nowrap;font-size:12.5px;overflow:hidden}.project-row-time{color:var(--color-meta);white-space:nowrap;flex:none;font-size:12.5px}.project-row-chevron{color:var(--color-control-border);flex:none;display:flex}.project-row:hover .project-row-chevron{color:var(--color-muted)}.home-empty{text-align:center;min-height:min(58vh,480px);color:var(--color-muted);flex-direction:column;justify-content:center;align-items:center;gap:12px;padding:40px 24px;display:flex}.empty-symbol{border:1px solid var(--color-hairline);background:var(--color-surface);width:58px;height:58px;color:var(--color-accent);border-radius:16px;place-content:center;display:grid}.home-empty h2,.empty-state h3{color:var(--color-ink);font-size:17px}.home-empty p{max-width:360px}.home-empty .home-actions{justify-content:center;margin-top:6px}.empty-state{text-align:center;color:var(--color-muted);border:1px solid var(--color-hairline);background:var(--color-canvas);border-radius:9px;flex-direction:column;align-items:center;gap:14px;padding:56px 28px;display:flex}.empty-state p{max-width:340px}.empty-state.compact{background:0 0;border:0;padding:40px 24px}.home-note{color:var(--color-meta)}.project-page{flex-direction:column;gap:30px;display:flex}.empty-project{text-align:center;flex-direction:column;justify-content:center;align-items:center;gap:12px;min-height:min(54vh,460px);padding:32px 24px;display:flex}.empty-project h2{font-size:17px}.empty-actions{flex-wrap:wrap;justify-content:center;gap:8px;margin-top:6px;display:flex}.empty-actions button{min-height:36px}.project-question{border:1px solid var(--color-hairline);background:var(--color-surface);border-radius:12px;align-items:center;gap:12px;padding:15px 18px;display:flex}.project-question svg{color:var(--color-accent);flex:none}.project-question h2{overflow-wrap:anywhere;font-size:16px;font-weight:500;line-height:1.5}.project-columns{grid-template-columns:minmax(0,1fr) minmax(230px,.45fr);gap:40px;display:grid}.project-columns.single{grid-template-columns:minmax(0,1fr)}.project-primary{flex-direction:column;gap:34px;min-width:0;display:flex}.project-section{flex-direction:column;gap:16px;min-width:0;display:flex}.section-heading{justify-content:space-between;align-items:center;gap:16px;display:flex}.section-heading h2,.project-section h2{font-size:15px}.section-heading .text-button{font-size:12px}.project-work{margin-bottom:28px}.work-session>header{justify-content:space-between;align-items:start;gap:16px;display:flex}.work-session header p{color:var(--color-muted);margin:6px 0 0;font-size:12px}.work-session header button{flex-shrink:0}.work-sessions{gap:16px;min-width:0;display:grid}.work-session{border:1px solid var(--color-hairline);background:var(--color-surface);overflow-wrap:anywhere;border-radius:8px;min-width:0;padding:18px}.work-session h3{margin:0;font-size:14px;line-height:1.5}.session-progress{overflow-wrap:anywhere;font-size:13px;line-height:1.6}.session-title{margin:12px 0 4px;font-weight:500}.session-caption{color:var(--color-muted);margin:12px 0 6px;font-size:12px}.session-plan ol{gap:8px;margin:0;padding:0;list-style:none;display:grid}.session-plan li{grid-template-columns:18px minmax(0,1fr);gap:6px;display:grid}.session-plan li[data-status=completed]{color:var(--color-muted)}.session-plan li[data-status=in_progress]>span:first-child{color:var(--color-accent)}.session-usage,.session-basis,.work-native-note,.work-references{color:var(--color-muted);font-size:12px}.session-basis summary{cursor:pointer}.session-basis p{margin:8px 0}.work-native-note{line-height:1.6}.work-native-note button{margin-left:8px}.work-files{overflow-wrap:anywhere;min-width:0}.work-files small{color:var(--color-muted);margin-top:4px;display:block}.work-files details{min-width:0;font-size:12px}.work-files button{white-space:normal;text-align:left}.conversation-progress{border-top:1px solid var(--color-divider);padding:12px 16px;font-size:12px}@media (width<=600px){.work-session>header{flex-direction:column;align-items:stretch}.work-session{padding:14px}}.result-list,.agent-notes,.health-list{margin:0;padding:0;list-style:none}.file-symbol{background:var(--color-well);border:1px solid var(--color-hairline);width:38px;height:38px;color:var(--color-muted);border-radius:10px;flex:none;place-content:center;display:grid}.result-row{border:0;border-bottom:1px solid var(--color-divider);text-align:left;border-radius:0;align-items:center;gap:12px;width:100%;padding:15px 0;font-weight:400;display:flex}.result-name{overflow-wrap:anywhere;flex-direction:column;flex:1;gap:3px;min-width:0;display:flex}.result-name small,.result-state{color:var(--color-meta);font-size:12px}.result-state{text-align:right;max-width:110px}.project-recent{border-left:1px solid var(--color-hairline);min-width:0;padding-left:28px}.activity-list{flex-direction:column;display:flex}button.activity-row{border:0;border-bottom:1px solid var(--color-divider);text-align:left;border-radius:0;justify-content:flex-start;gap:12px;width:100%;padding:16px 4px;font-weight:400}.activity-symbol{background:var(--color-well);width:32px;height:32px;color:var(--color-meta);border-radius:50%;flex:none;place-content:center;display:grid}.activity-symbol.active{color:var(--color-accent);background:var(--color-accent-soft)}.activity-name{overflow-wrap:anywhere;flex-direction:column;flex:1;gap:4px;min-width:0;display:flex}.activity-name small{color:var(--color-meta)}.project-recent .activity-row{flex-wrap:wrap}.project-recent .activity-name{flex-basis:calc(100% - 48px)}.project-recent .activity-row>.state{margin-left:44px}.project-recent .activity-row>svg{margin-left:auto}.project-recent .activity-name strong{font-size:13px}.quiet-empty{color:var(--color-meta);padding:24px 0}.agent-notes li{border-bottom:1px solid var(--color-divider);padding:14px 0}.agent-notes p{color:var(--color-muted);padding-top:5px}.agent-notes small{color:var(--color-meta);margin-top:7px;display:block}.state{white-space:nowrap;color:var(--color-muted);align-items:center;gap:7px;font-size:12px;display:inline-flex}.state:before{content:"";background:currentColor;border-radius:50%;width:6px;height:6px}.state.failed,.state.fail{color:var(--color-failed)}.state.active,.state.pending{color:var(--color-accent)}.state.unknown,.state.unobserved,.state.warn{color:var(--color-amber-text)}.state.good,.state.ok{color:var(--color-verified-text)}.state.superseded,.state.declared,.state.completed{color:var(--color-muted)}.document-list{flex-wrap:wrap;gap:9px;display:flex}.document-link{border-color:var(--color-hairline);justify-content:flex-start;gap:9px;min-width:0}.document-link>span{overflow-wrap:anywhere}.unsaved-dot{background:var(--color-amber);border-radius:50%;width:6px;height:6px}.file-toolbar{justify-content:space-between;align-items:center;gap:18px;display:flex}.folder-location{overflow-wrap:anywhere;align-items:center;gap:8px;min-width:0;display:flex}.folder-location svg{transform:rotate(180deg)}.file-toolbar .search-field{max-width:260px}.file-table-wrap{overflow-x:auto}.file-table{border-collapse:collapse;text-align:left;width:100%}.file-table th{color:var(--color-meta);background:var(--color-canvas);padding:10px 12px;font-size:12px;font-weight:500}.file-table th:first-child{border-radius:6px 0 0 6px}.file-table th:nth-child(3){border-radius:0 6px 6px 0}.file-table td{border-bottom:1px solid var(--color-divider);color:var(--color-meta);padding:4px 12px;font-size:12px}.file-table td:first-child{width:72%}.file-open{text-align:left;width:100%;min-height:42px;color:var(--color-ink);overflow-wrap:anywhere;background:0 0;border:0;justify-content:flex-start;padding:8px 0;font-size:14px}.file-open svg{color:var(--color-meta)}.settings-sections{flex-direction:column;gap:40px;max-width:760px;display:flex}.source-folders{flex-direction:column;align-items:flex-start;gap:10px;width:100%;display:flex}.source-folders ul{border:1px solid var(--color-hairline);border-radius:10px;width:100%;margin:0;padding:0;list-style:none;overflow:hidden}.source-folders li{border-bottom:1px solid var(--color-divider);align-items:center;gap:12px;padding:12px 14px;display:flex}.source-folders li:last-child{border-bottom:0}.source-folder-name{overflow-wrap:anywhere;flex-direction:column;flex:1;gap:3px;min-width:0;display:flex}.source-folder-name small{color:var(--color-meta)}.source-empty{border:1px dashed var(--color-control-border);width:100%;color:var(--color-meta);border-radius:10px;align-items:center;gap:10px;padding:14px;display:flex}.source-add{background:var(--color-surface)}.health-list li{border-bottom:1px solid var(--color-divider);align-items:flex-start;gap:16px;padding:16px 0;display:flex}.health-list .state{padding-top:3px}.health-list small{color:var(--color-meta)}.inspector-pane{border-left:1px solid var(--color-hairline);background:#fff;flex-direction:column;flex:0 0 340px;min-height:0;display:flex;overflow:auto}.side-panel{flex-grow:0;flex-shrink:0;position:relative;overflow:visible}.side-panel-body{flex-direction:column;flex:1;min-height:0;display:flex;overflow:auto}.panel-resizer{z-index:25;cursor:col-resize;touch-action:none;width:10px;position:absolute;top:0;bottom:0;left:-5px}.panel-resizer:after{content:"";width:2px;position:absolute;top:0;bottom:0;left:4px}.panel-resizer:hover:after,.panel-resizer:focus-visible:after,body[data-resizing] .panel-resizer:after{background:var(--color-accent)}.panel-resizer:focus-visible{outline:none}.panel-resizer:focus-visible:after{width:4px;left:3px}body[data-resizing=col]{cursor:col-resize;-webkit-user-select:none;user-select:none}.drawer-heading{border-bottom:1px solid var(--color-hairline);flex:none;justify-content:space-between;align-items:center;padding:14px 18px;display:flex}.drawer-heading h2{font-size:14px}.agent-slot{min-height:0}.agent-request{border-bottom:1px solid var(--color-hairline);flex-direction:column;gap:12px;padding:20px;display:flex}.agent-request textarea{min-height:100px;font-size:13px;line-height:1.6}.agent-request-actions{align-items:center;gap:12px;display:flex}.agent-request-actions>span{color:var(--color-meta);flex:1;font-size:11px}.agent-request-actions button{font-size:12px}.agent-request>p{color:var(--color-muted);font-size:12px}.conversation{flex-direction:column;flex:1 0 auto;min-height:0;font-size:14px;display:flex;container-type:inline-size}.conversation-head{z-index:5;border-bottom:1px solid var(--color-divider);background:var(--color-surface);align-items:center;gap:4px;min-width:0;padding:7px 8px;display:flex;position:sticky;top:0}.conversation-head .icon-button{border-radius:8px;width:30px;height:30px;min-height:30px}.conversation-head .icon-button:hover{background:var(--color-hover);color:var(--color-ink)}.conversation-switch{flex:1;min-width:0;display:flex;position:relative}.conversation-title{max-width:100%;min-height:32px;color:var(--color-ink);text-align:left;background:0 0;border:0;border-radius:8px;align-items:center;gap:7px;padding:4px 8px;font-weight:400;display:inline-flex}.conversation-title:hover:not(:disabled),.conversation-title[aria-expanded=true]{background:var(--color-hover)}.conversation-title:disabled{opacity:1;cursor:default}.conversation-title>svg{flex:none}.conversation-title strong{text-overflow:ellipsis;white-space:nowrap;min-width:0;font-size:13.5px;font-weight:600;overflow:hidden}.conversation-title-chevron{color:var(--color-meta);flex:none;transition:transform .15s;display:inline-flex;transform:rotate(90deg)}.conversation-title[aria-expanded=true] .conversation-title-chevron{transform:rotate(-90deg)}.menu-pop.history-pop{width:min(340px,100cqw - 16px);max-height:min(60vh,440px);top:calc(100% + 4px);bottom:auto}.history-list{overscroll-behavior:contain;flex-direction:column;gap:1px;min-height:0;display:flex;overflow-y:auto}.history-row{width:100%;min-height:0;color:var(--color-ink);text-align:left;background:0 0;border:0;border-radius:8px;align-items:flex-start;gap:10px;padding:8px 10px;font-weight:400;display:flex}.history-row:hover,.history-row:focus-visible{background:var(--color-hover);outline:none}.history-row>svg,.history-mark{flex:none;margin-top:2px}.history-mark{background:var(--color-well);border-radius:4px;width:14px;height:14px}.history-text{flex-direction:column;flex:1;gap:1px;min-width:0;display:flex}.history-text strong{text-overflow:ellipsis;white-space:nowrap;font-size:13px;font-weight:500;overflow:hidden}.history-row[aria-current=true] .history-text strong{font-weight:600}.history-text span{color:var(--color-meta);font-size:11.5px}.history-check{color:var(--color-accent);flex:none;margin-top:2px;display:inline-flex}.conversation-intro{flex-direction:column;gap:24px;padding:28px 20px 16px;display:flex}.intro-lead{flex-direction:column;align-items:flex-start;gap:6px;display:flex}.intro-lead>svg{margin-bottom:6px}.intro-lead p{letter-spacing:-.1px;overflow-wrap:anywhere;font-size:16px;font-weight:600;line-height:1.4}.intro-lead small{color:var(--color-meta);font-size:13px}.conversation-turns{flex-direction:column;gap:30px;margin:0;padding:18px 20px 16px;list-style:none;display:flex}.turn{flex-direction:column;gap:12px;min-width:0;display:flex}.turn-person{align-self:flex-end;max-width:85%}.turn-person p{background:var(--color-well);white-space:pre-wrap;overflow-wrap:anywhere;border-radius:16px 16px 5px;padding:9px 14px;line-height:1.55}.turn-note{color:var(--color-meta);font-size:12px}.turn-work>summary{min-width:0;max-width:100%;color:var(--color-muted);cursor:pointer;border-radius:7px;align-items:center;gap:7px;margin-left:-8px;padding:3px 8px;font-size:13px;list-style:none;display:inline-flex}.turn-work>summary::-webkit-details-marker{display:none}.turn-work>summary:after{content:"";opacity:.6;border-bottom:1.5px solid;border-right:1.5px solid;flex:none;width:5px;height:5px;margin:0 2px 3px 1px;transform:rotate(45deg)}.turn-work[open]>summary:after{margin-bottom:-2px;transform:rotate(-135deg)}.turn-work>summary:hover{background:var(--color-hover);color:var(--color-ink)}.turn-work-label{flex:none;font-weight:500}.turn-work-said{text-overflow:ellipsis;white-space:nowrap;min-width:0;color:var(--color-meta);overflow:hidden}.turn-work-body{border-left:2px solid var(--color-divider);flex-direction:column;gap:10px;margin:8px 0 0 1px;padding-left:14px;display:flex}.turn-work-body .turn-text{color:var(--color-muted);font-size:13.5px}.turn-text-block{min-width:0}.turn-text{overflow-wrap:anywhere;line-height:1.65}.turn-text>*+*{margin-top:10px}.turn-text p{margin:0}.turn-text>.md-heading:not(:first-child){margin-top:20px}.turn-text>.md-heading+*{margin-top:6px}.md-heading{font-size:14px;font-weight:600;line-height:1.45}.md-heading[data-level="1"],.md-heading[data-level="2"]{letter-spacing:-.2px;font-size:15.5px}.md-list{flex-direction:column;gap:4px;margin:0;padding-left:22px;display:flex}.md-list li{overflow-wrap:anywhere;padding-left:2px}.md-list li::marker{color:var(--color-meta)}ul.md-list{list-style-type:disc}ol.md-list{list-style-type:decimal}.md-code-block{background:var(--color-well);border-radius:10px;overflow:hidden}.md-code-head{min-height:28px;color:var(--color-meta);justify-content:space-between;align-items:center;gap:8px;padding:2px 4px 0 12px;font-size:11.5px;display:flex}.md-code{white-space:pre;margin:0;padding:2px 12px 12px;font-size:12px;line-height:1.55;overflow:auto}.md-table{border:1px solid var(--color-hairline);background:linear-gradient(to right, var(--color-surface) 40%, transparent) left / 28px 100% no-repeat local, linear-gradient(to left, var(--color-surface) 40%, transparent) right / 28px 100% no-repeat local, radial-gradient(farthest-side at 0 50%, color-mix(in srgb, var(--color-ink) 16%, transparent), transparent) left / 12px 100% no-repeat scroll, radial-gradient(farthest-side at 100% 50%, color-mix(in srgb, var(--color-ink) 16%, transparent), transparent) right / 12px 100% no-repeat scroll;border-radius:10px;max-width:100%;overflow-x:auto}.md-table table{border-collapse:collapse;font-variant-numeric:tabular-nums;width:100%;font-size:13px;line-height:1.5}.md-table th,.md-table td{border-bottom:1px solid var(--color-divider);text-align:left;vertical-align:top;overflow-wrap:normal;word-break:normal;min-width:4.5em;padding:7px 12px}.md-table td{-webkit-hyphens:none;hyphens:none}.md-table th{color:var(--color-meta);font-size:12px;font-weight:500}.md-table tbody tr:last-child td{border-bottom:0}.md-inline{background:var(--color-well);border-radius:5px;padding:1px 5px;font-size:.86em}.turn-text blockquote{border-left:3px solid var(--color-hairline);color:var(--color-muted);margin:0;padding-left:12px}.md-rule{border:0;border-top:1px solid var(--color-divider);margin:14px 0}.copy-button{width:26px;height:26px;min-height:26px;color:var(--color-meta);border-radius:6px}.copy-button:hover{background:var(--color-hover);color:var(--color-ink)}.stream-caret{vertical-align:-.12em;background:var(--color-accent);border-radius:1px;width:.45em;height:.95em;margin-left:2px;animation:1s step-end infinite stream-caret;display:inline-block}@keyframes stream-caret{50%{opacity:0}}.turn-error{color:var(--color-failed);font-size:13px}.turn-foot{min-height:26px;color:var(--color-meta);flex-wrap:wrap;align-items:center;gap:4px 10px;margin-top:-4px;font-size:12px;display:flex}.turn-ending{overflow-wrap:anywhere;align-items:center;gap:7px;min-width:0;display:inline-flex}.turn-ending.failed{color:var(--color-failed)}.turn-ending.running{color:var(--color-accent-strong)}.turn-ending.unknown{color:var(--color-amber-text)}.turn-meta{gap:6px;min-width:0;display:inline-flex}.turn-meta>*+:before{content:"·";margin-right:6px}.turn-model{text-overflow:ellipsis;white-space:nowrap;min-width:0;max-width:200px;overflow:hidden}.turn-foot .copy-button{margin-left:-4px}.turn-foot .text-button{font-size:12px}.turn-elapsed{font-variant-numeric:tabular-nums}.turn-spinner{border:1.5px solid;border-right-color:#0000;border-radius:50%;flex:none;width:11px;height:11px;animation:.9s linear infinite turn-spin}@keyframes turn-spin{to{transform:rotate(360deg)}}.turn-permission{border:1px solid var(--color-amber-line);background:var(--color-amber-soft);border-radius:12px;flex-direction:column;gap:8px;padding:12px 14px;display:flex}.permission-caption{color:var(--color-amber-text);align-items:center;gap:6px;font-size:12px;font-weight:600;display:flex}.permission-caption>span{background:var(--color-amber);border-radius:50%;flex:none;width:6px;height:6px}.permission-title{overflow-wrap:anywhere;margin:0;font-weight:500}.turn-permission pre{border:1px solid var(--color-amber-line);background:var(--color-surface);white-space:pre-wrap;overflow-wrap:anywhere;border-radius:8px;max-height:160px;margin:0;padding:8px 10px;font-size:12px}.turn-permission>div{flex-wrap:wrap;gap:6px;display:flex}.turn-choices{flex-direction:column;gap:2px;margin:0;padding:0;list-style:none;display:flex}.turn-choice{min-width:0;color:var(--color-meta);align-items:center;gap:7px;font-size:12.5px;line-height:1.6;display:flex}.turn-choice>svg{color:var(--color-verified);flex:none}.turn-choice-option{text-overflow:ellipsis;white-space:nowrap;min-width:0;max-width:60%;color:var(--color-muted);flex:0 auto;overflow:hidden}.turn-choice-what{text-overflow:ellipsis;white-space:nowrap;min-width:0;font-family:var(--font-mono);flex:1;font-size:11.5px;overflow:hidden}.activity-list{flex-direction:column;margin:0;padding:0;list-style:none;display:flex}.activity-row{min-width:0}.activity-row>p,.activity-row>details>summary{min-width:0;color:var(--color-muted);border-radius:6px;align-items:center;gap:8px;margin:0 0 0 -6px;padding:3px 6px;font-size:13px;line-height:1.5;display:flex}.activity-row>details>summary{cursor:pointer;list-style:none}.activity-row>details>summary::-webkit-details-marker{display:none}.activity-row>details>summary:hover{background:var(--color-hover)}.activity-icon{width:16px;height:16px;color:var(--color-meta);flex:none;place-content:center;display:inline-grid}.activity-icon.requested{color:var(--color-accent);animation:1.4s ease-in-out infinite activity-breathe}.activity-icon.rejected,.activity-icon.failed{color:var(--color-failed)}.activity-icon.unknown{color:var(--color-amber)}@keyframes activity-breathe{50%{opacity:.35}}.activity-verb{flex:none}.activity-target{text-overflow:ellipsis;white-space:nowrap;min-width:0;color:var(--color-ink);overflow:hidden}.activity-row>details>summary:after{content:"";opacity:0;border-bottom:1.5px solid;border-right:1.5px solid;flex:none;width:5px;height:5px;margin-left:auto;transform:rotate(45deg)}.activity-row>details[open]>summary:after{transform:rotate(-135deg)}.activity-row>details>summary:hover:after,.activity-row>details>summary:focus-visible:after,.activity-row>details[open]>summary:after{opacity:.6}.activity-target.path,.activity-target.command,.activity-target.operation,.activity-target.query{font-family:var(--font-mono);font-size:12px}.activity-target.command,.activity-target.packages{white-space:normal;-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.activity-row[data-action=execute]>p,.activity-row[data-action=execute]>details>summary{align-items:flex-start}.activity-row[data-action=execute] .activity-icon,.activity-row[data-action=execute]>details>summary:after{margin-top:.2em}.activity-flag{color:var(--color-failed);flex:none;font-size:12px}.activity-flag.unknown{color:var(--color-amber-text)}.activity-duration{color:var(--color-meta);font-variant-numeric:tabular-nums;flex:none;margin-left:auto;font-size:12px}.activity-row>details>summary:has(.activity-duration):after{margin-left:0}.activity-details .activity-printed{grid-column:1/-1}.activity-output{background:var(--color-surface);border:1px solid var(--color-hairline);max-height:240px;font:11px/1.45 var(--font-mono);white-space:pre;color:var(--color-ink);border-radius:6px;margin:0;padding:6px 8px;overflow:auto}.activity-cut{color:var(--color-meta);margin-top:4px;display:block}.activity-details{background:var(--color-well);border-radius:8px;grid-template-columns:76px minmax(0,1fr);gap:5px 10px;margin:4px 0 6px 18px;padding:8px 12px;font-size:12px;display:grid}.activity-details dt{color:var(--color-meta)}.activity-details dd{overflow-wrap:anywhere;margin:0}.activity-details code{font-size:11.5px}.activity-group{color:var(--color-meta);font-size:13px}.activity-group>summary{cursor:pointer;border-radius:6px;align-items:flex-start;gap:6px;max-width:100%;margin-left:-6px;padding:3px 6px;list-style:none;display:inline-flex}.activity-group>summary::-webkit-details-marker{display:none}.activity-group>summary:before{content:"";opacity:.65;border-bottom:1.5px solid;border-right:1.5px solid;flex:none;width:5px;height:5px;margin:.55em 5px 0 3px;transform:rotate(-45deg)}.activity-group[open]>summary:before{transform:rotate(45deg)}.activity-group>summary:hover{color:var(--color-ink);background:var(--color-hover)}.activity-group .activity-list{margin-top:2px}.activity-live .activity-row>p,.activity-live .activity-row>details>summary{color:var(--color-muted)}@keyframes activity-pulse{0%{box-shadow:0 0 #1e6b5245}70%{box-shadow:0 0 0 5px #1e6b5200}to{box-shadow:0 0 #1e6b5200}}.conversation-composer{z-index:2;background:var(--color-surface);flex-direction:column;gap:6px;margin-top:auto;padding:6px 14px 10px;display:flex;position:sticky;bottom:0}.conversation-composer [role=alert]{color:var(--color-failed);flex-wrap:wrap;align-items:center;gap:8px;padding:0 4px;font-size:12px;display:flex}.composer-box{border:1px solid var(--color-control-border);background:var(--color-surface);cursor:text;border-radius:18px;flex-direction:column;gap:4px;padding:11px 8px 8px 14px;display:flex;box-shadow:0 6px 20px #141e190f}.composer-box:focus-within{border-color:var(--color-hairline-strong);box-shadow:0 0 0 3px var(--color-accent-soft), 0 6px 20px #141e190f}.composer-box textarea{resize:none;background:0 0;border:0;border-radius:0;width:100%;min-height:0;max-height:240px;padding:0 6px 2px 0;font-size:14px;line-height:1.55;display:block}.composer-box textarea:focus-visible{outline:none}.composer-bar{cursor:default;align-items:center;gap:8px;min-width:0;display:flex}.composer-bar .composer-settings{flex:1;min-width:0}.composer-bar .settings-menu{margin-left:-8px}.composer-bar .setting-chip{min-height:28px;color:var(--color-muted);background:0 0;border-color:#0000;padding:3px 8px}.composer-bar .setting-chip:hover:not(:disabled){background:var(--color-hover);color:var(--color-ink)}.composer-bar .summary-model{flex:none;max-width:clamp(72px,100cqw - 216px,240px)}.composer-bar .summary-group{text-overflow:ellipsis;max-width:140px;color:var(--color-meta);flex:none;overflow:hidden}.composer-send{background:var(--color-accent);color:#fff;border:0;border-radius:50%;flex:none;width:32px;height:32px;min-height:32px;margin-left:auto;padding:0}.composer-send:hover:not(:disabled){background:var(--color-accent-hover)}.composer-send:disabled{opacity:1;background:var(--color-well);color:var(--color-meta)}.composer-send.stop{background:var(--color-ink)}.composer-send.stop:disabled{background:var(--color-well)}.stop-square{background:currentColor;border-radius:2px;width:10px;height:10px}.jump-latest{border:1px solid var(--color-hairline);background:var(--color-surface);width:32px;height:32px;min-height:32px;color:var(--color-muted);border-radius:50%;padding:0;position:absolute;top:-42px;left:50%;transform:translate(-50%);box-shadow:0 4px 14px #141e191f}.jump-latest.unseen:after{content:"";border:2px solid var(--color-surface);background:var(--color-accent);border-radius:50%;width:9px;height:9px;position:absolute;top:-1px;right:-1px}.conversation-plan{font-size:12px;position:relative}.conversation-plan>summary{min-width:0;color:var(--color-meta);cursor:pointer;border-radius:6px;align-items:center;gap:12px;margin:0 -2px;padding:2px 6px;list-style:none;display:flex}.conversation-plan>summary::-webkit-details-marker{display:none}.conversation-plan>summary:hover,.conversation-plan[open]>summary{color:var(--color-ink)}.strip-plan{text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0;overflow:hidden}.plan-state{background:var(--color-verified);border-radius:50%;flex:none;width:6px;height:6px}.plan-state.in_progress{background:var(--color-accent);animation:1.4s ease-out infinite activity-pulse}.plan-state.pending{background:var(--color-control-border)}.plan-state.completed{background:var(--color-verified)}.strip-plan .plan-state{vertical-align:1px;margin-right:6px;display:inline-block}.strip-usage{font-variant-numeric:tabular-nums;flex:none;align-items:center;gap:6px;display:inline-flex}.strip-usage>span+span:before{content:"·";margin-right:6px}.context-ring circle{fill:none;stroke-width:2.4px}.context-ring circle:first-child{stroke:var(--color-hairline)}.context-ring circle+circle{stroke:var(--color-accent);stroke-linecap:round}.context-ring.high circle+circle{stroke:var(--color-amber)}.session-popover{z-index:30;border:1px solid var(--color-hairline);background:var(--color-surface);border-radius:12px;flex-direction:column;gap:14px;width:min(320px,100% + 8px);max-height:min(60vh,420px);padding:14px 16px 12px;font-size:13px;display:flex;position:absolute;bottom:calc(100% + 8px);right:-4px;overflow:auto;box-shadow:0 12px 32px #141e1929}.session-popover section{flex-direction:column;gap:6px;display:flex}.session-popover section+section{border-top:1px solid var(--color-divider);padding-top:12px}.session-row{color:var(--color-muted);justify-content:space-between;align-items:baseline;gap:12px;display:flex}.session-row strong{color:var(--color-ink);font-variant-numeric:tabular-nums;font-weight:600}.session-bar{background:var(--color-well);border-radius:3px;height:6px;display:block;overflow:hidden}.session-bar>span{background:var(--color-accent);border-radius:3px;height:100%;display:block}.session-bar.high>span{background:var(--color-amber)}.session-note{color:var(--color-meta);font-variant-numeric:tabular-nums;font-size:12px}.session-switch{width:100%;color:var(--color-ink);font:inherit;text-align:left;cursor:pointer;background:0 0;border:0;justify-content:space-between;align-items:center;gap:12px;padding:0;font-weight:600;display:flex}.session-switch:focus-visible{border-radius:4px}.strip-describe{color:var(--color-meta);font-variant-numeric:tabular-nums;white-space:nowrap;margin-left:6px}.session-plan-list ol{flex-direction:column;gap:6px;margin:2px 0 0;padding:0;list-style:none;display:flex}.session-plan-list li{overflow-wrap:anywhere;align-items:baseline;gap:8px;line-height:1.45;display:flex}.session-plan-list li .plan-state{position:relative;top:-1px}.session-plan-list li[data-status=completed]{color:var(--color-meta)}.session-source{border-top:1px solid var(--color-divider);color:var(--color-meta);padding-top:10px;font-size:11.5px}.session-popover>*+.session-describe{border-top:1px solid var(--color-divider);padding-top:12px}@container (width<=420px){.strip-tokens,.composer-bar .summary-group{display:none}.conversation-turns{padding-left:16px;padding-right:16px}}.context-agent-where{font-size:12px}.context-section{border-bottom:1px solid var(--color-hairline);flex-direction:column;gap:14px;padding:20px;font-size:13px;display:flex}.context-section p{color:var(--color-meta);overflow-wrap:anywhere}.context-agent-list{flex-direction:column;gap:20px;margin:0;padding:0;list-style:none;display:flex}.context-agent-list li{flex-direction:column;align-items:flex-start;gap:6px;display:flex}.context-agent-list span{color:var(--color-meta);font-size:12px}.context-slot:empty{display:none}.away{background:var(--color-canvas);place-content:center;min-height:100dvh;padding:24px;display:grid}.standalone{border:1px solid var(--color-hairline);background:#fff;border-radius:14px;flex-direction:column;gap:20px;max-width:480px;padding:40px;display:flex}.standalone .wordmark{color:var(--color-accent);font-size:22px}.standalone h1{font-size:24px}.standalone p{color:var(--color-muted)}.away-detail{overflow-wrap:anywhere;font-size:12px}.away-note{border-top:1px solid var(--color-hairline);padding-top:16px;font-size:12px}dialog{color:var(--color-ink);border:1px solid var(--color-hairline);background:#fff;border-radius:12px;max-width:calc(100% - 32px);max-height:calc(100dvh - 40px);box-shadow:0 20px 80px #18352729}dialog::backdrop{background:#13231c45}.commands{width:620px;margin-top:min(18vh,160px);padding:0}.command-filter{border-bottom:1px solid var(--color-hairline);align-items:center;gap:10px;padding:14px 18px;display:flex}.command-filter input{box-shadow:none;border:0;outline:none;padding:4px 0;font-size:16px}.command-list{max-height:400px;padding:7px;overflow-y:auto}.command-heading{color:var(--color-meta);padding:12px 10px 5px;font-size:11px;display:block}.command-item{cursor:pointer;border-radius:6px;align-items:center;gap:12px;padding:10px;display:flex}.command-item[aria-selected=true]{background:var(--color-selected)}.command-label{flex:1}.command-meta{text-overflow:ellipsis;white-space:nowrap;max-width:180px;color:var(--color-meta);font-size:12px;overflow:hidden}.command-danger{color:var(--color-failed)}.command-none{color:var(--color-meta);padding:30px 15px}.command-footer{border-top:1px solid var(--color-hairline);color:var(--color-meta);justify-content:space-between;align-items:center;gap:12px;padding:12px 18px;font-size:11px;display:flex}.command-keys{flex:none;align-items:center;gap:5px;display:flex}.confirm{width:420px;padding:28px}.confirm p{color:var(--color-muted);margin-top:12px}.dialog-actions{justify-content:flex-end;gap:8px;margin-top:24px;display:flex}.sheet{border-radius:16px;width:520px;padding:0}.sheet::backdrop{-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);background:#16241d33}.sheet-head{justify-content:space-between;align-items:center;gap:12px;padding:22px 24px 0;display:flex}.sheet-head h2{letter-spacing:-.3px;font-size:20px}.sheet-body{flex-direction:column;gap:20px;padding:18px 24px 24px;display:flex}.sheet-body h2{font-size:22px}.field{flex-direction:column;gap:8px;display:flex}.field>span{font-weight:500}.field-hint{color:var(--color-meta);font-size:12px}.project-problem,[aria-invalid=true]{color:var(--color-failed)}[aria-invalid=true]{border-color:var(--color-failed)}.sheet-footer{border-top:1px solid var(--color-hairline);background:var(--color-canvas);border-radius:0 0 16px 16px;justify-content:flex-end;align-items:center;gap:8px;padding:14px 24px;display:flex}.sheet-hint{min-width:0;color:var(--color-meta);flex:1;font-size:12px}.drawer,.context-sheet{border-radius:0;height:100dvh;max-height:100dvh;margin:0;padding:0;position:fixed;top:0;bottom:0}.drawer{background:var(--color-canvas);width:min(310px,90vw);padding:22px 14px 14px}.drawer[open]{flex-direction:column;display:flex}.drawer-close{position:absolute;top:18px;right:12px}.context-sheet{width:min(400px,100vw);max-width:100vw;left:auto;right:0}.context-sheet[open]{flex-direction:column;display:flex;overflow:auto}.run-dialog{width:820px;padding:20px}.run-dialog-close{z-index:1;position:absolute;top:10px;right:10px}@media (width>=1600px){.project-nav{flex-basis:248px}}@media (width<=1150px){.project-nav{flex-basis:216px}.agent-chip-what{display:none}.project-columns{grid-template-columns:minmax(0,1fr);gap:32px}.project-recent{border-left:0;border-top:1px solid var(--color-hairline);padding-top:26px;padding-left:0}.project-recent .activity-row{flex-wrap:nowrap}.project-recent .activity-name{flex-basis:auto}.project-recent .activity-row>.state{margin-left:0}.inspector-pane{z-index:20;width:340px;position:absolute;top:0;bottom:0;right:0;box-shadow:-12px 0 32px #193a2614}.command-trigger>span{display:none}}@media (width<=767px){.app-body>.project-nav{display:none}.topbar{gap:8px;min-height:54px;padding:0 10px}.topbar-actions{gap:6px}.connection-label,.command-trigger kbd,.crumb,.crumb-sep{display:none}.command-trigger{padding:5px}.agent-toggle{padding:5px 8px}.home,.project-page,.page-section{padding:28px 20px}h1{font-size:25px}.home-header,.page-heading{flex-wrap:wrap;gap:20px}.page-heading>div{width:100%}.project-row{gap:12px;min-height:68px;padding:14px}.project-symbol{border-radius:10px;width:38px;height:38px}.project-row-time{display:none}.project-row-name small{font-size:11px}.project-row-name strong{font-size:14px}.project-question{padding:16px}.project-question h2{font-size:16px}.result-state{display:none}.file-toolbar{flex-wrap:wrap;gap:12px}.file-toolbar .search-field{width:100%;max-width:none}.file-table th:nth-child(2),.file-table td:nth-child(2){display:none}.file-table td{padding-inline:8px}.file-open{font-size:13px}button.activity-row{gap:8px}.activity-name strong{font-size:12px}.activity-name small,.activity-row>.state{font-size:11px}.project-recent .activity-row>svg{display:none}.workspace-tools{gap:8px;padding:6px 10px}.agent-chip{max-width:44px;padding:4px 10px}.agent-chip strong,.agent-chip-what{display:none}.studio-bar{gap:6px;padding:6px 10px}.follow-toggle{padding:4px 9px}.studio-with-notes.notes-open>.studio-main{display:none}.studio-with-notes.notes-open>.notes-panel{border-right:0;flex:1;width:auto}.workspace-question,.command-footer .command-keys{display:none}.run-dialog{padding:12px}}@media (prefers-reduced-motion:reduce){*,:before,:after{scroll-behavior:auto!important;transition:none!important;animation:none!important}}.external-reply{white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px}.rho-review{width:100%;max-width:1160px;margin:0 auto;padding:44px clamp(20px,4vw,56px) 72px;line-height:1.6}.rho-review section,.review-reply,.review-question{border-top:1px solid var(--border);margin:24px 0;padding-top:18px}.rho-review h1{letter-spacing:-1px;font-size:30px;line-height:1.25}.rho-review h2{margin-bottom:12px;font-size:17px}.rho-review h3{font-size:15px}.review-choose{flex-wrap:wrap;gap:18px;display:flex}.rho-review select{min-width:180px;max-width:100%;padding:7px}.review-choose label{flex:1;gap:5px;min-width:0;display:grid}.rho-review button,.review-overlay button{font:inherit;border:1px solid var(--border);background:var(--surface);color:inherit;cursor:pointer;border-radius:6px;padding:6px 11px}.rho-review button:disabled{opacity:.5}.rho-review button+button{margin-left:8px}.review-draft{border:1px solid var(--border);border-radius:8px;height:160px;margin:12px 0;overflow:hidden}.review-history{background:var(--surface-muted,#f4f6f5);border-radius:8px;margin:12px 0;padding:12px 16px}.review-history p{white-space:pre-wrap}.review-fields{flex-wrap:wrap;gap:14px;margin:10px 0;display:flex}.review-table-scroll{max-width:100%;margin:15px 0;overflow:auto}.review-table-scroll table{border-collapse:collapse;font-variant-numeric:tabular-nums;white-space:nowrap}.review-table-scroll td,.review-table-scroll th{text-align:right;border-bottom:1px solid var(--border);padding:8px 12px}.review-table-scroll tr[data-changed=true]{background:#fff6df}.review-table-scroll th:first-child{text-align:left}.review-overlay{background:var(--surface,#fff);z-index:1000;border:1px solid var(--border);border-radius:12px;padding:24px;position:fixed;inset:5vh 8vw;overflow:auto;box-shadow:0 0 0 100vmax #0005}.snapshot-view{min-width:0}.snapshot-view img{max-width:100%;height:auto}.snapshot-view pre{white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px}.snapshot-view p{color:var(--text-muted);font-size:12px}@media (width<=768px){.rho-review{padding:16px}.review-overlay{padding:16px;inset:12px}.review-choose{display:block}.review-choose label{margin:12px 0}.rho-review select{width:100%}}.review-code-diff{white-space:pre-wrap;overflow-wrap:anywhere;background:var(--surface-muted,#f5f7f5);max-height:480px;padding:14px;font-size:13px;overflow:auto}.review-code-diff del{background:#ffe0e0;text-decoration:none}.review-code-diff ins{background:#d5f4dd;text-decoration:none}.review-fields label{flex-direction:row;align-items:center;gap:6px;display:flex}.rho-comparison summary{cursor:pointer;color:var(--text-muted)}.rho-comparison>p{margin:8px 0}.review-overlay::backdrop{background:#14261e59}dialog.review-overlay{border:1px solid var(--border);color:inherit;width:calc(100% - 32px);max-width:1100px;max-height:calc(100dvh - 32px);margin:auto;inset:0;overflow:auto}.rho-review>header p{color:var(--color-meta);margin-top:7px;font-size:13px}.rho-review .review-threads,.rho-review .review-results{border-top:0;margin:30px 0 0;padding-top:0}.rho-review .review-threads h2,.rho-review .review-results h2{margin-bottom:12px;font-size:15px}.review-threads ul,.review-results ul{margin:0;padding:0;list-style:none}.rho-review .review-thread{border:0;border-bottom:1px solid var(--color-divider);text-align:left;background:0 0;border-radius:0;flex-direction:column;align-items:flex-start;gap:2px;width:100%;padding:11px 14px;font-weight:400;display:flex}.rho-review .review-thread:hover{background:var(--color-hover)}.rho-review .review-thread[aria-pressed=true]{background:var(--color-selected);box-shadow:inset 2px 0 0 var(--color-accent)}.review-thread span{overflow-wrap:anywhere;color:var(--color-ink)}.review-thread small,.review-result small{color:var(--color-meta);font-size:12px}.review-results ul{grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:10px;display:grid}.rho-review .review-result{border:1px solid var(--color-hairline);background:var(--color-surface);text-align:left;border-radius:10px;flex-direction:column;align-items:flex-start;gap:2px;width:100%;min-width:0;padding:12px 14px;font-weight:400;display:flex}.rho-review .review-result:hover{border-color:var(--color-hairline-strong);background:var(--color-hover)}.review-result strong{text-overflow:ellipsis;white-space:nowrap;max-width:100%;font-size:13.5px;font-weight:550;overflow:hidden}.rho-review .review-version{color:var(--color-meta);text-align:left;flex-flow:wrap;justify-content:flex-start;align-self:flex-start;align-items:center;gap:8px;margin-top:14px;font-size:12.5px;font-weight:400;display:flex}.rho-review .review-version select{border:1px solid var(--color-control-border);background:var(--color-surface);min-width:220px;color:var(--color-ink);font:inherit;border-radius:8px;padding:5px 8px}.script-flow{height:100%;min-height:0;container-type:inline-size}.script-flow-split{grid-template-columns:minmax(0,1fr);height:100%;min-height:0;display:grid}.script-flow-split.open{grid-template-columns:minmax(0,1fr) minmax(280px,42%)}.script-flow-editor{min-width:0;height:100%;min-height:0}.script-flow-side{border-left:1px solid var(--color-divider);background:var(--color-canvas);flex-direction:column;gap:8px;min-width:0;min-height:0;padding:10px 12px 14px;display:flex;overflow-y:auto}.cm-flow-here{background:var(--color-accent-soft);box-shadow:inset 3px 0 0 var(--color-accent)}.cm-flow-from{background:var(--color-hue-sky);box-shadow:inset 3px 0 0 var(--color-hue-sky-ink)}.cm-flow-into{background:var(--color-hue-clay);box-shadow:inset 3px 0 0 var(--color-hue-clay-ink)}@container (width<=640px){.script-flow-split.open{grid-template-rows:minmax(0,1fr) minmax(0,1fr);grid-template-columns:minmax(0,1fr)}.script-flow-side{border-top:1px solid var(--color-divider);border-left:0}}.explore-in{color:var(--color-muted);white-space:nowrap;align-items:center;gap:0;font-size:12.5px;font-weight:500;display:inline-flex}span.explore-in>svg{margin:0 5px 0 8px}.explore-in-label{margin-right:1px}.explore-in button.explore-in-language{min-height:28px;color:var(--color-accent-strong);background:0 0;border:0;border-radius:6px;padding:4px 6px;font-size:12.5px;font-weight:600}.explore-in button.explore-in-language:hover:not(:disabled){background:var(--color-hover)}button.explore-in-one{background:0 0;border:0;border-radius:6px;gap:5px;min-height:28px;padding:4px 8px}button.explore-in-one:hover:not(:disabled){background:var(--color-hover);color:var(--color-ink)}.page-add{text-align:left;flex-direction:column;gap:10px;min-width:280px;max-height:min(70vh,560px);display:flex;overflow-y:auto}.page-add>*,.page-add-kind>*{flex-shrink:0}.page-add button{width:100%;min-height:32px;color:var(--color-ink);text-align:left;background:0 0;border:0;border-radius:6px;justify-content:flex-start;align-items:center;gap:8px;padding:5px 8px;font-size:13px;font-weight:400;display:flex}.page-add button:hover{background:var(--color-hover)}.page-add button>span{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.page-add button>small{max-width:40%;color:var(--color-meta);text-overflow:ellipsis;white-space:nowrap;flex:0 auto;margin-left:auto;font-size:11.5px;overflow:hidden}.page-add button.page-add-notebook{border:1px solid var(--color-hairline-strong);align-items:flex-start;padding:9px 10px}.page-add-notebook>svg{color:var(--color-accent-strong);margin-top:2px}.page-add-notebook>span{white-space:normal;flex-direction:column;gap:1px;display:flex}.page-add-notebook small{color:var(--color-meta);font-size:12px}.page-add-kind{flex-direction:column;display:flex}.page-add-kind h3{color:var(--color-meta);letter-spacing:.3px;text-transform:uppercase;padding:0 8px 3px;font-size:11.5px;font-weight:650}.page-add button.page-add-all{color:var(--color-accent-strong);font-size:12px;font-weight:600}.page-add-note{color:var(--color-meta);padding:0 8px;font-size:12px}.page-empty .page-add{width:min(560px,100%);max-height:none;margin-top:8px}.nav-new{color:var(--color-meta)}.nav-new:hover{color:var(--color-accent-strong)}.notebook-section{max-width:1280px;container-type:inline-size}.plugin-page{flex-direction:column;gap:32px;display:flex}.plugin-page-heading p{color:var(--color-meta);max-width:620px;margin-top:8px}.plugin-group{flex-direction:column;gap:14px;display:flex}.plugin-group>h2{color:var(--color-meta);font-size:13px;font-weight:500}.plugin-grid{grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:14px;display:grid}.plugin-card{text-align:left;border:1px solid var(--color-hairline);border-radius:10px;justify-content:flex-start;gap:16px;min-height:100px;padding:20px;font-weight:400}.plugin-symbol{width:42px;height:42px;color:var(--color-accent);background:var(--color-accent-soft);border-radius:10px;flex:none;place-content:center;display:grid}.plugin-symbol.large{border-radius:14px;width:56px;height:56px}.plugin-symbol.large svg{width:28px;height:28px}.plugin-symbol.small{border-radius:5px;width:20px;height:20px}.plugin-symbol.small svg{width:14px;height:14px}.plugin-symbol-text{font-size:23px;font-weight:600}.plugin-symbol.small .plugin-symbol-text{font-size:13px}.plugin-card-copy{overflow-wrap:anywhere;flex-direction:column;flex:1;gap:6px;min-width:0;display:flex}.plugin-card-copy strong{font-size:16px}.plugin-tagline,.plugin-card-state{color:var(--color-meta);font-size:12px}.plugin-chevron{color:var(--color-meta);flex:none}.plugin-card.absent{opacity:.75}.plugin-back{color:var(--color-accent);background:0 0;border:0;align-self:flex-start;padding:3px 0}.plugin-detail{max-width:960px}.plugin-detail-heading{align-items:center;gap:20px;display:flex}.plugin-detail-title{flex:1;justify-content:space-between;align-items:center;gap:16px;display:flex}.plugin-detail-title .plugin-tagline{margin-top:5px;font-size:14px}.plugin-installed{color:var(--color-meta);align-items:center;gap:5px;font-size:12px;display:inline-flex}.plugin-installed svg{color:var(--color-verified)}.plugin-notice{background:var(--color-well);border:1px solid var(--color-hairline);border-radius:8px;padding:18px 20px}.plugin-notice p{color:var(--color-meta);margin-top:5px}.plugin-about{color:var(--color-accent);background:0 0;border:0;margin-top:10px;padding:4px 0}.plugin-prompts{background:var(--color-canvas);border:1px solid var(--color-hairline);border-radius:9px;padding:20px 22px}.plugin-prompts ul,.plugin-entry-section ul{margin:0;padding:0;list-style:none}.plugin-prompts li{justify-content:space-between;align-items:center;gap:18px;padding:10px 0;display:flex}.plugin-prompts li+li{border-top:1px solid var(--color-hairline)}.plugin-prompts li>span{flex:1;min-width:0}.plugin-prompts button{flex:none;min-height:28px;font-size:12px}.plugin-prompts-note{color:var(--color-meta);margin-top:10px;font-size:12px}.plugin-copy-status{color:var(--color-accent);font-size:12px}.plugin-copy-status:empty{display:none}.plugin-description{color:var(--color-muted);line-height:1.8}.plugin-entry-section h2,.plugin-information h2{border-bottom:1px solid var(--color-hairline);padding-bottom:12px}.plugin-count{color:var(--color-meta);margin-left:6px;font-size:12px;font-weight:400}.plugin-entry-section li{border-bottom:1px solid var(--color-divider);align-items:center;gap:14px;padding:16px 0;display:flex}.plugin-entry-symbol{color:var(--color-meta);flex:none}.plugin-entry-copy{overflow-wrap:anywhere;flex-direction:column;flex:1;gap:4px;min-width:0;display:flex}.plugin-entry-name{font-weight:500}.plugin-entry-description{color:var(--color-meta);font-size:12px}.plugin-markers{flex-wrap:wrap;gap:5px;display:flex}.plugin-marker{background:var(--color-well);color:var(--color-meta);border-radius:4px;padding:2px 6px;font-size:11px}.plugin-view-state,.plugin-view-note{color:var(--color-meta);font-size:12px}.plugin-view-note{margin-top:12px}.plugin-information dl{grid-template-columns:120px minmax(0,1fr);gap:15px;padding-top:18px;font-size:13px}.plugin-link-row{display:contents}.plugin-needs,.plugin-dependency{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.plugin-dependency>span{color:var(--color-meta);font-size:12px}.plugin-needs button{min-height:30px;font-size:12px}.plugin-use{align-items:center;gap:7px;display:flex}@media (width<=767px){.plugin-grid{grid-template-columns:minmax(0,1fr)}.plugin-detail-heading,.plugin-detail-title{flex-direction:column;align-items:flex-start}.plugin-prompts{padding:15px}.plugin-prompts li{align-items:flex-start}.plugin-entry-section li{flex-wrap:wrap}.plugin-information dl{grid-template-columns:85px minmax(0,1fr)}}.access-card{border:1px solid var(--color-hairline);background:var(--color-surface);border-radius:12px;flex-direction:column;gap:12px;padding:14px;display:flex}.access-head{align-items:center;gap:11px;min-width:0;display:flex}.access-head>button{flex:none;margin-left:auto}.access-mark{background:var(--color-well);width:32px;height:32px;color:var(--color-muted);border-radius:50%;flex:none;justify-content:center;align-items:center;display:inline-flex}.access-card.live .access-mark{background:var(--color-verified-soft);color:var(--color-verified-text)}.access-card.offline{border-color:var(--color-amber-line)}.access-card.offline .access-mark{background:var(--color-amber-soft);color:var(--color-amber-text)}.access-card.connecting .access-mark svg{animation:1.4s linear infinite access-turn}@keyframes access-turn{to{transform:rotate(360deg)}}@media (prefers-reduced-motion:reduce){.access-card.connecting .access-mark svg{animation:none}}.access-title{flex-direction:column;gap:1px;min-width:0;display:flex}.access-title strong{color:var(--color-ink);font-size:14px;font-weight:600}.access-title small{color:var(--color-meta);font-size:12px;line-height:1.4}.context-section .access-foot{border-top:1px solid var(--color-divider);color:var(--color-meta);padding-top:10px;font-size:12px;line-height:1.5}.context-section .access-problem{background:var(--color-amber-soft);color:var(--color-amber-text);border-radius:8px;padding:8px 10px;font-size:12px}.context-section .access-scope{background:var(--color-well);color:var(--color-muted);border-radius:8px;align-items:flex-start;gap:8px;padding:8px 10px;font-size:12.5px;line-height:1.45;display:flex}.access-scope>svg{color:var(--color-meta);flex:none;margin-top:1px}.access-scope strong{color:var(--color-ink);font-weight:600}.access-can{flex-direction:column;gap:7px;margin:0;padding:0;font-size:13px;line-height:1.4;list-style:none;display:flex}.access-can li{color:var(--color-ink);align-items:flex-start;gap:9px;display:flex}.access-can li>svg{color:var(--color-verified);flex:none;margin-top:2px}.access-can li.not,.access-can li.not>svg{color:var(--color-meta)}.access-leave{border:1px solid var(--color-hairline);background:var(--color-surface);min-height:30px;color:var(--color-failed);border-radius:8px;align-self:flex-start;gap:7px;padding:5px 11px;font-size:12.5px}.access-leave:hover{border-color:var(--color-failed);background:var(--color-hover)}.context-slot{border-bottom:1px solid var(--color-hairline);--border:var(--color-hairline);--surface:var(--color-surface);--surface-muted:var(--color-well);--text:var(--color-ink);--text-muted:var(--color-meta);padding:8px 4px}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Z as e}from"./index-
|
|
1
|
+
import{Z as e}from"./index-BHQIaDsx.js";var t=[[`question`,/^(questions?|aims?|问题|研究问题)$/i],[`method`,/^(data\s*(&|and)\s*methods?|data|methods?|数据与方法|数据和方法|方法)$/i],[`finding`,/^(key\s+results?|results?|findings?|关键结果|主要结果|结果)$/i],[`choice`,/^((analysis\s+)?choices?|decisions?|选择|分析选择)$/i],[`file`,/^(files?|outputs?|文件|输出)$/i],[`todo`,/^(to\s*-?\s*dos?|next\s+steps?|待办(事项)?)$/i]],n=e=>t.find(([,t])=>t.test(e.replace(/[*_`::]/g,``).trim()))?.[0]??null;function r(e){let t=e.trim().replace(/^<|>$/g,``);if(!t||t.startsWith(`#`)||/^[a-z][a-z0-9+.-]*:/i.test(t)||(t=t.replace(/[?#].*$/,``),t.endsWith(`/`)))return null;try{t=decodeURIComponent(t)}catch{}return t=t.replace(/^\.?\//,``).replace(/\/+$/,``),!t||t.split(`/`).some(e=>e===`..`||e===`.git`||e===`.rho`)?null:t}var i=/(!?)\[([^\]]*)\]\(\s*(<[^>]+>|[^)\s]+)(?:\s+"[^"]*")?\s*\)/g,a=/`([\w@.\/-]+\.[A-Za-z0-9]{1,6})`/g,o=/\.(csv|tsv|txt|json|jsonl|ya?ml|toml|md|qmd|rmd|ipynb|html?|pdf|png|jpe?g|gif|svg|webp|tiff?|py|r|jl|sh|js|mjs|ts|sql|xlsx?|parquet|feather|rds|rdata|h5|h5ad|hdf5|npy|npz|pkl|log|gz|zip|bam|sam|vcf|bed|gtf|gff3?|fasta|fa|fastq|fq|mtx|nc)$/i;function s(e){let t=[],n=e=>{let n=r(e);n&&!t.includes(n)&&t.push(n)};for(let t of e.matchAll(i))n(t[3]);for(let t of e.replace(i,` `).matchAll(a))(t[1].includes(`/`)||o.test(t[1]))&&n(t[1]);return t}function c(e){let t=e.replace(i,(e,t,n)=>n).replace(/^\s*(?:[-*+]|\d+[.)])\s+(\[[ xX]\]\s+)?/gm,``),n=[];return t.replace(/`([^`]*)`/g,(e,t)=>`\0`+(n.push(t)-1)+`\0`).replace(/(\*{1,3})(?=\S)([^*]+?)(?<=\S)\1/g,`$2`).replace(/(^|[^\w])(_{1,3})(?=\S)([^_]+?)(?<=\S)\2(?![\w])/g,`$1$3`).replace(/\u0000(\d+)\u0000/g,(e,t)=>n[Number(t)]).replace(/\s+/g,` `).trim()}var l=e=>e.charAt(0).toUpperCase()+e.slice(1);function u(e){let t=/^(.{2,48}?)\s*(?:=|:)\s+(\S[\s\S]*)$/.exec(e);return!t||t[1].split(/\s+/).length>6||/[.!?]\s/.test(t[1])?{topic:null,rest:e}:{topic:t[1],rest:l(t[2])}}function d(e,t){let n=e.trim(),r=``,i=e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);for(let e=!0;e;){e=!1;for(let a of t){let t=RegExp(`[\\s,;]*\\(?`+i(a)+`\\)?([.;]?)$`).exec(n);t&&(n=n.slice(0,t.index),r||=t[1],e=!0)}}return n=n.replace(/[\s,;]+$/,``),r&&!/[.!?;:]$/.test(n)?n+r:n}var f=/^(\s*)([-*+]|\d+[.)])\s+(.*)$/,p=/^\s*!\[([^\]]*)\]\(\s*(<[^>]+>|[^)\s]+)(?:\s+"[^"]*")?\s*\)\s*$/,m=/^(alternatives?|instead|other(wise)?|或者|备选|替代)\b\s*[::-]?\s*/i,h=/(?<=[.;!?)\]—])\s+(?=(?:\*\*|__)?(?:alternatives?|instead|otherwise|备选|替代)(?:\*\*|__)?\s*[::])/i;function g(t){let i=t.split(`
|
|
2
2
|
`),a=e(t);return a.map((e,t)=>{let o=t+1<a.length?a[t+1].line:_(i,e.line),l=[],u=null,d=null,g=null,v=``,y=()=>{let e=d;if(d=null,!e)return;if(e.kind===`choice`&&!e.alternatives.length){let[t,...n]=v.split(h);n.length&&(v=t,e.alternatives=n.map(e=>({text:``,source:e,links:[]})))}let t=e.kind===`choice`?v:e.source;e.text=c(t),e.links=s(t);for(let t of e.alternatives??[])t.text=c(t.source.replace(/^\s*(?:[-*+]|\d+[.)])\s+/,``)).replace(m,``),t.links=s(t.source);if(e.text||e.links.length)return l.push(e),l.length-1};for(let t=e.line+1;t<o;t++){let e=i[t],a=/^\s*(`{3,}|~{3,})/.exec(e);if(a){y(),g=g===null?a[1][0]:g===a[1][0]?null:g;continue}if(g!==null)continue;let o=/^#{3,6}\s+(.+?)\s*#*\s*$/.exec(e);if(o){y(),u=n(o[1]);continue}if(!u||/^\s*<!--.*-->\s*$/.test(e))continue;if(!e.trim()){d&&!f.test(i[t+1]??``)&&!/^\s+\S/.test(i[t+1]??``)&&y();continue}let s=p.exec(e);if(s){let n=d?.kind===`finding`,i=y(),a=r(s[2]);a&&l.push({kind:`figure`,text:s[1].trim(),source:e.trim(),line:t,links:[a],...n&&i!==void 0?{of:i}:{}});continue}let c=f.exec(e);if(c&&c[1].length<=1){y();let n=/^\[([ xX])\]\s+/.exec(c[3]);d={kind:u===`todo`||n&&u!==`choice`?`todo`:u,text:``,source:e.trim(),line:t,links:[],...n?{done:n[1]!==` `}:{}},d.kind===`choice`&&(d.alternatives=[],v=e.trim())}else if(d&&d.kind===`choice`){let t=d.alternatives;c?t.push({text:``,source:e.trim(),links:[]}):t.length?t.at(-1).source+=`
|
|
3
3
|
`+e.trim():v+=`
|
|
4
4
|
`+e.trim(),d.source+=`
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/graph-
|
|
2
|
-
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{n as t,t as n}from"./react-Dss-ouuy.js";import{a as r,n as i,r as a,s as o}from"./home-CCbP6kS-.js";import{r as s}from"./markdown-0ngRuTpW.js";import{C as c,L as l,N as u,n as d,s as f}from"./canvas-BXhC8RDZ.js";import{$ as p,At as m,C as h,Dt as g,Et as ee,Lt as te,Nt as ne,Ot as _,Pt as re,Rt as v,Tt as ie,Ut as ae,Vt as oe,_ as se,ct as y,dt as b,et as x,g as S,i as C,jt as ce,kt as le,lt as w,nt as T,qt as ue,st as E,tt as D,ut as de,v as O,yt as k}from"./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/graph-hS2kvHTI.js","assets/rolldown-runtime-XKyaHtl9.js","assets/react-Dss-ouuy.js","assets/markdown-0ngRuTpW.js","assets/canvas-BXhC8RDZ.js","assets/home-CCbP6kS-.js","assets/index-BHQIaDsx.js","assets/index-Cj1_iqyK.css","assets/work-turns-Co0C71rJ.js","assets/snapshot-CAxBYPvV.js","assets/timeline-events-DmX1BCh3.js","assets/choices-DU9kHlyQ.js","assets/notes-meaning-DdPbtNzJ.js","assets/choices-DLah50GC.css","assets/graph-BYKN84J3.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{n as t,t as n}from"./react-Dss-ouuy.js";import{a as r,n as i,r as a,s as o}from"./home-CCbP6kS-.js";import{r as s}from"./markdown-0ngRuTpW.js";import{C as c,L as l,N as u,n as d,s as f}from"./canvas-BXhC8RDZ.js";import{$ as p,At as m,C as h,Dt as g,Et as ee,Lt as te,Nt as ne,Ot as _,Pt as re,Rt as v,Tt as ie,Ut as ae,Vt as oe,_ as se,ct as y,dt as b,et as x,g as S,i as C,jt as ce,kt as le,lt as w,nt as T,qt as ue,st as E,tt as D,ut as de,v as O,yt as k}from"./index-BHQIaDsx.js";import{c as fe,d as pe,f as me,l as he,t as ge,u as _e}from"./facts-BMO6V3-3.js";import{t as ve}from"./work-turns-Co0C71rJ.js";import{n as A,t as ye}from"./choices-DU9kHlyQ.js";import{t as j,u as M}from"./skills-work-Cj0W6b-I.js";import{t as N}from"./explore-in-8Q5ftt-E.js";import{n as be,r as P}from"./answer-board-CBkGbSLD.js";var F=e(n(),1),I=t(),L={running:`Answering`,completed:`Last message answered`,failed:`Last message failed`,stopped:`Stopped`,unknown:`Outcome unknown`,retained:`Retained native activity`,idle:`No messages`};function R(e,t,n,r){let[i,a]=(0,F.useState)(null),[o,s]=(0,F.useState)(``),[c,l]=(0,F.useState)(!1),u=(0,F.useRef)(null),d=(0,F.useRef)(null);return(0,F.useEffect)(()=>{if(!n)return;let i=!0,o=!1,c=!1,f=new AbortController,p=async()=>{if(o)c=!0;else{o=!0,l(!0);try{let n=await e.call(`project.work.read`,{projectId:t.project.id},f.signal);i&&(a(n),s(``),r(n.sessions.length>0))}catch(e){i&&s(e instanceof Error?e.message:`Could not read project work.`)}finally{o=!1,i&&(l(!1),c&&(c=!1,m()))}}},m=()=>{u.current||=setTimeout(()=>{u.current=null,p()},750)};d.current=m,p();let h=setInterval(()=>{document.hidden||m()},1500);return()=>{clearInterval(h),i=!1,f.abort(),u.current&&clearTimeout(u.current),u.current=null,d.current=null}},[e,t.project.id,n]),(0,F.useEffect)(()=>{d.current?.()},[t.cursor]),{work:i,problem:o,reading:c,refresh:()=>d.current?.()}}function xe({state:e,openConversation:t,openActivity:n,boarded:r=!1}){let{work:i,problem:a,reading:o,refresh:s}=e,c=i?.sessions.filter(e=>!e.conversationId||(e.pendingPermissions??0)>0||!r&&e.state===`running`)??[];return!c.length&&!a?null:(0,I.jsxs)(`section`,{className:`project-section project-work`,"aria-label":`Project work`,children:[(0,I.jsxs)(`div`,{className:`section-heading`,children:[(0,I.jsx)(`h2`,{children:`Work progress`}),(0,I.jsx)(`button`,{className:`text-button`,disabled:o,onClick:s,children:o?`Reading…`:`Refresh`})]}),a&&(0,I.jsxs)(`p`,{role:`alert`,children:[a,` Retained observations remain below.`]}),c.length>0&&(0,I.jsx)(`div`,{className:`work-sessions`,children:c.map(e=>(0,I.jsxs)(`article`,{className:`work-session`,children:[(0,I.jsxs)(`header`,{children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`h3`,{children:e.title}),(0,I.jsxs)(`p`,{children:[L[e.state]??e.state,` · `,e.source===`acp`?e.agent===`codex`?`Codex · ACP`:`Claude Code · ACP`:e.source===`external-acp`?`External ACP`:e.source===`native-transcript`?`Native transcript`:`Claude CLI`]})]}),e.conversationId?(0,I.jsx)(`button`,{onClick:()=>t(e.conversationId),children:`Continue conversation`}):e.source===`external-acp`?(0,I.jsx)(`span`,{className:`muted`,children:`Input stays in the original client`}):(0,I.jsx)(`button`,{onClick:n,children:`View activity`})]}),e.observation?(0,I.jsx)(g,{observation:e.observation}):e.source===`native-transcript`?(0,I.jsxs)(`p`,{className:`muted`,children:[`Input stays in the original window. Retained through cursor `,e.cursor,`; `,e.droppedEvents??0,` events dropped.`]}):(0,I.jsx)(`p`,{className:`muted`,children:`No session projection retained yet.`}),e.source===`external-acp`&&(0,I.jsxs)(I.Fragment,{children:[(e.pendingPermissions??0)>0&&(0,I.jsx)(`p`,{role:`status`,children:`Waiting for a permission choice in the original client.`}),e.lastMessage&&(0,I.jsxs)(`details`,{children:[(0,I.jsx)(`summary`,{children:`Latest reply · read only`}),(0,I.jsx)(`p`,{className:`external-reply`,children:e.lastMessage}),(e.omittedMessageChars??0)>0&&(0,I.jsx)(`small`,{children:`Later reply text was not retained.`})]})]})]},e.id))})]})}var z=e=>/\.(png|jpe?g|svg|gif|pdf|tiff?|webp)$/i.test(e)?`image`:/\.(csv|tsv|xlsx?|parquet|rds|rda|feather)$/i.test(e)?`table`:/\.(R|r|py|sh|sql|js|ts|jl|Rmd|qmd)$/.test(e)?`code`:/\.(md|txt)$/i.test(e)?`document`:`file`;function Se({work:e,openFile:t,openActivity:n}){if(!e||!e.files.length&&!e.omitted.fileReferences)return null;let r=[...e.files].sort((e,t)=>t.references.length-e.references.length),i=Math.max(1,...r.map(e=>e.references.length)),a=e.omitted.fileReferences;return(0,I.jsxs)(`section`,{className:`project-section touched-files`,"aria-labelledby":`touched-title`,children:[(0,I.jsxs)(`div`,{className:`section-heading`,children:[(0,I.jsx)(`h2`,{id:`touched-title`,children:`Files the Agent used`}),(0,I.jsx)(`span`,{className:`touched-unit`,children:`Tool calls`})]}),(0,I.jsx)(`ul`,{className:`touched-list`,children:r.map((n,r)=>{let a=n.path.split(`/`),o=a.pop(),c=a.join(`/`),l=n.state===`observed`,u=[...new Set(n.references.map(t=>e.sessions.find(e=>e.id===t.session)?.title??t.session))];return(0,I.jsx)(`li`,{children:(0,I.jsxs)(`button`,{className:`touched-row`+(r===0?` top`:``),"aria-label":n.path,title:`${n.path}\nNamed in ${u.join(`, `)}`,disabled:!l,onClick:()=>t(n.path),children:[(0,I.jsx)(s,{name:z(o),size:16,stroke:1.6}),(0,I.jsxs)(`span`,{className:`touched-name`,children:[(0,I.jsx)(`strong`,{children:o}),(0,I.jsx)(`small`,{children:l?c||`Project folder`:n.state.replaceAll(`-`,` `)}),(0,I.jsx)(`i`,{"aria-hidden":`true`,style:{width:`${Math.max(4,n.references.length/i*100)}%`}})]}),(0,I.jsx)(`span`,{className:`touched-count`,children:n.references.length})]})},n.path)})}),a>0&&(0,I.jsxs)(`p`,{className:`touched-more`,children:[a,` more outside the project or past the limit`]}),e.native.state===`available`&&(0,I.jsxs)(`button`,{className:`text-button touched-native`,onClick:n,children:[`View native activity `,(0,I.jsx)(s,{name:`chevron`,size:12})]})]})}function Ce({work:e,openFile:t}){let n=e?.notes.path??`project-notes.md`;return(0,I.jsxs)(`button`,{className:`notes-card`,"aria-label":`Open shared notes`,onClick:()=>t(n),children:[(0,I.jsxs)(`span`,{className:`notes-sheet`,"aria-hidden":`true`,children:[(0,I.jsx)(`i`,{}),(0,I.jsx)(`i`,{}),(0,I.jsx)(`i`,{})]}),(0,I.jsxs)(`span`,{className:`notes-name`,children:[(0,I.jsx)(`strong`,{children:`Shared notes`}),(0,I.jsx)(`small`,{children:n})]}),(0,I.jsx)(s,{name:`chevron`,size:14})]})}var B=e=>({path:e.path,bytes:e.bytes,modifiedAt:e.modifiedAt,resource:e.resource?{...e.resource,kind:/\.(csv|tsv)$/i.test(e.path)?`table`:`file`}:void 0}),V={completed:`Answered`,failed:`Failed`,stopped:`Stopped`,running:`Working`,unknown:`Outcome unknown`};function H(e){let t=typeof e==`number`?e:typeof e==`string`&&/^-?\d+\.\d+(?:e[-+]?\d+)?$/i.test(e.trim())?Number(e):NaN;return Number.isFinite(t)?String(Number.isInteger(t)?t:Math.abs(t)>=1e5?Math.round(t):Number(t.toPrecision(4))):e==null?``:String(e)}function U({client:e,snapshot:t,node:n}){let[r,i]=(0,F.useState)(null),a=n.path+`@`+(n.resource?.version??n.modifiedAt);return(0,F.useEffect)(()=>{let r=!0;return S(e,t,B(n)).then(e=>{r&&i(e)}),()=>{r=!1}},[a]),r?r.kind===`image`?(0,I.jsx)(`img`,{className:`board-figure`,src:r.url,alt:n.title}):(0,I.jsx)(`span`,{className:`board-figure none`,children:r.kind===`none`?r.note:``}):(0,I.jsx)(`span`,{className:`board-figure loading`,"aria-hidden":`true`})}function W({client:e,snapshot:t,node:n,rows:r}){let[i,a]=(0,F.useState)(void 0),o=n.path+`@`+(n.resource?.version??n.modifiedAt);if((0,F.useEffect)(()=>{let i=!0;return se(e,t,B(n),r).then(e=>{i&&a(e)}),()=>{i=!1}},[o,r]),i===void 0)return(0,I.jsx)(`span`,{className:`board-table loading`,"aria-hidden":`true`});if(!i)return(0,I.jsx)(`p`,{className:`board-note`,children:`This table could not be read.`});let s=i.rows.slice(0,r);return(0,I.jsxs)(`div`,{className:`board-table-wrap`,children:[(0,I.jsxs)(`table`,{className:`board-table`,children:[(0,I.jsx)(`thead`,{children:(0,I.jsx)(`tr`,{children:i.columns.map(e=>(0,I.jsx)(`th`,{title:e,children:e},e))})}),(0,I.jsx)(`tbody`,{children:s.map((e,t)=>(0,I.jsx)(`tr`,{children:i.columns.map(t=>(0,I.jsx)(`td`,{title:e[t]===null||e[t]===void 0?``:String(e[t]),children:H(e[t])},t))},t))})]}),(0,I.jsxs)(`small`,{children:[i.total>s.length?`First ${s.length} of ${i.total.toLocaleString()} rows`:`${i.total.toLocaleString()} ${i.total===1?`row`:`rows`}`,i.width>i.columns.length?` · ${i.columns.length} of ${i.width} columns`:``]})]})}function we(e,t){let n=e.split(`
|
|
3
3
|
`),r=[],i=/\.py$/i.test(t),a=/\.[rR]$/.test(t);return n.forEach((e,t)=>{let n=/^#{1,3}\s*[-=#*]*\s*([A-Za-z0-9].{2,80}?)\s*[-=#*]*\s*$/.exec(e);i&&/^(?:async\s+)?(?:def|class)\s+\w+/.test(e)?r.push({line:t+1,text:e.replace(/\s*:\s*$/,``).replace(/^async\s+/,``)}):a&&/^[\w.]+\s*(?:<-|=)\s*function\s*\(/.test(e)?r.push({line:t+1,text:e.replace(/\s*\{\s*$/,``)}):n&&!/^#!/.test(e)&&!/^#\s*(?:TODO|NOTE|FIXME)\b/i.test(e)&&r.push({line:t+1,text:n[1]})}),{lines:n.length-+(n.at(-1)===``),marks:r}}function G({client:e,snapshot:t,node:n}){let[r,i]=(0,F.useState)(void 0),a=n.path+`@`+(n.resource?.version??n.modifiedAt);if((0,F.useEffect)(()=>{let r=!0;return O(e,t,B(n)).then(e=>{r&&i(e)}),()=>{r=!1}},[a]),r===void 0)return(0,I.jsx)(`span`,{className:`board-outline loading`,"aria-hidden":`true`});if(!r)return null;let{lines:o,marks:s}=we(r.text,n.path);return(0,I.jsxs)(`div`,{className:`board-outline`,children:[s.length>0&&(0,I.jsx)(`ol`,{children:s.slice(0,12).map(e=>(0,I.jsxs)(`li`,{children:[(0,I.jsx)(`span`,{children:e.line}),(0,I.jsx)(`code`,{children:e.text})]},e.line))}),(0,I.jsxs)(`small`,{children:[o.toLocaleString(),` lines`,r.cut?` (more than Rho read)`:``,s.length>12?` · ${s.length-12} more sections`:``]})]})}function K({client:e,snapshot:t,node:n,lines:r}){let[i,a]=(0,F.useState)(void 0),o=n.path+`@`+(n.resource?.version??n.modifiedAt);if((0,F.useEffect)(()=>{let r=!0;return O(e,t,B(n)).then(e=>{r&&a(e)}),()=>{r=!1}},[o]),i===void 0)return(0,I.jsx)(`span`,{className:`board-text loading`,"aria-hidden":`true`});if(!i)return null;let s=i.text;if(/\.json$/i.test(n.path)&&!i.cut)try{s=JSON.stringify(JSON.parse(s),null,2)}catch{}let c=s.replace(/\n$/,``).split(`
|
|
4
4
|
`);return(0,I.jsxs)(`div`,{className:`board-text`,children:[(0,I.jsx)(`pre`,{children:c.slice(0,r).join(`
|
|
5
5
|
`)}),(c.length>r||i.cut)&&(0,I.jsxs)(`small`,{children:[`First `,Math.min(r,c.length),` of `,i.cut?`more than `+c.length:c.length.toLocaleString(),` lines`]})]})}function q({node:e}){let t=e.outcome===`returned`&&(!e.end||/^exit 0\b/i.test(e.end));return(0,I.jsxs)(`details`,{className:`board-run`,children:[(0,I.jsxs)(`summary`,{children:[(0,I.jsxs)(`code`,{title:e.ran??e.command,children:[`$ `,P(e.ran??e.command??``)]}),(0,I.jsxs)(`span`,{className:`board-run-end`+(t?``:` problem`),children:[e.end??(e.outcome===`requested`?`Running`:`Returned`),e.durationMs?` · `+ae(e.durationMs):``]})]}),(0,I.jsx)(`pre`,{className:`board-run-full`,children:e.ran??e.command}),e.output?.text?(0,I.jsx)(`pre`,{ref:e=>{e&&(e.scrollTop=e.scrollHeight)},children:e.output.text}):(0,I.jsx)(`p`,{className:`board-note`,children:`The Agent reported no output for this command.`})]})}var Te=(e,t)=>e.length>t?e.slice(0,t-1).trimEnd()+`…`:e,J=e=>e instanceof Error?e.message:`The message could not be sent.`;function Ee({about:e,onSend:t,onCancel:n}){let[r,i]=(0,F.useState)(``),[a,o]=(0,F.useState)(!1),[s,c]=(0,F.useState)(``),l=(0,F.useRef)(null);(0,F.useEffect)(()=>{l.current?.focus()},[]);async function u(){if(r.trim()&&!a){o(!0),c(``);try{await t(r)}catch(e){c(J(e))}finally{o(!1)}}}return(0,I.jsxs)(`form`,{className:`board-ask-box`,onSubmit:e=>{e.preventDefault(),u()},onKeyDown:e=>{e.key===`Escape`&&n()},children:[e.kind===`passage`?(0,I.jsx)(`blockquote`,{children:e.text}):e.kind===`file`?(0,I.jsxs)(`p`,{className:`board-ask-about`,children:[`About `,(0,I.jsx)(`strong`,{children:e.title}),e.resource?` as this message left it`:``]}):(0,I.jsxs)(`p`,{className:`board-ask-about`,children:[(0,I.jsx)(`strong`,{children:`What needs to change?`}),` The Agent receives your words.`]}),(0,I.jsx)(`textarea`,{ref:l,rows:2,value:r,"aria-label":e.kind===`changes`?`What needs to change`:`Your question`,placeholder:e.kind===`changes`?`Say what is wrong or missing`:`What do you want to know or change?`,onChange:e=>i(e.target.value),onKeyDown:e=>{e.key===`Enter`&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),u())}}),s&&(0,I.jsx)(`p`,{className:`inline-error`,role:`alert`,children:s}),(0,I.jsxs)(`div`,{className:`board-ask-actions`,children:[(0,I.jsx)(`button`,{type:`button`,onClick:n,children:`Cancel`}),(0,I.jsx)(`button`,{type:`submit`,className:`primary`,disabled:a||!r.trim(),children:a?`Sending…`:e.kind===`changes`?`Send to the Agent`:`Ask the Agent`})]})]})}function De({text:e}){return(0,I.jsx)(I.Fragment,{children:e.split("`").map((e,t)=>t%2?(0,I.jsx)(`code`,{children:e},t):e)})}function Y({client:e,snapshot:t,item:n,onPath:r,onExplore:i,said:a,span:o,ask:c,holds:l}){let{node:u,role:d}=n,f=u.category===`figures`,p=/\.(csv|tsv)$/i.test(u.path??``),h=d===`run`?null:f?(0,I.jsx)(U,{client:e,snapshot:t,node:u}):p&&(d===`primary`||d===`supporting`)?(0,I.jsx)(W,{client:e,snapshot:t,node:u,rows:d===`primary`?12:5}):d===`method`?(0,I.jsx)(G,{client:e,snapshot:t,node:u}):(d===`primary`||d===`supporting`)&&/\.(json|txt|md|ya?ml|log)$/i.test(u.path??``)?(0,I.jsx)(K,{client:e,snapshot:t,node:u,lines:d===`primary`?16:8}):null;return d===`run`?(0,I.jsxs)(`div`,{className:`board-item role-run`,children:[(0,I.jsx)(q,{node:u}),(0,I.jsx)(`small`,{className:`board-why`,children:(0,I.jsx)(De,{text:n.why})})]}):(0,I.jsxs)(`article`,{className:`board-item role-`+d+(o?` span-`+o:``)+(c?.open?` asking`:``),children:[(0,I.jsxs)(`header`,{children:[(0,I.jsxs)(`div`,{className:`board-item-title`,children:[(0,I.jsxs)(`button`,{className:`board-name`,title:`Show `+u.path,onClick:()=>r(u.path),children:[(0,I.jsx)(s,{name:m(u.path),size:15,stroke:1.7}),(0,I.jsx)(`strong`,{children:u.title})]}),(0,I.jsxs)(`span`,{className:`board-item-actions`,children:[c&&(0,I.jsx)(`button`,{className:`text-button board-ask-button`,"aria-expanded":c.open,onClick:c.toggle,children:`Ask`}),i&&D(u.path)&&C(t)&&(0,I.jsx)(N,{languages:[`r`,`python`],title:e=>`Open ${u.title} in Studio with the Notebook beside it, loaded into the ${T[e]} session as a new value`,onExplore:e=>i(u.path,e)})]})]}),l&&(0,I.jsx)(k,{className:`board-holds`,holds:l}),n.why!==a&&(0,I.jsx)(`small`,{className:`board-why`,children:(0,I.jsx)(De,{text:n.why})})]}),c?.open&&c.box,h]})}function Oe({record:e,graph:t,shown:n,onDecide:r,onNeedsChanges:i}){let a=e.decisions?.at(-1),[o,c]=(0,F.useState)(!1),[l,u]=(0,F.useState)(!1),[d,f]=(0,F.useState)(!1),[p,m]=(0,F.useState)(``);if((0,F.useEffect)(()=>{c(!1),u(!1),m(``)},[e.id,a?.changeId]),e.state===`running`||oe(e)&&!a)return null;let h=a?a.results.filter(e=>{let n=t.nodes.find(t=>t.kind===`file`&&t.path===e.path);return!!n?.modifiedAt&&Date.parse(n.modifiedAt)>Date.parse(a.at)+1e3}):[],g=a?n.filter(e=>!a.results.some(t=>t.path===e)):[];async function ee(){f(!0),m(``);try{await r()}catch(e){m(J(e))}finally{f(!1)}}return l?(0,I.jsx)(`div`,{className:`board-verdict`,children:(0,I.jsx)(Ee,{about:{kind:`changes`},onSend:i,onCancel:()=>u(!1)})}):(0,I.jsxs)(`div`,{className:`board-verdict`+(a&&!o?` `+a.decision:``),children:[a&&!o?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`p`,{children:[(0,I.jsx)(s,{name:a.decision===`accepted`?`check`:`pencil`,size:14,stroke:2}),` `,(0,I.jsx)(`strong`,{children:a.decision===`accepted`?`You chose to use this answer`:`You said this needs changes`}),(0,I.jsxs)(`span`,{className:`board-meta`,children:[` · `,le(a.at),` · for the `,a.results.length,` `,a.results.length===1?`file version`:`file versions`,` this message kept`]})]}),a.note&&(0,I.jsx)(`blockquote`,{children:a.note}),g.length>0&&(0,I.jsxs)(`p`,{className:`board-meta`,children:[`Not covered: no version was kept of `,g.map(e=>e.split(`/`).at(-1)).join(`, `),`.`]}),h.length>0&&(0,I.jsxs)(`p`,{className:`board-verdict-since`,children:[`Changed since: `,h.map(e=>e.path.split(`/`).at(-1)).join(`, `),`. The decision does not cover the new `,h.length===1?`version`:`versions`,`.`]}),(0,I.jsx)(`button`,{className:`text-button`,onClick:()=>c(!0),children:`Change`})]}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`p`,{className:`board-meta`,children:`Will you use this answer?`}),(0,I.jsxs)(`div`,{className:`board-verdict-actions`,children:[(0,I.jsx)(`button`,{className:`primary`,disabled:d,onClick:()=>void ee(),children:d?`Saving…`:`Use this answer`}),(0,I.jsx)(`button`,{disabled:d,onClick:()=>u(!0),children:`Needs changes`}),o&&(0,I.jsx)(`button`,{className:`text-button`,onClick:()=>c(!1),children:`Cancel`})]})]}),p&&(0,I.jsx)(`p`,{className:`inline-error`,role:`alert`,children:p})]})}function ke({id:e,node:t,running:n,at:r,onOpen:i}){if(!t)return null;let{about:a,quote:o,question:c}=v(t.text??``);return(0,I.jsxs)(`li`,{className:`board-follow-up`,id:`board-follow-`+e,children:[(0,I.jsxs)(`div`,{className:`board-follow-ask`,children:[(a||o)&&(0,I.jsx)(`span`,{className:`board-follow-about`,title:o??a??``,children:a?`About `+(a.split(`/`).at(-1)??a):`“`+Te(o,60)+`”`}),(0,I.jsx)(`p`,{children:c}),(0,I.jsxs)(`button`,{className:`text-button`,onClick:i,children:[n?`Answering…`:new Date(r).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`,hourCycle:`h23`}),` `,(0,I.jsx)(s,{name:`chevron`,size:12})]})]}),t.answer?(0,I.jsx)(_,{text:t.answer,streaming:n}):n?(0,I.jsx)(`p`,{className:`board-note`,role:`status`,children:`The Agent is working on this.`}):null]})}function Ae({client:e,snapshot:t,files:n,notesText:r=``,onConversation:i,onPath:a,onExplore:o,onConsole:c,onGraph:l,onAsked:d}){let{turns:f,loading:p}=ve(e,t),h=(0,F.useMemo)(()=>n.files.map(e=>({path:e.path,bytes:e.bytes,modifiedAt:e.modifiedAt,category:e.category})),[n.files]),g=(0,F.useMemo)(()=>re(ne({turns:f,files:h,project:t.project,kindOf:u,now:Date.now()})),[f,h,t.project]),ee=A(e,t,g,h,r,f),ie=(0,F.useMemo)(()=>be(g),[g]),[ae,se]=(0,F.useState)(null),y=ae&&ie.find(e=>e.turn.id===ae)||ie[0],b=y?.turn,x=y?.board,S=y?.followUps??[],[C,w]=(0,F.useState)(null),[T,ue]=(0,F.useState)(null),E=(0,F.useRef)(null),D=(0,F.useRef)(null),de=(0,F.useRef)(null);if((0,F.useEffect)(()=>{w(null),ue(null)},[b?.id]),p||!x||!b)return null;let O=b.conversationId,k=t.conversations?.find(e=>e.conversationId===O)?.state===`running`;async function fe(n,r){let a=te(n,r);E.current?.text!==a&&(E.current={text:a,changeId:`ask-`+crypto.randomUUID()}),await e.call(`conversation.send`,{projectId:t.project.id,conversationId:O,changeId:E.current.changeId,text:a}),E.current=null,w(null),(d??i)(O)}async function pe(n,r){let i=b.id+`:`+n+`:`+(r??``);D.current?.key!==i&&(D.current={key:i,changeId:`decide-`+crypto.randomUUID()}),await e.call(`conversation.decide`,{projectId:t.project.id,conversationId:O,turnId:M.id,changeId:D.current.changeId,decision:n,...r?{note:r}:{}}),D.current=null}async function me(n){await pe(`needs-changes`,n.trim());let r=`Needs changes: `+n.trim();E.current?.text!==r&&(E.current={text:r,changeId:`ask-`+crypto.randomUUID()}),await e.call(`conversation.send`,{projectId:t.project.id,conversationId:O,changeId:E.current.changeId,text:r}),E.current=null,(d??i)(O)}let he=(e,t)=>C?.key===e?(0,I.jsx)(Ee,{about:C.about,onSend:e=>fe(C.about,e),onCancel:()=>w(null)}):null,ge=e=>{let t=`file:`+e.node.path;return{open:C?.key===t,toggle:()=>w(C?.key===t?null:{key:t,about:{kind:`file`,path:e.node.path,title:e.node.title,resource:e.node.resource??null}}),box:he(t,{kind:`file`,path:e.node.path,title:e.node.title})}};function _e(){let e=getSelection(),t=e?.toString().trim()??``,n=de.current;if(!e||!t||!n||!e.rangeCount||!n.contains(e.anchorNode)||!n.contains(e.focusNode)){ue(null);return}let r=e.getRangeAt(0).getBoundingClientRect(),i=n.getBoundingClientRect();ue({text:t.slice(0,2e3),top:r.bottom-i.top+6,left:Math.max(0,Math.min(r.left-i.left,i.width-140))})}let{question:j}=x,M=f.find(e=>e.conversationId+`/`+e.turn.id===b.id)?.turn,N=e=>x.items.filter(t=>t.role===e),L=N(`primary`)[0],R=N(`supporting`),xe=N(`method`),z=N(`run`),Se=N(`input`),Ce=N(`report`),B=e=>x.omitted[e]?(0,I.jsxs)(`small`,{className:`board-more`,children:[x.omitted[e],` more in Files`]}):null,H=b.running?g.live:null,U=H&&g.nodes.find(e=>e.id===H.node),W=H&&U&&U.kind!==`question`?H.label+` `+(U.kind===`run`&&U.ran?P(U.ran):U.title):H?.waiting?H.label:null,we=S.find(e=>e.running),G=we?{id:we.id,title:Te(v(g.nodes.find(e=>e.id===`q:`+we.id)?.text??``).question.split(`
|
|
6
|
-
`)[0],60)}:null,K=[L,...R].filter(Boolean),q=e=>e.node.path?ee.holds(e.node.path):void 0,J=ee.meanings.find(e=>e.conversationId===O)?.statements.filter(e=>e.kind===`choice`)??[],Ae=K.length>1&&K.every(e=>e.why===K[0].why)?K[0].why:void 0,je=(L?Math.max(0,R.length-2):R.length)%3;return(0,I.jsxs)(`section`,{className:`project-section answer-board`,"aria-labelledby":`board-title`,children:[(0,I.jsxs)(`header`,{className:`board-head`,children:[(0,I.jsxs)(`div`,{className:`board-ask`,children:[(0,I.jsx)(`h2`,{id:`board-title`,title:j.text,children:j.title}),(0,I.jsxs)(`p`,{className:`board-meta`,children:[(0,I.jsx)(`span`,{className:`work-state `+(j.state??``),children:M&&oe(M)?`Turn limit reached`:V[j.state??``]??j.state}),M&&(0,I.jsxs)(I.Fragment,{children:[` · `,le(M.endedAt??M.sentAt),M.endedAt&&ce(M.startedAt??M.sentAt,M.endedAt)?` · took `+ce(M.startedAt??M.sentAt,M.endedAt):``]}),W&&(0,I.jsxs)(I.Fragment,{children:[` · `,(0,I.jsx)(`span`,{className:`board-live`+(H?.waiting?` waiting`:``),title:W,children:W})]}),G&&(0,I.jsxs)(I.Fragment,{children:[` · `,(0,I.jsxs)(`button`,{className:`text-button board-live`,onClick:()=>document.getElementById(`board-follow-`+G.id)?.scrollIntoView({block:`center`,behavior:`smooth`}),children:[`Answering “`,G.title,`”`]})]})]})]}),(0,I.jsxs)(`div`,{className:`board-actions`,children:[ie.length>1&&(0,I.jsx)(`select`,{"aria-label":`Answer to show`,value:b.id,onChange:e=>se(e.target.value),children:ie.map(({turn:e})=>(0,I.jsxs)(`option`,{value:e.id,children:[new Date(e.start).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`,hourCycle:`h23`}),` · `,g.nodes.find(t=>t.id===`q:`+e.id)?.title??`A message`]},e.id))}),(0,I.jsxs)(`button`,{className:`text-button`,onClick:()=>i(b.conversationId),children:[`Conversation `,(0,I.jsx)(s,{name:`chevron`,size:12})]})]})]}),j.answer?(0,I.jsxs)(`div`,{className:`board-answer`,ref:de,onMouseUp:_e,onKeyUp:_e,children:[(0,I.jsx)(_,{text:j.answer,streaming:!!b.running}),T&&!b.running&&(0,I.jsx)(`button`,{className:`board-select-ask`,style:{top:T.top,left:T.left},onMouseDown:e=>e.preventDefault(),onClick:()=>{w({key:`passage`,about:{kind:`passage`,text:T.text}}),ue(null),getSelection()?.removeAllRanges()},children:`Ask about this`})]}):b.running?(0,I.jsx)(`p`,{className:`board-note`,role:`status`,children:`The Agent is working on this message.`}):null,C?.key===`passage`&&he(`passage`,C.about),k&&C&&(0,I.jsx)(`p`,{className:`board-note`,children:`The Agent is still answering. Your question can be sent when it has finished.`}),(L||R.length>0)&&(0,I.jsxs)(`div`,{className:`board-results-block`,children:[(0,I.jsxs)(`p`,{className:`board-results-why`,children:[(0,I.jsx)(`strong`,{children:`Results`}),Ae&&(0,I.jsxs)(I.Fragment,{children:[` · `,(0,I.jsx)(De,{text:Ae})]})]}),(0,I.jsxs)(`div`,{className:`board-results beside-`+Math.min(R.length,2),children:[L&&(0,I.jsx)(Y,{client:e,snapshot:t,item:L,onPath:a,onExplore:o,said:Ae,holds:q(L),ask:b.running?void 0:ge(L)}),R.map((n,r)=>(0,I.jsx)(Y,{client:e,snapshot:t,item:n,onPath:a,onExplore:o,said:Ae,holds:q(n),span:r>=R.length-je?6/je:void 0,ask:b.running?void 0:ge(n)},n.node.id))]}),B(`supporting`)]}),(xe.length>0||z.length>0||Se.length>0||Ce.length>0||x.otherCommands>0)&&(0,I.jsxs)(`div`,{className:`board-how`,children:[xe.length>0&&(0,I.jsxs)(`div`,{className:`board-row`,children:[(0,I.jsx)(`span`,{className:`board-label`,children:`Method`}),(0,I.jsx)(`div`,{className:`board-cells`,children:xe.map(n=>(0,I.jsx)(Y,{client:e,snapshot:t,item:n,onPath:a,holds:q(n),ask:b.running?void 0:ge(n)},n.node.id))})]}),(z.length>0||x.otherCommands>0)&&(0,I.jsxs)(`div`,{className:`board-row`,children:[(0,I.jsx)(`span`,{className:`board-label`,children:`Ran`}),(0,I.jsxs)(`div`,{className:`board-cells`,children:[z.map(n=>(0,I.jsx)(Y,{client:e,snapshot:t,item:n,onPath:a},n.node.id)),x.otherCommands>0&&(0,I.jsxs)(`button`,{className:`text-button board-console`,onClick:()=>c(b.id),children:[z.length?x.otherCommands+` other `+(x.otherCommands===1?`command`:`commands`):x.otherCommands+(x.otherCommands===1?` command`:` commands`),` in the Console `,(0,I.jsx)(s,{name:`chevron`,size:12})]})]})]}),Se.length>0&&(0,I.jsxs)(`div`,{className:`board-row`,children:[(0,I.jsx)(`span`,{className:`board-label`,children:`From`}),(0,I.jsxs)(`div`,{className:`board-chips`,children:[Se.map(e=>(0,I.jsxs)(`button`,{className:`work-file`,title:e.why.replaceAll("`",``)+` · `+e.node.path,onClick:()=>a(e.node.path),children:[(0,I.jsx)(s,{name:m(e.node.path),size:14,stroke:1.7}),(0,I.jsx)(`span`,{children:e.node.title})]},e.node.id)),B(`input`)]})]}),Ce.length>0&&(0,I.jsxs)(`div`,{className:`board-row`,children:[(0,I.jsx)(`span`,{className:`board-label`,children:`Report`}),(0,I.jsx)(`div`,{className:`board-chips`,children:Ce.map(e=>(0,I.jsxs)(`button`,{className:`work-file`,title:e.why.replaceAll("`",``)+` · `+e.node.path,onClick:()=>a(e.node.path),children:[(0,I.jsx)(s,{name:`document`,size:14,stroke:1.7}),(0,I.jsx)(`span`,{children:e.node.title})]},e.node.id))})]})]}),J.length>0&&(0,I.jsxs)(`div`,{className:`board-choices`,children:[(0,I.jsxs)(`p`,{className:`board-results-why`,children:[(0,I.jsx)(`strong`,{children:`Choices`}),` · what the Agent went with`,J.some(e=>e.alternatives?.length)?`, and the other option where the notes name one`:``]}),J.map(n=>(0,I.jsx)(ye,{statement:n,trace:ee.traces.get(n),conversationId:O,client:e,projectId:t.project.id,onPath:a,onSent:e=>(d??i)(e)},n.line))]}),S.length>0&&(0,I.jsxs)(`div`,{className:`board-follow`,children:[(0,I.jsx)(`p`,{className:`board-results-why`,children:(0,I.jsx)(`strong`,{children:`Asked since`})}),(0,I.jsx)(`ol`,{children:S.map(e=>(0,I.jsx)(ke,{id:e.id,node:g.nodes.find(t=>t.id===`q:`+e.id),running:!!e.running,at:e.start,onOpen:()=>i(e.conversationId)},e.id))})]}),M&&(0,I.jsx)(Oe,{record:M,graph:g,shown:[L,...R,...Ce].filter(e=>!!e).map(e=>e.node.path),onDecide:()=>pe(`accepted`),onNeedsChanges:me}),(0,I.jsx)(`footer`,{className:`board-foot`,children:(0,I.jsxs)(`button`,{className:`text-button`,onClick:l,children:[`How each file connects, in the Graph `,(0,I.jsx)(s,{name:`chevron`,size:12})]})})]})}var je=(0,F.lazy)(()=>h(()=>import(`./graph-CK-df5lh.js`).then(e=>({default:e.WorkStrip})),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]))),Me=e=>e>=6?6:e>=3?3:e,Ne=(e,t)=>/table/.test(e)?`table`:/media|image/.test(e)?`image`:/\.(R|r|py|sh|sql|js|ts)$/.test(t)?`code`:/document|editor|note/.test(e)?`document`:`file`;function Pe({client:e,snapshot:t,item:n,modifiedAt:r}){let i=/\.(png|jpe?g|svg|csv)$/i.test(n.path),[a,o]=(0,F.useState)(null);return(0,F.useEffect)(()=>{if(!i)return;let a=!0;return S(e,t,{path:n.path,bytes:n.bytes,modifiedAt:r,resource:n.resource}).then(e=>{a&&o(e)}),()=>{a=!1}},[n.path,n.bytes,r,n.resource?.version]),i&&!a?(0,I.jsx)(`span`,{className:`figure-thumb loading`,"aria-hidden":`true`}):a?.kind===`image`?(0,I.jsx)(`span`,{className:`figure-thumb image`,children:(0,I.jsx)(`img`,{src:a.url,alt:``})}):a?.kind===`table`?(0,I.jsx)(`span`,{className:`figure-thumb table`,"aria-hidden":`true`,children:(0,I.jsxs)(`span`,{style:{gridTemplateColumns:`repeat(${a.columns.length}, minmax(0, 1fr))`},children:[a.columns.map(e=>(0,I.jsx)(`b`,{children:e},`h`+e)),a.rows.map((e,t)=>a.columns.map(n=>(0,I.jsx)(`i`,{children:e[n]===null||e[n]===void 0?``:String(e[n])},t+n)))]})}):(0,I.jsx)(`span`,{className:`figure-thumb kind`,"aria-hidden":`true`,children:(0,I.jsx)(s,{name:y(n),size:26,stroke:1.4})})}function Fe({composition:e}){let t=c(e),n=new Map(e.views.map(e=>[e.id,e]));if(!t)return(0,I.jsx)(`span`,{className:`mini-layout empty`,children:`Empty workspace`});let r=e=>{if(e.kind===`split`)return(0,I.jsx)(`span`,{className:`mini-split `+e.axis,children:e.children.map((t,n)=>(0,I.jsx)(`span`,{style:{flexGrow:e.weights[n]??1},children:r(t)},t.id))});let t=e.views.flatMap(e=>n.get(e)??[]),i=t[0],a=i?String(i.props.title??i.id):``;return(0,I.jsxs)(`span`,{className:`mini-pane`,children:[(0,I.jsx)(`span`,{className:`mini-tabs`,children:t.slice(0,5).map((e,t)=>(0,I.jsx)(`i`,{className:t===0?`on`:void 0},e.id))}),i&&(0,I.jsxs)(`span`,{className:`mini-face`,children:[(0,I.jsx)(s,{name:Ne(String(i.component),a),size:13}),(0,I.jsx)(`span`,{children:a})]}),t.length>1&&(0,I.jsxs)(`small`,{children:[`+`,t.length-1]})]})};return(0,I.jsx)(`span`,{className:`mini-layout`,"aria-hidden":`true`,children:r(t)})}function Ie(e){return e.provenance?.originalPath??e.path}function Le(e,t){if(!e)return r(t);let[n,...i]=e.split(`/`),a=n.startsWith(`@`)?t.sources?.find(e=>`@`+e.id===n):void 0;return[a?a.name:n,...i].join(`/`)}function X({project:e,snapshot:t,client:n,section:c,notesText:l=``,workspace:u,onExplore:m,onSection:h,onAgent:g,onLayout:te,onProjectChanged:ne,onOpened:_,category:re,files:v,sources:ae,onFile:oe,linked:se=!1,onPath:y,onNewConversation:S,onConsole:C}){let[ce,le]=(0,F.useState)(!1),{runs:T,problem:D,readAgain:O}=fe(n,e.id,t.cursor),[k,ve]=(0,F.useState)(null),[A,ye]=(0,F.useState)(null),[N,be]=(0,F.useState)(!1),[P,L]=(0,F.useState)(``),[z,B]=(0,F.useState)(``),[V,H]=(0,F.useState)(``),[U,W]=(0,F.useState)(!1),[we,G]=(0,F.useState)(``),[K,q]=(0,F.useState)(``),[Te,J]=(0,F.useState)(null),[Ee,De]=(0,F.useState)(!1),[Y,Oe]=(0,F.useState)(null),[ke,Ne]=(0,F.useState)(!1),X=t.catalog.operations.some(e=>e.method===`project.work.read`&&e.authorized),Z=R(n,t,c===`overview`&&X,Ne),ze=t.catalog.operations.some(e=>e.method===`kernel.read`&&e.state===`available`&&e.authorized),Be=x(n,e.id,t.cursor,c===`overview`&&ze),Ve=!ze||Be.read!==null||!!Be.problem,He=t.catalog.operations.some(e=>e.method===`skills.list`&&e.state===`available`&&e.authorized),Ue=M(n,e.id,t.cursor,c===`overview`&&He),We=!!Ue.problem||[...Ue.list?.skills??[],...Ue.list?.removed??[]].some(e=>e.last),Ge=(0,F.useRef)(0),Ke=(0,F.useRef)(null),Q=c===`files`||c===`documents`,qe=new Map,Je=new Map;for(let e of t.compositions)for(let t of e.views)for(let n of Object.values(t.bindings??{}))`id`in n&&`version`in n&&qe.set(n.id+`@`+n.version,{compositionId:e.compositionId,viewId:t.id}),`documentId`in n&&`kind`in n&&n.kind===`live-document`&&Je.set(String(n.documentId),{compositionId:e.compositionId,viewId:t.id});let Ye=pe(t.resources.filter(e=>e.provenance?.source!==`current-filesystem-observation`),T??[]),Xe=[...T??[]].sort((e,t)=>t.acceptedAt.localeCompare(e.acceptedAt)),Ze=new Map((v?.files??[]).map(e=>[e.path,e.modifiedAt])),$=[...ae?.results??[]].sort((e,t)=>(Ze.get(t.path)??``).localeCompare(Ze.get(e.path)??``)),Qe=a(e),$e=!t.compositions.length&&!Ye.length&&!t.taskMap?.question&&!t.taskMap?.items.length&&!t.conversations?.length&&!ke&&!Be.cells&&!Be.problem,et=!$e||(T!==null||!!D)&&Y!==null&&Ve,tt=c===`overview`&&$e&&T!==null&&T.length===0&&Y!==null&&Ve,nt=!!D||(T?.length??0)>0,rt=!!Z.work&&(Z.work.files.length>0||Z.work.omitted.fileReferences>0),it=nt||rt||X||t.compositions.length>0||We,at=Me($.length),ot=!!v&&!!t.conversations?.length,st=(Y??0)>0,ct=[{key:`files`,label:`Browse files`,icon:`folder`,run:()=>h(`files`),primary:st},{key:`agent`,label:`Work with Agent`,icon:`prompt`,run:()=>g(),primary:!st}].sort((e,t)=>Number(t.primary)-Number(e.primary));async function lt(t=``){let r=++Ge.current;be(!0),B(``);try{let i=await n.call(`project.entries`,{projectId:e.id,...t?{path:t}:{}});r===Ge.current&&(ye(i),H(``))}catch(e){r===Ge.current&&B(e instanceof Error?e.message:`Could not read this folder. Try again.`)}finally{r===Ge.current&&be(!1)}}(0,F.useEffect)(()=>{Q&&!A&&!N&<()},[Q]),(0,F.useEffect)(()=>{if(c!==`overview`||!$e)return;let t=!0;return n.call(`project.entries`,{projectId:e.id}).then(e=>{t&&Oe(e.entries.length)},()=>{t&&Oe(-1)}),()=>{t=!1}},[n,e.id,c,$e]),(0,F.useEffect)(()=>()=>{Ge.current++},[]),(0,F.useEffect)(()=>{k&&!Ke.current?.open&&Ke.current?.showModal()},[k]);async function ut(r){if(!P){L(r.path),B(``);try{let i=u(),a=t.compositions.find(e=>e.compositionId===i),o=await n.call(`project.openFile`,{projectId:e.id,path:r.path,compositionId:i,expectedVersion:a?.version??0,changeId:`open-`+crypto.randomUUID()});_(o.composition.compositionId,o.viewId)}catch(e){B(e instanceof Error?e.message:`Could not open this file. Try again.`)}finally{L(``)}}}async function dt(){W(!0),G(``);try{let t=await n.call(`project.source.add`,{projectId:e.id},new AbortController().signal);t.project&&ne(t.project)}catch(e){G(e instanceof Error?e.message:`Could not add the folder. Try again.`)}finally{W(!1)}}async function ft(){De(!0),q(``);try{J((await n.call(`project.doctor`,{projectId:e.id},new AbortController().signal)).checks)}catch(e){q(e instanceof Error?e.message:`Could not check this project. Try again.`)}finally{De(!1)}}let pt=e=>(0,I.jsxs)(`button`,{className:`activity-row`,onClick:()=>ve(e.operationId),children:[(0,I.jsx)(`span`,{className:`activity-symbol `+e.execution,children:(0,I.jsx)(s,{name:`run`,size:16})}),(0,I.jsxs)(`span`,{className:`activity-name`,children:[(0,I.jsx)(`strong`,{children:e.operationId}),(0,I.jsxs)(`small`,{children:[e.author,` · `,o(e.acceptedAt).text]})]}),(0,I.jsx)(`span`,{className:`state `+e.execution,children:he(e.execution)}),(0,I.jsx)(s,{name:`chevron`,size:13})]},e.operationId),mt=(e,t)=>e&&(0,I.jsxs)(`div`,{className:`inline-error`,role:`alert`,children:[(0,I.jsx)(`p`,{children:e}),(0,I.jsx)(`button`,{onClick:t,children:`Try again`})]}),ht=(0,I.jsx)(`ul`,{className:`result-list`,children:Ye.map(({resource:e,run:t,earlier:n})=>{let r=qe.get(e.id+`@`+e.version),i=(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`span`,{className:`file-symbol`,children:(0,I.jsx)(s,{name:w(e.kind),size:19,stroke:1.6})}),(0,I.jsxs)(`span`,{className:`result-name`,children:[(0,I.jsx)(`strong`,{title:Ie(e),children:me(Ie(e))}),(0,I.jsxs)(`small`,{children:[e.kind,n?` · ${n} earlier version${n===1?``:`s`}`:``,t?` · `+t.operationId:``]})]}),(0,I.jsx)(`span`,{className:`result-state`,children:t?_e(t.integrity):E(e)}),r&&(0,I.jsx)(s,{name:`chevron`,size:14})]});return(0,I.jsx)(`li`,{children:r?(0,I.jsx)(`button`,{className:`result-row`,onClick:()=>te(r.compositionId,r.viewId),children:i}):(0,I.jsxs)(`div`,{className:`result-row`,children:[i,(0,I.jsx)(`small`,{children:`No open view`})]})},e.id+e.version)})}),gt=A?.entries.filter(e=>!V||e.name.toLocaleLowerCase().includes(V.toLocaleLowerCase()))??[],_t=b[re??`data`],vt=Q?`Files`:c===`agent`?`Agent`:c===`settings`?`Project settings`:c===`sources`?_t:r(e);return(0,I.jsxs)(`section`,{className:`project-page overview`+(Q?` files-page`:``),"aria-labelledby":`overview-title`,children:[(0,I.jsxs)(`header`,{className:`page-heading`,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`h1`,{id:`overview-title`,children:vt}),c===`overview`&&(0,I.jsx)(`p`,{title:Qe.full,children:Qe.text})]}),Q&&(0,I.jsxs)(`button`,{onClick:()=>void lt(A?.path),disabled:N,children:[(0,I.jsx)(s,{name:`refresh`,size:15}),`Refresh`]}),c===`sources`&&v&&(0,I.jsxs)(`button`,{onClick:v.refresh,disabled:v.reading,children:[(0,I.jsx)(s,{name:`refresh`,size:15}),`Refresh`]})]}),c===`sources`&&v&&oe&&(0,I.jsx)(Re,{category:re??`data`,files:v,items:ae?.[re??`data`]??null,artifacts:Ye,onFile:oe}),c===`overview`&&X&&(0,I.jsx)(xe,{state:Z,boarded:!!v&&!!t.conversations?.length,openConversation:g,openActivity:()=>h(`agent`)}),c===`overview`&&z&&(0,I.jsx)(`p`,{role:`alert`,children:z}),tt&&(0,I.jsxs)(`div`,{className:`empty-project`,children:[(0,I.jsx)(`span`,{className:`empty-symbol`,children:(0,I.jsx)(s,{name:`grid`,size:26,stroke:1.5})}),(0,I.jsx)(`h2`,{children:`No work yet`}),(0,I.jsx)(`div`,{className:`empty-actions`,children:ct.map(e=>(0,I.jsxs)(`button`,{className:e.primary?`primary`:void 0,onClick:e.run,children:[(0,I.jsx)(s,{name:e.icon,size:17,stroke:1.6}),(0,I.jsx)(`span`,{children:e.label})]},e.key))})]}),c===`overview`&&!tt&&et&&(0,I.jsxs)(I.Fragment,{children:[t.taskMap?.question&&(0,I.jsxs)(`div`,{className:`project-question`,children:[(0,I.jsx)(s,{name:`prompt`,size:18}),(0,I.jsx)(`h2`,{children:t.taskMap.question})]}),v&&!!t.conversations?.length&&(0,I.jsx)(Ae,{client:n,snapshot:t,files:v,notesText:l,onConversation:e=>g(e),onPath:e=>y?.(e),onExplore:m,onConsole:e=>C?C(e):h(`console`),onGraph:()=>h(`graph`)}),(0,I.jsxs)(`div`,{className:`project-columns`+(it?``:` single`),children:[(0,I.jsxs)(`div`,{className:`project-primary`,children:[v&&(0,I.jsx)(F.Suspense,{fallback:null,children:(0,I.jsx)(je,{client:n,snapshot:t,files:v,onOpen:()=>h(`graph`),onConversations:()=>h(`agent`)})}),(!ot||!$.length&&Ye.length>0)&&(0,I.jsxs)(`section`,{className:`project-section figures-section`,children:[(0,I.jsxs)(`div`,{className:`section-heading`,children:[(0,I.jsxs)(`h2`,{children:[`Results & figures`,$.length>0&&(0,I.jsx)(`span`,{className:`section-count`,children:$.length})]}),(0,I.jsxs)(`button`,{className:`text-button`,onClick:()=>h(`files`),children:[`All files `,(0,I.jsx)(s,{name:`chevron`,size:12})]})]}),$.length?(0,I.jsx)(`ul`,{className:`figure-grid count-`+at+(at>=3?` featured`:``),children:$.slice(0,at).map(e=>(0,I.jsx)(`li`,{children:(0,I.jsxs)(`button`,{className:`figure-card`,onClick:()=>oe?.(`results`,e),title:e.path,children:[(0,I.jsx)(Pe,{client:n,snapshot:t,item:e,modifiedAt:Ze.get(e.path)}),(0,I.jsxs)(`span`,{className:`figure-name`,children:[(0,I.jsx)(`strong`,{children:e.name}),(0,I.jsxs)(`small`,{children:[e.resource&&e.path.startsWith(`.rho/`)?`Run output`:e.folder,Ze.get(e.path)?` · `+o(Ze.get(e.path)).text:``]})]})]})},e.key))}):Ye.length?ht:(0,I.jsx)(`p`,{className:`quiet-empty`,children:`No results or figures yet.`}),$.length>at&&(0,I.jsxs)(`button`,{className:`text-button figures-more`,onClick:()=>h(`files`),children:[$.length-at,` more in Files `,(0,I.jsx)(s,{name:`chevron`,size:12})]})]}),(0,I.jsx)(p,{work:Be,snapshot:t,onOpen:()=>h(`notebook`)}),t.taskMap?.items.length?(0,I.jsxs)(`section`,{className:`project-section`,children:[(0,I.jsx)(`div`,{className:`section-heading`,children:(0,I.jsx)(`h2`,{children:`From your Agent`})}),(0,I.jsx)(`ul`,{className:`agent-notes`,children:t.taskMap.items.map(e=>(0,I.jsxs)(`li`,{"data-fact":`agent`,children:[(0,I.jsx)(`strong`,{children:e.title}),e.summary&&(0,I.jsx)(`p`,{children:e.summary}),(0,I.jsx)(`small`,{children:t.taskMap.vocabulary.states[e.state]?.label??e.state})]},e.id))})]}):null]}),it&&(0,I.jsxs)(`aside`,{className:`project-side`,children:[(t.compositions.length>0||X)&&(0,I.jsxs)(`section`,{className:`project-section`,children:[(0,I.jsx)(`div`,{className:`section-heading`,children:(0,I.jsx)(`h2`,{children:`Continue working`})}),(0,I.jsxs)(`div`,{className:`workspace-grid`,children:[t.compositions.filter(e=>!f(e.compositionId)).map(e=>(0,I.jsxs)(`button`,{className:`workspace-card`,onClick:()=>te(e.compositionId),children:[(0,I.jsxs)(`span`,{className:`workspace-card-head`,children:[(0,I.jsx)(`strong`,{children:d(e.compositionId)}),(0,I.jsxs)(`small`,{children:[e.views.length,` `,e.views.length===1?`view`:`views`]}),(0,I.jsx)(s,{name:`chevron`,size:14})]}),(0,I.jsx)(Fe,{composition:e})]},e.compositionId)),X&&(0,I.jsx)(Ce,{work:Z.work,openFile:e=>void ut({path:e})})]})]}),(0,I.jsx)(j,{list:Ue.list,problem:Ue.problem,snapshot:t,onOpen:()=>h(`skills`)}),(0,I.jsx)(Se,{work:Z.work,openFile:e=>void ut({path:e}),openActivity:()=>h(`agent`)}),nt&&(0,I.jsxs)(`section`,{className:`project-section project-recent`,children:[(0,I.jsxs)(`div`,{className:`section-heading`,children:[(0,I.jsx)(`h2`,{children:`Recent activity`}),(0,I.jsx)(`button`,{className:`text-button`,onClick:()=>h(`agent`),children:`View all`})]}),mt(D,O),Xe.length?(0,I.jsx)(`div`,{className:`activity-list`,children:Xe.slice(0,5).map(pt)}):(0,I.jsx)(`p`,{className:`quiet-empty`,children:`No runs yet.`})]})]})]})]}),Q&&(0,I.jsxs)(I.Fragment,{children:[t.documents.length>0&&(0,I.jsxs)(`section`,{className:`project-section`,children:[(0,I.jsx)(`div`,{className:`section-heading`,children:(0,I.jsx)(`h2`,{children:`Open documents`})}),(0,I.jsx)(`div`,{className:`document-list`,children:t.documents.map(e=>{let t=Je.get(e.id);return(0,I.jsxs)(`button`,{className:`document-link`,disabled:!!P,onClick:()=>t?te(t.compositionId,t.viewId):void ut(e),children:[(0,I.jsx)(s,{name:`document`,size:18}),(0,I.jsx)(`span`,{children:me(e.path)}),e.dirty&&(0,I.jsx)(`span`,{className:`unsaved-dot`,title:`Unsaved changes`,"aria-label":`Unsaved changes`})]},e.id)})})]}),(0,I.jsxs)(`section`,{className:`project-section`,"aria-label":`Project files`,children:[(0,I.jsxs)(`div`,{className:`file-toolbar`,children:[(0,I.jsxs)(`div`,{className:`folder-location`,children:[A?.path&&(0,I.jsx)(`button`,{className:`icon-button`,"aria-label":`Up one folder`,onClick:()=>void lt(A.path.split(`/`).slice(0,-1).join(`/`)),children:(0,I.jsx)(s,{name:`chevron`,size:16})}),(0,I.jsx)(`strong`,{children:Le(A?.path??``,e)})]}),(0,I.jsxs)(`div`,{className:`search-field`,children:[(0,I.jsx)(s,{name:`search`,size:17,stroke:1.7}),(0,I.jsx)(`input`,{"aria-label":`Filter files`,placeholder:`Filter files…`,value:V,onChange:e=>H(e.target.value)})]})]}),mt(z,()=>void lt(A?.path)),N&&(0,I.jsx)(`p`,{className:`loading-inline`,role:`status`,children:`Reading folder…`}),A&&(gt.length?(0,I.jsxs)(`div`,{className:`file-table-wrap`,"aria-busy":N,children:[(0,I.jsxs)(`table`,{className:`file-table`,children:[(0,I.jsx)(`thead`,{children:(0,I.jsxs)(`tr`,{children:[(0,I.jsx)(`th`,{children:`Name`}),(0,I.jsx)(`th`,{children:`Type`}),(0,I.jsx)(`th`,{children:`Size`})]})}),(0,I.jsx)(`tbody`,{children:gt.map(e=>(0,I.jsxs)(`tr`,{children:[(0,I.jsx)(`td`,{children:(0,I.jsxs)(`button`,{className:`file-open`,disabled:!!P||N,onClick:()=>void(e.kind===`folder`?lt(e.path):ut(e)),children:[(0,I.jsx)(s,{name:e.kind===`folder`?`folder`:`file`,size:19,stroke:1.6}),e.name,P===e.path&&(0,I.jsx)(`span`,{role:`status`,children:`Opening…`})]})}),(0,I.jsx)(`td`,{children:e.kind===`folder`?`Folder`:e.name.split(`.`).at(-1)?.toUpperCase()||`File`}),(0,I.jsx)(`td`,{children:e.kind===`folder`?`—`:de(e.bytes)})]},e.path))})]}),A.truncated&&(0,I.jsxs)(`p`,{className:`muted`,children:[`Showing `,A.entries.length,` of `,A.total,` entries.`]})]}):(0,I.jsxs)(`div`,{className:`empty-state compact`,children:[(0,I.jsx)(`p`,{children:V?`No files match your search.`:`This folder is empty.`}),V&&(0,I.jsx)(`button`,{onClick:()=>H(``),children:`Clear search`})]}))]}),t.resources.length>0&&(0,I.jsxs)(`section`,{className:`project-section`,children:[(0,I.jsx)(`div`,{className:`section-heading`,children:(0,I.jsx)(`h2`,{children:`Registered results`})}),ht]})]}),c===`agent`&&(()=>{let r=(0,I.jsxs)(I.Fragment,{children:[(Xe.length>0||D)&&(0,I.jsxs)(`section`,{className:`project-section agent-runs`,children:[(0,I.jsx)(`div`,{className:`section-heading`,children:(0,I.jsx)(`h2`,{children:`Runs`})}),mt(D,O),(0,I.jsx)(`div`,{className:`activity-list`,children:Xe.map(pt)})]}),se&&(0,I.jsxs)(`details`,{className:`agent-outside`,open:ce,onToggle:e=>le(e.currentTarget.open),children:[(0,I.jsx)(`summary`,{children:`Agent sessions with access`}),ce&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(ue,{snapshot:t}),(0,I.jsx)(ee,{client:n,projectId:e.id,root:e.root,onOpened:_})]})]})]});return se?r:(0,I.jsx)(ie,{client:n,snapshot:t,exists:e=>!!v?.files.some(t=>t.path===e),onContinue:e=>g(e),onPath:e=>y?.(e),onNew:()=>S?.(),onOpened:_,extra:r})})(),c===`settings`&&(0,I.jsxs)(`div`,{className:`settings-sections`,children:[(0,I.jsxs)(`section`,{className:`project-section`,children:[(0,I.jsx)(`h2`,{children:`Source folders`}),(0,I.jsx)(i,{folders:e.sources??[{id:e.id,root:e.root,name:r(e)}],busy:U,onAdd:()=>void dt()}),mt(we,()=>void dt())]}),(0,I.jsxs)(`section`,{className:`project-section`,children:[(0,I.jsxs)(`div`,{className:`section-heading`,children:[(0,I.jsx)(`h2`,{children:`Project health`}),(0,I.jsx)(`button`,{disabled:Ee,onClick:()=>void ft(),children:Ee?`Checking…`:`Check project`})]}),Te?(0,I.jsx)(`ul`,{className:`health-list`,children:Te.map(e=>(0,I.jsxs)(`li`,{children:[(0,I.jsx)(`span`,{className:`state `+e.state,children:e.state===`ok`?`Ready`:e.state===`fail`?`Blocked`:`Check`}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`p`,{children:e.detail}),e.remedy&&(0,I.jsx)(`small`,{children:e.remedy})]})]},e.id))}):(0,I.jsx)(`p`,{className:`muted`,children:`Check the tools and capabilities available to this project.`}),mt(K,()=>void ft())]})]}),k&&(0,I.jsxs)(`dialog`,{ref:Ke,className:`run-dialog`,"aria-label":k,onClose:()=>ve(null),onClick:e=>{e.target===e.currentTarget&&e.currentTarget.close()},children:[(0,I.jsx)(`button`,{className:`icon-button run-dialog-close`,"aria-label":`Close`,onClick:()=>Ke.current?.close(),children:(0,I.jsx)(s,{name:`close`,size:18})}),(0,I.jsx)(ge,{snapshot:t,client:n,operationId:k,runs:T,readRuns:O,onOpenRun:ve,opener:e=>{let t=qe.get(e.id+`@`+e.version);return t?()=>te(t.compositionId,t.viewId):null}},k)]})]})}var Z={data:`No data files in this project yet.`,code:`No scripts in this project yet.`,results:`No results or figures yet.`,notes:`No notes in this project yet.`,workflows:`No workflow files in this project now.`,reports:`No reports in this project now.`,references:`No references in this project now.`,environment:`No environment files in this project now.`};function Re({category:e,files:t,items:n,artifacts:r,onFile:i}){let[a,o]=(0,F.useState)(``),c=new Map(r.map(e=>[e.resource.id+`@`+e.resource.version,e])),u=n??[],d=u.length,f=u.filter(e=>!a||e.path.toLocaleLowerCase().includes(a.toLocaleLowerCase()));return(0,I.jsxs)(`section`,{className:`project-section source-list`,"aria-label":e,children:[(0,I.jsxs)(`div`,{className:`file-toolbar`,children:[(0,I.jsxs)(`p`,{className:`source-summary`,children:[t.readAt===0&&t.reading?`Reading the project folders…`:`${d}${t.truncated?`+`:``} ${d===1?`file`:`files`}`,t.truncated&&(0,I.jsx)(`span`,{title:`Rho reads at most ${l.maxFolders} folders, ${l.maxDepth} levels deep.`,children:` · deeper folders were not read`})]}),(0,I.jsxs)(`div`,{className:`search-field`,children:[(0,I.jsx)(s,{name:`search`,size:17,stroke:1.7}),(0,I.jsx)(`input`,{"aria-label":`Filter these files`,placeholder:`Filter…`,value:a,onChange:e=>o(e.target.value)})]})]}),t.problem&&(0,I.jsxs)(`div`,{className:`inline-error`,role:`alert`,children:[(0,I.jsx)(`p`,{children:t.problem}),(0,I.jsx)(`button`,{onClick:t.refresh,children:`Try again`})]}),d===0&&t.readAt>0?(0,I.jsx)(`div`,{className:`empty-state compact`,children:(0,I.jsx)(`p`,{children:Z[e]})}):f.length>0?(0,I.jsx)(`ul`,{className:`source-rows`,children:f.map(t=>{let n=t.resource?c.get(t.resource.id+`@`+t.resource.version):void 0;return(0,I.jsx)(`li`,{children:(0,I.jsxs)(`button`,{className:`source-row`,onClick:()=>i(e,t),children:[(0,I.jsx)(`span`,{className:`file-symbol`,children:(0,I.jsx)(s,{name:y(t),size:18,stroke:1.6})}),(0,I.jsxs)(`span`,{className:`source-name`,children:[(0,I.jsx)(`strong`,{children:t.name}),(0,I.jsxs)(`small`,{children:[t.folder,n?.run?` · from `+n.run.operationId:``]})]}),(0,I.jsx)(`span`,{className:`source-meta`,children:t.resource?n?.run?_e(n.run.integrity):`Result`:t.bytes===null?``:de(t.bytes)})]})},t.key)})}):d>0?(0,I.jsxs)(`div`,{className:`empty-state compact`,children:[(0,I.jsx)(`p`,{children:`No files match your filter.`}),(0,I.jsx)(`button`,{onClick:()=>o(``),children:`Clear filter`})]}):null]})}export{X as ProjectOverview};
|
|
6
|
+
`)[0],60)}:null,K=[L,...R].filter(Boolean),q=e=>e.node.path?ee.holds(e.node.path):void 0,J=ee.meanings.find(e=>e.conversationId===O)?.statements.filter(e=>e.kind===`choice`)??[],Ae=K.length>1&&K.every(e=>e.why===K[0].why)?K[0].why:void 0,je=(L?Math.max(0,R.length-2):R.length)%3;return(0,I.jsxs)(`section`,{className:`project-section answer-board`,"aria-labelledby":`board-title`,children:[(0,I.jsxs)(`header`,{className:`board-head`,children:[(0,I.jsxs)(`div`,{className:`board-ask`,children:[(0,I.jsx)(`h2`,{id:`board-title`,title:j.text,children:j.title}),(0,I.jsxs)(`p`,{className:`board-meta`,children:[(0,I.jsx)(`span`,{className:`work-state `+(j.state??``),children:M&&oe(M)?`Turn limit reached`:V[j.state??``]??j.state}),M&&(0,I.jsxs)(I.Fragment,{children:[` · `,le(M.endedAt??M.sentAt),M.endedAt&&ce(M.startedAt??M.sentAt,M.endedAt)?` · took `+ce(M.startedAt??M.sentAt,M.endedAt):``]}),W&&(0,I.jsxs)(I.Fragment,{children:[` · `,(0,I.jsx)(`span`,{className:`board-live`+(H?.waiting?` waiting`:``),title:W,children:W})]}),G&&(0,I.jsxs)(I.Fragment,{children:[` · `,(0,I.jsxs)(`button`,{className:`text-button board-live`,onClick:()=>document.getElementById(`board-follow-`+G.id)?.scrollIntoView({block:`center`,behavior:`smooth`}),children:[`Answering “`,G.title,`”`]})]})]})]}),(0,I.jsxs)(`div`,{className:`board-actions`,children:[ie.length>1&&(0,I.jsx)(`select`,{"aria-label":`Answer to show`,value:b.id,onChange:e=>se(e.target.value),children:ie.map(({turn:e})=>(0,I.jsxs)(`option`,{value:e.id,children:[new Date(e.start).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`,hourCycle:`h23`}),` · `,g.nodes.find(t=>t.id===`q:`+e.id)?.title??`A message`]},e.id))}),(0,I.jsxs)(`button`,{className:`text-button`,onClick:()=>i(b.conversationId),children:[`Conversation `,(0,I.jsx)(s,{name:`chevron`,size:12})]})]})]}),j.answer?(0,I.jsxs)(`div`,{className:`board-answer`,ref:de,onMouseUp:_e,onKeyUp:_e,children:[(0,I.jsx)(_,{text:j.answer,streaming:!!b.running}),T&&!b.running&&(0,I.jsx)(`button`,{className:`board-select-ask`,style:{top:T.top,left:T.left},onMouseDown:e=>e.preventDefault(),onClick:()=>{w({key:`passage`,about:{kind:`passage`,text:T.text}}),ue(null),getSelection()?.removeAllRanges()},children:`Ask about this`})]}):b.running?(0,I.jsx)(`p`,{className:`board-note`,role:`status`,children:`The Agent is working on this message.`}):null,C?.key===`passage`&&he(`passage`,C.about),k&&C&&(0,I.jsx)(`p`,{className:`board-note`,children:`The Agent is still answering. Your question can be sent when it has finished.`}),(L||R.length>0)&&(0,I.jsxs)(`div`,{className:`board-results-block`,children:[(0,I.jsxs)(`p`,{className:`board-results-why`,children:[(0,I.jsx)(`strong`,{children:`Results`}),Ae&&(0,I.jsxs)(I.Fragment,{children:[` · `,(0,I.jsx)(De,{text:Ae})]})]}),(0,I.jsxs)(`div`,{className:`board-results beside-`+Math.min(R.length,2),children:[L&&(0,I.jsx)(Y,{client:e,snapshot:t,item:L,onPath:a,onExplore:o,said:Ae,holds:q(L),ask:b.running?void 0:ge(L)}),R.map((n,r)=>(0,I.jsx)(Y,{client:e,snapshot:t,item:n,onPath:a,onExplore:o,said:Ae,holds:q(n),span:r>=R.length-je?6/je:void 0,ask:b.running?void 0:ge(n)},n.node.id))]}),B(`supporting`)]}),(xe.length>0||z.length>0||Se.length>0||Ce.length>0||x.otherCommands>0)&&(0,I.jsxs)(`div`,{className:`board-how`,children:[xe.length>0&&(0,I.jsxs)(`div`,{className:`board-row`,children:[(0,I.jsx)(`span`,{className:`board-label`,children:`Method`}),(0,I.jsx)(`div`,{className:`board-cells`,children:xe.map(n=>(0,I.jsx)(Y,{client:e,snapshot:t,item:n,onPath:a,holds:q(n),ask:b.running?void 0:ge(n)},n.node.id))})]}),(z.length>0||x.otherCommands>0)&&(0,I.jsxs)(`div`,{className:`board-row`,children:[(0,I.jsx)(`span`,{className:`board-label`,children:`Ran`}),(0,I.jsxs)(`div`,{className:`board-cells`,children:[z.map(n=>(0,I.jsx)(Y,{client:e,snapshot:t,item:n,onPath:a},n.node.id)),x.otherCommands>0&&(0,I.jsxs)(`button`,{className:`text-button board-console`,onClick:()=>c(b.id),children:[z.length?x.otherCommands+` other `+(x.otherCommands===1?`command`:`commands`):x.otherCommands+(x.otherCommands===1?` command`:` commands`),` in the Console `,(0,I.jsx)(s,{name:`chevron`,size:12})]})]})]}),Se.length>0&&(0,I.jsxs)(`div`,{className:`board-row`,children:[(0,I.jsx)(`span`,{className:`board-label`,children:`From`}),(0,I.jsxs)(`div`,{className:`board-chips`,children:[Se.map(e=>(0,I.jsxs)(`button`,{className:`work-file`,title:e.why.replaceAll("`",``)+` · `+e.node.path,onClick:()=>a(e.node.path),children:[(0,I.jsx)(s,{name:m(e.node.path),size:14,stroke:1.7}),(0,I.jsx)(`span`,{children:e.node.title})]},e.node.id)),B(`input`)]})]}),Ce.length>0&&(0,I.jsxs)(`div`,{className:`board-row`,children:[(0,I.jsx)(`span`,{className:`board-label`,children:`Report`}),(0,I.jsx)(`div`,{className:`board-chips`,children:Ce.map(e=>(0,I.jsxs)(`button`,{className:`work-file`,title:e.why.replaceAll("`",``)+` · `+e.node.path,onClick:()=>a(e.node.path),children:[(0,I.jsx)(s,{name:`document`,size:14,stroke:1.7}),(0,I.jsx)(`span`,{children:e.node.title})]},e.node.id))})]})]}),J.length>0&&(0,I.jsxs)(`div`,{className:`board-choices`,children:[(0,I.jsxs)(`p`,{className:`board-results-why`,children:[(0,I.jsx)(`strong`,{children:`Choices`}),` · what the Agent went with`,J.some(e=>e.alternatives?.length)?`, and the other option where the notes name one`:``]}),J.map(n=>(0,I.jsx)(ye,{statement:n,trace:ee.traces.get(n),conversationId:O,client:e,projectId:t.project.id,onPath:a,onSent:e=>(d??i)(e)},n.line))]}),S.length>0&&(0,I.jsxs)(`div`,{className:`board-follow`,children:[(0,I.jsx)(`p`,{className:`board-results-why`,children:(0,I.jsx)(`strong`,{children:`Asked since`})}),(0,I.jsx)(`ol`,{children:S.map(e=>(0,I.jsx)(ke,{id:e.id,node:g.nodes.find(t=>t.id===`q:`+e.id),running:!!e.running,at:e.start,onOpen:()=>i(e.conversationId)},e.id))})]}),M&&(0,I.jsx)(Oe,{record:M,graph:g,shown:[L,...R,...Ce].filter(e=>!!e).map(e=>e.node.path),onDecide:()=>pe(`accepted`),onNeedsChanges:me}),(0,I.jsx)(`footer`,{className:`board-foot`,children:(0,I.jsxs)(`button`,{className:`text-button`,onClick:l,children:[`How each file connects, in the Graph `,(0,I.jsx)(s,{name:`chevron`,size:12})]})})]})}var je=(0,F.lazy)(()=>h(()=>import(`./graph-hS2kvHTI.js`).then(e=>({default:e.WorkStrip})),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]))),Me=e=>e>=6?6:e>=3?3:e,Ne=(e,t)=>/table/.test(e)?`table`:/media|image/.test(e)?`image`:/\.(R|r|py|sh|sql|js|ts)$/.test(t)?`code`:/document|editor|note/.test(e)?`document`:`file`;function Pe({client:e,snapshot:t,item:n,modifiedAt:r}){let i=/\.(png|jpe?g|svg|csv)$/i.test(n.path),[a,o]=(0,F.useState)(null);return(0,F.useEffect)(()=>{if(!i)return;let a=!0;return S(e,t,{path:n.path,bytes:n.bytes,modifiedAt:r,resource:n.resource}).then(e=>{a&&o(e)}),()=>{a=!1}},[n.path,n.bytes,r,n.resource?.version]),i&&!a?(0,I.jsx)(`span`,{className:`figure-thumb loading`,"aria-hidden":`true`}):a?.kind===`image`?(0,I.jsx)(`span`,{className:`figure-thumb image`,children:(0,I.jsx)(`img`,{src:a.url,alt:``})}):a?.kind===`table`?(0,I.jsx)(`span`,{className:`figure-thumb table`,"aria-hidden":`true`,children:(0,I.jsxs)(`span`,{style:{gridTemplateColumns:`repeat(${a.columns.length}, minmax(0, 1fr))`},children:[a.columns.map(e=>(0,I.jsx)(`b`,{children:e},`h`+e)),a.rows.map((e,t)=>a.columns.map(n=>(0,I.jsx)(`i`,{children:e[n]===null||e[n]===void 0?``:String(e[n])},t+n)))]})}):(0,I.jsx)(`span`,{className:`figure-thumb kind`,"aria-hidden":`true`,children:(0,I.jsx)(s,{name:y(n),size:26,stroke:1.4})})}function Fe({composition:e}){let t=c(e),n=new Map(e.views.map(e=>[e.id,e]));if(!t)return(0,I.jsx)(`span`,{className:`mini-layout empty`,children:`Empty workspace`});let r=e=>{if(e.kind===`split`)return(0,I.jsx)(`span`,{className:`mini-split `+e.axis,children:e.children.map((t,n)=>(0,I.jsx)(`span`,{style:{flexGrow:e.weights[n]??1},children:r(t)},t.id))});let t=e.views.flatMap(e=>n.get(e)??[]),i=t[0],a=i?String(i.props.title??i.id):``;return(0,I.jsxs)(`span`,{className:`mini-pane`,children:[(0,I.jsx)(`span`,{className:`mini-tabs`,children:t.slice(0,5).map((e,t)=>(0,I.jsx)(`i`,{className:t===0?`on`:void 0},e.id))}),i&&(0,I.jsxs)(`span`,{className:`mini-face`,children:[(0,I.jsx)(s,{name:Ne(String(i.component),a),size:13}),(0,I.jsx)(`span`,{children:a})]}),t.length>1&&(0,I.jsxs)(`small`,{children:[`+`,t.length-1]})]})};return(0,I.jsx)(`span`,{className:`mini-layout`,"aria-hidden":`true`,children:r(t)})}function Ie(e){return e.provenance?.originalPath??e.path}function Le(e,t){if(!e)return r(t);let[n,...i]=e.split(`/`),a=n.startsWith(`@`)?t.sources?.find(e=>`@`+e.id===n):void 0;return[a?a.name:n,...i].join(`/`)}function X({project:e,snapshot:t,client:n,section:c,notesText:l=``,workspace:u,onExplore:m,onSection:h,onAgent:g,onLayout:te,onProjectChanged:ne,onOpened:_,category:re,files:v,sources:ae,onFile:oe,linked:se=!1,onPath:y,onNewConversation:S,onConsole:C}){let[ce,le]=(0,F.useState)(!1),{runs:T,problem:D,readAgain:O}=fe(n,e.id,t.cursor),[k,ve]=(0,F.useState)(null),[A,ye]=(0,F.useState)(null),[N,be]=(0,F.useState)(!1),[P,L]=(0,F.useState)(``),[z,B]=(0,F.useState)(``),[V,H]=(0,F.useState)(``),[U,W]=(0,F.useState)(!1),[we,G]=(0,F.useState)(``),[K,q]=(0,F.useState)(``),[Te,J]=(0,F.useState)(null),[Ee,De]=(0,F.useState)(!1),[Y,Oe]=(0,F.useState)(null),[ke,Ne]=(0,F.useState)(!1),X=t.catalog.operations.some(e=>e.method===`project.work.read`&&e.authorized),Z=R(n,t,c===`overview`&&X,Ne),ze=t.catalog.operations.some(e=>e.method===`kernel.read`&&e.state===`available`&&e.authorized),Be=x(n,e.id,t.cursor,c===`overview`&&ze),Ve=!ze||Be.read!==null||!!Be.problem,He=t.catalog.operations.some(e=>e.method===`skills.list`&&e.state===`available`&&e.authorized),Ue=M(n,e.id,t.cursor,c===`overview`&&He),We=!!Ue.problem||[...Ue.list?.skills??[],...Ue.list?.removed??[]].some(e=>e.last),Ge=(0,F.useRef)(0),Ke=(0,F.useRef)(null),Q=c===`files`||c===`documents`,qe=new Map,Je=new Map;for(let e of t.compositions)for(let t of e.views)for(let n of Object.values(t.bindings??{}))`id`in n&&`version`in n&&qe.set(n.id+`@`+n.version,{compositionId:e.compositionId,viewId:t.id}),`documentId`in n&&`kind`in n&&n.kind===`live-document`&&Je.set(String(n.documentId),{compositionId:e.compositionId,viewId:t.id});let Ye=pe(t.resources.filter(e=>e.provenance?.source!==`current-filesystem-observation`),T??[]),Xe=[...T??[]].sort((e,t)=>t.acceptedAt.localeCompare(e.acceptedAt)),Ze=new Map((v?.files??[]).map(e=>[e.path,e.modifiedAt])),$=[...ae?.results??[]].sort((e,t)=>(Ze.get(t.path)??``).localeCompare(Ze.get(e.path)??``)),Qe=a(e),$e=!t.compositions.length&&!Ye.length&&!t.taskMap?.question&&!t.taskMap?.items.length&&!t.conversations?.length&&!ke&&!Be.cells&&!Be.problem,et=!$e||(T!==null||!!D)&&Y!==null&&Ve,tt=c===`overview`&&$e&&T!==null&&T.length===0&&Y!==null&&Ve,nt=!!D||(T?.length??0)>0,rt=!!Z.work&&(Z.work.files.length>0||Z.work.omitted.fileReferences>0),it=nt||rt||X||t.compositions.length>0||We,at=Me($.length),ot=!!v&&!!t.conversations?.length,st=(Y??0)>0,ct=[{key:`files`,label:`Browse files`,icon:`folder`,run:()=>h(`files`),primary:st},{key:`agent`,label:`Work with Agent`,icon:`prompt`,run:()=>g(),primary:!st}].sort((e,t)=>Number(t.primary)-Number(e.primary));async function lt(t=``){let r=++Ge.current;be(!0),B(``);try{let i=await n.call(`project.entries`,{projectId:e.id,...t?{path:t}:{}});r===Ge.current&&(ye(i),H(``))}catch(e){r===Ge.current&&B(e instanceof Error?e.message:`Could not read this folder. Try again.`)}finally{r===Ge.current&&be(!1)}}(0,F.useEffect)(()=>{Q&&!A&&!N&<()},[Q]),(0,F.useEffect)(()=>{if(c!==`overview`||!$e)return;let t=!0;return n.call(`project.entries`,{projectId:e.id}).then(e=>{t&&Oe(e.entries.length)},()=>{t&&Oe(-1)}),()=>{t=!1}},[n,e.id,c,$e]),(0,F.useEffect)(()=>()=>{Ge.current++},[]),(0,F.useEffect)(()=>{k&&!Ke.current?.open&&Ke.current?.showModal()},[k]);async function ut(r){if(!P){L(r.path),B(``);try{let i=u(),a=t.compositions.find(e=>e.compositionId===i),o=await n.call(`project.openFile`,{projectId:e.id,path:r.path,compositionId:i,expectedVersion:a?.version??0,changeId:`open-`+crypto.randomUUID()});_(o.composition.compositionId,o.viewId)}catch(e){B(e instanceof Error?e.message:`Could not open this file. Try again.`)}finally{L(``)}}}async function dt(){W(!0),G(``);try{let t=await n.call(`project.source.add`,{projectId:e.id},new AbortController().signal);t.project&&ne(t.project)}catch(e){G(e instanceof Error?e.message:`Could not add the folder. Try again.`)}finally{W(!1)}}async function ft(){De(!0),q(``);try{J((await n.call(`project.doctor`,{projectId:e.id},new AbortController().signal)).checks)}catch(e){q(e instanceof Error?e.message:`Could not check this project. Try again.`)}finally{De(!1)}}let pt=e=>(0,I.jsxs)(`button`,{className:`activity-row`,onClick:()=>ve(e.operationId),children:[(0,I.jsx)(`span`,{className:`activity-symbol `+e.execution,children:(0,I.jsx)(s,{name:`run`,size:16})}),(0,I.jsxs)(`span`,{className:`activity-name`,children:[(0,I.jsx)(`strong`,{children:e.operationId}),(0,I.jsxs)(`small`,{children:[e.author,` · `,o(e.acceptedAt).text]})]}),(0,I.jsx)(`span`,{className:`state `+e.execution,children:he(e.execution)}),(0,I.jsx)(s,{name:`chevron`,size:13})]},e.operationId),mt=(e,t)=>e&&(0,I.jsxs)(`div`,{className:`inline-error`,role:`alert`,children:[(0,I.jsx)(`p`,{children:e}),(0,I.jsx)(`button`,{onClick:t,children:`Try again`})]}),ht=(0,I.jsx)(`ul`,{className:`result-list`,children:Ye.map(({resource:e,run:t,earlier:n})=>{let r=qe.get(e.id+`@`+e.version),i=(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`span`,{className:`file-symbol`,children:(0,I.jsx)(s,{name:w(e.kind),size:19,stroke:1.6})}),(0,I.jsxs)(`span`,{className:`result-name`,children:[(0,I.jsx)(`strong`,{title:Ie(e),children:me(Ie(e))}),(0,I.jsxs)(`small`,{children:[e.kind,n?` · ${n} earlier version${n===1?``:`s`}`:``,t?` · `+t.operationId:``]})]}),(0,I.jsx)(`span`,{className:`result-state`,children:t?_e(t.integrity):E(e)}),r&&(0,I.jsx)(s,{name:`chevron`,size:14})]});return(0,I.jsx)(`li`,{children:r?(0,I.jsx)(`button`,{className:`result-row`,onClick:()=>te(r.compositionId,r.viewId),children:i}):(0,I.jsxs)(`div`,{className:`result-row`,children:[i,(0,I.jsx)(`small`,{children:`No open view`})]})},e.id+e.version)})}),gt=A?.entries.filter(e=>!V||e.name.toLocaleLowerCase().includes(V.toLocaleLowerCase()))??[],_t=b[re??`data`],vt=Q?`Files`:c===`agent`?`Agent`:c===`settings`?`Project settings`:c===`sources`?_t:r(e);return(0,I.jsxs)(`section`,{className:`project-page overview`+(Q?` files-page`:``),"aria-labelledby":`overview-title`,children:[(0,I.jsxs)(`header`,{className:`page-heading`,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`h1`,{id:`overview-title`,children:vt}),c===`overview`&&(0,I.jsx)(`p`,{title:Qe.full,children:Qe.text})]}),Q&&(0,I.jsxs)(`button`,{onClick:()=>void lt(A?.path),disabled:N,children:[(0,I.jsx)(s,{name:`refresh`,size:15}),`Refresh`]}),c===`sources`&&v&&(0,I.jsxs)(`button`,{onClick:v.refresh,disabled:v.reading,children:[(0,I.jsx)(s,{name:`refresh`,size:15}),`Refresh`]})]}),c===`sources`&&v&&oe&&(0,I.jsx)(Re,{category:re??`data`,files:v,items:ae?.[re??`data`]??null,artifacts:Ye,onFile:oe}),c===`overview`&&X&&(0,I.jsx)(xe,{state:Z,boarded:!!v&&!!t.conversations?.length,openConversation:g,openActivity:()=>h(`agent`)}),c===`overview`&&z&&(0,I.jsx)(`p`,{role:`alert`,children:z}),tt&&(0,I.jsxs)(`div`,{className:`empty-project`,children:[(0,I.jsx)(`span`,{className:`empty-symbol`,children:(0,I.jsx)(s,{name:`grid`,size:26,stroke:1.5})}),(0,I.jsx)(`h2`,{children:`No work yet`}),(0,I.jsx)(`div`,{className:`empty-actions`,children:ct.map(e=>(0,I.jsxs)(`button`,{className:e.primary?`primary`:void 0,onClick:e.run,children:[(0,I.jsx)(s,{name:e.icon,size:17,stroke:1.6}),(0,I.jsx)(`span`,{children:e.label})]},e.key))})]}),c===`overview`&&!tt&&et&&(0,I.jsxs)(I.Fragment,{children:[t.taskMap?.question&&(0,I.jsxs)(`div`,{className:`project-question`,children:[(0,I.jsx)(s,{name:`prompt`,size:18}),(0,I.jsx)(`h2`,{children:t.taskMap.question})]}),v&&!!t.conversations?.length&&(0,I.jsx)(Ae,{client:n,snapshot:t,files:v,notesText:l,onConversation:e=>g(e),onPath:e=>y?.(e),onExplore:m,onConsole:e=>C?C(e):h(`console`),onGraph:()=>h(`graph`)}),(0,I.jsxs)(`div`,{className:`project-columns`+(it?``:` single`),children:[(0,I.jsxs)(`div`,{className:`project-primary`,children:[v&&(0,I.jsx)(F.Suspense,{fallback:null,children:(0,I.jsx)(je,{client:n,snapshot:t,files:v,onOpen:()=>h(`graph`),onConversations:()=>h(`agent`)})}),(!ot||!$.length&&Ye.length>0)&&(0,I.jsxs)(`section`,{className:`project-section figures-section`,children:[(0,I.jsxs)(`div`,{className:`section-heading`,children:[(0,I.jsxs)(`h2`,{children:[`Results & figures`,$.length>0&&(0,I.jsx)(`span`,{className:`section-count`,children:$.length})]}),(0,I.jsxs)(`button`,{className:`text-button`,onClick:()=>h(`files`),children:[`All files `,(0,I.jsx)(s,{name:`chevron`,size:12})]})]}),$.length?(0,I.jsx)(`ul`,{className:`figure-grid count-`+at+(at>=3?` featured`:``),children:$.slice(0,at).map(e=>(0,I.jsx)(`li`,{children:(0,I.jsxs)(`button`,{className:`figure-card`,onClick:()=>oe?.(`results`,e),title:e.path,children:[(0,I.jsx)(Pe,{client:n,snapshot:t,item:e,modifiedAt:Ze.get(e.path)}),(0,I.jsxs)(`span`,{className:`figure-name`,children:[(0,I.jsx)(`strong`,{children:e.name}),(0,I.jsxs)(`small`,{children:[e.resource&&e.path.startsWith(`.rho/`)?`Run output`:e.folder,Ze.get(e.path)?` · `+o(Ze.get(e.path)).text:``]})]})]})},e.key))}):Ye.length?ht:(0,I.jsx)(`p`,{className:`quiet-empty`,children:`No results or figures yet.`}),$.length>at&&(0,I.jsxs)(`button`,{className:`text-button figures-more`,onClick:()=>h(`files`),children:[$.length-at,` more in Files `,(0,I.jsx)(s,{name:`chevron`,size:12})]})]}),(0,I.jsx)(p,{work:Be,snapshot:t,onOpen:()=>h(`notebook`)}),t.taskMap?.items.length?(0,I.jsxs)(`section`,{className:`project-section`,children:[(0,I.jsx)(`div`,{className:`section-heading`,children:(0,I.jsx)(`h2`,{children:`From your Agent`})}),(0,I.jsx)(`ul`,{className:`agent-notes`,children:t.taskMap.items.map(e=>(0,I.jsxs)(`li`,{"data-fact":`agent`,children:[(0,I.jsx)(`strong`,{children:e.title}),e.summary&&(0,I.jsx)(`p`,{children:e.summary}),(0,I.jsx)(`small`,{children:t.taskMap.vocabulary.states[e.state]?.label??e.state})]},e.id))})]}):null]}),it&&(0,I.jsxs)(`aside`,{className:`project-side`,children:[(t.compositions.length>0||X)&&(0,I.jsxs)(`section`,{className:`project-section`,children:[(0,I.jsx)(`div`,{className:`section-heading`,children:(0,I.jsx)(`h2`,{children:`Continue working`})}),(0,I.jsxs)(`div`,{className:`workspace-grid`,children:[t.compositions.filter(e=>!f(e.compositionId)).map(e=>(0,I.jsxs)(`button`,{className:`workspace-card`,onClick:()=>te(e.compositionId),children:[(0,I.jsxs)(`span`,{className:`workspace-card-head`,children:[(0,I.jsx)(`strong`,{children:d(e.compositionId)}),(0,I.jsxs)(`small`,{children:[e.views.length,` `,e.views.length===1?`view`:`views`]}),(0,I.jsx)(s,{name:`chevron`,size:14})]}),(0,I.jsx)(Fe,{composition:e})]},e.compositionId)),X&&(0,I.jsx)(Ce,{work:Z.work,openFile:e=>void ut({path:e})})]})]}),(0,I.jsx)(j,{list:Ue.list,problem:Ue.problem,snapshot:t,onOpen:()=>h(`skills`)}),(0,I.jsx)(Se,{work:Z.work,openFile:e=>void ut({path:e}),openActivity:()=>h(`agent`)}),nt&&(0,I.jsxs)(`section`,{className:`project-section project-recent`,children:[(0,I.jsxs)(`div`,{className:`section-heading`,children:[(0,I.jsx)(`h2`,{children:`Recent activity`}),(0,I.jsx)(`button`,{className:`text-button`,onClick:()=>h(`agent`),children:`View all`})]}),mt(D,O),Xe.length?(0,I.jsx)(`div`,{className:`activity-list`,children:Xe.slice(0,5).map(pt)}):(0,I.jsx)(`p`,{className:`quiet-empty`,children:`No runs yet.`})]})]})]})]}),Q&&(0,I.jsxs)(I.Fragment,{children:[t.documents.length>0&&(0,I.jsxs)(`section`,{className:`project-section`,children:[(0,I.jsx)(`div`,{className:`section-heading`,children:(0,I.jsx)(`h2`,{children:`Open documents`})}),(0,I.jsx)(`div`,{className:`document-list`,children:t.documents.map(e=>{let t=Je.get(e.id);return(0,I.jsxs)(`button`,{className:`document-link`,disabled:!!P,onClick:()=>t?te(t.compositionId,t.viewId):void ut(e),children:[(0,I.jsx)(s,{name:`document`,size:18}),(0,I.jsx)(`span`,{children:me(e.path)}),e.dirty&&(0,I.jsx)(`span`,{className:`unsaved-dot`,title:`Unsaved changes`,"aria-label":`Unsaved changes`})]},e.id)})})]}),(0,I.jsxs)(`section`,{className:`project-section`,"aria-label":`Project files`,children:[(0,I.jsxs)(`div`,{className:`file-toolbar`,children:[(0,I.jsxs)(`div`,{className:`folder-location`,children:[A?.path&&(0,I.jsx)(`button`,{className:`icon-button`,"aria-label":`Up one folder`,onClick:()=>void lt(A.path.split(`/`).slice(0,-1).join(`/`)),children:(0,I.jsx)(s,{name:`chevron`,size:16})}),(0,I.jsx)(`strong`,{children:Le(A?.path??``,e)})]}),(0,I.jsxs)(`div`,{className:`search-field`,children:[(0,I.jsx)(s,{name:`search`,size:17,stroke:1.7}),(0,I.jsx)(`input`,{"aria-label":`Filter files`,placeholder:`Filter files…`,value:V,onChange:e=>H(e.target.value)})]})]}),mt(z,()=>void lt(A?.path)),N&&(0,I.jsx)(`p`,{className:`loading-inline`,role:`status`,children:`Reading folder…`}),A&&(gt.length?(0,I.jsxs)(`div`,{className:`file-table-wrap`,"aria-busy":N,children:[(0,I.jsxs)(`table`,{className:`file-table`,children:[(0,I.jsx)(`thead`,{children:(0,I.jsxs)(`tr`,{children:[(0,I.jsx)(`th`,{children:`Name`}),(0,I.jsx)(`th`,{children:`Type`}),(0,I.jsx)(`th`,{children:`Size`})]})}),(0,I.jsx)(`tbody`,{children:gt.map(e=>(0,I.jsxs)(`tr`,{children:[(0,I.jsx)(`td`,{children:(0,I.jsxs)(`button`,{className:`file-open`,disabled:!!P||N,onClick:()=>void(e.kind===`folder`?lt(e.path):ut(e)),children:[(0,I.jsx)(s,{name:e.kind===`folder`?`folder`:`file`,size:19,stroke:1.6}),e.name,P===e.path&&(0,I.jsx)(`span`,{role:`status`,children:`Opening…`})]})}),(0,I.jsx)(`td`,{children:e.kind===`folder`?`Folder`:e.name.split(`.`).at(-1)?.toUpperCase()||`File`}),(0,I.jsx)(`td`,{children:e.kind===`folder`?`—`:de(e.bytes)})]},e.path))})]}),A.truncated&&(0,I.jsxs)(`p`,{className:`muted`,children:[`Showing `,A.entries.length,` of `,A.total,` entries.`]})]}):(0,I.jsxs)(`div`,{className:`empty-state compact`,children:[(0,I.jsx)(`p`,{children:V?`No files match your search.`:`This folder is empty.`}),V&&(0,I.jsx)(`button`,{onClick:()=>H(``),children:`Clear search`})]}))]}),t.resources.length>0&&(0,I.jsxs)(`section`,{className:`project-section`,children:[(0,I.jsx)(`div`,{className:`section-heading`,children:(0,I.jsx)(`h2`,{children:`Registered results`})}),ht]})]}),c===`agent`&&(()=>{let r=(0,I.jsxs)(I.Fragment,{children:[(Xe.length>0||D)&&(0,I.jsxs)(`section`,{className:`project-section agent-runs`,children:[(0,I.jsx)(`div`,{className:`section-heading`,children:(0,I.jsx)(`h2`,{children:`Runs`})}),mt(D,O),(0,I.jsx)(`div`,{className:`activity-list`,children:Xe.map(pt)})]}),se&&(0,I.jsxs)(`details`,{className:`agent-outside`,open:ce,onToggle:e=>le(e.currentTarget.open),children:[(0,I.jsx)(`summary`,{children:`Agent sessions with access`}),ce&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(ue,{snapshot:t}),(0,I.jsx)(ee,{client:n,projectId:e.id,root:e.root,onOpened:_})]})]})]});return se?r:(0,I.jsx)(ie,{client:n,snapshot:t,exists:e=>!!v?.files.some(t=>t.path===e),onContinue:e=>g(e),onPath:e=>y?.(e),onNew:()=>S?.(),onOpened:_,extra:r})})(),c===`settings`&&(0,I.jsxs)(`div`,{className:`settings-sections`,children:[(0,I.jsxs)(`section`,{className:`project-section`,children:[(0,I.jsx)(`h2`,{children:`Source folders`}),(0,I.jsx)(i,{folders:e.sources??[{id:e.id,root:e.root,name:r(e)}],busy:U,onAdd:()=>void dt()}),mt(we,()=>void dt())]}),(0,I.jsxs)(`section`,{className:`project-section`,children:[(0,I.jsxs)(`div`,{className:`section-heading`,children:[(0,I.jsx)(`h2`,{children:`Project health`}),(0,I.jsx)(`button`,{disabled:Ee,onClick:()=>void ft(),children:Ee?`Checking…`:`Check project`})]}),Te?(0,I.jsx)(`ul`,{className:`health-list`,children:Te.map(e=>(0,I.jsxs)(`li`,{children:[(0,I.jsx)(`span`,{className:`state `+e.state,children:e.state===`ok`?`Ready`:e.state===`fail`?`Blocked`:`Check`}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`p`,{children:e.detail}),e.remedy&&(0,I.jsx)(`small`,{children:e.remedy})]})]},e.id))}):(0,I.jsx)(`p`,{className:`muted`,children:`Check the tools and capabilities available to this project.`}),mt(K,()=>void ft())]})]}),k&&(0,I.jsxs)(`dialog`,{ref:Ke,className:`run-dialog`,"aria-label":k,onClose:()=>ve(null),onClick:e=>{e.target===e.currentTarget&&e.currentTarget.close()},children:[(0,I.jsx)(`button`,{className:`icon-button run-dialog-close`,"aria-label":`Close`,onClick:()=>Ke.current?.close(),children:(0,I.jsx)(s,{name:`close`,size:18})}),(0,I.jsx)(ge,{snapshot:t,client:n,operationId:k,runs:T,readRuns:O,onOpenRun:ve,opener:e=>{let t=qe.get(e.id+`@`+e.version);return t?()=>te(t.compositionId,t.viewId):null}},k)]})]})}var Z={data:`No data files in this project yet.`,code:`No scripts in this project yet.`,results:`No results or figures yet.`,notes:`No notes in this project yet.`,workflows:`No workflow files in this project now.`,reports:`No reports in this project now.`,references:`No references in this project now.`,environment:`No environment files in this project now.`};function Re({category:e,files:t,items:n,artifacts:r,onFile:i}){let[a,o]=(0,F.useState)(``),c=new Map(r.map(e=>[e.resource.id+`@`+e.resource.version,e])),u=n??[],d=u.length,f=u.filter(e=>!a||e.path.toLocaleLowerCase().includes(a.toLocaleLowerCase()));return(0,I.jsxs)(`section`,{className:`project-section source-list`,"aria-label":e,children:[(0,I.jsxs)(`div`,{className:`file-toolbar`,children:[(0,I.jsxs)(`p`,{className:`source-summary`,children:[t.readAt===0&&t.reading?`Reading the project folders…`:`${d}${t.truncated?`+`:``} ${d===1?`file`:`files`}`,t.truncated&&(0,I.jsx)(`span`,{title:`Rho reads at most ${l.maxFolders} folders, ${l.maxDepth} levels deep.`,children:` · deeper folders were not read`})]}),(0,I.jsxs)(`div`,{className:`search-field`,children:[(0,I.jsx)(s,{name:`search`,size:17,stroke:1.7}),(0,I.jsx)(`input`,{"aria-label":`Filter these files`,placeholder:`Filter…`,value:a,onChange:e=>o(e.target.value)})]})]}),t.problem&&(0,I.jsxs)(`div`,{className:`inline-error`,role:`alert`,children:[(0,I.jsx)(`p`,{children:t.problem}),(0,I.jsx)(`button`,{onClick:t.refresh,children:`Try again`})]}),d===0&&t.readAt>0?(0,I.jsx)(`div`,{className:`empty-state compact`,children:(0,I.jsx)(`p`,{children:Z[e]})}):f.length>0?(0,I.jsx)(`ul`,{className:`source-rows`,children:f.map(t=>{let n=t.resource?c.get(t.resource.id+`@`+t.resource.version):void 0;return(0,I.jsx)(`li`,{children:(0,I.jsxs)(`button`,{className:`source-row`,onClick:()=>i(e,t),children:[(0,I.jsx)(`span`,{className:`file-symbol`,children:(0,I.jsx)(s,{name:y(t),size:18,stroke:1.6})}),(0,I.jsxs)(`span`,{className:`source-name`,children:[(0,I.jsx)(`strong`,{children:t.name}),(0,I.jsxs)(`small`,{children:[t.folder,n?.run?` · from `+n.run.operationId:``]})]}),(0,I.jsx)(`span`,{className:`source-meta`,children:t.resource?n?.run?_e(n.run.integrity):`Result`:t.bytes===null?``:de(t.bytes)})]})},t.key)})}):d>0?(0,I.jsxs)(`div`,{className:`empty-state compact`,children:[(0,I.jsx)(`p`,{children:`No files match your filter.`}),(0,I.jsx)(`button`,{onClick:()=>o(``),children:`Clear filter`})]}):null]})}export{X as ProjectOverview};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{n as t,t as n}from"./react-Dss-ouuy.js";import{r}from"./markdown-0ngRuTpW.js";import{a as i,l as a}from"./canvas-BXhC8RDZ.js";import{ct as o,it as s,nt as c,tt as l,u,ut as d}from"./index-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{n as t,t as n}from"./react-Dss-ouuy.js";import{r}from"./markdown-0ngRuTpW.js";import{a as i,l as a}from"./canvas-BXhC8RDZ.js";import{ct as o,it as s,nt as c,tt as l,u,ut as d}from"./index-BHQIaDsx.js";import{t as f}from"./explore-in-8Q5ftt-E.js";var p=e(n(),1),m=t();async function h(e,t,n){let r=await a(e,t,n.resource??n.path);return r&&{id:r.node.id,component:String(r.node.component),version:String(r.node.version),props:r.node.props??{},bindings:r.node.bindings}}function g(e){return!!(e instanceof HTMLElement?e:null)?.closest(`input, textarea, select, [contenteditable=""], [contenteditable=true], [data-owner-body], [role=tablist], [role=menu], dialog[open]`)}function _({client:e,snapshot:t,item:n,items:a,kind:_,principalId:v,workspace:y,onExplore:b,onMove:x,onStudio:S,onList:C,onAbout:w}){let[T,E]=(0,p.useState)(null),[D,O]=(0,p.useState)(null),[k,A]=(0,p.useState)(!1),[j,M]=(0,p.useState)(``),N=a.findIndex(e=>e.key===n.key),P=N>0?a[N-1]:void 0,F=N>=0?a[N+1]:void 0,I=t.catalog.components.length>0;(0,p.useEffect)(()=>{if(!I)return;let r=!0;E(e=>e&&`view`in e?e:null);let i=n.key;return h(e,t,n).then(e=>{r&&E(e?{key:i,view:e}:{key:i,problem:`Rho has no viewer for this kind of file yet. It stays in the project folder.`})},e=>{r&&E({key:i,problem:e instanceof Error?e.message:`This file could not be opened.`})}),()=>{r=!1}},[e,t.project.id,I,n.key,n.bytes,n.resource?.version]),(0,p.useEffect)(()=>{M(``)},[n.key]),(0,p.useEffect)(()=>{function e(e){if(e.defaultPrevented||e.metaKey||e.ctrlKey||e.altKey||e.shiftKey||g(e.target))return;let t=e.key===`ArrowLeft`?P:e.key===`ArrowRight`?F:void 0;t&&(e.preventDefault(),x(t))}return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[P?.key,F?.key,x]);async function L(){A(!0),M(``);try{let r=await i(e,t,y(),n.resource??n.path);r?S(r.compositionId,r.viewId):M(`Rho has no viewer for this kind of file yet.`)}catch(e){M(e instanceof Error?e.message:`It could not be opened in Studio.`)}finally{A(!1)}}let R=T&&`view`in T?T.view:null,z=T?.key===n.key;return(0,m.jsxs)(`section`,{className:`file-preview`,"aria-labelledby":`preview-title`,children:[(0,m.jsxs)(`header`,{className:`preview-bar`,children:[(0,m.jsx)(`span`,{className:`file-symbol`,children:(0,m.jsx)(r,{name:o(n),size:18,stroke:1.6})}),(0,m.jsxs)(`div`,{className:`preview-name`,children:[(0,m.jsx)(`h1`,{id:`preview-title`,title:n.path,children:n.name}),(0,m.jsxs)(`small`,{children:[n.folder,n.bytes===null?``:` · `+d(n.bytes)]})]}),(0,m.jsx)(`div`,{ref:O,className:`preview-owner-header`}),(0,m.jsxs)(`div`,{className:`preview-nav`,role:`group`,"aria-label":`Browse `+_,children:[(0,m.jsx)(`button`,{className:`icon-button`,"aria-label":P?`Previous: `+P.name:`Previous file`,title:`Previous (←)`,"aria-keyshortcuts":`ArrowLeft`,disabled:!P,onClick:()=>P&&x(P),children:(0,m.jsx)(r,{name:`back`,size:16})}),(0,m.jsx)(`button`,{className:`preview-position`,title:`All `+_.toLowerCase(),onClick:C,children:N>=0?`${N+1} of ${a.length}`:a.length+` files`}),(0,m.jsx)(`button`,{className:`icon-button`,"aria-label":F?`Next: `+F.name:`Next file`,title:`Next (→)`,"aria-keyshortcuts":`ArrowRight`,disabled:!F,onClick:()=>F&&x(F),children:(0,m.jsx)(r,{name:`chevron`,size:16})})]}),b&&(l(n.path)||s(n.path))&&(0,m.jsx)(f,{languages:l(n.path)?[`r`,`python`]:[s(n.path)],title:e=>l(n.path)?`Open ${n.name} in Studio with the Notebook beside it, loaded into the ${c[e]} session as a new value`:`Open ${n.name} in Studio with the Notebook beside it, and a line that runs it waiting there for you`,onExplore:e=>b(n.path,e)}),(0,m.jsxs)(`button`,{className:`preview-studio`,"aria-label":k?`Opening in Studio`:`Open in Studio`,title:`Open in Studio`,disabled:k,onClick:()=>void L(),children:[(0,m.jsx)(r,{name:`layout`,size:15}),(0,m.jsx)(`span`,{children:k?`Opening…`:`Open in Studio`})]})]}),j&&(0,m.jsx)(`p`,{className:`canvas-note`,role:`alert`,children:j}),(0,m.jsx)(`div`,{className:`preview-body`+(R&&!z?` switching`:``),"aria-busy":!z,children:R?(0,m.jsx)(u,{active:!0,params:{view:R,snapshot:t,client:e,principalId:v,compositionId:`preview`,compositionVersion:0,contextTarget:null,headerTarget:z?D:null,renderAllowed:!0,onAbout:w}},R.id):T&&`problem`in T&&z?(0,m.jsxs)(`div`,{className:`studio-empty`,children:[(0,m.jsx)(`span`,{className:`empty-symbol`,children:(0,m.jsx)(r,{name:`file`,size:26,stroke:1.5})}),(0,m.jsx)(`h2`,{children:n.name}),(0,m.jsx)(`p`,{children:T.problem})]}):(0,m.jsxs)(`div`,{className:`loading-state`,role:`status`,children:[(0,m.jsx)(`span`,{className:`loading-dot`}),(0,m.jsxs)(`span`,{children:[`Opening `,n.name,`…`]})]})})]})}export{_ as FilePreview};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{n as t,t as n}from"./react-Dss-ouuy.js";import{t as r}from"./markdown-0ngRuTpW.js";import{
|
|
1
|
+
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{n as t,t as n}from"./react-Dss-ouuy.js";import{t as r}from"./markdown-0ngRuTpW.js";import{b as i,w as a,x as o}from"./index-BHQIaDsx.js";import{t as s}from"./snapshot-CAxBYPvV.js";var c=e(n(),1),l=t();function u({client:e,snapshot:t,principalId:n,annotationId:a,initialAnchor:u,onSent:m,onGraph:h}){let[g,_]=(0,c.useState)(null),[v,y]=(0,c.useState)(``);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(i,{client:e,projectId:t.project.id,principalId:n,annotationId:a,initialAnchor:u,threads:t.annotations,resources:t.resources,conversations:t.conversations??[],contexts:t.contexts,onSent:m,onOpenResource:_,onGraphResource:h,renderText:e=>(0,l.jsx)(r,{text:e,streaming:!1}),renderCodeChanges:n=>(0,l.jsx)(f,{client:e,projectId:t.project.id,annotationId:n,cursor:t.cursor}),renderComparison:(n,r)=>(0,l.jsx)(o,{client:e,projectId:t.project.id,left:n,right:r},n.id+r.id),onExport:y}),g&&(0,l.jsxs)(p,{label:`Captured result`,onClose:()=>_(null),children:[(0,l.jsx)(`button`,{onClick:()=>_(null),children:`Close captured result`}),(0,l.jsx)(s,{client:e,projectId:t.project.id,resource:g})]}),v&&(0,l.jsx)(d,{client:e,projectId:t.project.id,annotationId:v,onClose:()=>y(``)})]})}function d({client:e,projectId:t,annotationId:n,onClose:i}){let[a,o]=(0,c.useState)(null),[u,d]=(0,c.useState)(null),[f,m]=(0,c.useState)(null),[h,g]=(0,c.useState)(``),[_,v]=(0,c.useState)(!1);async function y(){v(!0);try{d(await e.call(`evidence.preview`,{projectId:t,annotationId:n}))}catch(e){g(e.message)}finally{v(!1)}}async function b(){v(!0);try{let r,i=`rho.evidence.export:`+t+`:`+n;try{r=JSON.parse(sessionStorage.getItem(i)??`null`)}catch{}r||(r={projectId:t,annotationId:n,expectedDigest:u.digest,exportId:`evidence-`+crypto.randomUUID()},sessionStorage.setItem(i,JSON.stringify(r))),m(await e.call(`evidence.export`,r)),sessionStorage.removeItem(i)}catch(e){g(e.message)}finally{v(!1)}}return(0,l.jsxs)(p,{label:`Export evidence`,onClose:i,children:[(0,l.jsx)(`button`,{onClick:i,children:`Close export`}),(0,l.jsx)(`h2`,{children:`Export read-only evidence`}),(0,l.jsx)(`p`,{children:`Only this question, its replies, decisions and explicitly linked captured files are included. Completeness of the analysis evidence is not established.`}),h&&(0,l.jsx)(`p`,{role:`alert`,children:h}),(0,l.jsx)(`button`,{disabled:_,onClick:()=>void y(),children:`Preview included evidence`}),u&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(`h3`,{children:`Question and replies`}),u.thread.messages.map(e=>(0,l.jsx)(`div`,{children:(0,l.jsx)(r,{text:e.draft.text,streaming:!1})},e.id)),(0,l.jsx)(`h3`,{children:`Human decisions`}),(u.thread.decisions??[]).map(e=>(0,l.jsxs)(`p`,{children:[e.status,` · `,e.reason]},e.id)),(0,l.jsx)(`h3`,{children:`Selected files`}),(0,l.jsxs)(`p`,{children:[u.files.length,` files · `,u.bytes,` bytes`]}),(0,l.jsx)(`ul`,{children:u.files.map(e=>(0,l.jsxs)(`li`,{children:[(0,l.jsx)(`button`,{onClick:()=>o(e.resource),children:e.provenance?.transform?.fields?`Table differences`:e.path}),` `,`· `,e.bytes,` bytes · `,e.resource.version.slice(0,12)]},e.resource.id))}),a&&(0,l.jsx)(s,{client:e,projectId:t,resource:a}),(0,l.jsx)(`h3`,{children:`Evidence gaps`}),(0,l.jsx)(`ul`,{children:u.gaps.map((e,t)=>(0,l.jsx)(`li`,{children:e},t))}),(0,l.jsx)(`button`,{disabled:_||!!f,onClick:()=>void b(),children:`Export this selection`})]}),f&&(0,l.jsxs)(`p`,{role:`status`,children:[`Saved to `,f.destination,`. Open index.html to read it offline.`]})]})}function f({client:e,projectId:t,annotationId:n,cursor:r}){let[i,o]=(0,c.useState)([]),[s,u]=(0,c.useState)(``);(0,c.useEffect)(()=>{let r=!0;return e.call(`evidence.preview`,{projectId:t,annotationId:n}).then(e=>{r&&o(e.files.map(e=>({...e,sourceKind:e.provenance?.observation?.kind??`disk`})).filter(e=>/\.(R|r|py|qmd|Rmd|sh|sql)$/.test(e.path)))},e=>r&&u(e.message)),()=>{r=!1}},[n,r]);let d=[...new Set(i.map(e=>e.path+` · `+e.sourceKind))];return(0,l.jsxs)(`section`,{children:[(0,l.jsx)(`h2`,{children:`Code observations`}),s&&(0,l.jsx)(`p`,{role:`alert`,children:s}),!d.length&&(0,l.jsx)(`p`,{children:`No code versions were explicitly retained for this review.`}),d.map(n=>{let r=i.filter(e=>e.path+` · `+e.sourceKind===n);return(0,l.jsxs)(`article`,{children:[(0,l.jsx)(`h3`,{children:n}),r.length>1?(0,l.jsx)(a,{client:e,projectId:t,before:r[0].resource,after:r.at(-1).resource}):(0,l.jsx)(`p`,{children:`Only one captured version is available. An earlier code version was not retained.`})]},n)})]})}function p({label:e,onClose:t,children:n}){let r=(0,c.useRef)(null);return(0,c.useEffect)(()=>{let e=document.activeElement;return r.current?.showModal(),()=>{r.current?.close(),e?.focus()}},[]),(0,l.jsx)(`dialog`,{className:`review-overlay`,ref:r,"aria-label":e,onCancel:e=>{e.preventDefault(),t()},children:n})}export{u as default};
|