@wular/coder 0.3.18 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -16
- package/bin/coder.mjs +3 -1
- package/dist/actions-Mk3FSlpJ.js +20 -0
- package/dist/adapter-B0oYCI0S.js +1 -0
- package/dist/adapter-BKVzTDnn.js +1 -0
- package/dist/adapter-DPInwbJG.js +1 -0
- package/dist/adapter-DaiJMOYo.js +1 -0
- package/dist/adapter-PeKziOUg.js +1 -0
- package/dist/add-BxpLHnvD.js +1 -0
- package/dist/add-CE-70LFs.js +1 -0
- package/dist/add-U-pty9qJ.js +6 -0
- package/dist/add-ej0X9e3a.js +1 -0
- package/dist/add-json-CEa-6luW.js +1 -0
- package/dist/agent-BsYx3Odz.js +3 -0
- package/dist/agent-JdtZozvP.js +1 -0
- package/dist/alias-DX-Bm86x.js +2 -0
- package/dist/app-BT5f7zL5.js +1 -0
- package/dist/approvals-C-AvFt6s.js +2 -0
- package/dist/approve-DOmpQRNd.js +2 -0
- package/dist/apps-CjfrZyM5.js +1 -0
- package/dist/archive-BUB8gFKD.js +4 -0
- package/dist/archive-BziJ1rQ-.js +3 -0
- package/dist/archive-sweep-CtBcARgN.js +1 -0
- package/dist/args-BOEEdpWk.js +1 -0
- package/dist/ask-dE3U3ss2.js +4 -0
- package/dist/auth-BFny--17.js +1 -0
- package/dist/auth-DWHIzqbA.js +1 -0
- package/dist/builtin/coder/agent.json +24 -0
- package/dist/builtin/coder/system.md +17 -0
- package/dist/chat-3Znsevah.js +1 -0
- package/dist/chat-B_yhNTo0.js +13 -0
- package/dist/chat-bridge-BS9WtP3X.js +2 -0
- package/dist/cli-BilSDkvE.js +9 -0
- package/dist/cli.d.ts +71 -1
- package/dist/cli.js +1 -91
- package/dist/client-D9IoAuDD.js +1 -0
- package/dist/config-Da_cwoxI.js +3 -0
- package/dist/create-C_iMJV4Y.js +1 -0
- package/dist/credentials-B1jv6dkg.js +1 -0
- package/dist/dash/manifest.json +3427 -0
- package/dist/dash/public/assets/apple-touch-icon.png +0 -0
- package/dist/dash/public/assets/chunks/agent-pills-69c965aae1737cef.js +1 -0
- package/dist/dash/public/assets/chunks/agent-settings-form-a1ce70812eea3f20.js +1 -0
- package/dist/dash/public/assets/chunks/agents-grid-f62180478e43c192.js +1 -0
- package/dist/dash/public/assets/chunks/badge-d07f35e9abc80e14.js +1 -0
- package/dist/dash/public/assets/chunks/card-be04148b64223a52.js +1 -0
- package/dist/dash/public/assets/chunks/combo-32c321a7a84fa902.js +1 -0
- package/dist/dash/public/assets/chunks/composer-aec9c3c691f1f79a.js +1 -0
- package/dist/dash/public/assets/chunks/composer-data-6f7608fed13f3dd7.js +1 -0
- package/dist/dash/public/assets/chunks/composer-e56860d72742379e.js +1 -0
- package/dist/dash/public/assets/chunks/confirm-b4e2c16aef4b3431.js +1 -0
- package/dist/dash/public/assets/chunks/connect-apps-a5a63941e287c33f.js +1 -0
- package/dist/dash/public/assets/chunks/connect-repositories-e4c049b5b4384623.js +1 -0
- package/dist/dash/public/assets/chunks/credentials-list-2b7d0c771b89f9c5.js +2 -0
- package/dist/dash/public/assets/chunks/custom-range-53b70e0d9eeae84e.js +1 -0
- package/dist/dash/public/assets/chunks/editor-691d2bcecb1ecb87.js +7 -0
- package/dist/dash/public/assets/chunks/engines-list-a5fe1671601ce3b0.js +1 -0
- package/dist/dash/public/assets/chunks/field-9e12e5fc8774b6e5.js +1 -0
- package/dist/dash/public/assets/chunks/format-eb03fc9d9744d960.js +1 -0
- package/dist/dash/public/assets/chunks/heads-4041a925d63ab116.js +1 -0
- package/dist/dash/public/assets/chunks/instructions-4e0d18b9b40edbd7.js +2 -0
- package/dist/dash/public/assets/chunks/instructions-b00959bd4bb70502.js +1 -0
- package/dist/dash/public/assets/chunks/list-d7eb9e02cf261fbe.js +1 -0
- package/dist/dash/public/assets/chunks/mcp-list-a450533109045ef5.js +1 -0
- package/dist/dash/public/assets/chunks/model-options-15c53331a2f28a4f.js +1 -0
- package/dist/dash/public/assets/chunks/models-list-1e273c6843858148.js +1 -0
- package/dist/dash/public/assets/chunks/paged-bc6fa0c2b9d52ed7.js +1 -0
- package/dist/dash/public/assets/chunks/platform-actions-87f3f76ec1b840cb.js +1 -0
- package/dist/dash/public/assets/chunks/runners-list-fc7cdae4fa93e78b.js +1 -0
- package/dist/dash/public/assets/chunks/runtime-246221e985d863e5-1.js +2 -0
- package/dist/dash/public/assets/chunks/segmented-6091dfb2f954799f.js +1 -0
- package/dist/dash/public/assets/chunks/select-dd09a6b9544cfde2.js +1 -0
- package/dist/dash/public/assets/chunks/sentinel-ff7143a47fd22835.js +1 -0
- package/dist/dash/public/assets/chunks/shared-init-246221e985d863e5-2.js +1 -0
- package/dist/dash/public/assets/chunks/shared-init-8f2ac936c95a7f7b.js +1 -0
- package/dist/dash/public/assets/chunks/shared-init-986901c810947c12.js +5 -0
- package/dist/dash/public/assets/chunks/shared-init-baceed9fd2d43661.js +2 -0
- package/dist/dash/public/assets/chunks/tail-5a5bfcd308535d70.js +1 -0
- package/dist/dash/public/assets/chunks/task-actions-7919ca0e901131f4.js +1 -0
- package/dist/dash/public/assets/chunks/task-fa8b82e95e771c4a.js +1 -0
- package/dist/dash/public/assets/chunks/task-view-e8a0f99c992fa11e.js +3 -0
- package/dist/dash/public/assets/chunks/tasks-list-7b72f5b295349532.js +1 -0
- package/dist/dash/public/assets/chunks/toolbar-9b18a5d26dee37c3.js +1 -0
- package/dist/dash/public/assets/chunks/versions-list-8cdf3a41c56b2152.js +1 -0
- package/dist/dash/public/assets/chunks/wular-pnext-246221e985d863e5-0.js +1 -0
- package/dist/dash/public/assets/connect-382b1729a7ae7808.css +1 -0
- package/dist/dash/public/assets/dash-9e02d5d1a6d42ee3.css +1 -0
- package/dist/dash/public/assets/dash-account-04859899c1838ada.css +1 -0
- package/dist/dash/public/assets/dash-agents-9e678137267dec07.css +1 -0
- package/dist/dash/public/assets/dash-agents-new-26fa27b17ef9b8d8.css +1 -0
- package/dist/dash/public/assets/dash-agents-param-slug-b975c48f8abf3444.css +1 -0
- package/dist/dash/public/assets/dash-agents-param-slug-edit-e13fda599bb04843.css +1 -0
- package/dist/dash/public/assets/dash-agents-param-slug-platforms-70292932cb27bc96.css +1 -0
- package/dist/dash/public/assets/dash-agents-param-slug-settings-71f9a86251723fcc.css +1 -0
- package/dist/dash/public/assets/dash-agents-param-slug-tasks-fb8eb2ed71006601.css +1 -0
- package/dist/dash/public/assets/dash-agents-param-slug-usage-7c8740f1cdd52c71.css +1 -0
- package/dist/dash/public/assets/dash-settings-8eb818da462227e8.css +1 -0
- package/dist/dash/public/assets/dash-settings-param-tab-849a1a9542e273f5.css +1 -0
- package/dist/dash/public/assets/dash-tasks-81e510e0b6931b42.css +1 -0
- package/dist/dash/public/assets/dash-tasks-param-id-bbd2a83342f2ec10.css +1 -0
- package/dist/dash/public/assets/dash-usage-8e0259e03eaed1bd.css +1 -0
- package/dist/dash/public/assets/favicon.ico +0 -0
- package/dist/dash/public/assets/favicon.svg +1 -0
- package/dist/dash/public/assets/fonts/LICENSE-fira-code +93 -0
- package/dist/dash/public/assets/fonts/fira-code-latin-400-normal-717ee080.woff2 +0 -0
- package/dist/dash/public/assets/fonts/fira-code-latin-500-normal-530b6706.woff2 +0 -0
- package/dist/dash/public/assets/fonts/fira-code-latin-700-normal-98730669.woff2 +0 -0
- package/dist/dash/public/assets/global-d2adbf01910d9df5.css +1 -0
- package/dist/dash/public/assets/login-c129b1ce237be260.css +1 -0
- package/dist/dash/public/assets/pnext-client-073464b8f422ef57.js +1 -0
- package/dist/dash/public/assets/pnext-client-0b6720fdec66eeb0.js +1 -0
- package/dist/dash/public/assets/pnext-client-1e9cb2f4f6387a87.js +1 -0
- package/dist/dash/public/assets/pnext-client-2f0e78dd006fed0f.js +1 -0
- package/dist/dash/public/assets/pnext-client-3c62e2aa2cbe9fe1.js +1 -0
- package/dist/dash/public/assets/pnext-client-43a88896ed42dd39.js +1 -0
- package/dist/dash/public/assets/pnext-client-4cf2e27d0b9c0365.js +1 -0
- package/dist/dash/public/assets/pnext-client-587008fa987d3073.js +1 -0
- package/dist/dash/public/assets/pnext-client-676360cc86f31573.js +1 -0
- package/dist/dash/public/assets/pnext-client-813427605f424145.js +1 -0
- package/dist/dash/public/assets/pnext-client-82de7cf6dfc35b98.js +1 -0
- package/dist/dash/public/assets/pnext-client-831e8004c09f0b5b.js +1 -0
- package/dist/dash/public/assets/pnext-client-9b557fe468a45ca3.js +1 -0
- package/dist/dash/public/assets/pnext-client-ab7c900c802fe827.js +1 -0
- package/dist/dash/public/assets/pnext-client-d87d00e402811f0c.js +1 -0
- package/dist/dash/public/assets/pnext-client-fbdb7c1da7eda7e5.js +1 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/boot-B2MFTRO2.js +28 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/build-tier-XJJSL5FR.js +2702 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-2HFY3DQT.js +206 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-2ICEVELW.js +832 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-3UPROT2C.js +33 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-4P5CMIYT.js +1580 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-4TKZKZ3Q.js +129 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-5RDEILQB.js +435 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-62KEQM43.js +23 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-6KQSWT6D.js +829 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-7DCNCW6O.js +722 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-B4THCTQP.js +20 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-C2LIV2MM.js +170 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-CCATPVTW.js +376 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-COXJAPTU.js +87 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-E6IXL2NJ.js +6268 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-FLGRBFAH.js +1196 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-FTJVHFWD.js +59 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-H523KSIH.js +5149 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-HT6KKX6A.js +18 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-JESFYECC.js +436 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-JRPJM2XY.js +15 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-L2IWDUXG.js +105 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-L5P4Y4UC.js +181 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-NQE46AZN.js +645 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-PA4QEARJ.js +127 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-PZ5AXOLW.js +7144 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-SNVPTULL.js +2395 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-T3QZT3PG.js +218 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-VC5O2SDP.js +70 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-WZX4V6CM.js +229 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-XUUIDXY5.js +625 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-ZHFDO3PR.js +263 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/compile-CE2DN7ZA.js +16 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/config-UREY7XJT.js +14 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/config-loader-UI2XE3PZ.js +15 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/entry.js +217 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/generate-I2PPTDFD.js +14 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/modules-UVOCE4C2.js +46 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/pipeline-UW47K537.js +961 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/proxy-ITGOVJBW.js +24 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/register-4SA55SWT.js +12577 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/router-JNKHLBCZ.js +503 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/routes-PD6J2NXW.js +52 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/tsconfig-defaults-ZXEH7RQK.js +13 -0
- package/dist/default-Bobztoxf.js +1 -0
- package/dist/default-vYPT26DR.js +1 -0
- package/dist/delete-D8gEwoOj.js +4 -0
- package/dist/delete-z1_86nf6.js +2 -0
- package/dist/disable-DVKd-0Xb.js +1 -0
- package/dist/discover-Df-a8K4R.js +3 -0
- package/dist/discover-Dvr_3_Xr.js +1 -0
- package/dist/dispatch-BKeAch9E.js +14 -0
- package/dist/docs-BX65z2Iu.js +2 -0
- package/dist/docs-DKJnqZqt.js +2 -0
- package/dist/enable-C8Zf_wpN.js +1 -0
- package/dist/env-CRf6wkM2.js +1 -0
- package/dist/exec-RZFLclKX.js +11 -0
- package/dist/executor-BvAA7Cgw.js +10 -0
- package/dist/flow/builtin/review.d.ts +157 -0
- package/dist/flow/builtin/review.js +19 -0
- package/dist/flow/index.d.ts +1 -1
- package/dist/flow/index.js +1 -1
- package/dist/flow-17k25MHt.js +1 -0
- package/dist/github-actions-DwUzm4hC.js +24 -0
- package/dist/http-Bkg_OQ6r.js +1 -0
- package/dist/{index-BQ-b77or.d.ts → index-DT7EST00.d.ts} +116 -238
- package/dist/init-CoMfFxbG.js +1 -0
- package/dist/integrations-5xCaXSd-.js +1 -0
- package/dist/integrations-BAgdVDhj.js +5 -0
- package/dist/lib/broker.js +3 -3
- package/dist/list-BAKvxSbh.js +4 -0
- package/dist/list-BYiG8Zav.js +2 -0
- package/dist/list-BxEywhHU.js +1 -0
- package/dist/list-C5w01-8q.js +1 -0
- package/dist/list-CIW2joV1.js +1 -0
- package/dist/list-DX-z3SBp.js +3 -0
- package/dist/list-DpCf4G-H.js +4 -0
- package/dist/list-VToARh3C.js +1 -0
- package/dist/load-BpEsAn51.js +2 -0
- package/dist/local-H3uvqEbq.js +1 -0
- package/dist/log-view-dg0TlKLA.js +1 -0
- package/dist/login-BFxX4jJy.js +1 -0
- package/dist/login-DkkslfBx.js +1 -0
- package/dist/logout-BHAtw4Z8.js +1 -0
- package/dist/maintenance-C5FklUw3.js +1 -0
- package/dist/match-CXAjDhg7.js +1 -0
- package/dist/mcp-BgKb2Cdk.js +1 -0
- package/dist/mcp-CCZOAo06.js +1 -0
- package/dist/mcp-server-DGzme0YX.js +1 -0
- package/dist/migrate-C4vM7DQN.js +2 -0
- package/dist/migrate-N-85_N7J.js +1 -0
- package/dist/model-Bs1StDo3.js +1 -0
- package/dist/models-_5LVGC3m.js +1 -0
- package/dist/output-BKeyLbvt.js +5 -0
- package/dist/prompt-CEuBMNhk.js +7 -0
- package/dist/push-CUC55Bqd.js +1 -0
- package/dist/queue-6io_NOP3.js +116 -0
- package/dist/refresh-BIrmrWYq.js +1 -0
- package/dist/remote-miQNTVRa.js +1 -0
- package/dist/remove-B93LNkZI.js +1 -0
- package/dist/remove-C5_xggx7.js +1 -0
- package/dist/remove-CuH8a3L9.js +1 -0
- package/dist/remove-eQ8y5C5p.js +1 -0
- package/dist/rename-CYfy03FE.js +1 -0
- package/dist/result-BEtQZHaY.js +5 -0
- package/dist/result-BzaM3inj.js +15 -0
- package/dist/resume-DYzKvyEw.js +3 -0
- package/dist/review-oIBeECZE.js +7 -0
- package/dist/rolldown-runtime-DT7IzrpZ.js +1 -0
- package/dist/rotate-key-IdMYH7gg.js +1 -0
- package/dist/run-BDYl0CKl.js +2 -0
- package/dist/run-CTtd0Znc.js +5 -0
- package/dist/run-CawRGnOg.js +2 -0
- package/dist/runner-D7ScbIHJ.js +1 -0
- package/dist/runner-sUpWJ_k0.js +1 -0
- package/dist/schema-CU2iFkp8.js +1 -0
- package/dist/sdk.d.ts +1166 -191
- package/dist/sdk.js +1 -1
- package/dist/serve-BTeomYxW.js +1 -0
- package/dist/serve-CE8YV2e9.js +1 -0
- package/dist/serve-CPnmrKyf.js +2 -0
- package/dist/serve-CQKZxzFE.js +4 -0
- package/dist/serve-GmRO89s5.js +12 -0
- package/dist/server-Kb22cWfF.js +1 -0
- package/dist/setup-host-GFTUzzZJ.js +6 -0
- package/dist/shared-DVtzWhUT.js +1 -0
- package/dist/show-CMUg8SJu.js +1 -0
- package/dist/show-COTZEYgc.js +1 -0
- package/dist/status-D26U--p8.js +1 -0
- package/dist/steer-C6uARLp5.js +4 -0
- package/dist/stop-BrGI3hSS.js +1 -0
- package/dist/stop-ByCAlbmN.js +3 -0
- package/dist/store-B94tSate.js +42 -0
- package/dist/store-DzqXS2wT.js +8 -0
- package/dist/task-C6VAg5WU.js +1 -0
- package/dist/task-CgOKgkEG.js +1 -0
- package/dist/task-DeglY79z.js +5 -0
- package/dist/test-NEbhlxvo.js +1 -0
- package/dist/tools-D0Zfs8Hx.js +1 -0
- package/dist/types-D0q15RJa.js +1 -0
- package/dist/types-Dve7Z0ZP.d.ts +389 -0
- package/dist/unalias-C9NqmSDq.js +1 -0
- package/dist/update-BTxYQj7Z.js +2 -0
- package/dist/upgrade-hA0yWBvx.js +2 -0
- package/dist/usage-BhqoCjvE.js +1 -0
- package/dist/usage-C4d9X2Uq.js +1 -0
- package/dist/watch-CSdj24ct.js +5 -0
- package/dist/watch-DtRuC0Wc.js +8 -0
- package/dist/wire-BeT1Axeo.js +1 -0
- package/dist/worker-CXndxmGF.js +9 -0
- package/dist/worker-DX7P9kWl.js +1 -0
- package/dist/workflow-Dcmdooi8.js +1 -0
- package/docs/agents/coder.md +26 -0
- package/docs/agents/index.md +120 -0
- package/docs/config.md +51 -30
- package/docs/dash.md +64 -0
- package/docs/flows.md +20 -15
- package/docs/mcp.md +62 -0
- package/docs/models.md +41 -23
- package/docs/review.md +41 -0
- package/docs/sdk.md +57 -38
- package/docs/self-host.md +188 -0
- package/migrations/0000_initial.sql +252 -0
- package/migrations/meta/0000_snapshot.json +1787 -0
- package/migrations/meta/_journal.json +13 -0
- package/package.json +37 -7
- package/plugins/agents/skills/coder/SKILL.md +14 -60
- package/plugins/claude/.claude-plugin/plugin.json +1 -1
- package/plugins/claude/commands/setup.md +2 -2
- package/plugins/claude/skills/dispatch/SKILL.md +14 -58
- package/plugins/cursor/.cursor-plugin/plugin.json +1 -1
- package/plugins/cursor/README.md +5 -5
- package/plugins/cursor/assets/logo.png +0 -0
- package/plugins/cursor/skills/coder/SKILL.md +14 -59
- package/src/client/index.ts +573 -0
- package/src/client/types.ts +506 -0
- package/src/core/errors.ts +72 -0
- package/src/core/task/log-view.ts +173 -0
- package/src/server/auth/sign-in.ts +14 -0
- package/src/server/dash/api/load.ts +62 -0
- package/src/server/dash/api/types.ts +11 -0
- package/src/server/dash/app/connect/page.tsx +42 -0
- package/src/server/dash/app/dash/account/loading.tsx +11 -0
- package/src/server/dash/app/dash/account/notify.tsx +42 -0
- package/src/server/dash/app/dash/account/page.css +81 -0
- package/src/server/dash/app/dash/account/page.tsx +126 -0
- package/src/server/dash/app/dash/account/sign-out.tsx +24 -0
- package/src/server/dash/app/dash/agents/(list)/agent-menu.tsx +10 -0
- package/src/server/dash/app/dash/agents/(list)/agents-grid.tsx +143 -0
- package/src/server/dash/app/dash/agents/(list)/connect-apps.tsx +46 -0
- package/src/server/dash/app/dash/agents/(list)/loading.tsx +14 -0
- package/src/server/dash/app/dash/agents/(list)/page.css +72 -0
- package/src/server/dash/app/dash/agents/(list)/page.tsx +89 -0
- package/src/server/dash/app/dash/agents/[slug]/(tabs)/layout.tsx +135 -0
- package/src/server/dash/app/dash/agents/[slug]/(tabs)/loading.tsx +5 -0
- package/src/server/dash/app/dash/agents/[slug]/(tabs)/page.css +21 -0
- package/src/server/dash/app/dash/agents/[slug]/(tabs)/page.tsx +173 -0
- package/src/server/dash/app/dash/agents/[slug]/(tabs)/platforms/loading.tsx +18 -0
- package/src/server/dash/app/dash/agents/[slug]/(tabs)/platforms/page.css +87 -0
- package/src/server/dash/app/dash/agents/[slug]/(tabs)/platforms/page.tsx +258 -0
- package/src/server/dash/app/dash/agents/[slug]/(tabs)/platforms/platform-actions.tsx +111 -0
- package/src/server/dash/app/dash/agents/[slug]/(tabs)/settings/agent-settings-form.css +114 -0
- package/src/server/dash/app/dash/agents/[slug]/(tabs)/settings/agent-settings-form.tsx +294 -0
- package/src/server/dash/app/dash/agents/[slug]/(tabs)/settings/loading.tsx +5 -0
- package/src/server/dash/app/dash/agents/[slug]/(tabs)/settings/page.tsx +54 -0
- package/src/server/dash/app/dash/agents/[slug]/(tabs)/tasks/loading.tsx +5 -0
- package/src/server/dash/app/dash/agents/[slug]/(tabs)/tasks/page.tsx +14 -0
- package/src/server/dash/app/dash/agents/[slug]/(tabs)/usage/loading.tsx +31 -0
- package/src/server/dash/app/dash/agents/[slug]/(tabs)/usage/page.css +12 -0
- package/src/server/dash/app/dash/agents/[slug]/(tabs)/usage/page.tsx +163 -0
- package/src/server/dash/app/dash/agents/[slug]/(tabs)/versions-list.tsx +53 -0
- package/src/server/dash/app/dash/agents/[slug]/edit/loading.tsx +31 -0
- package/src/server/dash/app/dash/agents/[slug]/edit/page.tsx +91 -0
- package/src/server/dash/app/dash/agents/agent/agent-pills.css +27 -0
- package/src/server/dash/app/dash/agents/agent/agent-pills.tsx +133 -0
- package/src/server/dash/app/dash/agents/agent/hero.css +40 -0
- package/src/server/dash/app/dash/agents/agent/hero.tsx +60 -0
- package/src/server/dash/app/dash/agents/agent/instructions.css +29 -0
- package/src/server/dash/app/dash/agents/agent/instructions.tsx +82 -0
- package/src/server/dash/app/dash/agents/editor/connect-repositories.ts +16 -0
- package/src/server/dash/app/dash/agents/editor/editor.css +263 -0
- package/src/server/dash/app/dash/agents/editor/editor.tsx +774 -0
- package/src/server/dash/app/dash/agents/editor/import-picker.css +48 -0
- package/src/server/dash/app/dash/agents/editor/import-picker.tsx +253 -0
- package/src/server/dash/app/dash/agents/editor/names.ts +35 -0
- package/src/server/dash/app/dash/agents/new/loading.tsx +25 -0
- package/src/server/dash/app/dash/agents/new/page.tsx +72 -0
- package/src/server/dash/app/dash/layout.css +265 -0
- package/src/server/dash/app/dash/layout.tsx +332 -0
- package/src/server/dash/app/dash/page.tsx +14 -0
- package/src/server/dash/app/dash/settings/[tab]/credentials-list.css +94 -0
- package/src/server/dash/app/dash/settings/[tab]/credentials-list.tsx +619 -0
- package/src/server/dash/app/dash/settings/[tab]/credentials.tsx +36 -0
- package/src/server/dash/app/dash/settings/[tab]/engines-list.css +16 -0
- package/src/server/dash/app/dash/settings/[tab]/engines-list.tsx +135 -0
- package/src/server/dash/app/dash/settings/[tab]/list.css +98 -0
- package/src/server/dash/app/dash/settings/[tab]/list.tsx +215 -0
- package/src/server/dash/app/dash/settings/[tab]/loading.tsx +6 -0
- package/src/server/dash/app/dash/settings/[tab]/mcp-list.css +43 -0
- package/src/server/dash/app/dash/settings/[tab]/mcp-list.tsx +290 -0
- package/src/server/dash/app/dash/settings/[tab]/models-list.tsx +513 -0
- package/src/server/dash/app/dash/settings/[tab]/page.tsx +89 -0
- package/src/server/dash/app/dash/settings/[tab]/runners-list.css +153 -0
- package/src/server/dash/app/dash/settings/[tab]/runners-list.tsx +457 -0
- package/src/server/dash/app/dash/settings/layout.tsx +50 -0
- package/src/server/dash/app/dash/settings/model-options.ts +117 -0
- package/src/server/dash/app/dash/settings/page.tsx +7 -0
- package/src/server/dash/app/dash/settings/settings-head.tsx +24 -0
- package/src/server/dash/app/dash/settings/tunnel-guide.tsx +28 -0
- package/src/server/dash/app/dash/tasks/[id]/activity.tsx +202 -0
- package/src/server/dash/app/dash/tasks/[id]/loading.tsx +31 -0
- package/src/server/dash/app/dash/tasks/[id]/page.tsx +30 -0
- package/src/server/dash/app/dash/tasks/[id]/task-actions.tsx +164 -0
- package/src/server/dash/app/dash/tasks/[id]/task-view.css +407 -0
- package/src/server/dash/app/dash/tasks/[id]/task-view.tsx +513 -0
- package/src/server/dash/app/dash/tasks/composer-data.ts +96 -0
- package/src/server/dash/app/dash/tasks/composer.css +316 -0
- package/src/server/dash/app/dash/tasks/composer.tsx +890 -0
- package/src/server/dash/app/dash/tasks/list/status.css +50 -0
- package/src/server/dash/app/dash/tasks/list/status.tsx +20 -0
- package/src/server/dash/app/dash/tasks/list/task.ts +45 -0
- package/src/server/dash/app/dash/tasks/list/tasks-list.css +85 -0
- package/src/server/dash/app/dash/tasks/list/tasks-list.tsx +402 -0
- package/src/server/dash/app/dash/tasks/list/tasks-section.tsx +96 -0
- package/src/server/dash/app/dash/tasks/page.tsx +53 -0
- package/src/server/dash/app/dash/token-from-hash.tsx +17 -0
- package/src/server/dash/app/dash/usage/custom-range.tsx +63 -0
- package/src/server/dash/app/dash/usage/day-chart.css +109 -0
- package/src/server/dash/app/dash/usage/day-chart.tsx +110 -0
- package/src/server/dash/app/dash/usage/loading.tsx +17 -0
- package/src/server/dash/app/dash/usage/metric.ts +13 -0
- package/src/server/dash/app/dash/usage/page.tsx +117 -0
- package/src/server/dash/app/dash/usage/range-bar.css +13 -0
- package/src/server/dash/app/dash/usage/range-bar.tsx +69 -0
- package/src/server/dash/app/dash/usage/stats.css +52 -0
- package/src/server/dash/app/dash/usage/stats.tsx +19 -0
- package/src/server/dash/app/dash/usage/top-agents.css +40 -0
- package/src/server/dash/app/dash/usage/top-agents.tsx +138 -0
- package/src/server/dash/app/dash/usage/usage.css +0 -0
- package/src/server/dash/app/globals.css +692 -0
- package/src/server/dash/app/layout.tsx +52 -0
- package/src/server/dash/app/login/page.css +26 -0
- package/src/server/dash/app/login/page.tsx +57 -0
- package/src/server/dash/app/page.tsx +5 -0
- package/src/server/dash/app/responsive.css +49 -0
- package/src/server/dash/app/zone.tsx +13 -0
- package/src/server/dash/comps/frame/auth-panel.css +60 -0
- package/src/server/dash/comps/frame/auth-panel.tsx +44 -0
- package/src/server/dash/comps/frame/drawer.css +28 -0
- package/src/server/dash/comps/frame/drawer.tsx +39 -0
- package/src/server/dash/comps/frame/heads.ts +41 -0
- package/src/server/dash/comps/frame/loading-card.tsx +65 -0
- package/src/server/dash/comps/frame/page-head.css +83 -0
- package/src/server/dash/comps/frame/page-head.tsx +71 -0
- package/src/server/dash/comps/frame/stream.tsx +50 -0
- package/src/server/dash/comps/frame/task-toasts.tsx +214 -0
- package/src/server/dash/comps/frame/theme-choices.tsx +46 -0
- package/src/server/dash/comps/nav/current-link.tsx +53 -0
- package/src/server/dash/comps/nav/side-toggle.tsx +30 -0
- package/src/server/dash/comps/nav/to.ts +22 -0
- package/src/server/dash/comps/ui/badge.css +64 -0
- package/src/server/dash/comps/ui/badge.tsx +41 -0
- package/src/server/dash/comps/ui/card.css +93 -0
- package/src/server/dash/comps/ui/card.tsx +77 -0
- package/src/server/dash/comps/ui/collapse.css +32 -0
- package/src/server/dash/comps/ui/collapse.tsx +49 -0
- package/src/server/dash/comps/ui/combo.tsx +154 -0
- package/src/server/dash/comps/ui/confirm.css +36 -0
- package/src/server/dash/comps/ui/confirm.tsx +67 -0
- package/src/server/dash/comps/ui/field.css +25 -0
- package/src/server/dash/comps/ui/field.tsx +34 -0
- package/src/server/dash/comps/ui/icon.css +22 -0
- package/src/server/dash/comps/ui/icon.tsx +17 -0
- package/src/server/dash/comps/ui/icons.ts +44 -0
- package/src/server/dash/comps/ui/menu.css +178 -0
- package/src/server/dash/comps/ui/menu.tsx +152 -0
- package/src/server/dash/comps/ui/segmented.css +44 -0
- package/src/server/dash/comps/ui/segmented.tsx +58 -0
- package/src/server/dash/comps/ui/select.css +103 -0
- package/src/server/dash/comps/ui/select.tsx +250 -0
- package/src/server/dash/comps/ui/sentinel.css +58 -0
- package/src/server/dash/comps/ui/sentinel.tsx +67 -0
- package/src/server/dash/comps/ui/tabs.css +81 -0
- package/src/server/dash/comps/ui/tabs.tsx +32 -0
- package/src/server/dash/comps/ui/tail.css +12 -0
- package/src/server/dash/comps/ui/tail.tsx +37 -0
- package/src/server/dash/comps/ui/toast.css +72 -0
- package/src/server/dash/comps/ui/toolbar.css +143 -0
- package/src/server/dash/comps/ui/toolbar.tsx +93 -0
- package/src/server/dash/package.json +5 -0
- package/src/server/dash/pnext-env.d.ts +4 -0
- package/src/server/dash/pnext.config.ts +5 -0
- package/src/server/dash/public/assets/apple-touch-icon.png +0 -0
- package/src/server/dash/public/assets/favicon.ico +0 -0
- package/src/server/dash/public/assets/favicon.svg +1 -0
- package/src/server/dash/public/assets/fonts/LICENSE-fira-code +93 -0
- package/src/server/dash/public/assets/fonts/fira-code-latin-400-normal-717ee080.woff2 +0 -0
- package/src/server/dash/public/assets/fonts/fira-code-latin-500-normal-530b6706.woff2 +0 -0
- package/src/server/dash/public/assets/fonts/fira-code-latin-700-normal-98730669.woff2 +0 -0
- package/src/server/dash/tsconfig.json +10 -0
- package/src/server/dash/utils/client.ts +19 -0
- package/src/server/dash/utils/format.ts +75 -0
- package/src/server/dash/utils/paged.ts +184 -0
- package/src/server/dash/utils/range.ts +117 -0
- package/dist/app-server-CW93J9zJ.js +0 -3
- package/dist/runtime-D-U1DNkI.js +0 -26
- package/dist/upgrade-DOj06r5b.js +0 -37
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
.btn .logo {
|
|
2
|
+
width: 16px;
|
|
3
|
+
height: 16px;
|
|
4
|
+
flex: none;
|
|
5
|
+
}
|
|
6
|
+
.provider-grid {
|
|
7
|
+
display: grid;
|
|
8
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
9
|
+
gap: 8px;
|
|
10
|
+
}
|
|
11
|
+
.provider-grid > .provider:only-child {
|
|
12
|
+
grid-column: 1 / -1;
|
|
13
|
+
}
|
|
14
|
+
.provider {
|
|
15
|
+
justify-content: center;
|
|
16
|
+
gap: 10px;
|
|
17
|
+
text-transform: none;
|
|
18
|
+
letter-spacing: 0.02em;
|
|
19
|
+
font-size: 13px;
|
|
20
|
+
font-weight: 500;
|
|
21
|
+
}
|
|
22
|
+
@media (max-width: 420px) {
|
|
23
|
+
.provider-grid {
|
|
24
|
+
grid-template-columns: minmax(0, 1fr);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import './page.css';
|
|
2
|
+
import { redirect } from '@wular/pnext/navigation';
|
|
3
|
+
|
|
4
|
+
import { ErrorText } from '@/comps/ui/field';
|
|
5
|
+
import { AuthPanel } from '@/comps/frame/auth-panel';
|
|
6
|
+
import { safeReturnPath } from '@coder/server/auth/sign-in';
|
|
7
|
+
import { load } from '@/api/load';
|
|
8
|
+
|
|
9
|
+
const WULAR_LOGO = (
|
|
10
|
+
<svg class="logo" viewBox="6 12 52 36" aria-hidden="true">
|
|
11
|
+
<path
|
|
12
|
+
d="M8 14 18 46 26 26h12l8 20 10-32"
|
|
13
|
+
fill="none"
|
|
14
|
+
stroke="currentColor"
|
|
15
|
+
stroke-width="5"
|
|
16
|
+
stroke-linejoin="miter"
|
|
17
|
+
/>
|
|
18
|
+
</svg>
|
|
19
|
+
);
|
|
20
|
+
|
|
21
|
+
const ERRORS: Record<string, string> = {
|
|
22
|
+
expired: 'That sign-in took too long. Sign in again.',
|
|
23
|
+
unavailable: 'Wular Auth could not be reached. Try again in a moment.',
|
|
24
|
+
access_denied: 'Sign-in was cancelled.',
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
function LoginPage({ signIn, error }: { signIn: string; error?: string | null }) {
|
|
28
|
+
return (
|
|
29
|
+
<AuthPanel
|
|
30
|
+
tag="sign in"
|
|
31
|
+
title="Continue to Coder"
|
|
32
|
+
lead="Coder signs you in with your Wular Auth account."
|
|
33
|
+
>
|
|
34
|
+
<div class="provider-grid">
|
|
35
|
+
<a class="btn outline provider" href={signIn}>
|
|
36
|
+
{WULAR_LOGO}
|
|
37
|
+
<span>Sign in with Wular Auth</span>
|
|
38
|
+
</a>
|
|
39
|
+
</div>
|
|
40
|
+
<ErrorText value={error ? (ERRORS[error] ?? 'Sign-in did not finish. Try again.') : ''} />
|
|
41
|
+
</AuthPanel>
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export default async function Page({ request }: { request?: Request }) {
|
|
46
|
+
if (!request) return null;
|
|
47
|
+
const url = new URL(request.url);
|
|
48
|
+
const { wular } = await load(request).info();
|
|
49
|
+
// A memory server keeps no accounts: its dashboard asks for the admin token.
|
|
50
|
+
if (!wular) redirect('/dash');
|
|
51
|
+
return (
|
|
52
|
+
<LoginPage
|
|
53
|
+
signIn={`/api/auth/sign-in?return=${encodeURIComponent(safeReturnPath(url.searchParams.get('return'), url.origin))}`}
|
|
54
|
+
error={url.searchParams.get('error')}
|
|
55
|
+
/>
|
|
56
|
+
);
|
|
57
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
@media (max-width: 760px) {
|
|
2
|
+
main {
|
|
3
|
+
padding: 16px 16px 64px;
|
|
4
|
+
}
|
|
5
|
+
h1 {
|
|
6
|
+
font-size: 22px;
|
|
7
|
+
}
|
|
8
|
+
.head .actions,
|
|
9
|
+
.hero .actions {
|
|
10
|
+
width: 100%;
|
|
11
|
+
}
|
|
12
|
+
.head {
|
|
13
|
+
row-gap: 12px;
|
|
14
|
+
}
|
|
15
|
+
.head .actions {
|
|
16
|
+
gap: 4px;
|
|
17
|
+
}
|
|
18
|
+
.head .actions > .btn {
|
|
19
|
+
padding-inline: 10px;
|
|
20
|
+
}
|
|
21
|
+
.head .lead {
|
|
22
|
+
white-space: normal;
|
|
23
|
+
}
|
|
24
|
+
.fields,
|
|
25
|
+
.fields.three,
|
|
26
|
+
.agent-form,
|
|
27
|
+
.import,
|
|
28
|
+
.cred-new.split {
|
|
29
|
+
grid-template-columns: minmax(0, 1fr);
|
|
30
|
+
}
|
|
31
|
+
.stacked thead {
|
|
32
|
+
display: none;
|
|
33
|
+
}
|
|
34
|
+
.stacked tr {
|
|
35
|
+
display: grid;
|
|
36
|
+
grid-template-columns: minmax(0, 1fr) auto;
|
|
37
|
+
gap: 8px 12px;
|
|
38
|
+
padding: 14px 16px;
|
|
39
|
+
border-bottom: 1px solid var(--line);
|
|
40
|
+
}
|
|
41
|
+
.stacked td {
|
|
42
|
+
padding: 0;
|
|
43
|
+
border: 0;
|
|
44
|
+
}
|
|
45
|
+
.stacked td:first-child {
|
|
46
|
+
grid-column: 1 / -1;
|
|
47
|
+
min-width: 0;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { useEffect } from 'preact/hooks';
|
|
4
|
+
|
|
5
|
+
/** Records the browser's zone for server-rendered dates; until then they show in UTC. */
|
|
6
|
+
export function Zone() {
|
|
7
|
+
useEffect(() => {
|
|
8
|
+
const zone = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
9
|
+
if (zone && !document.cookie.includes(`tz=${encodeURIComponent(zone)}`))
|
|
10
|
+
document.cookie = `tz=${encodeURIComponent(zone)}; path=/; max-age=31536000; samesite=lax`;
|
|
11
|
+
}, []);
|
|
12
|
+
return null;
|
|
13
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/* sign-in and other server pages */
|
|
2
|
+
.auth {
|
|
3
|
+
display: grid;
|
|
4
|
+
min-height: 100vh;
|
|
5
|
+
}
|
|
6
|
+
.auth-side {
|
|
7
|
+
position: relative;
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
align-items: center;
|
|
11
|
+
justify-content: center;
|
|
12
|
+
gap: 28px;
|
|
13
|
+
padding: 40px 24px 72px;
|
|
14
|
+
}
|
|
15
|
+
.auth-frame {
|
|
16
|
+
width: 100%;
|
|
17
|
+
max-width: 440px;
|
|
18
|
+
}
|
|
19
|
+
.auth-frame .bar {
|
|
20
|
+
min-height: 32px;
|
|
21
|
+
font-size: 10px;
|
|
22
|
+
}
|
|
23
|
+
.auth-frame .brand {
|
|
24
|
+
font-size: 12px;
|
|
25
|
+
}
|
|
26
|
+
.tag {
|
|
27
|
+
margin-left: auto;
|
|
28
|
+
padding: 1px 8px;
|
|
29
|
+
background: var(--deep);
|
|
30
|
+
color: #fff;
|
|
31
|
+
}
|
|
32
|
+
.auth-body {
|
|
33
|
+
display: grid;
|
|
34
|
+
gap: 14px;
|
|
35
|
+
padding: 28px 24px 26px;
|
|
36
|
+
}
|
|
37
|
+
.auth-body h1 {
|
|
38
|
+
font-size: 22px;
|
|
39
|
+
}
|
|
40
|
+
.auth-body .lead {
|
|
41
|
+
margin: 0 0 6px;
|
|
42
|
+
}
|
|
43
|
+
.auth-body form {
|
|
44
|
+
display: grid;
|
|
45
|
+
gap: 14px;
|
|
46
|
+
}
|
|
47
|
+
.auth-links {
|
|
48
|
+
position: absolute;
|
|
49
|
+
bottom: 24px;
|
|
50
|
+
left: 0;
|
|
51
|
+
right: 0;
|
|
52
|
+
display: flex;
|
|
53
|
+
justify-content: center;
|
|
54
|
+
gap: 24px;
|
|
55
|
+
font-size: 9px;
|
|
56
|
+
color: var(--muted);
|
|
57
|
+
}
|
|
58
|
+
.auth-links a:hover {
|
|
59
|
+
color: var(--fg);
|
|
60
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import './auth-panel.css';
|
|
2
|
+
import type { ComponentChildren } from 'preact';
|
|
3
|
+
|
|
4
|
+
import { Mark } from '@/comps/ui/icon';
|
|
5
|
+
|
|
6
|
+
/** The one centered panel every server page outside the dashboard uses. */
|
|
7
|
+
export function AuthPanel({
|
|
8
|
+
tag,
|
|
9
|
+
title,
|
|
10
|
+
lead,
|
|
11
|
+
children,
|
|
12
|
+
}: {
|
|
13
|
+
tag: string;
|
|
14
|
+
title: string;
|
|
15
|
+
lead?: ComponentChildren;
|
|
16
|
+
children?: ComponentChildren;
|
|
17
|
+
}) {
|
|
18
|
+
return (
|
|
19
|
+
<section class="auth">
|
|
20
|
+
<div class="auth-side">
|
|
21
|
+
<div class="auth-frame frame">
|
|
22
|
+
<div class="bar">
|
|
23
|
+
<a class="brand" href="/">
|
|
24
|
+
<Mark />
|
|
25
|
+
<span class="lockup">
|
|
26
|
+
coder <small>wular</small>
|
|
27
|
+
</span>
|
|
28
|
+
</a>
|
|
29
|
+
<span class="tag">{tag}</span>
|
|
30
|
+
</div>
|
|
31
|
+
<div class="auth-body">
|
|
32
|
+
<h1>{title}</h1>
|
|
33
|
+
{lead ? <p class="lead">{lead}</p> : null}
|
|
34
|
+
{children}
|
|
35
|
+
</div>
|
|
36
|
+
</div>
|
|
37
|
+
<nav class="auth-links">
|
|
38
|
+
<a href="https://wular.ai">wular.ai</a>
|
|
39
|
+
<a href="https://coder.wular.ai">hosted service</a>
|
|
40
|
+
</nav>
|
|
41
|
+
</div>
|
|
42
|
+
</section>
|
|
43
|
+
);
|
|
44
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
.scrim {
|
|
2
|
+
display: none;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
@media (max-width: 760px) {
|
|
6
|
+
.drawer .side {
|
|
7
|
+
transform: none;
|
|
8
|
+
}
|
|
9
|
+
.scrim {
|
|
10
|
+
display: block;
|
|
11
|
+
position: fixed;
|
|
12
|
+
inset: 56px 0 0;
|
|
13
|
+
z-index: 25;
|
|
14
|
+
background: rgba(11, 12, 16, 0.45);
|
|
15
|
+
opacity: 0;
|
|
16
|
+
pointer-events: none;
|
|
17
|
+
transition: opacity 0.2s;
|
|
18
|
+
}
|
|
19
|
+
.drawer .scrim {
|
|
20
|
+
opacity: 1;
|
|
21
|
+
pointer-events: auto;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
@media (min-width: 761px) {
|
|
25
|
+
.only-m {
|
|
26
|
+
display: none;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import './drawer.css';
|
|
4
|
+
|
|
5
|
+
import { useEffect, useState } from 'preact/hooks';
|
|
6
|
+
import { usePathname } from '@wular/pnext/navigation/client';
|
|
7
|
+
|
|
8
|
+
import { iMenu } from '@/comps/ui/icons';
|
|
9
|
+
import { Icon } from '@/comps/ui/icon';
|
|
10
|
+
|
|
11
|
+
/** The phone layout's navigation drawer: its button and the scrim behind it; Escape or a new page closes it. */
|
|
12
|
+
export function Drawer() {
|
|
13
|
+
const [open, setOpen] = useState(false);
|
|
14
|
+
const path = usePathname();
|
|
15
|
+
|
|
16
|
+
useEffect(() => setOpen(false), [path]);
|
|
17
|
+
useEffect(() => {
|
|
18
|
+
document.documentElement.classList.toggle('drawer', open);
|
|
19
|
+
if (!open) return;
|
|
20
|
+
|
|
21
|
+
const onKey = (event: KeyboardEvent) => event.key === 'Escape' && setOpen(false);
|
|
22
|
+
addEventListener('keydown', onKey);
|
|
23
|
+
return () => removeEventListener('keydown', onKey);
|
|
24
|
+
}, [open]);
|
|
25
|
+
|
|
26
|
+
return (
|
|
27
|
+
<>
|
|
28
|
+
<button
|
|
29
|
+
type="button"
|
|
30
|
+
class="icon-btn only-m"
|
|
31
|
+
aria-label="Open navigation"
|
|
32
|
+
onClick={() => setOpen(!open)}
|
|
33
|
+
>
|
|
34
|
+
<Icon d={iMenu} />
|
|
35
|
+
</button>
|
|
36
|
+
<div class="scrim" onClick={() => setOpen(false)} />
|
|
37
|
+
</>
|
|
38
|
+
);
|
|
39
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { To } from '@/comps/nav/to';
|
|
2
|
+
|
|
3
|
+
/** Page titles and leads, shared by the pages and their loading frames. */
|
|
4
|
+
export const HEADS = {
|
|
5
|
+
agents: {
|
|
6
|
+
title: 'Agents',
|
|
7
|
+
lead: 'Each agent listens on the platforms it declares and answers as itself.',
|
|
8
|
+
},
|
|
9
|
+
tasks: {
|
|
10
|
+
title: 'Tasks',
|
|
11
|
+
},
|
|
12
|
+
newAgent: {
|
|
13
|
+
title: 'New agent',
|
|
14
|
+
lead: 'Start from a template or a repository. Everything but the name has a sensible default.',
|
|
15
|
+
},
|
|
16
|
+
usage: {
|
|
17
|
+
title: 'Usage',
|
|
18
|
+
lead: 'Tasks, runner time, and tokens by agent. Pick a range, or open an agent for its breakdown.',
|
|
19
|
+
},
|
|
20
|
+
} as const;
|
|
21
|
+
|
|
22
|
+
/** Back to the section a link came from, named in the link as `from`, or to the page's own list. */
|
|
23
|
+
export function backFrom(
|
|
24
|
+
from: string | null,
|
|
25
|
+
list: To & { label: string },
|
|
26
|
+
): To & { label: string } {
|
|
27
|
+
const task = from?.match(/^\/dash\/tasks\/([^\/?]+)$/);
|
|
28
|
+
if (task)
|
|
29
|
+
return {
|
|
30
|
+
href: '/dash/tasks/[id]',
|
|
31
|
+
params: { id: decodeURIComponent(task[1]!) },
|
|
32
|
+
label: 'Task',
|
|
33
|
+
};
|
|
34
|
+
const section = from?.match(/^\/dash\/(usage|agents|tasks)(?:\?(.*))?$/);
|
|
35
|
+
if (!section) return list;
|
|
36
|
+
const search = new URLSearchParams(section[2] ?? '');
|
|
37
|
+
const label = HEADS[section[1] as keyof typeof HEADS].title;
|
|
38
|
+
if (section[1] === 'usage') return { href: '/dash/usage', params: {}, search, label };
|
|
39
|
+
if (section[1] === 'agents') return { href: '/dash/agents', params: {}, search, label };
|
|
40
|
+
return { href: '/dash/tasks', params: {}, search, label };
|
|
41
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { iDown, iSearch } from '@/comps/ui/icons';
|
|
2
|
+
import { Card, Loading } from '@/comps/ui/card';
|
|
3
|
+
import { Icon } from '@/comps/ui/icon';
|
|
4
|
+
import { Toolbar } from '@/comps/ui/toolbar';
|
|
5
|
+
|
|
6
|
+
export const BLANK = ' ';
|
|
7
|
+
|
|
8
|
+
/** `Loading` inside the box its data fills, titled as that box. */
|
|
9
|
+
export function LoadingCard({ title, label, h }: { title?: string; label: string; h?: number }) {
|
|
10
|
+
return (
|
|
11
|
+
<Card title={title}>
|
|
12
|
+
<Loading label={label} h={h} />
|
|
13
|
+
</Card>
|
|
14
|
+
);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/** A list's toolbar while the list loads: the same title and controls, inert until the list is live. */
|
|
18
|
+
export function LoadingToolbar({
|
|
19
|
+
head,
|
|
20
|
+
search,
|
|
21
|
+
selects = [],
|
|
22
|
+
more,
|
|
23
|
+
action,
|
|
24
|
+
}: {
|
|
25
|
+
head?: { title: string; lead?: string };
|
|
26
|
+
search: string;
|
|
27
|
+
selects?: string[];
|
|
28
|
+
/** A disabled more-filters button after the selects. */
|
|
29
|
+
more?: boolean;
|
|
30
|
+
/** The primary button's label. */
|
|
31
|
+
action?: string;
|
|
32
|
+
}) {
|
|
33
|
+
return (
|
|
34
|
+
<Toolbar
|
|
35
|
+
head={head}
|
|
36
|
+
action={
|
|
37
|
+
action ? (
|
|
38
|
+
<button type="button" class="btn" disabled>
|
|
39
|
+
{action}
|
|
40
|
+
</button>
|
|
41
|
+
) : undefined
|
|
42
|
+
}
|
|
43
|
+
>
|
|
44
|
+
<label class="search" aria-hidden="true">
|
|
45
|
+
<Icon d={iSearch} />
|
|
46
|
+
<input type="search" placeholder={search} disabled tabIndex={-1} />
|
|
47
|
+
</label>
|
|
48
|
+
{selects.map(label => (
|
|
49
|
+
<span key={label} class="select" aria-hidden="true">
|
|
50
|
+
<button type="button" disabled tabIndex={-1}>
|
|
51
|
+
<span class="grow">{label}</span>
|
|
52
|
+
<Icon d={iDown} />
|
|
53
|
+
</button>
|
|
54
|
+
</span>
|
|
55
|
+
))}
|
|
56
|
+
{more ? (
|
|
57
|
+
<span class="menu filter-more" aria-hidden="true">
|
|
58
|
+
<button type="button" class="field-btn" disabled tabIndex={-1}>
|
|
59
|
+
Filter
|
|
60
|
+
</button>
|
|
61
|
+
</span>
|
|
62
|
+
) : null}
|
|
63
|
+
</Toolbar>
|
|
64
|
+
);
|
|
65
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
.page.narrow {
|
|
2
|
+
max-width: 760px;
|
|
3
|
+
}
|
|
4
|
+
.meta {
|
|
5
|
+
display: flex;
|
|
6
|
+
align-items: center;
|
|
7
|
+
flex-wrap: wrap;
|
|
8
|
+
gap: 8px;
|
|
9
|
+
}
|
|
10
|
+
.page .head,
|
|
11
|
+
.page .hero {
|
|
12
|
+
position: sticky;
|
|
13
|
+
top: 56px;
|
|
14
|
+
z-index: 10;
|
|
15
|
+
margin-inline: -40px;
|
|
16
|
+
padding: 0 40px 6px;
|
|
17
|
+
background: var(--bg);
|
|
18
|
+
/* compacting on stick must not drive scroll anchoring, or the page snaps back up */
|
|
19
|
+
overflow-anchor: none;
|
|
20
|
+
}
|
|
21
|
+
/* what sticks above the page: the top bar, the page head (its height set by Sentinel) and tabs */
|
|
22
|
+
.page {
|
|
23
|
+
--stuck: calc(56px + var(--head, 0px) + var(--tabs, 0px));
|
|
24
|
+
}
|
|
25
|
+
.page:has(.tabs:not(.vertical)) {
|
|
26
|
+
--tabs: 40px;
|
|
27
|
+
}
|
|
28
|
+
.page * {
|
|
29
|
+
scroll-margin-top: calc(var(--stuck) + 16px);
|
|
30
|
+
}
|
|
31
|
+
.back {
|
|
32
|
+
display: inline-flex;
|
|
33
|
+
align-items: center;
|
|
34
|
+
gap: 4px;
|
|
35
|
+
margin-bottom: 6px;
|
|
36
|
+
font-size: 12px;
|
|
37
|
+
color: var(--muted);
|
|
38
|
+
}
|
|
39
|
+
.stuck .back {
|
|
40
|
+
display: none;
|
|
41
|
+
}
|
|
42
|
+
.back:hover {
|
|
43
|
+
color: var(--fg);
|
|
44
|
+
}
|
|
45
|
+
.back .ic {
|
|
46
|
+
width: 14px;
|
|
47
|
+
height: 14px;
|
|
48
|
+
}
|
|
49
|
+
.title-row {
|
|
50
|
+
display: flex;
|
|
51
|
+
align-items: center;
|
|
52
|
+
flex-wrap: wrap;
|
|
53
|
+
gap: 6px 12px;
|
|
54
|
+
min-width: 0;
|
|
55
|
+
}
|
|
56
|
+
.title-row h1 {
|
|
57
|
+
min-width: 0;
|
|
58
|
+
}
|
|
59
|
+
.head .title-row {
|
|
60
|
+
flex-wrap: nowrap;
|
|
61
|
+
}
|
|
62
|
+
.head .title-row h1 {
|
|
63
|
+
flex: 0 1 auto;
|
|
64
|
+
white-space: nowrap;
|
|
65
|
+
overflow: hidden;
|
|
66
|
+
text-overflow: ellipsis;
|
|
67
|
+
}
|
|
68
|
+
.head .title-row .meta {
|
|
69
|
+
flex: none;
|
|
70
|
+
}
|
|
71
|
+
@media (max-width: 760px) {
|
|
72
|
+
.page .head,
|
|
73
|
+
.page .hero {
|
|
74
|
+
margin-inline: -16px;
|
|
75
|
+
padding-inline: 16px;
|
|
76
|
+
}
|
|
77
|
+
.head .title-row {
|
|
78
|
+
flex-wrap: wrap;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
.head .meta:empty {
|
|
82
|
+
min-height: 20px;
|
|
83
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import './page-head.css';
|
|
2
|
+
import type { ComponentChildren } from 'preact';
|
|
3
|
+
|
|
4
|
+
import { iLeft } from '@/comps/ui/icons';
|
|
5
|
+
import { Link } from '@wular/pnext/link';
|
|
6
|
+
import type { To } from '@/comps/nav/to';
|
|
7
|
+
import { HEADS } from '@/comps/frame/heads';
|
|
8
|
+
import { Icon } from '@/comps/ui/icon';
|
|
9
|
+
import { Sentinel } from '@/comps/ui/sentinel';
|
|
10
|
+
|
|
11
|
+
export function Page({ narrow, children }: { narrow?: boolean; children: ComponentChildren }) {
|
|
12
|
+
return <div class={narrow ? 'page narrow' : 'page'}>{children}</div>;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/** A same-origin `/dash` path from a `back` search param, named for its agent or section, or nothing. */
|
|
16
|
+
function backTo(back: string | null | undefined): { to: To; label: string } | undefined {
|
|
17
|
+
if (!back?.startsWith('/')) return;
|
|
18
|
+
const url = new URL(back, 'http://dash');
|
|
19
|
+
if (url.origin !== 'http://dash' || !/^\/dash(\/|$)/.test(url.pathname)) return;
|
|
20
|
+
const [, , section, slug] = url.pathname.split('/');
|
|
21
|
+
let label: string = HEADS[section as keyof typeof HEADS]?.title ?? 'Back';
|
|
22
|
+
if (section === 'agents' && slug)
|
|
23
|
+
try {
|
|
24
|
+
label = decodeURIComponent(slug);
|
|
25
|
+
} catch {}
|
|
26
|
+
return { to: { href: url.pathname as To['href'], search: url.searchParams } as To, label };
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/** Back to the logical parent, wherever the visitor came from; a `back` search param wins. */
|
|
30
|
+
export function Back({ label, back, ...to }: To & { label: string; back?: string | null }) {
|
|
31
|
+
const param = backTo(back);
|
|
32
|
+
return (
|
|
33
|
+
<Link class="back" {...(param?.to ?? to)}>
|
|
34
|
+
<Icon d={iLeft} />
|
|
35
|
+
{param?.label ?? label}
|
|
36
|
+
</Link>
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/** The page title row with its meta and actions, and one muted lead line; it sticks under the top bar and turns compact there. */
|
|
41
|
+
export function PageHead({
|
|
42
|
+
title,
|
|
43
|
+
lead,
|
|
44
|
+
actions,
|
|
45
|
+
meta,
|
|
46
|
+
back,
|
|
47
|
+
}: {
|
|
48
|
+
title: ComponentChildren;
|
|
49
|
+
lead?: ComponentChildren;
|
|
50
|
+
actions?: ComponentChildren;
|
|
51
|
+
meta?: ComponentChildren;
|
|
52
|
+
/** A `Back` link on its own line above the title. */
|
|
53
|
+
back?: ComponentChildren;
|
|
54
|
+
}) {
|
|
55
|
+
return (
|
|
56
|
+
<>
|
|
57
|
+
<Sentinel />
|
|
58
|
+
<header class="head">
|
|
59
|
+
<div>
|
|
60
|
+
{back}
|
|
61
|
+
<div class="title-row">
|
|
62
|
+
<h1>{title}</h1>
|
|
63
|
+
{meta ? <div class="meta">{meta}</div> : null}
|
|
64
|
+
</div>
|
|
65
|
+
{lead ? <p class="lead">{lead}</p> : null}
|
|
66
|
+
</div>
|
|
67
|
+
{actions ? <div class="actions">{actions}</div> : null}
|
|
68
|
+
</header>
|
|
69
|
+
</>
|
|
70
|
+
);
|
|
71
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { ComponentChildren } from 'preact';
|
|
2
|
+
import { Suspense } from 'preact/compat';
|
|
3
|
+
|
|
4
|
+
import { signedOut } from '@/api/load';
|
|
5
|
+
import { Card } from '@/comps/ui/card';
|
|
6
|
+
import { reasonText } from '@/utils/format';
|
|
7
|
+
|
|
8
|
+
/** A section that waits for `load`, under the route's loading frame; a failure stays inside it. */
|
|
9
|
+
export async function Settle({ load }: { load: () => Promise<ComponentChildren> }) {
|
|
10
|
+
try {
|
|
11
|
+
return await load();
|
|
12
|
+
} catch (error) {
|
|
13
|
+
return <SectionFailure error={error} />;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/** A section that streams in behind its loading box; `load` runs when it renders, and a failure stays inside. */
|
|
18
|
+
export function Stream({
|
|
19
|
+
fallback,
|
|
20
|
+
load,
|
|
21
|
+
}: {
|
|
22
|
+
fallback: ComponentChildren;
|
|
23
|
+
load: () => Promise<ComponentChildren>;
|
|
24
|
+
}) {
|
|
25
|
+
return (
|
|
26
|
+
<Suspense fallback={fallback}>
|
|
27
|
+
<Settle load={load} />
|
|
28
|
+
</Suspense>
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function SectionFailure({ error }: { error: unknown }) {
|
|
33
|
+
return (
|
|
34
|
+
<Card tone="danger" title="Could not load this">
|
|
35
|
+
<p class="body prose">
|
|
36
|
+
{signedOut(error) ? (
|
|
37
|
+
<>
|
|
38
|
+
Your session ended.{' '}
|
|
39
|
+
<a class="link" href="/login">
|
|
40
|
+
Sign in again
|
|
41
|
+
</a>
|
|
42
|
+
.
|
|
43
|
+
</>
|
|
44
|
+
) : (
|
|
45
|
+
reasonText(error)
|
|
46
|
+
)}
|
|
47
|
+
</p>
|
|
48
|
+
</Card>
|
|
49
|
+
);
|
|
50
|
+
}
|