@celljs/ta 4.9.0 → 4.10.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/dist/cli.mjs +69 -15
- package/dist/gateway.mjs +170 -28
- package/dist/pi/CHANGELOG.md +11 -0
- package/dist/pi/dist/bundle/chunks/anthropic-messages-CA3HHOL3.js +6 -0
- package/dist/pi/dist/bundle/chunks/{azure-openai-responses-FSC6BAW3.js → azure-openai-responses-76TWS6DT.js} +1 -1
- package/dist/pi/dist/bundle/chunks/bedrock-converse-stream.js +3 -3
- package/dist/pi/dist/bundle/chunks/chunk-4KSTFUIK.js +19 -0
- package/dist/pi/dist/bundle/chunks/chunk-4UNPP53I.js +55 -0
- package/dist/pi/dist/bundle/chunks/chunk-AUUCDC7R.js +4 -0
- package/dist/pi/dist/bundle/chunks/{chunk-V6KH5QG4.js → chunk-BAC3QPNW.js} +1 -1
- package/dist/pi/dist/bundle/chunks/{chunk-4EYXVSA5.js → chunk-FF6XOTWB.js} +9 -9
- package/dist/pi/dist/bundle/chunks/chunk-FMPAMX2W.js +82 -0
- package/dist/pi/dist/bundle/chunks/chunk-GFUN2N5K.js +2 -0
- package/dist/pi/dist/bundle/chunks/chunk-IEBK4HQA.js +2 -0
- package/dist/pi/dist/bundle/chunks/{chunk-C2WU32PX.js → chunk-IQUU5XIT.js} +1 -1
- package/dist/pi/dist/bundle/chunks/{chunk-EBFHJFEE.js → chunk-LQLJ7CDW.js} +1 -1
- package/dist/pi/dist/bundle/chunks/chunk-MMDXLZVS.js +30 -0
- package/dist/pi/dist/bundle/chunks/{chunk-GN3QYODH.js → chunk-QN4TOIZN.js} +1 -1
- package/dist/pi/dist/bundle/chunks/chunk-RKNK4Y6L.js +2 -0
- package/dist/pi/dist/bundle/chunks/{chunk-B46VJEHW.js → chunk-V7SLUK6A.js} +1 -1
- package/dist/pi/dist/bundle/chunks/chunk-VEJDBY3O.js +1237 -0
- package/dist/pi/dist/bundle/chunks/chunk-VKJQ6CME.js +8 -0
- package/dist/pi/dist/bundle/chunks/{chunk-3TGLJEWK.js → chunk-WL4TUXY7.js} +1 -1
- package/dist/pi/dist/bundle/chunks/{chunk-YZKQS34S.js → chunk-Y55SJART.js} +5 -1
- package/dist/pi/dist/bundle/chunks/{chunk-EOO47QGR.js → chunk-ZBIZYD6W.js} +1 -1
- package/dist/pi/dist/bundle/chunks/chunk-ZG74NES2.js +2 -0
- package/dist/pi/dist/bundle/chunks/chunk-ZGYS4UTC.js +2 -0
- package/dist/pi/dist/bundle/chunks/{cli-MCOUW5WS.js → cli-7RHMDOHL.js} +7 -7
- package/dist/pi/dist/bundle/chunks/{cloudflare-workers-ai-system-one-WLAFJSP6.js → cloudflare-workers-ai-system-one-U4J7D646.js} +1 -1
- package/dist/pi/dist/bundle/chunks/codemode-worker.js +2 -0
- package/dist/pi/dist/bundle/chunks/{easter-egg-3d-WMBNSJ4M.js → easter-egg-3d-GEVPKQF6.js} +1 -1
- package/dist/pi/dist/bundle/chunks/{execute-4CEBORGZ.js → execute-L2EEDV3L.js} +5 -3
- package/dist/pi/dist/bundle/chunks/github-copilot.js +1 -1
- package/dist/pi/dist/bundle/chunks/{google-generative-ai-INGKNW72.js → google-generative-ai-D5B6W47J.js} +1 -1
- package/dist/pi/dist/bundle/chunks/{google-vertex-IBTX6MBF.js → google-vertex-U4H5YDEW.js} +1 -1
- package/dist/pi/dist/bundle/chunks/{llama-cpp-classify-V5U3QKXI.js → llama-cpp-classify-EJXCQRUQ.js} +1 -1
- package/dist/pi/dist/bundle/chunks/{mistral-conversations-S4OWXIXQ.js → mistral-conversations-S277EKLB.js} +1 -1
- package/dist/pi/dist/bundle/chunks/openai-codex-responses-TEQRB65N.js +10 -0
- package/dist/pi/dist/bundle/chunks/{openai-completions-EJNYB6IX.js → openai-completions-HRZOSLBO.js} +3 -3
- package/dist/pi/dist/bundle/chunks/{openai-decisions-IXI34BYG.js → openai-decisions-F66BDLOM.js} +1 -1
- package/dist/pi/dist/bundle/chunks/openai-responses-BAKFWTGE.js +4 -0
- package/dist/pi/dist/bundle/chunks/{openrouter-images-PISKSFMS.js → openrouter-images-VXF5TVIK.js} +1 -1
- package/dist/pi/dist/bundle/chunks/{pi-messages-NORUKF4E.js → pi-messages-UBJKNDRN.js} +1 -1
- package/dist/pi/dist/bundle/chunks/{runtime-FQB7RU7U.js → runtime-J5ZSBGTX.js} +1 -1
- package/dist/pi/dist/bundle/chunks/{typesafe-system-one-CHVC2UUI.js → typesafe-system-one-56TEMIHL.js} +1 -1
- package/dist/pi/dist/bundle/chunks/virtual-modules-KITQRTYM.js +2 -0
- package/dist/pi/dist/bundle/cli-runtime.js +1 -1
- package/dist/pi/dist/bundle/index.js +1 -1
- package/dist/pi/dist/bundle/rpc-entry.js +1 -1
- package/dist/pi/docs/cli.md +14 -1
- package/dist/pi/docs/extensions.md +27 -7
- package/dist/pi/docs/keybindings.md +1 -1
- package/dist/pi/docs/llama-cpp.md +5 -8
- package/dist/pi/docs/models-configuration.md +6 -1
- package/dist/pi/docs/models.md +2 -1
- package/dist/pi/docs/prompt-templates.md +1 -1
- package/dist/pi/docs/providers.md +1 -1
- package/dist/pi/docs/rpc.md +4 -2
- package/dist/pi/docs/sessions.md +7 -1
- package/dist/pi/docs/settings.md +1 -1
- package/dist/pi/docs/tui.md +1 -1
- package/dist/pi/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
- package/dist/pi/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/dist/pi/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/dist/pi/examples/extensions/gondolin/package-lock.json +2 -2
- package/dist/pi/examples/extensions/gondolin/package.json +1 -1
- package/dist/pi/examples/extensions/plan-mode/index.ts +23 -13
- package/dist/pi/examples/extensions/plan-mode/utils.ts +42 -16
- package/dist/pi/examples/extensions/subagent/README.md +14 -11
- package/dist/pi/examples/extensions/subagent/index.ts +392 -171
- package/dist/pi/examples/extensions/with-deps/package-lock.json +2 -2
- package/dist/pi/examples/extensions/with-deps/package.json +1 -1
- package/dist/pi/examples/tsconfig.json +63 -35
- package/dist/pi/package.json +1 -1
- package/dist/pi/packages/ta-agents/README.en.md +2 -2
- package/dist/pi/packages/ta-agents/README.md +2 -2
- package/dist/pi/packages/ta-agents/extension/index.mjs +69 -13
- package/dist/pi/packages/ta-agents/lib/agent-bindings.d.ts +19 -4
- package/dist/pi/packages/ta-agents/lib/agent-bindings.js +43 -9
- package/dist/pi/packages/ta-agents/lib/agent-catalog.d.ts +2 -0
- package/dist/pi/packages/ta-agents/lib/agent-catalog.js +3 -0
- package/dist/pi/packages/ta-agents/lib/extension.d.ts +2 -1
- package/dist/pi/packages/ta-agents/lib/extension.js +26 -4
- package/dist/pi/packages/ta-agents/lib/json-rpc.js +7 -1
- package/dist/pi/packages/ta-agents/lib/texts.d.ts +4 -0
- package/dist/pi/packages/ta-agents/lib/texts.js +4 -0
- package/dist/pi/packages/ta-agents/package.json +3 -3
- package/dist/pi/packages/ta-bots/extension/index.mjs +46 -0
- package/dist/pi/packages/ta-bots/host/index.mjs +46 -0
- package/dist/pi/packages/ta-bots/package.json +1 -1
- package/dist/pi/packages/ta-changes/package.json +1 -1
- package/dist/pi/packages/ta-channels/README.en.md +2 -2
- package/dist/pi/packages/ta-channels/README.md +2 -2
- package/dist/pi/packages/ta-channels/host/index.mjs +50 -0
- package/dist/pi/packages/ta-channels/lib/create.js +11 -3
- package/dist/pi/packages/ta-channels/lib/faces.js +1 -1
- package/dist/pi/packages/ta-channels/lib/i18n.d.ts +6 -9
- package/dist/pi/packages/ta-channels/lib/i18n.js +12 -18
- package/dist/pi/packages/ta-channels/lib/more-menu.d.ts +3 -2
- package/dist/pi/packages/ta-channels/lib/more-menu.js +21 -29
- package/dist/pi/packages/ta-channels/lib/room.js +13 -8
- package/dist/pi/packages/ta-channels/lib/sidebar.js +241 -79
- package/dist/pi/packages/ta-channels/lib/style.d.ts +1 -1
- package/dist/pi/packages/ta-channels/lib/style.js +83 -37
- package/dist/pi/packages/ta-channels/lib/tasks.d.ts +2 -0
- package/dist/pi/packages/ta-channels/lib/tasks.js +22 -12
- package/dist/pi/packages/ta-channels/lib/views.d.ts +49 -1
- package/dist/pi/packages/ta-channels/lib/views.js +100 -1
- package/dist/pi/packages/ta-channels/package.json +1 -1
- package/dist/pi/packages/ta-channels/web/index.js +482 -259
- package/dist/pi/packages/ta-computer-use/package.json +2 -2
- package/dist/pi/packages/ta-cron/README.en.md +2 -2
- package/dist/pi/packages/ta-cron/README.md +2 -2
- package/dist/pi/packages/ta-cron/host/index.mjs +6 -0
- package/dist/pi/packages/ta-cron/lib/editor.js +60 -27
- package/dist/pi/packages/ta-cron/lib/i18n.d.ts +12 -1
- package/dist/pi/packages/ta-cron/lib/i18n.js +24 -2
- package/dist/pi/packages/ta-cron/lib/page.d.ts +33 -3
- package/dist/pi/packages/ta-cron/lib/page.js +119 -4
- package/dist/pi/packages/ta-cron/lib/style.d.ts +1 -1
- package/dist/pi/packages/ta-cron/lib/style.js +166 -46
- package/dist/pi/packages/ta-cron/lib/task-extension.d.ts +15 -0
- package/dist/pi/packages/ta-cron/lib/task-extension.js +56 -0
- package/dist/pi/packages/ta-cron/lib/task-util.d.ts +2 -0
- package/dist/pi/packages/ta-cron/lib/task-util.js +11 -0
- package/dist/pi/packages/ta-cron/lib/tasks-view.d.ts +4 -1
- package/dist/pi/packages/ta-cron/lib/tasks-view.js +102 -66
- package/dist/pi/packages/ta-cron/package.json +1 -1
- package/dist/pi/packages/ta-cron/web/index.js +928 -404
- package/dist/pi/packages/ta-extensions/README.en.md +3 -1
- package/dist/pi/packages/ta-extensions/README.md +3 -1
- package/dist/pi/packages/ta-extensions/lib/actions.js +3 -1
- package/dist/pi/packages/ta-extensions/lib/composer.d.ts +17 -0
- package/dist/pi/packages/ta-extensions/lib/composer.js +84 -0
- package/dist/pi/packages/ta-extensions/lib/i18n.d.ts +9 -0
- package/dist/pi/packages/ta-extensions/lib/i18n.js +18 -0
- package/dist/pi/packages/ta-extensions/lib/index.js +4 -0
- package/dist/pi/packages/ta-extensions/lib/make-model.d.ts +20 -0
- package/dist/pi/packages/ta-extensions/lib/make-model.js +43 -0
- package/dist/pi/packages/ta-extensions/lib/page.js +42 -18
- package/dist/pi/packages/ta-extensions/lib/settings.d.ts +4 -0
- package/dist/pi/packages/ta-extensions/lib/settings.js +44 -0
- package/dist/pi/packages/ta-extensions/lib/style.d.ts +1 -1
- package/dist/pi/packages/ta-extensions/lib/style.js +10 -4
- package/dist/pi/packages/ta-extensions/package.json +1 -1
- package/dist/pi/packages/ta-extensions/skills/ta-package/SKILL.md +7 -3
- package/dist/pi/packages/ta-extensions/web/index.js +269 -26
- package/dist/pi/packages/ta-launcher/package.json +1 -1
- package/dist/pi/packages/ta-workspace/README.md +1 -1
- package/dist/pi/packages/ta-workspace/README.zh-cn.md +1 -1
- package/dist/pi/packages/ta-workspace/lib/bytes.d.ts +11 -0
- package/dist/pi/packages/ta-workspace/lib/bytes.js +40 -0
- package/dist/pi/packages/ta-workspace/lib/common.d.ts +2 -1
- package/dist/pi/packages/ta-workspace/lib/common.js +15 -37
- package/dist/pi/packages/ta-workspace/lib/editors.js +12 -3
- package/dist/pi/packages/ta-workspace/lib/i18n.d.ts +1 -2
- package/dist/pi/packages/ta-workspace/lib/i18n.js +2 -4
- package/dist/pi/packages/ta-workspace/lib/index.js +17 -1
- package/dist/pi/packages/ta-workspace/lib/launcher.d.ts +9 -0
- package/dist/pi/packages/ta-workspace/lib/launcher.js +39 -0
- package/dist/pi/packages/ta-workspace/lib/preview.d.ts +13 -3
- package/dist/pi/packages/ta-workspace/lib/preview.js +17 -14
- package/dist/pi/packages/ta-workspace/lib/style.d.ts +1 -1
- package/dist/pi/packages/ta-workspace/lib/style.js +20 -7
- package/dist/pi/packages/ta-workspace/lib/terminal-sessions.d.ts +51 -0
- package/dist/pi/packages/ta-workspace/lib/terminal-sessions.js +226 -0
- package/dist/pi/packages/ta-workspace/lib/terminal.d.ts +0 -39
- package/dist/pi/packages/ta-workspace/lib/terminal.js +28 -240
- package/dist/pi/packages/ta-workspace/lib/util/keys.d.ts +18 -0
- package/dist/pi/packages/ta-workspace/lib/util/keys.js +23 -0
- package/dist/pi/packages/ta-workspace/lib/util/preview.d.ts +19 -0
- package/dist/pi/packages/ta-workspace/lib/util/preview.js +32 -1
- package/dist/pi/packages/ta-workspace/package.json +1 -1
- package/dist/pi/packages/ta-workspace/web/index.js +238 -68
- package/dist/public/assets/{abnfDiagram-S7VZAUFO-C1tb6dM5.js → abnfDiagram-S7VZAUFO-BmIko5tV.js} +1 -1
- package/dist/public/assets/{architecture-WOLXFQ4H-DN1Va8BF.js → architecture-WOLXFQ4H-XgsdQ7ul.js} +1 -1
- package/dist/public/assets/{architectureDiagram-YGSQEFNW-BmK2SYtQ.js → architectureDiagram-YGSQEFNW--sVhMS03.js} +1 -1
- package/dist/public/assets/{blockDiagram-APKKGZFW-DvLrLzTm.js → blockDiagram-APKKGZFW-8f9b-9k2.js} +1 -1
- package/dist/public/assets/browser-DOHZ0JCf.js +12 -0
- package/dist/public/assets/{c4Diagram-KJ2TOQU5-CrQlWwrG.js → c4Diagram-KJ2TOQU5-CwYQ0Jfy.js} +1 -1
- package/dist/public/assets/{chunk-6MUBBAK2-CHKMsuY_.js → chunk-6MUBBAK2-7Y9ezehi.js} +1 -1
- package/dist/public/assets/{chunk-AXFCVDMN-CWJ7Np6s.js → chunk-AXFCVDMN-CZIH4pWz.js} +1 -1
- package/dist/public/assets/{chunk-BG4553SI-3v5XbQGM.js → chunk-BG4553SI-DsNATY2m.js} +1 -1
- package/dist/public/assets/{chunk-DQASFODM-2CC-yiCz.js → chunk-DQASFODM-CoXkfYE-.js} +1 -1
- package/dist/public/assets/{chunk-HFQBQIA3-D2hzQPAy.js → chunk-HFQBQIA3-C5OLqki8.js} +1 -1
- package/dist/public/assets/{chunk-KQLB2F66-SifAZs2r.js → chunk-KQLB2F66-DMHuYGEF.js} +1 -1
- package/dist/public/assets/{chunk-KS47KZWR-BP0C0VCC.js → chunk-KS47KZWR-BKeOttO1.js} +1 -1
- package/dist/public/assets/{chunk-LEVMRMFU-B1f5vw5b.js → chunk-LEVMRMFU-D6zCwkk7.js} +1 -1
- package/dist/public/assets/{chunk-M57EVK23-B2MCJt7Y.js → chunk-M57EVK23-B5-QqcZg.js} +1 -1
- package/dist/public/assets/{chunk-OY52VR5R-cDpZJMk4.js → chunk-OY52VR5R-DQrq3n0T.js} +1 -1
- package/dist/public/assets/{chunk-QB3YPZ4I-BE0we2xc.js → chunk-QB3YPZ4I-j6ZT7EDR.js} +1 -1
- package/dist/public/assets/{chunk-R3KSYZAL-D9wOfqqH.js → chunk-R3KSYZAL-D5MXUO36.js} +1 -1
- package/dist/public/assets/{chunk-STOXU5M4-BIaVsc0K.js → chunk-STOXU5M4-DaBkw4dD.js} +1 -1
- package/dist/public/assets/{chunk-TU62E6Q5-BZc0OZEM.js → chunk-TU62E6Q5-vXcRfGci.js} +1 -1
- package/dist/public/assets/{chunk-X4PVCEUW-Bngfwwzm.js → chunk-X4PVCEUW-CIh6H4Y2.js} +1 -1
- package/dist/public/assets/{chunk-XXDRQBXY-C5FQ6XHK.js → chunk-XXDRQBXY-C_Vwv1FM.js} +1 -1
- package/dist/public/assets/{classDiagram-v2-L25IHNXF-_om54nmt.js → classDiagram-v2-L25IHNXF-DccDWEJn.js} +1 -1
- package/dist/public/assets/{cose-bilkent-JH36ORCC-Dwpeee_6.js → cose-bilkent-JH36ORCC-BX47lumZ.js} +1 -1
- package/dist/public/assets/cynefin-EF2NZ3EQ-MaI-3dMQ.js +1 -0
- package/dist/public/assets/{cynefinDiagram-L36ESFBY-DP5_y9Dq.js → cynefinDiagram-L36ESFBY-BE6WOGxW.js} +1 -1
- package/dist/public/assets/{d3-selection-DFiMlEmn.js → d3-selection-ZcE6yRN5.js} +1 -1
- package/dist/public/assets/{dagre-SPEB5RXH-DYwsk6gk.js → dagre-SPEB5RXH-CE6SOOcN.js} +1 -1
- package/dist/public/assets/{diagram-3B7GL73J-Dq_nT3AZ.js → diagram-3B7GL73J-xC8VtiYL.js} +1 -1
- package/dist/public/assets/{diagram-DNEMPZML-ChURW6y9.js → diagram-DNEMPZML-4dmcBbjL.js} +1 -1
- package/dist/public/assets/{diagram-L3MUGCDN-CgVp4Rto.js → diagram-L3MUGCDN-D14Yn3sQ.js} +1 -1
- package/dist/public/assets/{diagram-LA4NIPWU-vrqLMDby.js → diagram-LA4NIPWU-GxSXIhsK.js} +1 -1
- package/dist/public/assets/{diagram-MHCOC4E2-lvfOr5ij.js → diagram-MHCOC4E2-Cm7Prlpc.js} +1 -1
- package/dist/public/assets/{diagram-XPFHEONP-oQ18TeVp.js → diagram-XPFHEONP-mkUnnKFu.js} +1 -1
- package/dist/public/assets/{dist-BOxxmveI.js → dist-acJS-BlA.js} +1 -1
- package/dist/public/assets/{ebnfDiagram-UZSYDL2S-C7_tlZCS.js → ebnfDiagram-UZSYDL2S-m77ua3UQ.js} +1 -1
- package/dist/public/assets/{editor.api-CoZ8MEuz.js → editor.api-CljTm-EQ.js} +1 -1
- package/dist/public/assets/{elk-XV6XMXQE-Dkt5-ikg.js → elk-XV6XMXQE-DsQY1hw9.js} +1 -1
- package/dist/public/assets/{erDiagram-EYBAPDEH-27kh3zlx.js → erDiagram-EYBAPDEH-CV8gJM0P.js} +1 -1
- package/dist/public/assets/{eventmodeling-K75KTNOO-CxVEejjN.js → eventmodeling-K75KTNOO-C1pymbUr.js} +1 -1
- package/dist/public/assets/flowDiagram-MALGAFMO-shBnAQFk.js +1 -0
- package/dist/public/assets/{freemarker2-D6CwPIXh.js → freemarker2-DYJXaMHN.js} +1 -1
- package/dist/public/assets/{ganttDiagram-23REXITY-C-amlwpX.js → ganttDiagram-23REXITY-CppxOWRh.js} +1 -1
- package/dist/public/assets/gitGraph-VSP46ZUC-BtQWboBz.js +1 -0
- package/dist/public/assets/{gitGraphDiagram-STJD7YCW-DKhzI0Xz.js → gitGraphDiagram-STJD7YCW-CrQrZhcP.js} +1 -1
- package/dist/public/assets/{handlebars-mxNr68Gm.js → handlebars-DZCnH9e2.js} +1 -1
- package/dist/public/assets/{html-Bze6s9R9.js → html-DuzouNES.js} +1 -1
- package/dist/public/assets/{index-BhQUc9PU.js → index-B7OYKvCE.js} +2 -2
- package/dist/public/assets/info-OHQRW6UA-CDSLjba_.js +1 -0
- package/dist/public/assets/{infoDiagram-KBXO4MBG-WHuWjEDO.js → infoDiagram-KBXO4MBG-6pby19tQ.js} +1 -1
- package/dist/public/assets/{ishikawaDiagram-M35NCXHK-DFHUwD0J.js → ishikawaDiagram-M35NCXHK-Duf8c8rQ.js} +1 -1
- package/dist/public/assets/{javascript-4NMPu7y1.js → javascript-2d_L6cVd.js} +1 -1
- package/dist/public/assets/{journeyDiagram-OPLOXDXO-C7gV6zEr.js → journeyDiagram-OPLOXDXO-Dvv-xzNo.js} +1 -1
- package/dist/public/assets/{jsonMode-B1JEHPMp.js → jsonMode-CFadYXyI.js} +1 -1
- package/dist/public/assets/{kanban-definition-BZKZHSQY-DlRu_d2Q.js → kanban-definition-BZKZHSQY-Dsk6F-TT.js} +1 -1
- package/dist/public/assets/{liquid-B7sIf4NX.js → liquid-Din4CF34.js} +1 -1
- package/dist/public/assets/{mdx-CAN0qez6.js → mdx-DivDuCWI.js} +1 -1
- package/dist/public/assets/{mermaid-parser.core-BGmotBhf.js → mermaid-parser.core-BfCv4CYZ.js} +3 -3
- package/dist/public/assets/{mermaid.core-Cl6SS3cM.js → mermaid.core-DC20ZwJj.js} +4 -4
- package/dist/public/assets/{mindmap-definition-I2QAS2VK-DiQ8Feqr.js → mindmap-definition-I2QAS2VK-DRZRrJU_.js} +1 -1
- package/dist/public/assets/module-BAQaY56j.js +1 -0
- package/dist/public/assets/module-DxRGg3ED.js +1947 -0
- package/dist/public/assets/{monaco-CwCjTWAO.js → monaco-D1d6MOPe.js} +3 -3
- package/dist/public/assets/packet-JDAUHWVQ-dYb4P9eU.js +1 -0
- package/dist/public/assets/{pegDiagram-FD4XPPHP-XhCpv6BX.js → pegDiagram-FD4XPPHP-DcGr3Tbk.js} +1 -1
- package/dist/public/assets/pie-XZMESJXO-CIompBnc.js +1 -0
- package/dist/public/assets/{pieDiagram-J4AKIIQI-DUVzuXUd.js → pieDiagram-J4AKIIQI-GF7pu6ch.js} +1 -1
- package/dist/public/assets/{python-DsoF66Sp.js → python-BQbTTTT5.js} +1 -1
- package/dist/public/assets/{quadrantDiagram-XTYBLID2-Ddobf0z0.js → quadrantDiagram-XTYBLID2-D-bcu7Ey.js} +1 -1
- package/dist/public/assets/radar-ABXABTNO-DiJl7BtK.js +1 -0
- package/dist/public/assets/railroad-I3PHUGI6-B5cRBukM.js +1 -0
- package/dist/public/assets/{railroad-abnf-LNEFI6M7-DkrNo-Gf.js → railroad-abnf-LNEFI6M7-BiBHsI-K.js} +1 -1
- package/dist/public/assets/{railroad-ebnf-DWYD2UWJ-DaB7gY8P.js → railroad-ebnf-DWYD2UWJ-zKjrfkHs.js} +1 -1
- package/dist/public/assets/{railroad-peg-JR7BVNR7-D_QG87QV.js → railroad-peg-JR7BVNR7-DKuVn0GT.js} +1 -1
- package/dist/public/assets/{railroadDiagram-MRQ6NCDL-x-nUoBjv.js → railroadDiagram-MRQ6NCDL-Cyn-16mJ.js} +1 -1
- package/dist/public/assets/{razor-DSrcJyQe.js → razor-DiLk54O0.js} +1 -1
- package/dist/public/assets/{requirementDiagram-Y7LWUY3S-kNNcbsty.js → requirementDiagram-Y7LWUY3S-CwU2EBkW.js} +1 -1
- package/dist/public/assets/{sankeyDiagram-WGJFYUXA-ClC12Odk.js → sankeyDiagram-WGJFYUXA-ajf00HyW.js} +1 -1
- package/dist/public/assets/{sequenceDiagram-5NDRBG5M-DDQITP2g.js → sequenceDiagram-5NDRBG5M-DiX_OIAw.js} +1 -1
- package/dist/public/assets/{stateDiagram-v2-FJ4FJNEA-N1t_36oh.js → stateDiagram-v2-FJ4FJNEA-CV5bRqB7.js} +1 -1
- package/dist/public/assets/{swimlanes-UMQ2AFYF-DSt9fFYE.js → swimlanes-UMQ2AFYF-BGQKSlj7.js} +1 -1
- package/dist/public/assets/swimlanesDiagram-OMPLPG4O-DxXlavVT.js +8 -0
- package/dist/public/assets/{timeline-definition-SEUHKTQE-CfymOw_s.js → timeline-definition-SEUHKTQE-DhQoApff.js} +1 -1
- package/dist/public/assets/treeView-D4JQ5SDB-BOP6mkZC.js +1 -0
- package/dist/public/assets/treemap-SAJKECNS-BJxuPMz3.js +1 -0
- package/dist/public/assets/{typescript-J7rF-zX8.js → typescript-COQ1g-up.js} +1 -1
- package/dist/public/assets/{usecaseDiagram-AFA6YXN4-CK_mRc2_.js → usecaseDiagram-AFA6YXN4-CmLFzjie.js} +1 -1
- package/dist/public/assets/{vennDiagram-NNMJR3RB-DW8xR6IJ.js → vennDiagram-NNMJR3RB-DOa6JR5K.js} +1 -1
- package/dist/public/assets/wardley-7MLQ67FV-jqlowjVL.js +1 -0
- package/dist/public/assets/{wardleyDiagram-S7YFUSEH-Css55Zq5.js → wardleyDiagram-S7YFUSEH-BV7EEShp.js} +1 -1
- package/dist/public/assets/{xml-CJeviG_a.js → xml-BbvtjuaG.js} +1 -1
- package/dist/public/assets/{xychartDiagram-GGNKY7IX-BnhK9cFS.js → xychartDiagram-GGNKY7IX-DtMpPbsq.js} +1 -1
- package/dist/public/assets/{yaml-Gw3uo6rF.js → yaml-Bw8NFga9.js} +1 -1
- package/dist/public/index.html +1 -1
- package/dist/public/launch.svg +46 -42
- package/dist/serve/index.mjs +1367 -560
- package/package.json +25 -25
- package/dist/pi/dist/bundle/chunks/anthropic-messages-BWGCKOF4.js +0 -6
- package/dist/pi/dist/bundle/chunks/chunk-44DLKSKE.js +0 -1232
- package/dist/pi/dist/bundle/chunks/chunk-62VOPMLK.js +0 -65
- package/dist/pi/dist/bundle/chunks/chunk-7O7QKK6A.js +0 -2
- package/dist/pi/dist/bundle/chunks/chunk-CHWNPHIS.js +0 -82
- package/dist/pi/dist/bundle/chunks/chunk-NL4X6LBY.js +0 -4
- package/dist/pi/dist/bundle/chunks/chunk-NZY7EIPA.js +0 -4
- package/dist/pi/dist/bundle/chunks/chunk-R2EGYMOO.js +0 -7
- package/dist/pi/dist/bundle/chunks/chunk-UKVNB6C4.js +0 -2
- package/dist/pi/dist/bundle/chunks/chunk-USJZMAIR.js +0 -2
- package/dist/pi/dist/bundle/chunks/chunk-VOLAXWGI.js +0 -2
- package/dist/pi/dist/bundle/chunks/openai-codex-responses-QAWLOQSN.js +0 -10
- package/dist/pi/dist/bundle/chunks/openai-responses-MD3562FB.js +0 -4
- package/dist/pi/dist/bundle/chunks/virtual-modules-O76XM3OB.js +0 -2
- package/dist/public/assets/browser-DAv3ly6M.js +0 -12
- package/dist/public/assets/cynefin-EF2NZ3EQ-CW_93VVD.js +0 -1
- package/dist/public/assets/flowDiagram-MALGAFMO-BRowRdve.js +0 -1
- package/dist/public/assets/gitGraph-VSP46ZUC-BGmojXlx.js +0 -1
- package/dist/public/assets/info-OHQRW6UA-CRRVgGj2.js +0 -1
- package/dist/public/assets/module-1nDbf1AK.js +0 -1761
- package/dist/public/assets/module-BkKfSTDV.js +0 -1
- package/dist/public/assets/packet-JDAUHWVQ-DUlqTCWQ.js +0 -1
- package/dist/public/assets/pie-XZMESJXO-2RgP4ScO.js +0 -1
- package/dist/public/assets/radar-ABXABTNO-Dap8k-yH.js +0 -1
- package/dist/public/assets/railroad-I3PHUGI6-Ds10NBze.js +0 -1
- package/dist/public/assets/swimlanesDiagram-OMPLPG4O-BHAN4SQO.js +0 -8
- package/dist/public/assets/treeView-D4JQ5SDB-f1hLUBjI.js +0 -1
- package/dist/public/assets/treemap-SAJKECNS-_NPRpuUC.js +0 -1
- package/dist/public/assets/wardley-7MLQ67FV-CLBqtefx.js +0 -1
|
@@ -93,7 +93,6 @@ function ChannelRoom({ context, channelId: fixed }) {
|
|
|
93
93
|
const channelId = fixed !== null && fixed !== void 0 ? fixed : shown;
|
|
94
94
|
const faces = (0, views_1.useFaces)(state.team);
|
|
95
95
|
const w = views_1.ChannelViews.words(pi);
|
|
96
|
-
const list = react_1.React.useRef(null);
|
|
97
96
|
const channel = state.team.channels.find(candidate => candidate.id === channelId);
|
|
98
97
|
const messages = channel ? state.messages[channel.id] : undefined;
|
|
99
98
|
const working = channel ? ((_a = state.working[channel.id]) !== null && _a !== void 0 ? _a : []) : [];
|
|
@@ -102,13 +101,9 @@ function ChannelRoom({ context, channelId: fixed }) {
|
|
|
102
101
|
void service.messages(channelId);
|
|
103
102
|
}
|
|
104
103
|
}, [service, channelId]);
|
|
105
|
-
//
|
|
106
|
-
react_1.React.
|
|
107
|
-
|
|
108
|
-
if (element) {
|
|
109
|
-
element.scrollTop = element.scrollHeight;
|
|
110
|
-
}
|
|
111
|
-
}, [channelId, messages === null || messages === void 0 ? void 0 : messages.length, working.length]);
|
|
104
|
+
// As the conversations of the page: following what comes in at the bottom, to it when the user sends or another channel shows.
|
|
105
|
+
const sent = react_1.React.useMemo(() => { var _a; return (_a = messages === null || messages === void 0 ? void 0 : messages.filter(message => message.author === channels_util_1.USER).length) !== null && _a !== void 0 ? _a : 0; }, [messages]);
|
|
106
|
+
const list = pi.ui.useChatScroll(sent, channelId);
|
|
112
107
|
const Markdown = pi.ui.Markdown;
|
|
113
108
|
const Composer = pi.ui.Composer;
|
|
114
109
|
const Avatar = pi.ui.Avatar;
|
|
@@ -169,6 +164,16 @@ function ChannelRoom({ context, channelId: fixed }) {
|
|
|
169
164
|
},
|
|
170
165
|
},
|
|
171
166
|
],
|
|
167
|
+
[
|
|
168
|
+
{
|
|
169
|
+
// As in the + of every conversation (@celljs/ta-extensions): the lead answers, with what was said here.
|
|
170
|
+
key: 'make-extension',
|
|
171
|
+
label: w.makeExtension,
|
|
172
|
+
detail: w.makeExtensionDetail,
|
|
173
|
+
icon: views_1.ChannelViews.maybeIcon(pi, 'Sparkles', null, 16),
|
|
174
|
+
run: () => void service.post(channel.id, w.makeExtensionAsk).catch(error => pi.ui.notify(views_1.ChannelViews.message(error), 'error')),
|
|
175
|
+
},
|
|
176
|
+
],
|
|
172
177
|
], onSend: text => service.post(channel.id, text) }))));
|
|
173
178
|
}
|
|
174
179
|
//# sourceMappingURL=room.js.map
|
|
@@ -12,18 +12,24 @@ const more_menu_1 = require("./more-menu");
|
|
|
12
12
|
const react_1 = require("./react");
|
|
13
13
|
const views_1 = require("./views");
|
|
14
14
|
/** A row of the list: the face, the name and a line of what is going on, the time at the right. */
|
|
15
|
-
function Row({ pi, avatar, title, badge, preview, live, dot, waiting,
|
|
16
|
-
const
|
|
17
|
-
|
|
15
|
+
function Row({ pi, avatar, title, badge, preview, live, dot, waiting, fresh, time, hint, selected, onSelect, more, swipe, check, place }) {
|
|
16
|
+
const single = !preview && !place;
|
|
17
|
+
const spinner = dot === 'running' && react_1.React.createElement("span", { className: "tac-spinner ta-spinner" });
|
|
18
|
+
const row = (react_1.React.createElement("button", { type: "button", className: `tac-item${selected ? ' tac-selected' : ''}${single ? ' tac-item-single' : ''}`, "aria-current": selected || undefined, title: hint, onClick: onSelect },
|
|
19
|
+
check,
|
|
20
|
+
react_1.React.createElement("span", { className: "tac-avatar" },
|
|
21
|
+
avatar,
|
|
22
|
+
react_1.React.createElement("span", { className: `tac-dot${dot ? ` tac-dot-${dot}` : ''}` })),
|
|
18
23
|
react_1.React.createElement("span", { className: "tac-item-text" },
|
|
19
24
|
react_1.React.createElement("span", { className: "tac-item-top" },
|
|
20
25
|
react_1.React.createElement("span", { className: "tac-item-title" }, title),
|
|
21
26
|
badge,
|
|
27
|
+
single && spinner,
|
|
22
28
|
react_1.React.createElement("span", { className: "tac-item-time" }, time)),
|
|
23
|
-
react_1.React.createElement("span", { className: "tac-item-bottom" },
|
|
24
|
-
|
|
25
|
-
react_1.React.createElement("span", { className: `tac-item-preview${live ? ' tac-
|
|
26
|
-
|
|
29
|
+
!single && (react_1.React.createElement("span", { className: "tac-item-bottom" },
|
|
30
|
+
place,
|
|
31
|
+
react_1.React.createElement("span", { className: `tac-item-preview${live ? ' tac-now' : ''}${waiting ? ' tac-waiting' : ''}${fresh ? ' tac-fresh' : ''}` }, preview),
|
|
32
|
+
spinner)))));
|
|
27
33
|
const SwipeRow = pi.ui.SwipeRow;
|
|
28
34
|
const className = `tac-item-row${selected ? ' tac-selected' : ''}`;
|
|
29
35
|
if (SwipeRow && (more || swipe)) {
|
|
@@ -96,6 +102,8 @@ function SidebarHead({ context }) {
|
|
|
96
102
|
const FOLDED_KEY = 'ta-channels.folded';
|
|
97
103
|
/** Whether the members are grouped by directory, the same for the user on every device (pi.storage). */
|
|
98
104
|
const BY_DIRECTORY_KEY = 'ui.membersByDirectory';
|
|
105
|
+
/** No open sessions: a page of before reads none (ui.useSessions). */
|
|
106
|
+
const NO_SESSIONS = [];
|
|
99
107
|
/** The ended tasks shown before `showAll`. */
|
|
100
108
|
const ENDED_SHOWN = 5;
|
|
101
109
|
function useFolded() {
|
|
@@ -144,48 +152,182 @@ function useStored(storage, key, initial) {
|
|
|
144
152
|
return [value, set];
|
|
145
153
|
}
|
|
146
154
|
/** The head of a section: its name and count, a click folds it. */
|
|
147
|
-
function Section({ id, title, count, folded, onFold, action, children, }) {
|
|
155
|
+
function Section({ id, title, count, folded, onFold, action, alert, children, }) {
|
|
148
156
|
const closed = folded.has(id);
|
|
149
157
|
return (react_1.React.createElement("section", { className: `tac-section${closed ? ' tac-closed' : ''}` },
|
|
150
158
|
react_1.React.createElement("div", { className: "tac-section-head-row" },
|
|
151
159
|
react_1.React.createElement("button", { type: "button", className: "tac-section-head", "aria-expanded": !closed, onClick: () => onFold(id) },
|
|
152
|
-
react_1.React.createElement("span", { className: "tac-section-chevron", "aria-hidden": "true" }),
|
|
153
160
|
react_1.React.createElement("span", { className: "tac-section-title" }, title),
|
|
154
|
-
react_1.React.createElement("span", { className: "tac-section-count" }, count)
|
|
161
|
+
closed && count > 0 && react_1.React.createElement("span", { className: "tac-section-count" }, count),
|
|
162
|
+
closed && alert && react_1.React.createElement("span", { className: "tac-section-alert" }),
|
|
163
|
+
react_1.React.createElement("span", { className: "tac-section-chevron", "aria-hidden": "true" })),
|
|
155
164
|
!closed && action),
|
|
156
165
|
!closed && react_1.React.createElement("div", { className: "tac-section-body" }, children)));
|
|
157
166
|
}
|
|
158
|
-
/**
|
|
159
|
-
const
|
|
160
|
-
/**
|
|
161
|
-
|
|
167
|
+
/** Since when, and when the user last opened each task, the same on every device (pi.storage). */
|
|
168
|
+
const SEEN_KEY = 'ui.seenTasks';
|
|
169
|
+
/**
|
|
170
|
+
* Which tasks the user has seen, as a messenger's unread: a task that ended after they last opened it needs a
|
|
171
|
+
* look. Until it is read nothing ended is marked; the first time, what ended before is seen.
|
|
172
|
+
*/
|
|
173
|
+
function useSeenTasks(storage, tasks) {
|
|
174
|
+
const [seen, setSeen] = react_1.React.useState();
|
|
175
|
+
react_1.React.useEffect(() => {
|
|
176
|
+
let live = true;
|
|
177
|
+
const read = () => storage.get(SEEN_KEY).then(kept => {
|
|
178
|
+
if (!live) {
|
|
179
|
+
return;
|
|
180
|
+
}
|
|
181
|
+
const next = kept !== null && kept !== void 0 ? kept : { since: Date.now(), at: {} };
|
|
182
|
+
setSeen(next);
|
|
183
|
+
if (!kept) {
|
|
184
|
+
void storage.set(SEEN_KEY, next).catch(() => undefined);
|
|
185
|
+
}
|
|
186
|
+
}, () => undefined);
|
|
187
|
+
void read();
|
|
188
|
+
const stop = storage.onChange(keys => keys.includes(SEEN_KEY) && void read());
|
|
189
|
+
return () => {
|
|
190
|
+
live = false;
|
|
191
|
+
stop();
|
|
192
|
+
};
|
|
193
|
+
}, [storage]);
|
|
194
|
+
const needsLook = (task) => views_1.SidebarUtil.needsLook(task, seen !== null && seen !== void 0 ? seen : { since: Number.POSITIVE_INFINITY, at: {} });
|
|
195
|
+
const open = (task) => {
|
|
196
|
+
if (seen) {
|
|
197
|
+
const keys = new Set(tasks.map(each => each.key));
|
|
198
|
+
const at = Object.fromEntries(Object.entries(seen.at).filter(([key]) => keys.has(key)));
|
|
199
|
+
const next = { since: seen.since, at: { ...at, [task.key]: Date.now() } };
|
|
200
|
+
setSeen(next);
|
|
201
|
+
void storage.set(SEEN_KEY, next).catch(() => undefined);
|
|
202
|
+
}
|
|
203
|
+
task.open();
|
|
204
|
+
};
|
|
205
|
+
return { needsLook, open };
|
|
206
|
+
}
|
|
207
|
+
/** Who needs a look, and since when (SidebarUtil.toLook): agents by id, the double as DOUBLE_LOOK; the same on every device (pi.storage). */
|
|
208
|
+
const TO_LOOK_KEY = 'ui.agentsToLook';
|
|
209
|
+
const DOUBLE_LOOK = 'double';
|
|
210
|
+
const NO_MARKS = {};
|
|
211
|
+
const NOBODY = { own: [], channel: [] };
|
|
212
|
+
/** Whether the user can see the page: what goes on in a tab hidden or a phone locked is not seen. */
|
|
213
|
+
function useVisible() {
|
|
214
|
+
const [visible, setVisible] = react_1.React.useState(() => document.visibilityState === 'visible');
|
|
215
|
+
react_1.React.useEffect(() => {
|
|
216
|
+
const change = () => setVisible(document.visibilityState === 'visible');
|
|
217
|
+
document.addEventListener('visibilitychange', change);
|
|
218
|
+
return () => document.removeEventListener('visibilitychange', change);
|
|
219
|
+
}, []);
|
|
220
|
+
return visible;
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
* Who ended an answer in their own conversation while the user was elsewhere: an amber dot until they look,
|
|
224
|
+
* as a messenger's unread. `answering` and `inChannel` as SidebarUtil.watch takes them; `shown` is in front;
|
|
225
|
+
* `known`, once the team is read, every one there is.
|
|
226
|
+
*/
|
|
227
|
+
function useToLook(storage, answering, inChannel, shown, known) {
|
|
228
|
+
const [marks, setMarks] = useStored(storage, TO_LOOK_KEY, NO_MARKS);
|
|
229
|
+
const looking = useVisible() ? shown : undefined;
|
|
230
|
+
const before = react_1.React.useRef(NOBODY);
|
|
231
|
+
const latest = react_1.React.useRef(marks);
|
|
232
|
+
latest.current = marks;
|
|
233
|
+
const setRef = react_1.React.useRef(setMarks);
|
|
234
|
+
setRef.current = setMarks;
|
|
235
|
+
// By value: the lists are made again at each drawing.
|
|
236
|
+
const key = JSON.stringify([answering, inChannel, looking !== null && looking !== void 0 ? looking : null, known !== null && known !== void 0 ? known : null]);
|
|
237
|
+
react_1.React.useEffect(() => {
|
|
238
|
+
const [answeringNow, inChannelNow, lookingNow, knownNow] = JSON.parse(key);
|
|
239
|
+
const now = views_1.SidebarUtil.watch(before.current, answeringNow, inChannelNow);
|
|
240
|
+
const next = views_1.SidebarUtil.toLook(latest.current, before.current, now, lookingNow !== null && lookingNow !== void 0 ? lookingNow : undefined, Date.now(), knownNow !== null && knownNow !== void 0 ? knownNow : undefined);
|
|
241
|
+
before.current = now;
|
|
242
|
+
if (next) {
|
|
243
|
+
setRef.current(next);
|
|
244
|
+
}
|
|
245
|
+
}, [key]);
|
|
246
|
+
return marks;
|
|
247
|
+
}
|
|
248
|
+
/**
|
|
249
|
+
* What each agent said last, its sessions read again when the team says something or stops. The side bar
|
|
250
|
+
* opens again with what it read before (context.sessionLines); undefined until it was read once, so that no
|
|
251
|
+
* line of a channel shows for a moment in place of a later one of a session.
|
|
252
|
+
*/
|
|
253
|
+
function useSessionLines(context, changed) {
|
|
254
|
+
const { pi } = context;
|
|
255
|
+
const [lines, setLines] = react_1.React.useState(context.sessionLines);
|
|
256
|
+
react_1.React.useEffect(() => {
|
|
257
|
+
let live = true;
|
|
258
|
+
const read = () => Promise.all([pi.server.listSessions().catch(() => []), pi.server.listSavedSessions().catch(() => [])]).then(([open, saved]) => {
|
|
259
|
+
context.sessionLines = [...saved, ...open];
|
|
260
|
+
if (live) {
|
|
261
|
+
setLines(context.sessionLines);
|
|
262
|
+
}
|
|
263
|
+
});
|
|
264
|
+
void read();
|
|
265
|
+
const again = () => document.visibilityState === 'visible' && void read();
|
|
266
|
+
document.addEventListener('visibilitychange', again);
|
|
267
|
+
return () => {
|
|
268
|
+
live = false;
|
|
269
|
+
document.removeEventListener('visibilitychange', again);
|
|
270
|
+
};
|
|
271
|
+
}, [context, pi, changed]);
|
|
272
|
+
return lines;
|
|
273
|
+
}
|
|
274
|
+
/**
|
|
275
|
+
* Which tasks are chosen while the list selects (undefined while it does not), as the page's lists of tasks
|
|
276
|
+
* do: a swipe deletes one, the menu of one starts selecting, the bar deletes those chosen, asked once
|
|
277
|
+
* (ui.removeTasks). With none left that can be deleted, it stops selecting.
|
|
278
|
+
*/
|
|
279
|
+
function useTaskSelection(pi, tasks) {
|
|
280
|
+
const [chosen, setChosen] = react_1.React.useState();
|
|
281
|
+
const removable = tasks.filter(task => task.remove);
|
|
282
|
+
const selected = chosen ? removable.filter(task => chosen.has(task.key)) : [];
|
|
283
|
+
const selecting = !!chosen && removable.length > 0;
|
|
284
|
+
react_1.React.useEffect(() => {
|
|
285
|
+
if (chosen && removable.length === 0) {
|
|
286
|
+
setChosen(undefined);
|
|
287
|
+
}
|
|
288
|
+
}, [chosen, removable.length]);
|
|
289
|
+
return {
|
|
290
|
+
selecting,
|
|
291
|
+
selected,
|
|
292
|
+
removable,
|
|
293
|
+
isChosen: (task) => !!(chosen === null || chosen === void 0 ? void 0 : chosen.has(task.key)),
|
|
294
|
+
start: (task) => setChosen(new Set([task.key])),
|
|
295
|
+
toggle: (task) => setChosen(before => {
|
|
296
|
+
const next = new Set(before);
|
|
297
|
+
if (!next.delete(task.key)) {
|
|
298
|
+
next.add(task.key);
|
|
299
|
+
}
|
|
300
|
+
return next;
|
|
301
|
+
}),
|
|
302
|
+
selectAll: (all) => setChosen(new Set(all ? removable.map(task => task.key) : [])),
|
|
303
|
+
done: () => setChosen(undefined),
|
|
304
|
+
removeSelected: async () => {
|
|
305
|
+
if (await pi.ui.removeTasks(selected)) {
|
|
306
|
+
setChosen(undefined);
|
|
307
|
+
}
|
|
308
|
+
},
|
|
309
|
+
};
|
|
310
|
+
}
|
|
311
|
+
/** A task in the side bar: who does it, what it is at, when; its … what its source offers, and Select. */
|
|
312
|
+
function TaskItem({ context, task, selection, seen }) {
|
|
162
313
|
var _a, _b, _c;
|
|
163
314
|
const { pi } = context;
|
|
315
|
+
const w = views_1.ChannelViews.words(pi);
|
|
164
316
|
const Own = task.icon;
|
|
165
317
|
const ListTodo = (_a = pi.ui.icons.ListTodo) !== null && _a !== void 0 ? _a : views_1.ChannelViews.icon(pi, 'List');
|
|
166
|
-
const
|
|
318
|
+
const ListChecks = views_1.ChannelViews.icon(pi, 'ListChecks');
|
|
319
|
+
const SelectCheck = pi.ui.SelectCheck;
|
|
320
|
+
// A page before multiple selection: rows as they were.
|
|
321
|
+
const removable = !!task.remove && !!SelectCheck;
|
|
322
|
+
const selecting = selection.selecting && !!SelectCheck;
|
|
323
|
+
const items = () => { var _a; var _b; return [
|
|
324
|
+
...((_b = (_a = task.menu) === null || _a === void 0 ? void 0 : _a.call(task)) !== null && _b !== void 0 ? _b : []).map(section => section.map(({ icon: Icon, ...item }) => ({ ...item, icon: Icon && react_1.React.createElement(Icon, { size: 15 }) }))),
|
|
325
|
+
...(removable ? [[{ key: 'select', label: w.selectTasks, icon: react_1.React.createElement(ListChecks, { size: 15 }), run: () => selection.start(task) }]] : []),
|
|
326
|
+
]; };
|
|
327
|
+
const swipe = task.remove && !selecting ? [{ key: 'delete', label: w.delete, danger: true, run: () => void pi.ui.removeTasks([task]) }] : undefined;
|
|
167
328
|
return (react_1.React.createElement(Row, { pi: pi, avatar: Own ? (react_1.React.createElement("span", { className: "tac-task-face" },
|
|
168
|
-
react_1.React.createElement(Own, { size:
|
|
169
|
-
react_1.React.createElement(ListTodo, { size: 17 }))), title: task.title, dot:
|
|
170
|
-
}
|
|
171
|
-
/** A channel where agents talk: what the side bar holds once the double hands work out. */
|
|
172
|
-
function TeamPicture({ pi }) {
|
|
173
|
-
const Picture = pi.ui.Picture;
|
|
174
|
-
const rows = [
|
|
175
|
-
['ta-pic-mark', 70, 'ta-pic-accent'],
|
|
176
|
-
['ta-pic-plus', 52, 'ta-pic-pane'],
|
|
177
|
-
['ta-pic-dot', 84, 'ta-pic-pane'],
|
|
178
|
-
];
|
|
179
|
-
return (react_1.React.createElement(Picture, null,
|
|
180
|
-
react_1.React.createElement("rect", { className: "ta-pic-pane", x: "1", y: "1", width: "158", height: "17", rx: "9" }),
|
|
181
|
-
react_1.React.createElement("text", { className: "ta-pic-text", x: "11", y: "12.5" }, "# team"),
|
|
182
|
-
rows.map(([face, width, bubble], index) => {
|
|
183
|
-
const y = 26 + index * 22;
|
|
184
|
-
return (react_1.React.createElement(react_1.React.Fragment, { key: y },
|
|
185
|
-
react_1.React.createElement("circle", { className: face, cx: "20", cy: y + 7, r: "6.5" }),
|
|
186
|
-
react_1.React.createElement("rect", { className: bubble, x: "33", y: y, width: width, height: "14", rx: "7" }),
|
|
187
|
-
react_1.React.createElement("rect", { className: index === 0 ? 'ta-pic-mark ta-pic-soft' : 'ta-pic-line', x: "40", y: y + 4.5, width: width - 22, height: "5", rx: "2.5" })));
|
|
188
|
-
})));
|
|
329
|
+
react_1.React.createElement(Own, { size: 40 }))) : (react_1.React.createElement("span", { className: "tac-task-face tac-task-glyph" },
|
|
330
|
+
react_1.React.createElement(ListTodo, { size: 17 }))), title: task.title, dot: task.status === 'running' ? 'running' : seen.needsLook(task) ? 'attention' : undefined, preview: (_b = task.detail) !== null && _b !== void 0 ? _b : '', waiting: task.status === 'waiting', time: views_1.SidebarUtil.time((_c = task.endedAt) !== null && _c !== void 0 ? _c : task.startedAt, pi.ui.language), hint: task.title, selected: selecting && selection.isChosen(task), onSelect: selecting ? () => removable && selection.toggle(task) : () => seen.open(task), more: !selecting && (task.menu || removable) && react_1.React.createElement(more_menu_1.MoreMenu, { pi: pi, label: task.title, items: items }), swipe: swipe, check: selecting && react_1.React.createElement(SelectCheck, { checked: selection.isChosen(task), disabled: !removable }) }));
|
|
189
331
|
}
|
|
190
332
|
/**
|
|
191
333
|
* The side bar of the double: the double; what it was handed, what waits for the user first; then the
|
|
@@ -193,13 +335,14 @@ function TeamPicture({ pi }) {
|
|
|
193
335
|
* agents with it, until the user keeps them.
|
|
194
336
|
*/
|
|
195
337
|
function AgentsSidebar({ context }) {
|
|
196
|
-
var _a, _b, _c, _d;
|
|
338
|
+
var _a, _b, _c, _d, _e;
|
|
339
|
+
var _f, _g, _h, _j;
|
|
197
340
|
const { pi, service, ui } = context;
|
|
198
341
|
const state = (0, views_1.useChannels)(service);
|
|
199
|
-
const { query, draft, channelId, fresh } = (0, views_1.useUi)(ui);
|
|
342
|
+
const { query, draft, channelId, fresh: unread } = (0, views_1.useUi)(ui);
|
|
200
343
|
const w = views_1.ChannelViews.words(pi);
|
|
201
344
|
const faces = (0, views_1.useFaces)(state.team);
|
|
202
|
-
const serverCwd = (
|
|
345
|
+
const serverCwd = (_f = (0, views_1.useServerCwd)(pi)) !== null && _f !== void 0 ? _f : '';
|
|
203
346
|
const shownSession = pi.ui.useSessionId();
|
|
204
347
|
const double = pi.ui.useView(views_1.DOUBLE_PAGE);
|
|
205
348
|
const channelPage = pi.ui.useView(views_1.CHANNEL_PAGE);
|
|
@@ -213,34 +356,48 @@ function AgentsSidebar({ context }) {
|
|
|
213
356
|
const [allEnded, setAllEnded] = react_1.React.useState(false);
|
|
214
357
|
const [opening, setOpening] = react_1.React.useState();
|
|
215
358
|
const Folder = views_1.ChannelViews.icon(pi, 'Folder');
|
|
216
|
-
const FolderTree = (
|
|
359
|
+
const FolderTree = (_g = pi.ui.icons.FolderTree) !== null && _g !== void 0 ? _g : Folder;
|
|
217
360
|
const HostTag = pi.ui.HostTag;
|
|
218
|
-
const ListTodo = (
|
|
361
|
+
const ListTodo = (_h = pi.ui.icons.ListTodo) !== null && _h !== void 0 ? _h : views_1.ChannelViews.icon(pi, 'List');
|
|
362
|
+
const ChevronRight = views_1.ChannelViews.icon(pi, 'ChevronRight');
|
|
219
363
|
const Avatar = pi.ui.Avatar;
|
|
220
364
|
const Empty = pi.ui.Empty;
|
|
221
365
|
const Skeleton = pi.ui.Skeleton;
|
|
222
366
|
const { team, working } = state;
|
|
223
367
|
const own = react_1.React.useMemo(() => channels_util_1.ChannelsUtil.ownChannels(team), [team]);
|
|
368
|
+
const seen = useSeenTasks(pi.storage, tasks);
|
|
369
|
+
// Read again when an agent says something in a channel or stops answering.
|
|
370
|
+
const said = Object.values(state.messages).reduce((count, list) => count + list.length, 0);
|
|
371
|
+
const sessionLines = useSessionLines(context, `${said}:${Object.values(working).flat().join(',')}:${team.agents.length}`);
|
|
372
|
+
// The open sessions as the page reads them again: who answers in their own now, and what they said last. A page of before has none.
|
|
373
|
+
const openSessions = (_j = (_b = (_a = pi.ui).useSessions) === null || _b === void 0 ? void 0 : _b.call(_a)) !== null && _j !== void 0 ? _j : NO_SESSIONS;
|
|
374
|
+
const lastLines = react_1.React.useMemo(() => sessionLines && views_1.SidebarUtil.lastLines(team.agents, state.messages, [...sessionLines, ...openSessions]), [team.agents, state.messages, sessionLines, openSessions]);
|
|
375
|
+
const answering = react_1.React.useMemo(() => views_1.SidebarUtil.answering(team.agents, openSessions, context.sessions), [team.agents, openSessions, context.sessions]);
|
|
376
|
+
const doubleBusy = !!(double === null || double === void 0 ? void 0 : double.busy);
|
|
377
|
+
const inChannel = Object.values(working).flat();
|
|
378
|
+
const pageShown = !!(double === null || double === void 0 ? void 0 : double.shown) || !!(channelPage === null || channelPage === void 0 ? void 0 : channelPage.shown) || !!(agentPage === null || agentPage === void 0 ? void 0 : agentPage.shown);
|
|
379
|
+
// The agent whose conversation is in front: by the session the page opened for it, or by its file.
|
|
380
|
+
const shownFile = shownSession ? (_c = openSessions.find(session => session.sessionId === shownSession)) === null || _c === void 0 ? void 0 : _c.sessionFile : undefined;
|
|
381
|
+
const shownAgent = pageShown
|
|
382
|
+
? undefined
|
|
383
|
+
: (_d = team.agents.find(agent => (!!shownSession && context.sessions.get(agent.id) === shownSession) || (!!shownFile && agent.sessionFile === shownFile))) === null || _d === void 0 ? void 0 : _d.id;
|
|
384
|
+
const toLook = useToLook(pi.storage, [...answering, ...(doubleBusy ? [DOUBLE_LOOK] : [])], inChannel, (double === null || double === void 0 ? void 0 : double.shown) ? DOUBLE_LOOK : shownAgent, state.loaded ? [DOUBLE_LOOK, ...team.agents.map(agent => agent.id)] : undefined);
|
|
385
|
+
const doubleFresh = !doubleBusy && !!toLook[DOUBLE_LOOK];
|
|
224
386
|
react_1.React.useEffect(() => {
|
|
225
387
|
for (const channel of own) {
|
|
226
388
|
void service.messages(channel.id).catch(() => undefined);
|
|
227
389
|
}
|
|
228
390
|
}, [service, own]);
|
|
229
391
|
const name = (id) => channels_util_1.ChannelsUtil.authorName(team, id, { user: w.you, ta: w.ta });
|
|
230
|
-
const lastSaid = new Map();
|
|
231
|
-
for (const messages of Object.values(state.messages)) {
|
|
232
|
-
for (const message of messages) {
|
|
233
|
-
lastSaid.set(message.author, Math.max((_d = lastSaid.get(message.author)) !== null && _d !== void 0 ? _d : 0, message.at));
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
392
|
const shownTasks = tasks.filter(task => views_1.SidebarUtil.matches(query, task.title, task.detail));
|
|
237
393
|
const groups = views_1.SidebarUtil.taskGroups(shownTasks);
|
|
394
|
+
const selection = useTaskSelection(pi, shownTasks);
|
|
395
|
+
const SelectBar = pi.ui.SelectBar;
|
|
238
396
|
const channels = channels_util_1.ChannelsUtil.pinnedFirst(own).filter(channel => views_1.SidebarUtil.matches(query, channel.name, channel.topic, ...(0, views_1.membersOf)(team, channel).map(agent => agent.name)));
|
|
239
397
|
const agents = channels_util_1.ChannelsUtil.standing(team).filter(agent => views_1.SidebarUtil.matches(query, agent.name, agent.role));
|
|
240
398
|
// One list unless the user groups it: a level of directories is one more to look through. A remote agent is marked anyway.
|
|
241
399
|
const directories = views_1.SidebarUtil.directories(agents, serverCwd);
|
|
242
400
|
const memberGroups = views_1.SidebarUtil.memberGroups(agents, serverCwd, byDirectory && !query.trim());
|
|
243
|
-
const pageShown = !!(double === null || double === void 0 ? void 0 : double.shown) || !!(channelPage === null || channelPage === void 0 ? void 0 : channelPage.shown) || !!(agentPage === null || agentPage === void 0 ? void 0 : agentPage.shown);
|
|
244
401
|
const openAgent = (agent) => {
|
|
245
402
|
setOpening(agent.id);
|
|
246
403
|
views_1.ChannelViews.openAgent(context, agent.id)
|
|
@@ -251,13 +408,15 @@ function AgentsSidebar({ context }) {
|
|
|
251
408
|
const sessionId = context.sessions.get(agent.id);
|
|
252
409
|
return opening === agent.id || (!pageShown && !!sessionId && sessionId === shownSession);
|
|
253
410
|
};
|
|
254
|
-
|
|
411
|
+
// Selecting, every task shows: Select all chooses what the user sees.
|
|
412
|
+
const ended = allEnded || selection.selecting ? groups.ended : groups.ended.slice(0, ENDED_SHOWN);
|
|
255
413
|
const nothing = query && shownTasks.length === 0 && channels.length === 0 && agents.length === 0;
|
|
256
|
-
const blank = state.loaded && !query && !draft && tasks.length === 0 && own.length === 0 && channels_util_1.ChannelsUtil.standing(team).length === 0;
|
|
257
414
|
const running = tasks.filter(task => task.status === 'running').length;
|
|
258
415
|
const waiting = tasks.filter(task => task.status === 'waiting').length;
|
|
416
|
+
const fresh = tasks.filter(task => task.status !== 'waiting' && seen.needsLook(task)).length;
|
|
259
417
|
const doubleLine = [
|
|
260
418
|
waiting > 0 ? i18n_1.ChannelWords.format(w.waitingCount, { count: String(waiting) }) : '',
|
|
419
|
+
fresh > 0 ? i18n_1.ChannelWords.format(w.freshCount, { count: String(fresh) }) : '',
|
|
261
420
|
running > 0 ? i18n_1.ChannelWords.format(w.runningCount, { count: String(running) }) : '',
|
|
262
421
|
]
|
|
263
422
|
.filter(Boolean)
|
|
@@ -267,41 +426,47 @@ function AgentsSidebar({ context }) {
|
|
|
267
426
|
double && views_1.SidebarUtil.matches(query, double.title, w.myDouble) && (react_1.React.createElement("div", { className: "tac-double-row" },
|
|
268
427
|
react_1.React.createElement("button", { type: "button", className: `tac-double${double.shown ? ' tac-selected' : ''}`, "aria-current": double.shown || undefined, onClick: () => pi.ui.showView(views_1.DOUBLE_PAGE) },
|
|
269
428
|
react_1.React.createElement("span", { className: "tac-double-face" },
|
|
270
|
-
react_1.React.createElement(Avatar, { size:
|
|
429
|
+
react_1.React.createElement(Avatar, { size: 42, mood: doubleBusy ? 'working' : 'idle' }),
|
|
430
|
+
react_1.React.createElement("span", { className: `tac-dot${waiting > 0 || fresh > 0 || doubleFresh ? ' tac-dot-attention' : running > 0 || doubleBusy ? ' tac-dot-running' : ''}` })),
|
|
271
431
|
react_1.React.createElement("span", { className: "tac-double-text" },
|
|
272
|
-
react_1.React.createElement("span", { className: "tac-double-
|
|
273
|
-
|
|
274
|
-
react_1.React.createElement("span", { className:
|
|
275
|
-
|
|
432
|
+
react_1.React.createElement("span", { className: "tac-double-top" },
|
|
433
|
+
react_1.React.createElement("span", { className: "tac-double-name" }, double.title),
|
|
434
|
+
!doubleLine && double.preview && (react_1.React.createElement("span", { className: "tac-item-time" }, views_1.SidebarUtil.time(double.preview.at, pi.ui.language)))),
|
|
435
|
+
react_1.React.createElement("span", { className: `tac-double-line${waiting > 0 || fresh > 0 ? ' tac-waiting' : doubleFresh && !doubleLine ? ' tac-fresh' : ''}` },
|
|
436
|
+
react_1.React.createElement("span", null, doubleLine || ((_e = double.preview) === null || _e === void 0 ? void 0 : _e.text) || w.standingBy),
|
|
437
|
+
(doubleBusy || running > 0) && react_1.React.createElement("span", { className: "tac-spinner ta-spinner" }))),
|
|
438
|
+
react_1.React.createElement("span", { className: "tac-double-go", "aria-hidden": "true" },
|
|
439
|
+
react_1.React.createElement(ChevronRight, { size: 18 }))),
|
|
276
440
|
double.menu && (react_1.React.createElement(more_menu_1.MoreMenu, { pi: pi, label: double.title, items: () => { var _a; var _b; return ((_b = (_a = double.menu) === null || _a === void 0 ? void 0 : _a.call(double)) !== null && _b !== void 0 ? _b : []).map(section => section.map(({ icon: Icon, ...item }) => ({ ...item, icon: Icon && react_1.React.createElement(Icon, { size: 15 }) }))); } })))),
|
|
277
|
-
draft && (react_1.React.createElement(Row, { pi: pi, avatar: react_1.React.createElement(faces_1.Face, { face: draft.face, size:
|
|
441
|
+
draft && (react_1.React.createElement(Row, { pi: pi, avatar: react_1.React.createElement(faces_1.Face, { face: draft.face, size: 40 }), title: draft.name || w.newAgentName, preview: w.notStarted, time: "", selected: !!(agentPage === null || agentPage === void 0 ? void 0 : agentPage.shown), onSelect: () => pi.ui.showView(create_1.AGENT_PAGE) })),
|
|
278
442
|
!state.loaded && !query && Skeleton && react_1.React.createElement(Skeleton, { rows: 4 }),
|
|
279
443
|
nothing && react_1.React.createElement(Empty, { title: w.noMatch }),
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
react_1.React.createElement("span",
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
react_1.React.createElement("span", { className: "tac-item-preview" }, w.noTasksHere))))),
|
|
288
|
-
groups.waiting.length > 0 && (react_1.React.createElement(Section, { id: "waiting", title: w.waitingSection, count: groups.waiting.length, folded: folded, onFold: fold }, groups.waiting.map(task => (react_1.React.createElement(TaskItem, { key: task.key, context: context, task: task }))))),
|
|
289
|
-
groups.running.length > 0 && (react_1.React.createElement(Section, { id: "running", title: w.runningSection, count: groups.running.length, folded: folded, onFold: fold }, groups.running.map(task => (react_1.React.createElement(TaskItem, { key: task.key, context: context, task: task }))))),
|
|
290
|
-
groups.ended.length > 0 && (react_1.React.createElement(Section, { id: "ended", title: w.endedSection, count: groups.ended.length, folded: folded, onFold: fold },
|
|
291
|
-
ended.map(task => (react_1.React.createElement(TaskItem, { key: task.key, context: context, task: task }))),
|
|
292
|
-
groups.ended.length > ENDED_SHOWN && (react_1.React.createElement("button", { type: "button", className: "tac-show-all", onClick: () => setAllEnded(!allEnded) }, allEnded ? w.showFewer : i18n_1.ChannelWords.format(w.showAll, { count: String(groups.ended.length) }))))),
|
|
293
|
-
agents.length > 0 && (react_1.React.createElement(Section, { id: "members", title: w.membersSection, count: agents.length, folded: folded, onFold: fold, action: directories > 1 && (react_1.React.createElement("button", { type: "button", className: "tac-section-action", title: w.byDirectory, "aria-label": w.byDirectory, "aria-pressed": byDirectory, onClick: () => setByDirectory(!byDirectory) },
|
|
444
|
+
state.loaded && (shownTasks.length > 0 || (!query && tasks.length === 0)) && (react_1.React.createElement(Section, { id: "tasks", title: w.tasks, count: shownTasks.length, folded: folded, onFold: fold, alert: shownTasks.some(task => seen.needsLook(task)) },
|
|
445
|
+
shownTasks.length === 0 && (react_1.React.createElement("button", { type: "button", className: "tac-tasks-empty", onClick: () => pi.ui.showView(views_1.DOUBLE_PAGE) },
|
|
446
|
+
react_1.React.createElement(ListTodo, { size: 14 }),
|
|
447
|
+
react_1.React.createElement("span", null, w.noTasksHere))),
|
|
448
|
+
[...groups.waiting, ...groups.running, ...ended].map(task => (react_1.React.createElement(TaskItem, { key: task.key, context: context, task: task, selection: selection, seen: seen }))),
|
|
449
|
+
groups.ended.length > ENDED_SHOWN && !selection.selecting && (react_1.React.createElement("button", { type: "button", className: "tac-show-all", onClick: () => setAllEnded(!allEnded) }, allEnded ? w.showFewer : i18n_1.ChannelWords.format(w.showAll, { count: String(groups.ended.length) }))))),
|
|
450
|
+
agents.length > 0 && (react_1.React.createElement(Section, { id: "members", title: w.membersSection, count: agents.length, folded: folded, onFold: fold, alert: agents.some(agent => !!toLook[agent.id]), action: directories > 1 && (react_1.React.createElement("button", { type: "button", className: "tac-section-action", title: w.byDirectory, "aria-label": w.byDirectory, "aria-pressed": byDirectory, onClick: () => setByDirectory(!byDirectory) },
|
|
294
451
|
react_1.React.createElement(FolderTree, { size: 14 }))) }, memberGroups.map(group => { var _a; return (react_1.React.createElement(react_1.React.Fragment, { key: (_a = group.cwd) !== null && _a !== void 0 ? _a : '' },
|
|
295
452
|
group.cwd !== undefined && (react_1.React.createElement("div", { className: "tac-folder", title: group.cwd },
|
|
296
453
|
react_1.React.createElement(Folder, { size: 12 }),
|
|
297
454
|
react_1.React.createElement("span", null, views_1.SidebarUtil.folder(group.cwd)),
|
|
298
455
|
react_1.React.createElement(HostTag, { location: group.cwd }))),
|
|
299
456
|
group.agents.map(agent => {
|
|
300
|
-
var _a, _b, _c
|
|
457
|
+
var _a, _b, _c;
|
|
301
458
|
const where = team.channels.find(channel => { var _a; return (_a = working[channel.id]) === null || _a === void 0 ? void 0 : _a.includes(agent.id); });
|
|
302
|
-
|
|
459
|
+
const cwd = (_a = agent.cwd) !== null && _a !== void 0 ? _a : serverCwd;
|
|
460
|
+
// As a contact: what it said last, or where it answers now with a green dot; a remote one with its host. Where it works on hover.
|
|
461
|
+
// Until the sessions were read once, nothing: not a line that a later one replaces.
|
|
462
|
+
const last = lastLines === null || lastLines === void 0 ? void 0 : lastLines.get(agent.id);
|
|
463
|
+
const line = lastLines ? ((_b = last === null || last === void 0 ? void 0 : last.text) !== null && _b !== void 0 ? _b : w.noMessages) : '';
|
|
464
|
+
const busy = !!where || answering.has(agent.id);
|
|
465
|
+
// Its answer ended while the user was elsewhere: amber, and what it said reads as unread.
|
|
466
|
+
const unseen = !busy && !!toLook[agent.id];
|
|
467
|
+
return (react_1.React.createElement(Row, { pi: pi, key: agent.id, avatar: react_1.React.createElement(views_1.AgentAvatar, { agent: agent, faces: faces, size: 40, working: busy }), title: agent.name, place: react_1.React.createElement(HostTag, { location: cwd }), preview: where ? i18n_1.ChannelWords.format(w.answeringIn, { channel: where.name }) : line, live: busy, fresh: unseen, dot: busy ? 'running' : unseen ? 'attention' : undefined, time: lastLines ? views_1.SidebarUtil.time((_c = last === null || last === void 0 ? void 0 : last.at) !== null && _c !== void 0 ? _c : agent.createdAt, pi.ui.language) : '', hint: views_1.SidebarUtil.where(cwd), selected: agentSelected(agent), onSelect: () => openAgent(agent), more: react_1.React.createElement(agent_menu_1.AgentMenu, { context: context, agent: agent, cwd: cwd, working: !!where }), swipe: swipeDelete(pi, () => (0, agent_menu_1.deleteAgent)(context, agent)) }));
|
|
303
468
|
}))); }))),
|
|
304
|
-
channels.length > 0 && (react_1.React.createElement(Section, { id: "channels", title: w.channelsSection, count: channels.length, folded: folded, onFold: fold }, channels.map(channel => {
|
|
469
|
+
channels.length > 0 && (react_1.React.createElement(Section, { id: "channels", title: w.channelsSection, count: channels.length, folded: folded, onFold: fold, alert: channels.some(channel => unread.includes(channel.id)) }, channels.map(channel => {
|
|
305
470
|
var _a;
|
|
306
471
|
var _b, _c, _d;
|
|
307
472
|
const members = (0, views_1.membersOf)(team, channel);
|
|
@@ -312,11 +477,8 @@ function AgentsSidebar({ context }) {
|
|
|
312
477
|
: last
|
|
313
478
|
? `${name(last.author)}:${last.text.replace(/\s+/g, ' ')}`
|
|
314
479
|
: ((_c = channel.topic) !== null && _c !== void 0 ? _c : w.noMessages);
|
|
315
|
-
return (react_1.React.createElement(Row, { pi: pi, key: channel.id, avatar: react_1.React.createElement(faces_1.RoomFace, { members: members, faces: faces, size:
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
react_1.React.createElement("span", null, w.lead))),
|
|
319
|
-
channel.pinned && (react_1.React.createElement("span", { className: "tac-pinned", title: w.pinned, role: "img", "aria-label": w.pinned }, views_1.ChannelViews.maybeIcon(pi, 'Pin', null, 12)))), preview: preview, live: busy.length > 0, time: views_1.SidebarUtil.time((_d = last === null || last === void 0 ? void 0 : last.at) !== null && _d !== void 0 ? _d : channel.createdAt, pi.ui.language), fresh: fresh.includes(channel.id), hint: channel.topic ? `#${channel.name} · ${channel.topic}` : `#${channel.name}`, selected: !!(channelPage === null || channelPage === void 0 ? void 0 : channelPage.shown) && channelId === channel.id, onSelect: () => context.showChannel(channel.id), more: react_1.React.createElement(channel_menu_1.ChannelMenu, { context: context, channel: channel, working: busy }), swipe: swipeDelete(pi, () => (0, channel_menu_1.deleteChannel)(context, channel)) }));
|
|
320
|
-
}))))));
|
|
480
|
+
return (react_1.React.createElement(Row, { pi: pi, key: channel.id, avatar: react_1.React.createElement(faces_1.RoomFace, { members: members, faces: faces, size: 40, working: busy }), title: channel.name, badge: channel.pinned && (react_1.React.createElement("span", { className: "tac-pinned", title: w.pinned, role: "img", "aria-label": w.pinned }, views_1.ChannelViews.maybeIcon(pi, 'Pin', null, 12))), preview: preview, live: busy.length > 0, dot: busy.length > 0 ? 'running' : unread.includes(channel.id) ? 'attention' : undefined, time: views_1.SidebarUtil.time((_d = last === null || last === void 0 ? void 0 : last.at) !== null && _d !== void 0 ? _d : channel.createdAt, pi.ui.language), hint: channel.topic ? `#${channel.name} · ${channel.topic}` : `#${channel.name}`, selected: !!(channelPage === null || channelPage === void 0 ? void 0 : channelPage.shown) && channelId === channel.id, onSelect: () => context.showChannel(channel.id), more: react_1.React.createElement(channel_menu_1.ChannelMenu, { context: context, channel: channel, working: busy }), swipe: swipeDelete(pi, () => (0, channel_menu_1.deleteChannel)(context, channel)) }));
|
|
481
|
+
})))),
|
|
482
|
+
selection.selecting && SelectBar && (react_1.React.createElement(SelectBar, { count: selection.selected.length, total: selection.removable.length, onSelectAll: selection.selectAll, onDone: selection.done, actions: [{ key: 'delete', label: w.delete, danger: true, run: () => void selection.removeSelected() }] }))));
|
|
321
483
|
}
|
|
322
484
|
//# sourceMappingURL=sidebar.js.map
|