@wular/coder 0.3.18 → 0.4.1
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-c9c4ac4d4a10df83.js +1 -0
- package/dist/dash/public/assets/chunks/agent-settings-form-8be2ddab074aba6d.js +1 -0
- package/dist/dash/public/assets/chunks/agents-grid-951584b6f4c4314e.js +1 -0
- package/dist/dash/public/assets/chunks/badge-676b01e0c615bf7b.js +1 -0
- package/dist/dash/public/assets/chunks/card-e0901d68b79dfa93.js +1 -0
- package/dist/dash/public/assets/chunks/combo-41234c24668b1db1.js +1 -0
- package/dist/dash/public/assets/chunks/composer-5534be50bc12385e.js +1 -0
- package/dist/dash/public/assets/chunks/composer-d10d4b1d54c4f751.js +1 -0
- package/dist/dash/public/assets/chunks/composer-data-6f7608fed13f3dd7.js +1 -0
- package/dist/dash/public/assets/chunks/confirm-f2fe4ba9905a89c6.js +1 -0
- package/dist/dash/public/assets/chunks/connect-apps-aa2a3d82e48ed8c3.js +1 -0
- package/dist/dash/public/assets/chunks/connect-repositories-5389ec8701a3deac.js +1 -0
- package/dist/dash/public/assets/chunks/credentials-list-bc5bfcab058176c5.js +2 -0
- package/dist/dash/public/assets/chunks/custom-range-4761ab14f05149df.js +1 -0
- package/dist/dash/public/assets/chunks/editor-bfe8cd854f8001be.js +7 -0
- package/dist/dash/public/assets/chunks/engines-list-f1191390f5715b39.js +1 -0
- package/dist/dash/public/assets/chunks/field-901f1f35c18c39c9.js +1 -0
- package/dist/dash/public/assets/chunks/format-eb03fc9d9744d960.js +1 -0
- package/dist/dash/public/assets/chunks/heads-f3bcd289663d48fa.js +1 -0
- package/dist/dash/public/assets/chunks/instructions-052fa45a9daf6db6.js +2 -0
- package/dist/dash/public/assets/chunks/instructions-d0a4b0d95009c262.js +1 -0
- package/dist/dash/public/assets/chunks/list-1d259660d7612c5f.js +1 -0
- package/dist/dash/public/assets/chunks/mcp-list-e3bebbbe831393b8.js +1 -0
- package/dist/dash/public/assets/chunks/model-options-15c53331a2f28a4f.js +1 -0
- package/dist/dash/public/assets/chunks/models-list-44f857a469ca04d5.js +1 -0
- package/dist/dash/public/assets/chunks/paged-bc6fa0c2b9d52ed7.js +1 -0
- package/dist/dash/public/assets/chunks/platform-actions-d1426602049926d2.js +1 -0
- package/dist/dash/public/assets/chunks/runners-list-1901af8a5dea1f09.js +1 -0
- package/dist/dash/public/assets/chunks/runtime-246221e985d863e5-1.js +2 -0
- package/dist/dash/public/assets/chunks/segmented-358ff2b4992b8384.js +1 -0
- package/dist/dash/public/assets/chunks/select-7ae25fd8a7d6c338.js +1 -0
- package/dist/dash/public/assets/chunks/sentinel-c972a33dc69a5135.js +1 -0
- package/dist/dash/public/assets/chunks/shared-init-246221e985d863e5-2.js +1 -0
- package/dist/dash/public/assets/chunks/shared-init-88cce66bb3cfe1e5.js +5 -0
- package/dist/dash/public/assets/chunks/shared-init-8f2ac936c95a7f7b.js +1 -0
- package/dist/dash/public/assets/chunks/shared-init-ffb3397e494137c9.js +2 -0
- package/dist/dash/public/assets/chunks/tail-7c27aab8ba268bd9.js +1 -0
- package/dist/dash/public/assets/chunks/task-actions-8e1d93c788d001df.js +1 -0
- package/dist/dash/public/assets/chunks/task-fa8b82e95e771c4a.js +1 -0
- package/dist/dash/public/assets/chunks/task-view-6d7618d2820a5cb4.js +3 -0
- package/dist/dash/public/assets/chunks/tasks-list-f4784e5cbd0ed785.js +1 -0
- package/dist/dash/public/assets/chunks/toolbar-a75d2570f07cbb70.js +1 -0
- package/dist/dash/public/assets/chunks/versions-list-fc2e0d2a7382e049.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-03b03b254e525e82.js +1 -0
- package/dist/dash/public/assets/pnext-client-1b9ab0963a8ff77b.js +1 -0
- package/dist/dash/public/assets/pnext-client-1c7859bb888f4ef0.js +1 -0
- package/dist/dash/public/assets/pnext-client-3c748afe963fb05d.js +1 -0
- package/dist/dash/public/assets/pnext-client-4f47c2cae220f107.js +1 -0
- package/dist/dash/public/assets/pnext-client-6ab9fd9b53b794d2.js +1 -0
- package/dist/dash/public/assets/pnext-client-6c241786342498e4.js +1 -0
- package/dist/dash/public/assets/pnext-client-80b56d420f02b808.js +1 -0
- package/dist/dash/public/assets/pnext-client-83135c17bae850a3.js +1 -0
- package/dist/dash/public/assets/pnext-client-8e6fa4302ae0396f.js +1 -0
- package/dist/dash/public/assets/pnext-client-932c9d8cc0717fc8.js +1 -0
- package/dist/dash/public/assets/pnext-client-a42ae63d4de113f9.js +1 -0
- package/dist/dash/public/assets/pnext-client-d2ee6f8c1e337032.js +1 -0
- package/dist/dash/public/assets/pnext-client-d513f65ec23b7f20.js +1 -0
- package/dist/dash/public/assets/pnext-client-ecb88e2a8a109954.js +1 -0
- package/dist/dash/public/assets/pnext-client-f1545ee6270bbf9a.js +1 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/boot-B2MFTRO2.js +30 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/build-tier-XJJSL5FR.js +2704 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-2HFY3DQT.js +208 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-2ICEVELW.js +834 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-3UPROT2C.js +35 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-4P5CMIYT.js +1582 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-4TKZKZ3Q.js +131 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-5RDEILQB.js +437 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-62KEQM43.js +25 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-6KQSWT6D.js +831 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-7DCNCW6O.js +724 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-B4THCTQP.js +22 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-C2LIV2MM.js +172 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-CCATPVTW.js +378 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-COXJAPTU.js +89 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-E6IXL2NJ.js +6270 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-FLGRBFAH.js +1198 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-FTJVHFWD.js +61 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-H523KSIH.js +5151 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-HT6KKX6A.js +20 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-JESFYECC.js +438 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-JRPJM2XY.js +17 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-L2IWDUXG.js +107 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-L5P4Y4UC.js +183 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-NQE46AZN.js +647 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-PA4QEARJ.js +129 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-PZ5AXOLW.js +7146 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-SNVPTULL.js +2397 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-T3QZT3PG.js +220 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-VC5O2SDP.js +72 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-WZX4V6CM.js +231 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-XUUIDXY5.js +627 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/chunk-ZHFDO3PR.js +265 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/compile-CE2DN7ZA.js +18 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/config-UREY7XJT.js +16 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/config-loader-UI2XE3PZ.js +17 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/entry.js +219 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/generate-I2PPTDFD.js +16 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/modules-UVOCE4C2.js +48 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/pipeline-UW47K537.js +963 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/proxy-ITGOVJBW.js +26 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/register-4SA55SWT.js +12579 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/router-JNKHLBCZ.js +505 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/routes-PD6J2NXW.js +54 -0
- package/dist/dash/server/bundle-0.1.5-1508b6c99c0d1e68/tsconfig-defaults-ZXEH7RQK.js +15 -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-CZjFX5zV.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-I5Cwtl_K.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,143 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import type { ComponentChildren } from 'preact';
|
|
4
|
+
|
|
5
|
+
import { client } from '@/utils/client';
|
|
6
|
+
import { Link } from '@wular/pnext/link';
|
|
7
|
+
import { usePaged } from '@/utils/paged';
|
|
8
|
+
import type { AgentCardRow, IntegrationInfo, Paged } from '@coder/client/types';
|
|
9
|
+
import { Empty } from '@/comps/ui/card';
|
|
10
|
+
import { initial } from '@/utils/format';
|
|
11
|
+
import { AgentPills, BrandIcon, Platform } from '@/app/dash/agents/agent/agent-pills';
|
|
12
|
+
import { Menu, MenuRadio } from '@/comps/ui/menu';
|
|
13
|
+
import { Icon } from '@/comps/ui/icon';
|
|
14
|
+
import { NewAgentMenu } from './agent-menu';
|
|
15
|
+
import { Search, Toolbar, queryOf, useFilters } from '@/comps/ui/toolbar';
|
|
16
|
+
import { Tail } from '@/comps/ui/tail';
|
|
17
|
+
|
|
18
|
+
type Keys = 'q' | 'platform' | 'type';
|
|
19
|
+
|
|
20
|
+
function AgentCard({ agent, catalog }: { agent: AgentCardRow; catalog: IntegrationInfo[] }) {
|
|
21
|
+
return (
|
|
22
|
+
<li class="agent-card">
|
|
23
|
+
<div class="bc-head">
|
|
24
|
+
<span class="mark">{initial(agent.name)}</span>
|
|
25
|
+
<div class="grow">
|
|
26
|
+
<h3>
|
|
27
|
+
<Link class="cover" href="/dash/agents/[slug]" params={{ slug: agent.id }}>
|
|
28
|
+
{agent.name}
|
|
29
|
+
</Link>
|
|
30
|
+
</h3>
|
|
31
|
+
<span class="pills">
|
|
32
|
+
<AgentPills agent={agent} />
|
|
33
|
+
</span>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
<div class="lead-clamp">
|
|
37
|
+
<span>{agent.description ?? 'No description yet.'}</span>
|
|
38
|
+
</div>
|
|
39
|
+
{agent.platforms.length ? (
|
|
40
|
+
<span class="pfs">
|
|
41
|
+
{agent.platforms.map(platform => (
|
|
42
|
+
<Platform
|
|
43
|
+
key={platform.id}
|
|
44
|
+
id={platform.id}
|
|
45
|
+
info={catalog.find(entry => entry.id === platform.id)}
|
|
46
|
+
state={platform.state}
|
|
47
|
+
/>
|
|
48
|
+
))}
|
|
49
|
+
</span>
|
|
50
|
+
) : (
|
|
51
|
+
<span class="pfs muted">Listens nowhere yet</span>
|
|
52
|
+
)}
|
|
53
|
+
</li>
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/** Every agent in pages, searched and filtered on the server. */
|
|
58
|
+
/** Agent kinds a list filters by. */
|
|
59
|
+
export const KINDS: Array<[string, string]> = [
|
|
60
|
+
['', 'All agents'],
|
|
61
|
+
['dashboard', 'Dashboard agents'],
|
|
62
|
+
['repository', 'Repository agents'],
|
|
63
|
+
['builtin', 'Built-in'],
|
|
64
|
+
];
|
|
65
|
+
|
|
66
|
+
export function AgentsGrid({
|
|
67
|
+
first,
|
|
68
|
+
limit,
|
|
69
|
+
filters,
|
|
70
|
+
catalog,
|
|
71
|
+
head,
|
|
72
|
+
children,
|
|
73
|
+
}: {
|
|
74
|
+
first: Paged<AgentCardRow>;
|
|
75
|
+
/** Agent cards per page. */
|
|
76
|
+
limit: number;
|
|
77
|
+
filters: Record<Keys, string>;
|
|
78
|
+
catalog: IntegrationInfo[];
|
|
79
|
+
head: { title: string; lead: string };
|
|
80
|
+
/** What shows between the toolbar and the agents. */
|
|
81
|
+
children?: ComponentChildren;
|
|
82
|
+
}) {
|
|
83
|
+
const { values, set, query } = useFilters<Keys>(filters);
|
|
84
|
+
const list = usePaged<AgentCardRow>({
|
|
85
|
+
name: 'agents',
|
|
86
|
+
fetchPage: cursor => client.agents.list({ cursor, limit, ...values }),
|
|
87
|
+
query,
|
|
88
|
+
first,
|
|
89
|
+
initial: queryOf(filters),
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
return (
|
|
93
|
+
<>
|
|
94
|
+
<Toolbar head={head} action={<NewAgentMenu />}>
|
|
95
|
+
<Search value={values.q} label="Search agents" onInput={value => set('q', value, 250)} />
|
|
96
|
+
<Menu
|
|
97
|
+
class="filter-more"
|
|
98
|
+
label="More filters"
|
|
99
|
+
summaryClass={`field-btn${values.platform || values.type ? ' on' : ''}`}
|
|
100
|
+
summary="Filter"
|
|
101
|
+
>
|
|
102
|
+
<p class="pop-label">Platform</p>
|
|
103
|
+
<div role="group" aria-label="Platform">
|
|
104
|
+
<MenuRadio on={!values.platform} onPick={() => set('platform', '')}>
|
|
105
|
+
All platforms
|
|
106
|
+
</MenuRadio>
|
|
107
|
+
{catalog.map(entry => (
|
|
108
|
+
<MenuRadio
|
|
109
|
+
key={entry.id}
|
|
110
|
+
on={values.platform === entry.id}
|
|
111
|
+
onPick={() => set('platform', entry.id)}
|
|
112
|
+
>
|
|
113
|
+
<span class="pf">
|
|
114
|
+
<BrandIcon brand={entry.brand} />
|
|
115
|
+
{entry.name}
|
|
116
|
+
</span>
|
|
117
|
+
</MenuRadio>
|
|
118
|
+
))}
|
|
119
|
+
</div>
|
|
120
|
+
<p class="pop-label">Source</p>
|
|
121
|
+
<div role="group" aria-label="Source">
|
|
122
|
+
{KINDS.map(([value, label]) => (
|
|
123
|
+
<MenuRadio key={value} on={values.type === value} onPick={() => set('type', value)}>
|
|
124
|
+
{label}
|
|
125
|
+
</MenuRadio>
|
|
126
|
+
))}
|
|
127
|
+
</div>
|
|
128
|
+
</Menu>
|
|
129
|
+
</Toolbar>
|
|
130
|
+
{children}
|
|
131
|
+
{list.rows.length ? (
|
|
132
|
+
<ul class="agent-grid" aria-busy={list.stale}>
|
|
133
|
+
{list.rows.map(agent => (
|
|
134
|
+
<AgentCard key={agent.id} agent={agent} catalog={catalog} />
|
|
135
|
+
))}
|
|
136
|
+
</ul>
|
|
137
|
+
) : list.stale ? null : (
|
|
138
|
+
<Empty title="No agents match">Try another search or filter.</Empty>
|
|
139
|
+
)}
|
|
140
|
+
<Tail noun="agents" {...list} />
|
|
141
|
+
</>
|
|
142
|
+
);
|
|
143
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { useState } from 'preact/hooks';
|
|
4
|
+
|
|
5
|
+
import { client } from '@/utils/client';
|
|
6
|
+
import { iPlus } from '@/comps/ui/icons';
|
|
7
|
+
import { reasonText } from '@/utils/format';
|
|
8
|
+
import { ErrorText } from '@/comps/ui/field';
|
|
9
|
+
import { Icon } from '@/comps/ui/icon';
|
|
10
|
+
|
|
11
|
+
/** One click per built-in app not yet installed here; the platform returns to this page. */
|
|
12
|
+
export function ConnectApps({ apps }: { apps: Array<{ id: string; label: string }> }) {
|
|
13
|
+
const [error, setError] = useState('');
|
|
14
|
+
const [busy, setBusy] = useState('');
|
|
15
|
+
const connect = (app: string) => {
|
|
16
|
+
setBusy(app);
|
|
17
|
+
setError('');
|
|
18
|
+
void client.apps
|
|
19
|
+
.install(app, location.pathname)
|
|
20
|
+
.then(({ url }) => {
|
|
21
|
+
location.href = url;
|
|
22
|
+
})
|
|
23
|
+
.catch(reason => {
|
|
24
|
+
setBusy('');
|
|
25
|
+
setError(reasonText(reason));
|
|
26
|
+
});
|
|
27
|
+
};
|
|
28
|
+
return (
|
|
29
|
+
<div class="notice soft" role="status">
|
|
30
|
+
<Icon d={iPlus} />
|
|
31
|
+
<span class="grow">Add the built-in agent to your repositories and channels.</span>
|
|
32
|
+
{apps.map(app => (
|
|
33
|
+
<button
|
|
34
|
+
key={app.id}
|
|
35
|
+
type="button"
|
|
36
|
+
class="btn outline sm"
|
|
37
|
+
disabled={busy !== ''}
|
|
38
|
+
onClick={() => connect(app.id)}
|
|
39
|
+
>
|
|
40
|
+
{app.label}
|
|
41
|
+
</button>
|
|
42
|
+
))}
|
|
43
|
+
<ErrorText value={error} />
|
|
44
|
+
</div>
|
|
45
|
+
);
|
|
46
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { HEADS } from '@/comps/frame/heads';
|
|
2
|
+
import { Page } from '@/comps/frame/page-head';
|
|
3
|
+
import { LoadingToolbar } from '@/comps/frame/loading-card';
|
|
4
|
+
import { Loading } from '@/comps/ui/card';
|
|
5
|
+
|
|
6
|
+
/** The agents page before its list arrives. */
|
|
7
|
+
export default function AgentsLoading() {
|
|
8
|
+
return (
|
|
9
|
+
<Page>
|
|
10
|
+
<LoadingToolbar head={HEADS.agents} search="Search agents" more action="New agent" />
|
|
11
|
+
<Loading label="Loading agents" />
|
|
12
|
+
</Page>
|
|
13
|
+
);
|
|
14
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/* agents */
|
|
2
|
+
.agent-grid {
|
|
3
|
+
display: grid;
|
|
4
|
+
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
|
|
5
|
+
gap: 16px;
|
|
6
|
+
}
|
|
7
|
+
.agent-card {
|
|
8
|
+
position: relative;
|
|
9
|
+
display: flex;
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
gap: 14px;
|
|
12
|
+
height: 100%;
|
|
13
|
+
padding: 18px;
|
|
14
|
+
border: 1px solid var(--line2);
|
|
15
|
+
background: var(--panel);
|
|
16
|
+
}
|
|
17
|
+
.agent-card::before {
|
|
18
|
+
content: "";
|
|
19
|
+
position: absolute;
|
|
20
|
+
left: -1px;
|
|
21
|
+
right: -1px;
|
|
22
|
+
top: -1px;
|
|
23
|
+
height: 2px;
|
|
24
|
+
background: var(--line2);
|
|
25
|
+
transition: background 0.15s;
|
|
26
|
+
}
|
|
27
|
+
.agent-card:hover {
|
|
28
|
+
background: var(--tile);
|
|
29
|
+
}
|
|
30
|
+
.agent-card:hover::before {
|
|
31
|
+
background: var(--deep);
|
|
32
|
+
}
|
|
33
|
+
.bc-head {
|
|
34
|
+
display: flex;
|
|
35
|
+
align-items: center;
|
|
36
|
+
gap: 12px;
|
|
37
|
+
}
|
|
38
|
+
.bc-head h3 {
|
|
39
|
+
font-size: 14px;
|
|
40
|
+
font-weight: 700;
|
|
41
|
+
overflow-wrap: anywhere;
|
|
42
|
+
}
|
|
43
|
+
.agent-card .pills a {
|
|
44
|
+
position: relative;
|
|
45
|
+
z-index: 1;
|
|
46
|
+
}
|
|
47
|
+
.mark {
|
|
48
|
+
display: grid;
|
|
49
|
+
place-items: center;
|
|
50
|
+
flex: none;
|
|
51
|
+
width: 36px;
|
|
52
|
+
height: 36px;
|
|
53
|
+
background: var(--blue);
|
|
54
|
+
color: #fff;
|
|
55
|
+
font-weight: 700;
|
|
56
|
+
}
|
|
57
|
+
.lead-clamp {
|
|
58
|
+
display: -webkit-box;
|
|
59
|
+
-webkit-box-orient: vertical;
|
|
60
|
+
-webkit-line-clamp: 2;
|
|
61
|
+
flex: 1;
|
|
62
|
+
overflow: hidden;
|
|
63
|
+
color: var(--muted);
|
|
64
|
+
}
|
|
65
|
+
.pfs {
|
|
66
|
+
display: flex;
|
|
67
|
+
flex-wrap: wrap;
|
|
68
|
+
align-items: center;
|
|
69
|
+
gap: 6px 14px;
|
|
70
|
+
min-width: 0;
|
|
71
|
+
font-size: 12px;
|
|
72
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import './page.css';
|
|
2
|
+
import { dynamic } from '@wular/pnext/dynamic';
|
|
3
|
+
|
|
4
|
+
import { load } from '@/api/load';
|
|
5
|
+
import type { IntegrationInfo } from '@coder/client/types';
|
|
6
|
+
import { Page } from '@/comps/frame/page-head';
|
|
7
|
+
import { NeedsCredential } from '@/app/dash/tasks/composer';
|
|
8
|
+
import { Settle } from '@/comps/frame/stream';
|
|
9
|
+
import { localServer } from '@/api/types';
|
|
10
|
+
import { HEADS } from '@/comps/frame/heads';
|
|
11
|
+
|
|
12
|
+
/** Agent cards per page: whole rows of two or three. */
|
|
13
|
+
const AGENT_PAGE = 18;
|
|
14
|
+
|
|
15
|
+
// Rows arrive rendered; paging and search hydrate once the list is in view.
|
|
16
|
+
const AgentsGrid = dynamic(() => import('./agents-grid').then(m => m.AgentsGrid), {
|
|
17
|
+
load: 'visible',
|
|
18
|
+
ssr: true,
|
|
19
|
+
});
|
|
20
|
+
const ConnectApps = dynamic(() => import('./connect-apps').then(m => m.ConnectApps));
|
|
21
|
+
|
|
22
|
+
/** Built-in apps this workspace has not installed, labelled in each platform's words. */
|
|
23
|
+
function connectable(
|
|
24
|
+
apps: Array<{ id: string; integration: string }>,
|
|
25
|
+
integrations: IntegrationInfo[],
|
|
26
|
+
) {
|
|
27
|
+
return apps.map(value => ({
|
|
28
|
+
id: value.id,
|
|
29
|
+
label:
|
|
30
|
+
integrations.find(entry => entry.id === value.integration)?.installLabel ??
|
|
31
|
+
`Connect ${value.integration}`,
|
|
32
|
+
}));
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export default function AgentsPage({ request }: { request?: Request }) {
|
|
36
|
+
if (!request) return null;
|
|
37
|
+
const url = new URL(request.url);
|
|
38
|
+
const filters = {
|
|
39
|
+
q: url.searchParams.get('q') ?? '',
|
|
40
|
+
platform: url.searchParams.get('platform') ?? '',
|
|
41
|
+
type: url.searchParams.get('type') ?? '',
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
const agents = load(request).agents.list({
|
|
45
|
+
cursor: '',
|
|
46
|
+
limit: AGENT_PAGE,
|
|
47
|
+
connect: true,
|
|
48
|
+
...filters,
|
|
49
|
+
});
|
|
50
|
+
const credentials = load(request).credentials.list({ cursor: '', limit: 1 });
|
|
51
|
+
const me = load(request).me();
|
|
52
|
+
const catalog = load(request).integrations.list();
|
|
53
|
+
|
|
54
|
+
return (
|
|
55
|
+
<Page>
|
|
56
|
+
<Settle
|
|
57
|
+
load={() =>
|
|
58
|
+
Promise.all([
|
|
59
|
+
agents,
|
|
60
|
+
Promise.all([credentials, me]).then(
|
|
61
|
+
([page, who]) => (localServer(who) ? undefined : page.items.length),
|
|
62
|
+
() => undefined,
|
|
63
|
+
),
|
|
64
|
+
catalog.catch(() => []),
|
|
65
|
+
]).then(([first, count, integrations]) => {
|
|
66
|
+
const connect = connectable(first.connectable ?? [], integrations);
|
|
67
|
+
return (
|
|
68
|
+
<AgentsGrid
|
|
69
|
+
limit={AGENT_PAGE}
|
|
70
|
+
first={first}
|
|
71
|
+
filters={filters}
|
|
72
|
+
catalog={integrations}
|
|
73
|
+
head={HEADS.agents}
|
|
74
|
+
>
|
|
75
|
+
{connect.length ? <ConnectApps apps={connect} /> : null}
|
|
76
|
+
{count === 0 ? (
|
|
77
|
+
<NeedsCredential
|
|
78
|
+
reason="Agents need a model credential to run."
|
|
79
|
+
back="/dash/agents"
|
|
80
|
+
/>
|
|
81
|
+
) : null}
|
|
82
|
+
</AgentsGrid>
|
|
83
|
+
);
|
|
84
|
+
})
|
|
85
|
+
}
|
|
86
|
+
/>
|
|
87
|
+
</Page>
|
|
88
|
+
);
|
|
89
|
+
}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import type { ComponentChildren } from 'preact';
|
|
2
|
+
import { dynamic } from '@wular/pnext/dynamic';
|
|
3
|
+
|
|
4
|
+
import { iGit, iPencil } from '@/comps/ui/icons';
|
|
5
|
+
import { Link } from '@wular/pnext/link';
|
|
6
|
+
import { load } from '@/api/load';
|
|
7
|
+
import type { AgentRow, TasksPage } from '@coder/client/types';
|
|
8
|
+
import { Back, Page } from '@/comps/frame/page-head';
|
|
9
|
+
import { Icon } from '@/comps/ui/icon';
|
|
10
|
+
import { Stream } from '@/comps/frame/stream';
|
|
11
|
+
import { LoadingTabs, Tabs } from '@/comps/ui/tabs';
|
|
12
|
+
import { editableAgent } from '@/api/types';
|
|
13
|
+
import { backFrom } from '@/comps/frame/heads';
|
|
14
|
+
import { LoadingHero, Hero } from '@/app/dash/agents/agent/hero';
|
|
15
|
+
import { loadAgent } from '@/api/load';
|
|
16
|
+
import { loadTasks } from '@/app/dash/tasks/list/tasks-section';
|
|
17
|
+
|
|
18
|
+
const NewTaskButton = dynamic(() => import('@/app/dash/tasks/composer').then(m => m.NewTaskButton));
|
|
19
|
+
|
|
20
|
+
function Actions({ agent }: { agent: AgentRow }) {
|
|
21
|
+
return (
|
|
22
|
+
<>
|
|
23
|
+
{editableAgent(agent) ? (
|
|
24
|
+
<Link class="btn outline" href="/dash/agents/[slug]/edit" params={{ slug: agent.id }}>
|
|
25
|
+
<Icon d={iPencil} />
|
|
26
|
+
Edit
|
|
27
|
+
</Link>
|
|
28
|
+
) : agent.source === 'repo' && agent.sourceUrl ? (
|
|
29
|
+
<a class="btn outline" href={agent.sourceUrl} target="_blank" rel="noreferrer">
|
|
30
|
+
<Icon d={iGit} />
|
|
31
|
+
Open in repository
|
|
32
|
+
</a>
|
|
33
|
+
) : null}
|
|
34
|
+
<NewTaskButton agent={agent.id} />
|
|
35
|
+
</>
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/** The agent's newest task and its task counts. */
|
|
40
|
+
const lastTask = (request: Request, slug: string) =>
|
|
41
|
+
load(request).tasks.list({ cursor: '', limit: 1, summary: true, counts: true, agent: slug });
|
|
42
|
+
|
|
43
|
+
const TABS = [
|
|
44
|
+
['/dash/agents/[slug]', 'Overview'],
|
|
45
|
+
['/dash/agents/[slug]/usage', 'Usage'],
|
|
46
|
+
['/dash/agents/[slug]/platforms', 'Platforms'],
|
|
47
|
+
['/dash/agents/[slug]/tasks', 'Tasks'],
|
|
48
|
+
['/dash/agents/[slug]/settings', 'Settings'],
|
|
49
|
+
] as const;
|
|
50
|
+
|
|
51
|
+
/** The agent's header and tabs while its record loads. */
|
|
52
|
+
function LoadingAgentHead({ back }: { back: ComponentChildren }) {
|
|
53
|
+
return (
|
|
54
|
+
<>
|
|
55
|
+
<LoadingHero
|
|
56
|
+
back={back}
|
|
57
|
+
actions={
|
|
58
|
+
<button type="button" class="btn" disabled>
|
|
59
|
+
New task
|
|
60
|
+
</button>
|
|
61
|
+
}
|
|
62
|
+
/>
|
|
63
|
+
<LoadingTabs labels={TABS.map(([, label]) => label)} />
|
|
64
|
+
</>
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
function AgentHead({
|
|
69
|
+
agent,
|
|
70
|
+
tasks,
|
|
71
|
+
from,
|
|
72
|
+
back,
|
|
73
|
+
}: {
|
|
74
|
+
agent: AgentRow;
|
|
75
|
+
tasks?: TasksPage;
|
|
76
|
+
from: string | null;
|
|
77
|
+
back: ComponentChildren;
|
|
78
|
+
}) {
|
|
79
|
+
const counts: Partial<Record<(typeof TABS)[number][0], number>> = {
|
|
80
|
+
'/dash/agents/[slug]/platforms': Object.keys(agent.definition?.integrations ?? {}).length,
|
|
81
|
+
'/dash/agents/[slug]/tasks': tasks?.counts?.all,
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
return (
|
|
85
|
+
<>
|
|
86
|
+
<Hero agent={agent} back={back} actions={<Actions agent={agent} />} />
|
|
87
|
+
<Tabs
|
|
88
|
+
label="Agent"
|
|
89
|
+
items={TABS.map(([href, label]) => ({
|
|
90
|
+
href,
|
|
91
|
+
params: { slug: agent.id },
|
|
92
|
+
search: from ? { from } : undefined,
|
|
93
|
+
label,
|
|
94
|
+
count: counts[href],
|
|
95
|
+
}))}
|
|
96
|
+
/>
|
|
97
|
+
</>
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/** The agent's header and tabs around the open tab; a tab switch keeps them and swaps only the tab. */
|
|
102
|
+
export default function AgentTabsLayout({
|
|
103
|
+
request,
|
|
104
|
+
children,
|
|
105
|
+
}: {
|
|
106
|
+
request?: Request;
|
|
107
|
+
children: ComponentChildren;
|
|
108
|
+
}) {
|
|
109
|
+
if (!request) return null;
|
|
110
|
+
const url = new URL(request.url);
|
|
111
|
+
// Read from the address, not the params promise, so the layout renders with the loading frame.
|
|
112
|
+
const slug = decodeURIComponent(url.pathname.split('/')[3]!);
|
|
113
|
+
const from = url.searchParams.get('from');
|
|
114
|
+
const back = <Back {...backFrom(from, { href: '/dash/agents', params: {}, label: 'Agents' })} />;
|
|
115
|
+
|
|
116
|
+
return (
|
|
117
|
+
<Page>
|
|
118
|
+
<Stream
|
|
119
|
+
fallback={<LoadingAgentHead back={back} />}
|
|
120
|
+
load={() =>
|
|
121
|
+
Promise.all([
|
|
122
|
+
loadAgent(request, slug),
|
|
123
|
+
(url.pathname.endsWith('/tasks')
|
|
124
|
+
? loadTasks(request, slug).first
|
|
125
|
+
: lastTask(request, slug)
|
|
126
|
+
).catch(() => undefined),
|
|
127
|
+
]).then(([agent, tasks]) => (
|
|
128
|
+
<AgentHead agent={agent} tasks={tasks} from={from} back={back} />
|
|
129
|
+
))
|
|
130
|
+
}
|
|
131
|
+
/>
|
|
132
|
+
<div class="tab-body">{children}</div>
|
|
133
|
+
</Page>
|
|
134
|
+
);
|
|
135
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
.facts {
|
|
2
|
+
display: grid;
|
|
3
|
+
grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
|
|
4
|
+
gap: 12px 20px;
|
|
5
|
+
margin: 0;
|
|
6
|
+
}
|
|
7
|
+
.facts dt {
|
|
8
|
+
font-size: 10px;
|
|
9
|
+
color: var(--muted);
|
|
10
|
+
}
|
|
11
|
+
.facts dd {
|
|
12
|
+
margin: 4px 0 0;
|
|
13
|
+
overflow-wrap: anywhere;
|
|
14
|
+
}
|
|
15
|
+
.versions li {
|
|
16
|
+
display: flex;
|
|
17
|
+
align-items: first baseline;
|
|
18
|
+
gap: 14px;
|
|
19
|
+
padding: 12px 16px;
|
|
20
|
+
border-top: 1px solid var(--line);
|
|
21
|
+
}
|