@celljs/ta 4.9.1 → 4.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +3 -1
- package/README.md +3 -1
- package/dist/cli.mjs +1753 -75
- package/dist/gateway.mjs +311 -25
- package/dist/pi/CHANGELOG.md +30 -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/extension/index.mjs +185 -140
- package/dist/pi/packages/ta-agents/lib/acp-agent.js +30 -10
- package/dist/pi/packages/ta-agents/lib/agent-bindings.d.ts +2 -0
- package/dist/pi/packages/ta-agents/lib/agent-bindings.js +4 -0
- package/dist/pi/packages/ta-agents/lib/agent-catalog.d.ts +2 -2
- package/dist/pi/packages/ta-agents/lib/agent-catalog.js +4 -4
- package/dist/pi/packages/ta-agents/lib/agent-prompt.d.ts +6 -0
- package/dist/pi/packages/ta-agents/lib/agent-prompt.js +19 -0
- package/dist/pi/packages/ta-agents/lib/agent-session.d.ts +2 -0
- package/dist/pi/packages/ta-agents/lib/agent-session.js +2 -0
- package/dist/pi/packages/ta-agents/lib/agent-streamer.js +7 -0
- package/dist/pi/packages/ta-agents/lib/agent-tool.js +3 -2
- package/dist/pi/packages/ta-agents/lib/extension.js +15 -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 +31 -253
- package/dist/pi/packages/ta-bots/host/index.mjs +189 -1
- package/dist/pi/packages/ta-bots/lib/bots-protocol.d.ts +2 -0
- package/dist/pi/packages/ta-bots/lib/bots-protocol.js +3 -1
- package/dist/pi/packages/ta-bots/lib/bots-view.js +24 -12
- package/dist/pi/packages/ta-bots/lib/composer.js +1 -0
- package/dist/pi/packages/ta-bots/lib/extension.js +10 -17
- package/dist/pi/packages/ta-bots/lib/i18n.d.ts +1 -0
- package/dist/pi/packages/ta-bots/lib/i18n.js +2 -0
- package/dist/pi/packages/ta-bots/lib/index.js +2 -0
- package/dist/pi/packages/ta-bots/lib/style.d.ts +1 -1
- package/dist/pi/packages/ta-bots/lib/style.js +1 -0
- package/dist/pi/packages/ta-bots/lib/text-util.js +8 -1
- package/dist/pi/packages/ta-bots/lib/tool-line.d.ts +8 -0
- package/dist/pi/packages/ta-bots/lib/tool-line.js +19 -0
- package/dist/pi/packages/ta-bots/package.json +1 -1
- package/dist/pi/packages/ta-bots/web/index.js +47 -16
- package/dist/pi/packages/ta-changes/extension/index.mjs +23 -13
- package/dist/pi/packages/ta-changes/lib/card.js +18 -4
- package/dist/pi/packages/ta-changes/lib/changes-protocol.d.ts +0 -4
- package/dist/pi/packages/ta-changes/lib/changes-protocol.js +1 -5
- package/dist/pi/packages/ta-changes/lib/extension.js +5 -13
- package/dist/pi/packages/ta-changes/package.json +1 -1
- package/dist/pi/packages/ta-changes/web/index.js +16 -3
- package/dist/pi/packages/ta-channels/README.en.md +6 -5
- package/dist/pi/packages/ta-channels/README.md +6 -5
- package/dist/pi/packages/ta-channels/extension/index.mjs +350 -28
- package/dist/pi/packages/ta-channels/host/index.mjs +638 -43
- package/dist/pi/packages/ta-channels/lib/agent-cards.d.ts +19 -0
- package/dist/pi/packages/ta-channels/lib/agent-cards.js +58 -0
- package/dist/pi/packages/ta-channels/lib/agent-menu.d.ts +2 -2
- package/dist/pi/packages/ta-channels/lib/agent-menu.js +20 -6
- package/dist/pi/packages/ta-channels/lib/card.d.ts +27 -0
- package/dist/pi/packages/ta-channels/lib/card.js +178 -0
- package/dist/pi/packages/ta-channels/lib/channels-model.d.ts +65 -13
- package/dist/pi/packages/ta-channels/lib/channels-model.js +15 -6
- package/dist/pi/packages/ta-channels/lib/channels-util.d.ts +31 -2
- package/dist/pi/packages/ta-channels/lib/channels-util.js +100 -6
- package/dist/pi/packages/ta-channels/lib/channels.d.ts +28 -18
- package/dist/pi/packages/ta-channels/lib/channels.js +65 -65
- package/dist/pi/packages/ta-channels/lib/create.js +14 -4
- package/dist/pi/packages/ta-channels/lib/extension.d.ts +8 -0
- package/dist/pi/packages/ta-channels/lib/extension.js +104 -18
- package/dist/pi/packages/ta-channels/lib/faces.d.ts +2 -0
- package/dist/pi/packages/ta-channels/lib/faces.js +7 -1
- package/dist/pi/packages/ta-channels/lib/handoff-view.d.ts +19 -0
- package/dist/pi/packages/ta-channels/lib/handoff-view.js +113 -0
- package/dist/pi/packages/ta-channels/lib/handoff.d.ts +67 -0
- package/dist/pi/packages/ta-channels/lib/handoff.js +114 -0
- package/dist/pi/packages/ta-channels/lib/host.d.ts +1 -1
- package/dist/pi/packages/ta-channels/lib/host.js +1 -1
- package/dist/pi/packages/ta-channels/lib/i18n.d.ts +49 -8
- package/dist/pi/packages/ta-channels/lib/i18n.js +98 -16
- package/dist/pi/packages/ta-channels/lib/index.js +10 -1
- package/dist/pi/packages/ta-channels/lib/member-tools.d.ts +23 -0
- package/dist/pi/packages/ta-channels/lib/member-tools.js +56 -0
- package/dist/pi/packages/ta-channels/lib/members.js +6 -2
- 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/notice.d.ts +25 -0
- package/dist/pi/packages/ta-channels/lib/notice.js +101 -0
- package/dist/pi/packages/ta-channels/lib/room.js +26 -10
- package/dist/pi/packages/ta-channels/lib/sidebar.d.ts +1 -6
- package/dist/pi/packages/ta-channels/lib/sidebar.js +257 -84
- package/dist/pi/packages/ta-channels/lib/style.d.ts +1 -1
- package/dist/pi/packages/ta-channels/lib/style.js +151 -40
- package/dist/pi/packages/ta-channels/lib/tasks.js +3 -4
- package/dist/pi/packages/ta-channels/lib/team.d.ts +58 -10
- package/dist/pi/packages/ta-channels/lib/team.js +159 -38
- package/dist/pi/packages/ta-channels/lib/tool-lines.d.ts +22 -0
- package/dist/pi/packages/ta-channels/lib/tool-lines.js +113 -0
- package/dist/pi/packages/ta-channels/lib/views.d.ts +54 -1
- package/dist/pi/packages/ta-channels/lib/views.js +129 -1
- package/dist/pi/packages/ta-channels/package.json +2 -1
- package/dist/pi/packages/ta-channels/web/index.js +1792 -439
- package/dist/pi/packages/ta-computer-use/package.json +7 -2
- package/dist/pi/packages/ta-cron/README.en.md +6 -4
- package/dist/pi/packages/ta-cron/README.md +6 -4
- package/dist/pi/packages/ta-cron/extension/index.mjs +416 -44
- package/dist/pi/packages/ta-cron/host/index.mjs +30 -3
- package/dist/pi/packages/ta-cron/lib/chat-task.d.ts +48 -0
- package/dist/pi/packages/ta-cron/lib/chat-task.js +133 -0
- package/dist/pi/packages/ta-cron/lib/commands.d.ts +2 -1
- package/dist/pi/packages/ta-cron/lib/commands.js +10 -4
- package/dist/pi/packages/ta-cron/lib/composer.d.ts +11 -0
- package/dist/pi/packages/ta-cron/lib/composer.js +58 -0
- package/dist/pi/packages/ta-cron/lib/cron-protocol.d.ts +10 -3
- package/dist/pi/packages/ta-cron/lib/cron-protocol.js +6 -3
- package/dist/pi/packages/ta-cron/lib/editor.js +65 -30
- package/dist/pi/packages/ta-cron/lib/extension.d.ts +2 -0
- package/dist/pi/packages/ta-cron/lib/extension.js +33 -13
- package/dist/pi/packages/ta-cron/lib/i18n.d.ts +30 -1
- package/dist/pi/packages/ta-cron/lib/i18n.js +60 -2
- package/dist/pi/packages/ta-cron/lib/index.js +4 -0
- package/dist/pi/packages/ta-cron/lib/page.d.ts +38 -4
- package/dist/pi/packages/ta-cron/lib/page.js +131 -4
- package/dist/pi/packages/ta-cron/lib/react.d.ts +3 -0
- package/dist/pi/packages/ta-cron/lib/react.js +8 -0
- package/dist/pi/packages/ta-cron/lib/scheduler.js +3 -2
- package/dist/pi/packages/ta-cron/lib/style.d.ts +1 -1
- package/dist/pi/packages/ta-cron/lib/style.js +168 -50
- 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 +4 -0
- package/dist/pi/packages/ta-cron/lib/task-util.js +31 -1
- package/dist/pi/packages/ta-cron/lib/tasks-view.d.ts +4 -1
- package/dist/pi/packages/ta-cron/lib/tasks-view.js +107 -67
- package/dist/pi/packages/ta-cron/lib/tool-line.d.ts +9 -0
- package/dist/pi/packages/ta-cron/lib/tool-line.js +40 -0
- package/dist/pi/packages/ta-cron/lib/tool.d.ts +5 -1
- package/dist/pi/packages/ta-cron/lib/tool.js +6 -3
- package/dist/pi/packages/ta-cron/package.json +12 -1
- package/dist/pi/packages/ta-cron/web/index.js +1346 -415
- package/dist/pi/packages/ta-extensions/README.en.md +4 -2
- package/dist/pi/packages/ta-extensions/README.md +4 -2
- package/dist/pi/packages/ta-extensions/host/index.mjs +3 -2
- package/dist/pi/packages/ta-extensions/lib/actions.d.ts +4 -0
- package/dist/pi/packages/ta-extensions/lib/actions.js +16 -5
- 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/extensions-util.d.ts +5 -0
- package/dist/pi/packages/ta-extensions/lib/extensions-util.js +10 -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/market-parts.js +8 -2
- package/dist/pi/packages/ta-extensions/lib/market-style.d.ts +1 -1
- package/dist/pi/packages/ta-extensions/lib/market-style.js +4 -5
- package/dist/pi/packages/ta-extensions/lib/market-util.d.ts +2 -2
- package/dist/pi/packages/ta-extensions/lib/market-util.js +2 -2
- package/dist/pi/packages/ta-extensions/lib/page.js +52 -23
- package/dist/pi/packages/ta-extensions/lib/react.d.ts +3 -0
- package/dist/pi/packages/ta-extensions/lib/react.js +8 -0
- 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 +13 -6
- package/dist/pi/packages/ta-extensions/package.json +6 -1
- package/dist/pi/packages/ta-extensions/skills/ta-package/SKILL.md +25 -10
- package/dist/pi/packages/ta-extensions/web/index.js +459 -47
- package/dist/pi/packages/ta-games/README.en.md +47 -0
- package/dist/pi/packages/ta-games/README.md +47 -0
- package/dist/pi/packages/ta-games/host/index.mjs +65 -0
- package/dist/pi/packages/ta-games/lib/games-view.d.ts +16 -0
- package/dist/pi/packages/ta-games/lib/games-view.js +77 -0
- package/dist/pi/packages/ta-games/lib/host.d.ts +36 -0
- package/dist/pi/packages/ta-games/lib/host.js +83 -0
- package/dist/pi/packages/ta-games/lib/i18n.d.ts +35 -0
- package/dist/pi/packages/ta-games/lib/i18n.js +71 -0
- package/dist/pi/packages/ta-games/lib/ideas.d.ts +6 -0
- package/dist/pi/packages/ta-games/lib/ideas.js +62 -0
- package/dist/pi/packages/ta-games/lib/index.d.ts +7 -0
- package/dist/pi/packages/ta-games/lib/index.js +24 -0
- package/dist/pi/packages/ta-games/lib/make-game.d.ts +23 -0
- package/dist/pi/packages/ta-games/lib/make-game.js +67 -0
- package/dist/pi/packages/ta-games/lib/react.d.ts +11 -0
- package/dist/pi/packages/ta-games/lib/react.js +16 -0
- package/dist/pi/packages/ta-games/lib/style.d.ts +4 -0
- package/dist/pi/packages/ta-games/lib/style.js +33 -0
- package/dist/pi/packages/ta-games/package.json +60 -0
- package/dist/pi/packages/ta-games/skills/ta-game/SKILL.md +127 -0
- package/dist/pi/packages/ta-games/skills/ta-game/examples/dino-run/package.json +22 -0
- package/dist/pi/packages/ta-games/skills/ta-game/examples/dino-run/web.js +389 -0
- package/dist/pi/packages/ta-games/skills/ta-game/examples/stack/package.json +22 -0
- package/dist/pi/packages/ta-games/skills/ta-game/examples/stack/web.js +423 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/LICENSE.md +22 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/actions-and-utilities/SKILL.md +343 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/animations/SKILL.md +481 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/audio-and-sound/SKILL.md +453 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/cameras/SKILL.md +497 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/cameras/references/REFERENCE.md +128 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/curves-and-paths/SKILL.md +359 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/data-manager/SKILL.md +406 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/events-system/SKILL.md +497 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/filters-and-postfx/SKILL.md +449 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/game-object-components/SKILL.md +478 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/game-object-components/references/REFERENCE.md +76 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/game-setup-and-config/SKILL.md +485 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/geometry-and-math/SKILL.md +497 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/graphics-and-shapes/SKILL.md +473 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/groups-and-containers/SKILL.md +418 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/input-keyboard-mouse-touch/SKILL.md +500 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/input-keyboard-mouse-touch/references/REFERENCE.md +372 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/loading-assets/SKILL.md +474 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/loading-assets/references/REFERENCE.md +148 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/particles/SKILL.md +499 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/particles/references/REFERENCE.md +17 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/physics-arcade/SKILL.md +468 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/physics-matter/SKILL.md +499 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/render-textures/SKILL.md +441 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/scale-and-responsive/SKILL.md +371 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/scenes/SKILL.md +450 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/scenes/references/REFERENCE.md +78 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/sprites-and-images/SKILL.md +417 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/sprites-and-images/references/REFERENCE.md +160 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/text-and-bitmaptext/SKILL.md +460 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/tilemaps/SKILL.md +440 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/time-and-timers/SKILL.md +496 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/tweens/SKILL.md +414 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/v3-to-v4-migration/SKILL.md +430 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/v4-new-features/SKILL.md +384 -0
- package/dist/pi/packages/ta-games/skills/ta-game/phaser/v4-new-features/references/REFERENCE.md +69 -0
- package/dist/pi/packages/ta-games/web/index.js +431 -0
- package/dist/pi/packages/ta-glance/README.en.md +11 -0
- package/dist/pi/packages/ta-glance/README.md +11 -0
- package/dist/pi/packages/ta-glance/extension/index.mjs +67 -0
- package/dist/pi/packages/ta-glance/lib/card.d.ts +8 -0
- package/dist/pi/packages/ta-glance/lib/card.js +268 -0
- package/dist/pi/packages/ta-glance/lib/extension.d.ts +15 -0
- package/dist/pi/packages/ta-glance/lib/extension.js +24 -0
- package/dist/pi/packages/ta-glance/lib/glance-json.d.ts +9 -0
- package/dist/pi/packages/ta-glance/lib/glance-json.js +85 -0
- package/dist/pi/packages/ta-glance/lib/glance-prompt.d.ts +7 -0
- package/dist/pi/packages/ta-glance/lib/glance-prompt.js +34 -0
- package/dist/pi/packages/ta-glance/lib/glance-protocol.d.ts +98 -0
- package/dist/pi/packages/ta-glance/lib/glance-protocol.js +8 -0
- package/dist/pi/packages/ta-glance/lib/glance-spec.d.ts +6 -0
- package/dist/pi/packages/ta-glance/lib/glance-spec.js +204 -0
- package/dist/pi/packages/ta-glance/lib/glance-util.d.ts +3 -0
- package/dist/pi/packages/ta-glance/lib/glance-util.js +12 -0
- package/dist/pi/packages/ta-glance/lib/i18n.d.ts +22 -0
- package/dist/pi/packages/ta-glance/lib/i18n.js +41 -0
- package/dist/pi/packages/ta-glance/lib/index.d.ts +7 -0
- package/dist/pi/packages/ta-glance/lib/index.js +22 -0
- package/dist/pi/packages/ta-glance/lib/react.d.ts +8 -0
- package/dist/pi/packages/ta-glance/lib/react.js +8 -0
- package/dist/pi/packages/ta-glance/lib/style.d.ts +4 -0
- package/dist/pi/packages/ta-glance/lib/style.js +164 -0
- package/dist/pi/packages/ta-glance/package.json +53 -0
- package/dist/pi/packages/ta-glance/web/index.js +933 -0
- package/dist/pi/packages/ta-launcher/lib/actions.d.ts +4 -4
- package/dist/pi/packages/ta-launcher/lib/actions.js +7 -3
- package/dist/pi/packages/ta-launcher/lib/launcher-util.d.ts +7 -7
- package/dist/pi/packages/ta-launcher/lib/launcher-util.js +11 -8
- package/dist/pi/packages/ta-launcher/lib/launcher-view.js +13 -7
- package/dist/pi/packages/ta-launcher/lib/react.d.ts +3 -0
- package/dist/pi/packages/ta-launcher/lib/react.js +8 -0
- package/dist/pi/packages/ta-launcher/lib/style.d.ts +1 -1
- package/dist/pi/packages/ta-launcher/lib/style.js +6 -4
- package/dist/pi/packages/ta-launcher/package.json +1 -1
- package/dist/pi/packages/ta-launcher/web/index.js +34 -17
- package/dist/pi/packages/ta-manual/README.en.md +10 -0
- package/dist/pi/packages/ta-manual/README.md +10 -0
- package/dist/pi/packages/ta-manual/lib/i18n.d.ts +15 -0
- package/dist/pi/packages/ta-manual/lib/i18n.js +31 -0
- package/dist/pi/packages/ta-manual/lib/index.d.ts +7 -0
- package/dist/pi/packages/ta-manual/lib/index.js +24 -0
- package/dist/pi/packages/ta-manual/lib/manual-util.d.ts +18 -0
- package/dist/pi/packages/ta-manual/lib/manual-util.js +40 -0
- package/dist/pi/packages/ta-manual/lib/manual-view.d.ts +9 -0
- package/dist/pi/packages/ta-manual/lib/manual-view.js +81 -0
- package/dist/pi/packages/ta-manual/lib/pictures-a.d.ts +2 -0
- package/dist/pi/packages/ta-manual/lib/pictures-a.js +263 -0
- package/dist/pi/packages/ta-manual/lib/pictures-b.d.ts +2 -0
- package/dist/pi/packages/ta-manual/lib/pictures-b.js +216 -0
- package/dist/pi/packages/ta-manual/lib/pictures.d.ts +9 -0
- package/dist/pi/packages/ta-manual/lib/pictures.js +16 -0
- package/dist/pi/packages/ta-manual/lib/react.d.ts +8 -0
- package/dist/pi/packages/ta-manual/lib/react.js +8 -0
- package/dist/pi/packages/ta-manual/lib/scene.d.ts +68 -0
- package/dist/pi/packages/ta-manual/lib/scene.js +115 -0
- package/dist/pi/packages/ta-manual/lib/style.d.ts +4 -0
- package/dist/pi/packages/ta-manual/lib/style.js +47 -0
- package/dist/pi/packages/ta-manual/lib/topics.d.ts +42 -0
- package/dist/pi/packages/ta-manual/lib/topics.js +354 -0
- package/dist/pi/packages/ta-manual/package.json +54 -0
- package/dist/pi/packages/ta-manual/skills/ta-manual/SKILL.md +119 -0
- package/dist/pi/packages/ta-manual/web/index.js +2223 -0
- package/dist/pi/packages/ta-notify/README.en.md +29 -0
- package/dist/pi/packages/ta-notify/README.md +29 -0
- package/dist/pi/packages/ta-notify/extension/index.mjs +259 -0
- package/dist/pi/packages/ta-notify/host/index.mjs +163 -0
- package/dist/pi/packages/ta-notify/lib/ask-card.d.ts +9 -0
- package/dist/pi/packages/ta-notify/lib/ask-card.js +40 -0
- package/dist/pi/packages/ta-notify/lib/extension.d.ts +24 -0
- package/dist/pi/packages/ta-notify/lib/extension.js +102 -0
- package/dist/pi/packages/ta-notify/lib/host.d.ts +4 -0
- package/dist/pi/packages/ta-notify/lib/host.js +9 -0
- package/dist/pi/packages/ta-notify/lib/i18n.d.ts +31 -0
- package/dist/pi/packages/ta-notify/lib/i18n.js +63 -0
- package/dist/pi/packages/ta-notify/lib/index.d.ts +8 -0
- package/dist/pi/packages/ta-notify/lib/index.js +29 -0
- package/dist/pi/packages/ta-notify/lib/notify-protocol.d.ts +74 -0
- package/dist/pi/packages/ta-notify/lib/notify-protocol.js +23 -0
- package/dist/pi/packages/ta-notify/lib/notify-service.d.ts +21 -0
- package/dist/pi/packages/ta-notify/lib/notify-service.js +75 -0
- package/dist/pi/packages/ta-notify/lib/notify-util.d.ts +39 -0
- package/dist/pi/packages/ta-notify/lib/notify-util.js +119 -0
- package/dist/pi/packages/ta-notify/lib/react.d.ts +8 -0
- package/dist/pi/packages/ta-notify/lib/react.js +8 -0
- package/dist/pi/packages/ta-notify/lib/server-texts.d.ts +9 -0
- package/dist/pi/packages/ta-notify/lib/server-texts.js +22 -0
- package/dist/pi/packages/ta-notify/lib/settings.d.ts +8 -0
- package/dist/pi/packages/ta-notify/lib/settings.js +85 -0
- package/dist/pi/packages/ta-notify/lib/style.d.ts +4 -0
- package/dist/pi/packages/ta-notify/lib/style.js +29 -0
- package/dist/pi/packages/ta-notify/lib/tool-line.d.ts +9 -0
- package/dist/pi/packages/ta-notify/lib/tool-line.js +20 -0
- package/dist/pi/packages/ta-notify/lib/tool.d.ts +37 -0
- package/dist/pi/packages/ta-notify/lib/tool.js +46 -0
- package/dist/pi/packages/ta-notify/lib/watcher.d.ts +15 -0
- package/dist/pi/packages/ta-notify/lib/watcher.js +81 -0
- package/dist/pi/packages/ta-notify/package.json +55 -0
- package/dist/pi/packages/ta-notify/web/index.js +436 -0
- package/dist/pi/packages/ta-recall/README.en.md +19 -0
- package/dist/pi/packages/ta-recall/README.md +19 -0
- package/dist/pi/packages/ta-recall/extension/index.mjs +614 -0
- package/dist/pi/packages/ta-recall/host/index.mjs +820 -0
- package/dist/pi/packages/ta-recall/lib/brief-card.d.ts +21 -0
- package/dist/pi/packages/ta-recall/lib/brief-card.js +67 -0
- package/dist/pi/packages/ta-recall/lib/brief-home.d.ts +49 -0
- package/dist/pi/packages/ta-recall/lib/brief-home.js +143 -0
- package/dist/pi/packages/ta-recall/lib/brief-seen.d.ts +9 -0
- package/dist/pi/packages/ta-recall/lib/brief-seen.js +26 -0
- package/dist/pi/packages/ta-recall/lib/brief-util.d.ts +64 -0
- package/dist/pi/packages/ta-recall/lib/brief-util.js +179 -0
- package/dist/pi/packages/ta-recall/lib/chat-icons.d.ts +8 -0
- package/dist/pi/packages/ta-recall/lib/chat-icons.js +56 -0
- package/dist/pi/packages/ta-recall/lib/composer.d.ts +7 -0
- package/dist/pi/packages/ta-recall/lib/composer.js +38 -0
- package/dist/pi/packages/ta-recall/lib/conversation-index.d.ts +25 -0
- package/dist/pi/packages/ta-recall/lib/conversation-index.js +72 -0
- package/dist/pi/packages/ta-recall/lib/conversation-util.d.ts +16 -0
- package/dist/pi/packages/ta-recall/lib/conversation-util.js +109 -0
- package/dist/pi/packages/ta-recall/lib/conversations.d.ts +11 -0
- package/dist/pi/packages/ta-recall/lib/conversations.js +46 -0
- package/dist/pi/packages/ta-recall/lib/extension.d.ts +24 -0
- package/dist/pi/packages/ta-recall/lib/extension.js +131 -0
- package/dist/pi/packages/ta-recall/lib/host.d.ts +4 -0
- package/dist/pi/packages/ta-recall/lib/host.js +11 -0
- package/dist/pi/packages/ta-recall/lib/i18n.d.ts +41 -0
- package/dist/pi/packages/ta-recall/lib/i18n.js +83 -0
- package/dist/pi/packages/ta-recall/lib/index.d.ts +9 -0
- package/dist/pi/packages/ta-recall/lib/index.js +45 -0
- package/dist/pi/packages/ta-recall/lib/react.d.ts +11 -0
- package/dist/pi/packages/ta-recall/lib/react.js +16 -0
- package/dist/pi/packages/ta-recall/lib/recall-protocol.d.ts +186 -0
- package/dist/pi/packages/ta-recall/lib/recall-protocol.js +60 -0
- package/dist/pi/packages/ta-recall/lib/recall-service.d.ts +42 -0
- package/dist/pi/packages/ta-recall/lib/recall-service.js +241 -0
- package/dist/pi/packages/ta-recall/lib/search-source.d.ts +7 -0
- package/dist/pi/packages/ta-recall/lib/search-source.js +49 -0
- package/dist/pi/packages/ta-recall/lib/search-util.d.ts +30 -0
- package/dist/pi/packages/ta-recall/lib/search-util.js +167 -0
- package/dist/pi/packages/ta-recall/lib/server-texts.d.ts +7 -0
- package/dist/pi/packages/ta-recall/lib/server-texts.js +17 -0
- package/dist/pi/packages/ta-recall/lib/settings.d.ts +4 -0
- package/dist/pi/packages/ta-recall/lib/settings.js +77 -0
- package/dist/pi/packages/ta-recall/lib/skill-card.d.ts +9 -0
- package/dist/pi/packages/ta-recall/lib/skill-card.js +51 -0
- package/dist/pi/packages/ta-recall/lib/skill-util.d.ts +19 -0
- package/dist/pi/packages/ta-recall/lib/skill-util.js +110 -0
- package/dist/pi/packages/ta-recall/lib/stored.d.ts +5 -0
- package/dist/pi/packages/ta-recall/lib/stored.js +28 -0
- package/dist/pi/packages/ta-recall/lib/style.d.ts +4 -0
- package/dist/pi/packages/ta-recall/lib/style.js +48 -0
- package/dist/pi/packages/ta-recall/lib/tool-line.d.ts +10 -0
- package/dist/pi/packages/ta-recall/lib/tool-line.js +23 -0
- package/dist/pi/packages/ta-recall/lib/tool.d.ts +63 -0
- package/dist/pi/packages/ta-recall/lib/tool.js +71 -0
- package/dist/pi/packages/ta-recall/package.json +55 -0
- package/dist/pi/packages/ta-recall/web/index.js +1038 -0
- package/dist/pi/packages/ta-rooms/README.en.md +23 -0
- package/dist/pi/packages/ta-rooms/README.md +23 -0
- package/dist/pi/packages/ta-rooms/lib/dialogs.d.ts +39 -0
- package/dist/pi/packages/ta-rooms/lib/dialogs.js +235 -0
- package/dist/pi/packages/ta-rooms/lib/i18n.d.ts +101 -0
- package/dist/pi/packages/ta-rooms/lib/i18n.js +203 -0
- package/dist/pi/packages/ta-rooms/lib/index.d.ts +9 -0
- package/dist/pi/packages/ta-rooms/lib/index.js +85 -0
- package/dist/pi/packages/ta-rooms/lib/members-view.d.ts +3 -0
- package/dist/pi/packages/ta-rooms/lib/members-view.js +64 -0
- package/dist/pi/packages/ta-rooms/lib/page.d.ts +105 -0
- package/dist/pi/packages/ta-rooms/lib/page.js +306 -0
- package/dist/pi/packages/ta-rooms/lib/react.d.ts +8 -0
- package/dist/pi/packages/ta-rooms/lib/react.js +8 -0
- package/dist/pi/packages/ta-rooms/lib/room-view.d.ts +17 -0
- package/dist/pi/packages/ta-rooms/lib/room-view.js +150 -0
- package/dist/pi/packages/ta-rooms/lib/rooms-page.d.ts +8 -0
- package/dist/pi/packages/ta-rooms/lib/rooms-page.js +174 -0
- package/dist/pi/packages/ta-rooms/lib/style.d.ts +4 -0
- package/dist/pi/packages/ta-rooms/lib/style.js +154 -0
- package/dist/pi/packages/ta-rooms/package.json +50 -0
- package/dist/pi/packages/ta-rooms/web/index.js +1932 -0
- package/dist/pi/packages/ta-share/README.en.md +27 -0
- package/dist/pi/packages/ta-share/README.md +27 -0
- package/dist/pi/packages/ta-share/extension/index.mjs +184 -0
- package/dist/pi/packages/ta-share/host/index.mjs +364 -0
- package/dist/pi/packages/ta-share/lib/extension.d.ts +15 -0
- package/dist/pi/packages/ta-share/lib/extension.js +115 -0
- package/dist/pi/packages/ta-share/lib/host.d.ts +4 -0
- package/dist/pi/packages/ta-share/lib/host.js +9 -0
- package/dist/pi/packages/ta-share/lib/i18n.d.ts +106 -0
- package/dist/pi/packages/ta-share/lib/i18n.js +213 -0
- package/dist/pi/packages/ta-share/lib/index.d.ts +9 -0
- package/dist/pi/packages/ta-share/lib/index.js +77 -0
- package/dist/pi/packages/ta-share/lib/page.d.ts +48 -0
- package/dist/pi/packages/ta-share/lib/page.js +105 -0
- package/dist/pi/packages/ta-share/lib/react.d.ts +8 -0
- package/dist/pi/packages/ta-share/lib/react.js +8 -0
- package/dist/pi/packages/ta-share/lib/server-texts.d.ts +14 -0
- package/dist/pi/packages/ta-share/lib/server-texts.js +52 -0
- package/dist/pi/packages/ta-share/lib/share-dialog.d.ts +18 -0
- package/dist/pi/packages/ta-share/lib/share-dialog.js +233 -0
- package/dist/pi/packages/ta-share/lib/share-protocol.d.ts +86 -0
- package/dist/pi/packages/ta-share/lib/share-protocol.js +30 -0
- package/dist/pi/packages/ta-share/lib/share-service.d.ts +50 -0
- package/dist/pi/packages/ta-share/lib/share-service.js +130 -0
- package/dist/pi/packages/ta-share/lib/shared-view.d.ts +18 -0
- package/dist/pi/packages/ta-share/lib/shared-view.js +225 -0
- package/dist/pi/packages/ta-share/lib/shares-page.d.ts +3 -0
- package/dist/pi/packages/ta-share/lib/shares-page.js +54 -0
- package/dist/pi/packages/ta-share/lib/snapshot.d.ts +30 -0
- package/dist/pi/packages/ta-share/lib/snapshot.js +195 -0
- package/dist/pi/packages/ta-share/lib/style.d.ts +4 -0
- package/dist/pi/packages/ta-share/lib/style.js +111 -0
- package/dist/pi/packages/ta-share/package.json +56 -0
- package/dist/pi/packages/ta-share/web/index.js +1197 -0
- package/dist/pi/packages/ta-workspace/README.md +2 -2
- package/dist/pi/packages/ta-workspace/README.zh-cn.md +2 -2
- package/dist/pi/packages/ta-workspace/lib/browser-common.d.ts +1 -1
- package/dist/pi/packages/ta-workspace/lib/browser-common.js +29 -30
- package/dist/pi/packages/ta-workspace/lib/browser-tool-line.d.ts +15 -0
- package/dist/pi/packages/ta-workspace/lib/browser-tool-line.js +70 -0
- 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 +40 -4
- package/dist/pi/packages/ta-workspace/lib/i18n.d.ts +14 -4
- package/dist/pi/packages/ta-workspace/lib/i18n.js +31 -11
- package/dist/pi/packages/ta-workspace/lib/index.js +17 -0
- 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 +22 -3
- package/dist/pi/packages/ta-workspace/lib/preview.js +150 -22
- package/dist/pi/packages/ta-workspace/lib/style.d.ts +1 -1
- package/dist/pi/packages/ta-workspace/lib/style.js +70 -41
- package/dist/pi/packages/ta-workspace/lib/terminal-sessions.d.ts +15 -4
- package/dist/pi/packages/ta-workspace/lib/terminal-sessions.js +31 -9
- package/dist/pi/packages/ta-workspace/lib/terminal.d.ts +3 -2
- package/dist/pi/packages/ta-workspace/lib/terminal.js +51 -21
- 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 +46 -0
- package/dist/pi/packages/ta-workspace/lib/util/preview.js +106 -1
- package/dist/pi/packages/ta-workspace/lib/util/terminal.d.ts +5 -0
- package/dist/pi/packages/ta-workspace/lib/util/terminal.js +14 -0
- package/dist/pi/packages/ta-workspace/package.json +1 -1
- package/dist/pi/packages/ta-workspace/web/index.js +1032 -382
- package/dist/public/assets/OrbitControls-DVf70a7w.js +1 -0
- package/dist/public/assets/{abnfDiagram-S7VZAUFO-EVMX_yOb.js → abnfDiagram-S7VZAUFO-D9uU0Tx2.js} +1 -1
- package/dist/public/assets/{architecture-WOLXFQ4H-CDgbgZ_o.js → architecture-WOLXFQ4H-f7Nm7EIo.js} +1 -1
- package/dist/public/assets/{architectureDiagram-YGSQEFNW-dHreaCWz.js → architectureDiagram-YGSQEFNW-DSAqlcms.js} +1 -1
- package/dist/public/assets/{blockDiagram-APKKGZFW-D6FhzBDq.js → blockDiagram-APKKGZFW-C0lPIW9g.js} +1 -1
- package/dist/public/assets/browser-WLpgVYno.js +12 -0
- package/dist/public/assets/{c4Diagram-KJ2TOQU5-BFpcr8Cs.js → c4Diagram-KJ2TOQU5-CDcZ7mJq.js} +1 -1
- package/dist/public/assets/{chunk-6MUBBAK2-BczXkMV-.js → chunk-6MUBBAK2-CXPuyqPL.js} +1 -1
- package/dist/public/assets/{chunk-AXFCVDMN-CjJsv3jB.js → chunk-AXFCVDMN-Du6JRX1x.js} +1 -1
- package/dist/public/assets/{chunk-BG4553SI-FBaleaLz.js → chunk-BG4553SI-D592E55X.js} +1 -1
- package/dist/public/assets/{chunk-DQASFODM-BFdXY5sX.js → chunk-DQASFODM-BW2r2SL4.js} +1 -1
- package/dist/public/assets/{chunk-HFQBQIA3-C5cwK-Fg.js → chunk-HFQBQIA3-C3yoe54R.js} +1 -1
- package/dist/public/assets/{chunk-KQLB2F66-BUek3IRk.js → chunk-KQLB2F66-DF8gfYCy.js} +1 -1
- package/dist/public/assets/{chunk-KS47KZWR-BxsYBzt6.js → chunk-KS47KZWR-C8CRMTv1.js} +1 -1
- package/dist/public/assets/{chunk-LEVMRMFU-Bdcwz9fS.js → chunk-LEVMRMFU-BDcMKiwj.js} +1 -1
- package/dist/public/assets/{chunk-M57EVK23-kkpP5oug.js → chunk-M57EVK23-CKJPBygc.js} +1 -1
- package/dist/public/assets/{chunk-OY52VR5R-CFhQgxmD.js → chunk-OY52VR5R-B3ZWH07L.js} +1 -1
- package/dist/public/assets/{chunk-QB3YPZ4I-BVXqu0eC.js → chunk-QB3YPZ4I-DI-z4UPL.js} +1 -1
- package/dist/public/assets/{chunk-R3KSYZAL-B7SUqqLI.js → chunk-R3KSYZAL-Bg4-haAc.js} +1 -1
- package/dist/public/assets/{chunk-STOXU5M4-B3abfbnH.js → chunk-STOXU5M4-l_SHib3p.js} +1 -1
- package/dist/public/assets/{chunk-TU62E6Q5-C9NqnUav.js → chunk-TU62E6Q5-BINu9tIm.js} +1 -1
- package/dist/public/assets/{chunk-X4PVCEUW-BeLfETDx.js → chunk-X4PVCEUW-BQn-mvV5.js} +1 -1
- package/dist/public/assets/{chunk-XXDRQBXY-DXai1i8p.js → chunk-XXDRQBXY-uvpAu0Ys.js} +1 -1
- package/dist/public/assets/{classDiagram-v2-L25IHNXF-Zj6ne_tC.js → classDiagram-v2-L25IHNXF-BIowooW1.js} +1 -1
- package/dist/public/assets/{cose-bilkent-JH36ORCC-C0-TjqfJ.js → cose-bilkent-JH36ORCC-BTyx1Mh2.js} +1 -1
- package/dist/public/assets/cynefin-EF2NZ3EQ-Dg54eFzZ.js +1 -0
- package/dist/public/assets/{cynefinDiagram-L36ESFBY-BnqxfzPa.js → cynefinDiagram-L36ESFBY-D64EU9I0.js} +1 -1
- package/dist/public/assets/{d3-selection-DfFLTR9d.js → d3-selection-CN9k6_B9.js} +1 -1
- package/dist/public/assets/{dagre-SPEB5RXH-kI17e5cH.js → dagre-SPEB5RXH-FCbz2-Kk.js} +1 -1
- package/dist/public/assets/{diagram-3B7GL73J-DgPjeLA5.js → diagram-3B7GL73J-OhHUSI7j.js} +1 -1
- package/dist/public/assets/{diagram-DNEMPZML-CRhPfa0I.js → diagram-DNEMPZML-Be4xMtp6.js} +1 -1
- package/dist/public/assets/{diagram-L3MUGCDN-ExuTg12b.js → diagram-L3MUGCDN-CmKSs3aG.js} +1 -1
- package/dist/public/assets/{diagram-LA4NIPWU-Dgx5xNiY.js → diagram-LA4NIPWU-D1C32rMN.js} +1 -1
- package/dist/public/assets/{diagram-MHCOC4E2-BuifkUTl.js → diagram-MHCOC4E2-BjoE6JXs.js} +1 -1
- package/dist/public/assets/{diagram-XPFHEONP-CFEaBo7z.js → diagram-XPFHEONP-B22k4v8R.js} +1 -1
- package/dist/public/assets/{dist-C-iJHcSK.js → dist-DcBP8Cf6.js} +1 -1
- package/dist/public/assets/{ebnfDiagram-UZSYDL2S-D-hp5yNt.js → ebnfDiagram-UZSYDL2S-Tn-K8-X7.js} +1 -1
- package/dist/public/assets/{editor.api-BopUWpqY.js → editor.api-Bz4sjRz_.js} +1 -1
- package/dist/public/assets/{elk-XV6XMXQE-CBbk_IpU.js → elk-XV6XMXQE-COnQsWlN.js} +1 -1
- package/dist/public/assets/{erDiagram-EYBAPDEH-B02R_WWE.js → erDiagram-EYBAPDEH-c53dJilq.js} +1 -1
- package/dist/public/assets/{eventmodeling-K75KTNOO-aCZfYnCI.js → eventmodeling-K75KTNOO-DaFpPPks.js} +1 -1
- package/dist/public/assets/flowDiagram-MALGAFMO-V5qkYWIO.js +1 -0
- package/dist/public/assets/{freemarker2-DMN60LeK.js → freemarker2-BLxfRHsw.js} +1 -1
- package/dist/public/assets/{ganttDiagram-23REXITY-DioU8TlD.js → ganttDiagram-23REXITY-Md-SavIS.js} +1 -1
- package/dist/public/assets/gitGraph-VSP46ZUC-1q8ldRXU.js +1 -0
- package/dist/public/assets/{gitGraphDiagram-STJD7YCW--q3ctg6y.js → gitGraphDiagram-STJD7YCW-CMSwTghO.js} +1 -1
- package/dist/public/assets/{handlebars-B_-qdvpB.js → handlebars-sNpu01kP.js} +1 -1
- package/dist/public/assets/{html-BN8Ah3Js.js → html-C_tKd-uP.js} +1 -1
- package/dist/public/assets/{index-B3A--ac8.js → index-Bn86rI4n.js} +2 -2
- package/dist/public/assets/info-OHQRW6UA-Crere6sx.js +1 -0
- package/dist/public/assets/{infoDiagram-KBXO4MBG-CGXteYo9.js → infoDiagram-KBXO4MBG-CwgNj-7i.js} +1 -1
- package/dist/public/assets/{ishikawaDiagram-M35NCXHK-DM2LmOAc.js → ishikawaDiagram-M35NCXHK-BSlzQNMN.js} +1 -1
- package/dist/public/assets/{javascript-BlizGb0q.js → javascript-l3qKw0L-.js} +1 -1
- package/dist/public/assets/{journeyDiagram-OPLOXDXO-CNITRtGl.js → journeyDiagram-OPLOXDXO-B09LPEnF.js} +1 -1
- package/dist/public/assets/{jsonMode-CEUmT5sN.js → jsonMode-5SQQn1EX.js} +1 -1
- package/dist/public/assets/{kanban-definition-BZKZHSQY-BPUuS9um.js → kanban-definition-BZKZHSQY-BiW4aJ29.js} +1 -1
- package/dist/public/assets/{liquid-BbyLjUbE.js → liquid-BGyTIIUt.js} +1 -1
- package/dist/public/assets/{mdx-DiQz7Q35.js → mdx-8tGjz4em.js} +1 -1
- package/dist/public/assets/{mermaid-parser.core-Dum100hC.js → mermaid-parser.core-CctN5b0z.js} +3 -3
- package/dist/public/assets/{mermaid.core-BWmWf6XO.js → mermaid.core-7ERSdZ4-.js} +4 -4
- package/dist/public/assets/{mindmap-definition-I2QAS2VK-L8HyYUDY.js → mindmap-definition-I2QAS2VK-D-GOUwW1.js} +1 -1
- package/dist/public/assets/module-DEqsdd00.js +1 -0
- package/dist/public/assets/module-TWc52XwT.js +2244 -0
- package/dist/public/assets/{monaco-zOOyBmxy.js → monaco-B_9hlk78.js} +3 -3
- package/dist/public/assets/packet-JDAUHWVQ-qMf5LkHT.js +1 -0
- package/dist/public/assets/{pegDiagram-FD4XPPHP-CTZKPo0Z.js → pegDiagram-FD4XPPHP-Dmy1fWB3.js} +1 -1
- package/dist/public/assets/phaser.esm-BxCDEWDb.js +3202 -0
- package/dist/public/assets/pie-XZMESJXO-BjqLn4qm.js +1 -0
- package/dist/public/assets/{pieDiagram-J4AKIIQI-DAeT3dFi.js → pieDiagram-J4AKIIQI-CXFHLYTg.js} +1 -1
- package/dist/public/assets/{python-C984gt98.js → python-e-JK0s5M.js} +1 -1
- package/dist/public/assets/{quadrantDiagram-XTYBLID2--PXxwV1Z.js → quadrantDiagram-XTYBLID2-RQvEpGWO.js} +1 -1
- package/dist/public/assets/radar-ABXABTNO-DWO6t_4C.js +1 -0
- package/dist/public/assets/railroad-I3PHUGI6-D1XOJPWy.js +1 -0
- package/dist/public/assets/{railroad-abnf-LNEFI6M7-BYcFfrCa.js → railroad-abnf-LNEFI6M7-CDOSPZwX.js} +1 -1
- package/dist/public/assets/{railroad-ebnf-DWYD2UWJ-Cd33qxAm.js → railroad-ebnf-DWYD2UWJ-BTrNQ0DX.js} +1 -1
- package/dist/public/assets/{railroad-peg-JR7BVNR7-C5TpzaU8.js → railroad-peg-JR7BVNR7-B7NtVofS.js} +1 -1
- package/dist/public/assets/{railroadDiagram-MRQ6NCDL-DlWwjbhH.js → railroadDiagram-MRQ6NCDL-DsDrT0Jf.js} +1 -1
- package/dist/public/assets/{razor-BBqMR1Qn.js → razor-DtSPwumi.js} +1 -1
- package/dist/public/assets/{requirementDiagram-Y7LWUY3S-CsYBy9HS.js → requirementDiagram-Y7LWUY3S-BQh0hFuA.js} +1 -1
- package/dist/public/assets/{sankeyDiagram-WGJFYUXA-Baxyb5p9.js → sankeyDiagram-WGJFYUXA-BUXNAQEF.js} +1 -1
- package/dist/public/assets/{sequenceDiagram-5NDRBG5M-Cq6VeBT_.js → sequenceDiagram-5NDRBG5M-05f-N5V_.js} +1 -1
- package/dist/public/assets/{stateDiagram-v2-FJ4FJNEA-O60WKaE7.js → stateDiagram-v2-FJ4FJNEA-D6V1fGWV.js} +1 -1
- package/dist/public/assets/{swimlanes-UMQ2AFYF-C2nf1-Cc.js → swimlanes-UMQ2AFYF-DWhlPvKs.js} +1 -1
- package/dist/public/assets/swimlanesDiagram-OMPLPG4O-CRn5uHsY.js +8 -0
- package/dist/public/assets/three.module-CeVBJVoU.js +4225 -0
- package/dist/public/assets/{timeline-definition-SEUHKTQE-DEfUG6YH.js → timeline-definition-SEUHKTQE-CMdocOui.js} +1 -1
- package/dist/public/assets/treeView-D4JQ5SDB-D09wHNzT.js +1 -0
- package/dist/public/assets/treemap-SAJKECNS-ChxAT7Fq.js +1 -0
- package/dist/public/assets/{typescript-Gtq7f0aU.js → typescript-65jNyipU.js} +1 -1
- package/dist/public/assets/{usecaseDiagram-AFA6YXN4-Gw9DyJcx.js → usecaseDiagram-AFA6YXN4-BQTHUX1f.js} +1 -1
- package/dist/public/assets/{vennDiagram-NNMJR3RB-Clb3MLWF.js → vennDiagram-NNMJR3RB-BULkVTfA.js} +1 -1
- package/dist/public/assets/wardley-7MLQ67FV-DfSjKzbJ.js +1 -0
- package/dist/public/assets/{wardleyDiagram-S7YFUSEH-BrTRpwu2.js → wardleyDiagram-S7YFUSEH-Cek6l8lz.js} +1 -1
- package/dist/public/assets/{xml-Bx3nk7iG.js → xml-DWBejfu-.js} +1 -1
- package/dist/public/assets/{xychartDiagram-GGNKY7IX-BfjTcIsb.js → xychartDiagram-GGNKY7IX-ujnZQTWA.js} +1 -1
- package/dist/public/assets/{yaml-dFLE_rSl.js → yaml-CwRCT7q1.js} +1 -1
- package/dist/public/index.html +1 -1
- package/dist/public/launch.svg +46 -42
- package/dist/serve/index.mjs +8244 -3756
- package/package.json +33 -26
- 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-y6EDNUmc.js +0 -12
- package/dist/public/assets/cynefin-EF2NZ3EQ-CoY4CrZu.js +0 -1
- package/dist/public/assets/flowDiagram-MALGAFMO-CATkJShO.js +0 -1
- package/dist/public/assets/gitGraph-VSP46ZUC-g4yHXXxx.js +0 -1
- package/dist/public/assets/info-OHQRW6UA-CKADJjz4.js +0 -1
- package/dist/public/assets/module-CH7IXa5L.js +0 -1781
- package/dist/public/assets/module-DNAasuMC.js +0 -1
- package/dist/public/assets/packet-JDAUHWVQ-CpKMhX4K.js +0 -1
- package/dist/public/assets/pie-XZMESJXO-CW-zGDRd.js +0 -1
- package/dist/public/assets/radar-ABXABTNO-Cg8W433p.js +0 -1
- package/dist/public/assets/railroad-I3PHUGI6-DriMt2PQ.js +0 -1
- package/dist/public/assets/swimlanesDiagram-OMPLPG4O-B46JxqS8.js +0 -8
- package/dist/public/assets/treeView-D4JQ5SDB-1LhEWwC9.js +0 -1
- package/dist/public/assets/treemap-SAJKECNS-D3t3N7nS.js +0 -1
- package/dist/public/assets/wardley-7MLQ67FV-D3sAsd8p.js +0 -1
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = activate;
|
|
4
|
+
const notify_service_1 = require("./notify-service");
|
|
5
|
+
/** The server side of the package (`pi.host`): the Ta service runs it once; the pi extensions of every session post to it. */
|
|
6
|
+
function activate(host) {
|
|
7
|
+
return new notify_service_1.NotifyHost(host);
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=host.js.map
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
declare const EN: {
|
|
2
|
+
settingsTitle: string;
|
|
3
|
+
levelLabel: string;
|
|
4
|
+
levelHint: string;
|
|
5
|
+
levelAll: string;
|
|
6
|
+
levelNeeds: string;
|
|
7
|
+
levelOff: string;
|
|
8
|
+
systemLabel: string;
|
|
9
|
+
systemHint: string;
|
|
10
|
+
systemAllow: string;
|
|
11
|
+
systemOn: string;
|
|
12
|
+
systemDenied: string;
|
|
13
|
+
systemNone: string;
|
|
14
|
+
mutedLabel: string;
|
|
15
|
+
mutedHint: string;
|
|
16
|
+
mutedNone: string;
|
|
17
|
+
unmute: string;
|
|
18
|
+
mute: string;
|
|
19
|
+
mutedNotice: string;
|
|
20
|
+
untitled: string;
|
|
21
|
+
toolAsk: string;
|
|
22
|
+
toolTell: string;
|
|
23
|
+
askTitle: string;
|
|
24
|
+
};
|
|
25
|
+
export type Words = typeof EN;
|
|
26
|
+
export declare namespace NotifyWords {
|
|
27
|
+
function of(language: string): Words;
|
|
28
|
+
function format(text: string, values: Record<string, string | number>): string;
|
|
29
|
+
}
|
|
30
|
+
export {};
|
|
31
|
+
//# sourceMappingURL=i18n.d.ts.map
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NotifyWords = void 0;
|
|
4
|
+
const EN = {
|
|
5
|
+
settingsTitle: 'Notifications',
|
|
6
|
+
levelLabel: 'Tell me',
|
|
7
|
+
levelHint: 'Never of the conversation you look at; of a task of the double, the double tells you.',
|
|
8
|
+
levelAll: 'Every answer',
|
|
9
|
+
levelNeeds: 'When it needs me',
|
|
10
|
+
levelOff: 'Off',
|
|
11
|
+
systemLabel: 'Notices of the system',
|
|
12
|
+
systemHint: 'While Ta is not in front.',
|
|
13
|
+
systemAllow: 'Allow',
|
|
14
|
+
systemOn: 'On',
|
|
15
|
+
systemDenied: 'Blocked in the settings of the browser',
|
|
16
|
+
systemNone: 'None on this device: a banner while Ta is open. Pushes to a locked phone are not set up yet.',
|
|
17
|
+
mutedLabel: 'Muted conversations',
|
|
18
|
+
mutedHint: 'They tell you only when they need you.',
|
|
19
|
+
mutedNone: 'None',
|
|
20
|
+
unmute: 'Unmute',
|
|
21
|
+
mute: 'Mute',
|
|
22
|
+
mutedNotice: 'Muted {name}: it tells you only when it needs you',
|
|
23
|
+
untitled: 'the conversation',
|
|
24
|
+
toolAsk: 'Ask you',
|
|
25
|
+
toolTell: 'Tell you',
|
|
26
|
+
askTitle: 'Ta asks you',
|
|
27
|
+
};
|
|
28
|
+
const ZH = {
|
|
29
|
+
settingsTitle: '提醒',
|
|
30
|
+
levelLabel: '提醒我',
|
|
31
|
+
levelHint: '正在看的对话不提醒;分身跟进的任务由分身告诉你。',
|
|
32
|
+
levelAll: '每次回复',
|
|
33
|
+
levelNeeds: '需要我时',
|
|
34
|
+
levelOff: '关闭',
|
|
35
|
+
systemLabel: '系统通知',
|
|
36
|
+
systemHint: 'Ta 不在前台时用系统通知提醒。',
|
|
37
|
+
systemAllow: '允许',
|
|
38
|
+
systemOn: '已开启',
|
|
39
|
+
systemDenied: '已在浏览器设置里关闭',
|
|
40
|
+
systemNone: '此设备没有系统通知:Ta 打开时用横幅提醒。手机锁屏推送尚未接入。',
|
|
41
|
+
mutedLabel: '免打扰的对话',
|
|
42
|
+
mutedHint: '只在需要你时提醒。',
|
|
43
|
+
mutedNone: '没有',
|
|
44
|
+
unmute: '取消免打扰',
|
|
45
|
+
mute: '免打扰',
|
|
46
|
+
mutedNotice: '已对“{name}”免打扰,需要你时仍会提醒',
|
|
47
|
+
untitled: '这个对话',
|
|
48
|
+
toolAsk: '提醒你',
|
|
49
|
+
toolTell: '告诉你',
|
|
50
|
+
askTitle: 'Ta 在问你',
|
|
51
|
+
};
|
|
52
|
+
var NotifyWords;
|
|
53
|
+
(function (NotifyWords) {
|
|
54
|
+
function of(language) {
|
|
55
|
+
return language === 'zh-CN' ? ZH : EN;
|
|
56
|
+
}
|
|
57
|
+
NotifyWords.of = of;
|
|
58
|
+
function format(text, values) {
|
|
59
|
+
return text.replace(/\{(\w+)\}/g, (whole, key) => (key in values ? String(values[key]) : whole));
|
|
60
|
+
}
|
|
61
|
+
NotifyWords.format = format;
|
|
62
|
+
})(NotifyWords || (exports.NotifyWords = NotifyWords = {}));
|
|
63
|
+
//# sourceMappingURL=i18n.js.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { WebExtensionAPI } from '@celljs/ta-web/lib/browser/extension/web-extension-api';
|
|
2
|
+
/**
|
|
3
|
+
* Tells the user what conversations say while they look elsewhere (the page draws it: ui.notifySession), its
|
|
4
|
+
* section of the settings, and how Ta's tool reads. The host keeps the notices (host.ts); the pi extension of each
|
|
5
|
+
* session posts them (extension.ts).
|
|
6
|
+
*/
|
|
7
|
+
export default function activate(pi: WebExtensionAPI): () => void;
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = activate;
|
|
4
|
+
const ask_card_1 = require("./ask-card");
|
|
5
|
+
const i18n_1 = require("./i18n");
|
|
6
|
+
const notify_protocol_1 = require("./notify-protocol");
|
|
7
|
+
const react_1 = require("./react");
|
|
8
|
+
const settings_1 = require("./settings");
|
|
9
|
+
const style_1 = require("./style");
|
|
10
|
+
const tool_line_1 = require("./tool-line");
|
|
11
|
+
const watcher_1 = require("./watcher");
|
|
12
|
+
/**
|
|
13
|
+
* Tells the user what conversations say while they look elsewhere (the page draws it: ui.notifySession), its
|
|
14
|
+
* section of the settings, and how Ta's tool reads. The host keeps the notices (host.ts); the pi extension of each
|
|
15
|
+
* session posts them (extension.ts).
|
|
16
|
+
*/
|
|
17
|
+
function activate(pi) {
|
|
18
|
+
(0, react_1.bind)(pi.React);
|
|
19
|
+
const removeStyle = (0, style_1.injectStyle)();
|
|
20
|
+
pi.registerSettings((0, settings_1.notifySettings)(pi));
|
|
21
|
+
pi.registerMessageRenderer(notify_protocol_1.ASK_TYPE, (0, ask_card_1.askCard)(pi));
|
|
22
|
+
tool_line_1.NotifyToolLine.register(pi, key => i18n_1.NotifyWords.of(pi.ui.language)[key]);
|
|
23
|
+
const stop = (0, watcher_1.watchNotices)(pi);
|
|
24
|
+
return () => {
|
|
25
|
+
stop();
|
|
26
|
+
removeStyle();
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/** The name of the package (package.json): its data and its host go by it. */
|
|
2
|
+
export declare const NAME = "@celljs/ta-notify";
|
|
3
|
+
/** The tool by which Ta tells the user something that needs them. */
|
|
4
|
+
export declare const TOOL_NAME = "notify_user";
|
|
5
|
+
/**
|
|
6
|
+
* The custom message of what Ta asked with notify_user, at the end of its turn: the question and its answers as
|
|
7
|
+
* buttons in the conversation, on every device; the model does not read it.
|
|
8
|
+
*/
|
|
9
|
+
export declare const ASK_TYPE = "ta-notify-ask";
|
|
10
|
+
/** The details of an ASK_TYPE message. */
|
|
11
|
+
export interface AskDetails {
|
|
12
|
+
/** Notice.key: an answer is sent as `notice:<key>:<index>`, the same id as from a banner, so it goes once. */
|
|
13
|
+
key: string;
|
|
14
|
+
text: string;
|
|
15
|
+
options: string[];
|
|
16
|
+
}
|
|
17
|
+
/** Keys of the data of the package (pi.storage). */
|
|
18
|
+
export declare namespace Keys {
|
|
19
|
+
/** The latest notices, the newest last (Notice[]): the pages tell of those that come. */
|
|
20
|
+
const NOTICES = "notices";
|
|
21
|
+
/** NotifyLevel: of what the user is told. */
|
|
22
|
+
const LEVEL = "level";
|
|
23
|
+
/** Muted[]: the conversations the user muted. */
|
|
24
|
+
const MUTED = "muted";
|
|
25
|
+
}
|
|
26
|
+
/** `ask`: a conversation needs the user (Ta asks, a dialog waits); `failed`: its run failed; `done`: it answered. */
|
|
27
|
+
export type NoticeLevel = 'ask' | 'failed' | 'done';
|
|
28
|
+
/** Of what the user is told: every answer, only what needs them (`ask` and `failed`), or nothing. */
|
|
29
|
+
export type NotifyLevel = 'all' | 'needs' | 'off';
|
|
30
|
+
/** What gave it: Ta's tool, the end of a turn, a dialog of an extension. */
|
|
31
|
+
export type NoticeSource = 'agent' | 'turn' | 'dialog';
|
|
32
|
+
/** Something a conversation told the user, as the pages read it. */
|
|
33
|
+
export interface Notice {
|
|
34
|
+
/** The same on every page: each tells of a key once. */
|
|
35
|
+
key: string;
|
|
36
|
+
/** When it came (`Date.now()` of the Ta service). */
|
|
37
|
+
at: number;
|
|
38
|
+
level: NoticeLevel;
|
|
39
|
+
source: NoticeSource;
|
|
40
|
+
/** A line or two. */
|
|
41
|
+
text: string;
|
|
42
|
+
/** Answers to pick, for `ask`. */
|
|
43
|
+
options?: string[];
|
|
44
|
+
sessionId?: string;
|
|
45
|
+
sessionFile?: string;
|
|
46
|
+
cwd?: string;
|
|
47
|
+
/** The name of the conversation then, for the list of those muted. */
|
|
48
|
+
title?: string;
|
|
49
|
+
}
|
|
50
|
+
/** What the pi extension of a session posts to the host of the package. */
|
|
51
|
+
export interface NoticeInput {
|
|
52
|
+
/** The pi session that said it (its `getSessionId()`). */
|
|
53
|
+
piSessionId: string;
|
|
54
|
+
/** Unique in the session: the time of the answer, the id of the call of the tool. */
|
|
55
|
+
id: string;
|
|
56
|
+
level: NoticeLevel;
|
|
57
|
+
source: NoticeSource;
|
|
58
|
+
text: string;
|
|
59
|
+
options?: string[];
|
|
60
|
+
}
|
|
61
|
+
/** A conversation the user muted: told of only when it needs them. */
|
|
62
|
+
export interface Muted {
|
|
63
|
+
/** Its session file, else its session id. */
|
|
64
|
+
target: string;
|
|
65
|
+
title?: string;
|
|
66
|
+
}
|
|
67
|
+
/** The host of the package (host.ts), for its pi extension and its web extension (`callHost`). */
|
|
68
|
+
export interface NotifyService {
|
|
69
|
+
/** Keeps a notice for the pages, unless the settings say not to tell the user of it; what it kept. */
|
|
70
|
+
post(input: NoticeInput): Promise<Notice | undefined>;
|
|
71
|
+
/** Mutes a conversation or not; the list after. */
|
|
72
|
+
mute(target: string, muted: boolean, title?: string): Promise<Muted[]>;
|
|
73
|
+
}
|
|
74
|
+
//# sourceMappingURL=notify-protocol.d.ts.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Keys = exports.ASK_TYPE = exports.TOOL_NAME = exports.NAME = void 0;
|
|
4
|
+
/** The name of the package (package.json): its data and its host go by it. */
|
|
5
|
+
exports.NAME = '@celljs/ta-notify';
|
|
6
|
+
/** The tool by which Ta tells the user something that needs them. */
|
|
7
|
+
exports.TOOL_NAME = 'notify_user';
|
|
8
|
+
/**
|
|
9
|
+
* The custom message of what Ta asked with notify_user, at the end of its turn: the question and its answers as
|
|
10
|
+
* buttons in the conversation, on every device; the model does not read it.
|
|
11
|
+
*/
|
|
12
|
+
exports.ASK_TYPE = 'ta-notify-ask';
|
|
13
|
+
/** Keys of the data of the package (pi.storage). */
|
|
14
|
+
var Keys;
|
|
15
|
+
(function (Keys) {
|
|
16
|
+
/** The latest notices, the newest last (Notice[]): the pages tell of those that come. */
|
|
17
|
+
Keys.NOTICES = 'notices';
|
|
18
|
+
/** NotifyLevel: of what the user is told. */
|
|
19
|
+
Keys.LEVEL = 'level';
|
|
20
|
+
/** Muted[]: the conversations the user muted. */
|
|
21
|
+
Keys.MUTED = 'muted';
|
|
22
|
+
})(Keys || (exports.Keys = Keys = {}));
|
|
23
|
+
//# sourceMappingURL=notify-protocol.js.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { TaExtensionHost, TaPackageService } from '@celljs/ta-protocol';
|
|
2
|
+
import { type Muted, type Notice, type NoticeInput, type NotifyService } from './notify-protocol';
|
|
3
|
+
/**
|
|
4
|
+
* The host of the package in the Ta service: it keeps the notices the pi extensions of the sessions post, as the
|
|
5
|
+
* settings allow, for the pages to tell of (the pages tell of none that the user looks at). One writer, so that two
|
|
6
|
+
* sessions that post at once both stay. A push to a phone whose app is closed would go out from here (not done:
|
|
7
|
+
* docs/design/ta-notify.md).
|
|
8
|
+
*/
|
|
9
|
+
export declare class NotifyHost implements NotifyService, TaPackageService {
|
|
10
|
+
protected readonly host: TaExtensionHost;
|
|
11
|
+
/** The writes one after another. */
|
|
12
|
+
protected queue: Promise<unknown>;
|
|
13
|
+
constructor(host: TaExtensionHost);
|
|
14
|
+
post(input: NoticeInput): Promise<Notice | undefined>;
|
|
15
|
+
mute(target: string, muted: boolean, title?: string): Promise<Muted[]>;
|
|
16
|
+
/** Nothing runs on its own: what is written is written. */
|
|
17
|
+
dispose(): void;
|
|
18
|
+
protected read(key: string): Promise<unknown>;
|
|
19
|
+
protected serial<T>(work: () => Promise<T>): Promise<T>;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=notify-service.d.ts.map
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NotifyHost = void 0;
|
|
4
|
+
const notify_protocol_1 = require("./notify-protocol");
|
|
5
|
+
const notify_util_1 = require("./notify-util");
|
|
6
|
+
/**
|
|
7
|
+
* The host of the package in the Ta service: it keeps the notices the pi extensions of the sessions post, as the
|
|
8
|
+
* settings allow, for the pages to tell of (the pages tell of none that the user looks at). One writer, so that two
|
|
9
|
+
* sessions that post at once both stay. A push to a phone whose app is closed would go out from here (not done:
|
|
10
|
+
* docs/design/ta-notify.md).
|
|
11
|
+
*/
|
|
12
|
+
class NotifyHost {
|
|
13
|
+
constructor(host) {
|
|
14
|
+
this.host = host;
|
|
15
|
+
/** The writes one after another. */
|
|
16
|
+
this.queue = Promise.resolve();
|
|
17
|
+
}
|
|
18
|
+
post(input) {
|
|
19
|
+
return this.serial(async () => {
|
|
20
|
+
var _a;
|
|
21
|
+
var _b;
|
|
22
|
+
const info = (await this.host.listSessions()).find(session => session.piSessionId === input.piSessionId);
|
|
23
|
+
// A session a package opened for a role of its own (an agent of a channel, a run of a schedule) says
|
|
24
|
+
// when it ends a turn in its own way; it still asks, and its dialogs wait.
|
|
25
|
+
if (input.source === 'turn' && (info === null || info === void 0 ? void 0 : info.group)) {
|
|
26
|
+
return undefined;
|
|
27
|
+
}
|
|
28
|
+
const target = (_b = info === null || info === void 0 ? void 0 : info.sessionFile) !== null && _b !== void 0 ? _b : info === null || info === void 0 ? void 0 : info.sessionId;
|
|
29
|
+
const [level, muted] = await Promise.all([this.read(notify_protocol_1.Keys.LEVEL), this.read(notify_protocol_1.Keys.MUTED)]);
|
|
30
|
+
const isMuted = !!target && notify_util_1.NotifyUtil.muted(muted).some(item => item.target === target);
|
|
31
|
+
if (!notify_util_1.NotifyUtil.allows(input.level, notify_util_1.NotifyUtil.level(level), isMuted)) {
|
|
32
|
+
return undefined;
|
|
33
|
+
}
|
|
34
|
+
const notice = {
|
|
35
|
+
key: notify_util_1.NotifyUtil.key(input.piSessionId, input.source, input.id),
|
|
36
|
+
at: Date.now(),
|
|
37
|
+
level: input.level,
|
|
38
|
+
source: input.source,
|
|
39
|
+
text: input.text,
|
|
40
|
+
...(((_a = input.options) === null || _a === void 0 ? void 0 : _a.length) ? { options: input.options } : {}),
|
|
41
|
+
...(info
|
|
42
|
+
? {
|
|
43
|
+
sessionId: info.sessionId,
|
|
44
|
+
sessionFile: info.sessionFile,
|
|
45
|
+
cwd: info.cwd,
|
|
46
|
+
title: info.sessionName || info.firstMessage,
|
|
47
|
+
}
|
|
48
|
+
: {}),
|
|
49
|
+
};
|
|
50
|
+
const list = notify_util_1.NotifyUtil.notices(await this.read(notify_protocol_1.Keys.NOTICES));
|
|
51
|
+
await this.host.setExtensionData(notify_protocol_1.NAME, notify_protocol_1.Keys.NOTICES, notify_util_1.NotifyUtil.keep(list, notice));
|
|
52
|
+
return notice;
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
mute(target, muted, title) {
|
|
56
|
+
return this.serial(async () => {
|
|
57
|
+
const list = notify_util_1.NotifyUtil.muted(await this.read(notify_protocol_1.Keys.MUTED)).filter(item => item.target !== target);
|
|
58
|
+
const next = muted ? [...list, { target, ...(title ? { title } : {}) }] : list;
|
|
59
|
+
await this.host.setExtensionData(notify_protocol_1.NAME, notify_protocol_1.Keys.MUTED, next);
|
|
60
|
+
return next;
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
/** Nothing runs on its own: what is written is written. */
|
|
64
|
+
dispose() { }
|
|
65
|
+
read(key) {
|
|
66
|
+
return this.host.getExtensionData(notify_protocol_1.NAME, key).catch(() => undefined);
|
|
67
|
+
}
|
|
68
|
+
serial(work) {
|
|
69
|
+
const next = this.queue.then(work, work);
|
|
70
|
+
this.queue = next.catch(() => undefined);
|
|
71
|
+
return next;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
exports.NotifyHost = NotifyHost;
|
|
75
|
+
//# sourceMappingURL=notify-service.js.map
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { Muted, Notice, NoticeLevel, NotifyLevel } from './notify-protocol';
|
|
2
|
+
/** At most this many notices are kept: the pages only tell of those that just came. */
|
|
3
|
+
export declare const KEEP = 30;
|
|
4
|
+
/** A notice older than this is old news: a page that opens or wakes later does not tell of it. */
|
|
5
|
+
export declare const FRESH_MS: number;
|
|
6
|
+
export declare namespace NotifyUtil {
|
|
7
|
+
/** The key of a notice: the same on every page, and for the card of the question in the conversation. */
|
|
8
|
+
function key(piSessionId: string, source: string, id: string): string;
|
|
9
|
+
/** The id of the message of an answer, as the page's banners send it (SessionNoticeUtil.answerId of Ta Web). */
|
|
10
|
+
function answerId(key: string, index: number): string;
|
|
11
|
+
/**
|
|
12
|
+
* Whether the user is told: never when off; only what needs them (`ask`, `failed`) when they said so or
|
|
13
|
+
* muted the conversation, for a muted conversation still tells them when it needs them; else everything.
|
|
14
|
+
*/
|
|
15
|
+
function allows(level: NoticeLevel, setting: NotifyLevel, muted: boolean): boolean;
|
|
16
|
+
function level(value: unknown): NotifyLevel;
|
|
17
|
+
function muted(value: unknown): Muted[];
|
|
18
|
+
function notices(value: unknown): Notice[];
|
|
19
|
+
/** The list with `notice` last, the oldest beyond KEEP dropped; one of the same key is replaced. */
|
|
20
|
+
function keep(list: readonly Notice[], notice: Notice, max?: number): Notice[];
|
|
21
|
+
function fresh(notice: Pick<Notice, 'at'>, now?: number): boolean;
|
|
22
|
+
/**
|
|
23
|
+
* What a banner says of Markdown: its first lines as plain words (no headings, emphasis, fences, links' targets),
|
|
24
|
+
* two lines and TEXT_CHARS at most.
|
|
25
|
+
*/
|
|
26
|
+
function text(markdown: string): string;
|
|
27
|
+
/** At most OPTIONS short answers, each once. */
|
|
28
|
+
function options(value: unknown): string[] | undefined;
|
|
29
|
+
/** The text of the content of a message of pi: its text parts. */
|
|
30
|
+
function contentText(content: unknown): string;
|
|
31
|
+
/** How a run ended, from the messages of pi's `agent_end`: its last answer, whether it failed, and when. */
|
|
32
|
+
function lastAnswer(messages: readonly unknown[]): {
|
|
33
|
+
text: string;
|
|
34
|
+
failed: boolean;
|
|
35
|
+
aborted: boolean;
|
|
36
|
+
at: number;
|
|
37
|
+
} | undefined;
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=notify-util.d.ts.map
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NotifyUtil = exports.FRESH_MS = exports.KEEP = void 0;
|
|
4
|
+
/** At most this many notices are kept: the pages only tell of those that just came. */
|
|
5
|
+
exports.KEEP = 30;
|
|
6
|
+
/** A notice older than this is old news: a page that opens or wakes later does not tell of it. */
|
|
7
|
+
exports.FRESH_MS = 2 * 60000;
|
|
8
|
+
/** What a notice says, at most. */
|
|
9
|
+
const TEXT_CHARS = 200;
|
|
10
|
+
const OPTION_CHARS = 40;
|
|
11
|
+
const OPTIONS = 4;
|
|
12
|
+
var NotifyUtil;
|
|
13
|
+
(function (NotifyUtil) {
|
|
14
|
+
/** The key of a notice: the same on every page, and for the card of the question in the conversation. */
|
|
15
|
+
function key(piSessionId, source, id) {
|
|
16
|
+
return `${piSessionId}:${source}:${id}`;
|
|
17
|
+
}
|
|
18
|
+
NotifyUtil.key = key;
|
|
19
|
+
/** The id of the message of an answer, as the page's banners send it (SessionNoticeUtil.answerId of Ta Web). */
|
|
20
|
+
function answerId(key, index) {
|
|
21
|
+
return `notice:${key}:${index}`;
|
|
22
|
+
}
|
|
23
|
+
NotifyUtil.answerId = answerId;
|
|
24
|
+
/**
|
|
25
|
+
* Whether the user is told: never when off; only what needs them (`ask`, `failed`) when they said so or
|
|
26
|
+
* muted the conversation, for a muted conversation still tells them when it needs them; else everything.
|
|
27
|
+
*/
|
|
28
|
+
function allows(level, setting, muted) {
|
|
29
|
+
if (setting === 'off') {
|
|
30
|
+
return false;
|
|
31
|
+
}
|
|
32
|
+
return level !== 'done' || (setting === 'all' && !muted);
|
|
33
|
+
}
|
|
34
|
+
NotifyUtil.allows = allows;
|
|
35
|
+
function level(value) {
|
|
36
|
+
return value === 'needs' || value === 'off' ? value : 'all';
|
|
37
|
+
}
|
|
38
|
+
NotifyUtil.level = level;
|
|
39
|
+
function muted(value) {
|
|
40
|
+
return Array.isArray(value) ? value.filter((item) => !!item && typeof item.target === 'string') : [];
|
|
41
|
+
}
|
|
42
|
+
NotifyUtil.muted = muted;
|
|
43
|
+
function notices(value) {
|
|
44
|
+
return Array.isArray(value) ? value.filter((item) => !!item && typeof item.key === 'string') : [];
|
|
45
|
+
}
|
|
46
|
+
NotifyUtil.notices = notices;
|
|
47
|
+
/** The list with `notice` last, the oldest beyond KEEP dropped; one of the same key is replaced. */
|
|
48
|
+
function keep(list, notice, max = exports.KEEP) {
|
|
49
|
+
return [...list.filter(other => other.key !== notice.key), notice].slice(-max);
|
|
50
|
+
}
|
|
51
|
+
NotifyUtil.keep = keep;
|
|
52
|
+
function fresh(notice, now = Date.now()) {
|
|
53
|
+
return now - notice.at <= exports.FRESH_MS;
|
|
54
|
+
}
|
|
55
|
+
NotifyUtil.fresh = fresh;
|
|
56
|
+
/**
|
|
57
|
+
* What a banner says of Markdown: its first lines as plain words (no headings, emphasis, fences, links' targets),
|
|
58
|
+
* two lines and TEXT_CHARS at most.
|
|
59
|
+
*/
|
|
60
|
+
function text(markdown) {
|
|
61
|
+
const lines = markdown
|
|
62
|
+
.replace(/```[\s\S]*?(```|$)/g, ' ')
|
|
63
|
+
.replace(/!?\[([^\]]*)\]\([^)]*\)/g, '$1')
|
|
64
|
+
.split('\n')
|
|
65
|
+
.map(line => line
|
|
66
|
+
.replace(/^\s{0,3}(#{1,6}\s+|>\s?|[-*+]\s+|\d+[.)]\s+)/, '')
|
|
67
|
+
.replace(/(\*\*|__|\*|`|~~)/g, '')
|
|
68
|
+
.replace(/\s+/g, ' ')
|
|
69
|
+
.trim())
|
|
70
|
+
.filter(line => line && !/^[-*_=|:\s]+$/.test(line));
|
|
71
|
+
const joined = lines.slice(0, 2).join('\n');
|
|
72
|
+
return joined.length > TEXT_CHARS ? `${joined.slice(0, TEXT_CHARS - 1).trimEnd()}…` : joined;
|
|
73
|
+
}
|
|
74
|
+
NotifyUtil.text = text;
|
|
75
|
+
/** At most OPTIONS short answers, each once. */
|
|
76
|
+
function options(value) {
|
|
77
|
+
if (!Array.isArray(value)) {
|
|
78
|
+
return undefined;
|
|
79
|
+
}
|
|
80
|
+
const picked = [
|
|
81
|
+
...new Set(value
|
|
82
|
+
.filter((item) => typeof item === 'string')
|
|
83
|
+
.map(item => item.trim().slice(0, OPTION_CHARS))
|
|
84
|
+
.filter(Boolean)),
|
|
85
|
+
].slice(0, OPTIONS);
|
|
86
|
+
return picked.length ? picked : undefined;
|
|
87
|
+
}
|
|
88
|
+
NotifyUtil.options = options;
|
|
89
|
+
/** The text of the content of a message of pi: its text parts. */
|
|
90
|
+
function contentText(content) {
|
|
91
|
+
if (typeof content === 'string') {
|
|
92
|
+
return content;
|
|
93
|
+
}
|
|
94
|
+
return Array.isArray(content)
|
|
95
|
+
? content
|
|
96
|
+
.filter((part) => (part === null || part === void 0 ? void 0 : part.type) === 'text' && typeof part.text === 'string')
|
|
97
|
+
.map(part => part.text)
|
|
98
|
+
.join('\n')
|
|
99
|
+
: '';
|
|
100
|
+
}
|
|
101
|
+
NotifyUtil.contentText = contentText;
|
|
102
|
+
/** How a run ended, from the messages of pi's `agent_end`: its last answer, whether it failed, and when. */
|
|
103
|
+
function lastAnswer(messages) {
|
|
104
|
+
const answer = [...messages].reverse().find(message => (message === null || message === void 0 ? void 0 : message.role) === 'assistant');
|
|
105
|
+
if (!answer) {
|
|
106
|
+
return undefined;
|
|
107
|
+
}
|
|
108
|
+
const failed = answer.stopReason === 'error';
|
|
109
|
+
const said = contentText(answer.content);
|
|
110
|
+
return {
|
|
111
|
+
text: failed && answer.errorMessage ? answer.errorMessage : said,
|
|
112
|
+
failed,
|
|
113
|
+
aborted: answer.stopReason === 'aborted',
|
|
114
|
+
at: typeof answer.timestamp === 'number' ? answer.timestamp : Date.now(),
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
NotifyUtil.lastAnswer = lastAnswer;
|
|
118
|
+
})(NotifyUtil || (exports.NotifyUtil = NotifyUtil = {}));
|
|
119
|
+
//# sourceMappingURL=notify-util.js.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type * as ReactModule from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* The React of the page, which a web extension cannot import: `activate` binds it before anything
|
|
4
|
+
* renders. The JSX of this package compiles to `React.createElement` (tsconfig.json).
|
|
5
|
+
*/
|
|
6
|
+
export declare let React: typeof ReactModule;
|
|
7
|
+
export declare function bind(react: typeof ReactModule): void;
|
|
8
|
+
//# sourceMappingURL=react.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** What the pi extension of ta-notify says to the user, in the language of Ta's pages (`TA_LANGUAGE`) or the computer's. */
|
|
2
|
+
export declare namespace NotifyServerTexts {
|
|
3
|
+
function zh(env?: NodeJS.ProcessEnv): boolean;
|
|
4
|
+
/** A dialog waits that has no title. */
|
|
5
|
+
function waiting(): string;
|
|
6
|
+
/** A run failed that said nothing. */
|
|
7
|
+
function failed(): string;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=server-texts.d.ts.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NotifyServerTexts = void 0;
|
|
4
|
+
/** What the pi extension of ta-notify says to the user, in the language of Ta's pages (`TA_LANGUAGE`) or the computer's. */
|
|
5
|
+
var NotifyServerTexts;
|
|
6
|
+
(function (NotifyServerTexts) {
|
|
7
|
+
function zh(env = process.env) {
|
|
8
|
+
return /^zh/i.test(env.TA_LANGUAGE || env.LC_ALL || env.LC_MESSAGES || env.LANG || '');
|
|
9
|
+
}
|
|
10
|
+
NotifyServerTexts.zh = zh;
|
|
11
|
+
/** A dialog waits that has no title. */
|
|
12
|
+
function waiting() {
|
|
13
|
+
return zh() ? '有一个确认在等你回答' : 'A question waits for your answer';
|
|
14
|
+
}
|
|
15
|
+
NotifyServerTexts.waiting = waiting;
|
|
16
|
+
/** A run failed that said nothing. */
|
|
17
|
+
function failed() {
|
|
18
|
+
return zh() ? '这一轮没有完成' : 'This turn did not finish';
|
|
19
|
+
}
|
|
20
|
+
NotifyServerTexts.failed = failed;
|
|
21
|
+
})(NotifyServerTexts || (exports.NotifyServerTexts = NotifyServerTexts = {}));
|
|
22
|
+
//# sourceMappingURL=server-texts.js.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { WebExtensionAPI, WebSettingsSection } from '@celljs/ta-web/lib/browser/extension/web-extension-api';
|
|
2
|
+
export declare namespace SystemNotices {
|
|
3
|
+
type State = 'none' | 'default' | 'granted' | 'denied';
|
|
4
|
+
function state(): State;
|
|
5
|
+
}
|
|
6
|
+
/** Notifications, in the settings: of what the user is told, the notices of the system, and the conversations muted. */
|
|
7
|
+
export declare function notifySettings(pi: WebExtensionAPI): WebSettingsSection;
|
|
8
|
+
//# sourceMappingURL=settings.d.ts.map
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SystemNotices = void 0;
|
|
4
|
+
exports.notifySettings = notifySettings;
|
|
5
|
+
const i18n_1 = require("./i18n");
|
|
6
|
+
const notify_protocol_1 = require("./notify-protocol");
|
|
7
|
+
const notify_util_1 = require("./notify-util");
|
|
8
|
+
const react_1 = require("./react");
|
|
9
|
+
const LEVELS = [
|
|
10
|
+
{ value: 'all', label: 'levelAll' },
|
|
11
|
+
{ value: 'needs', label: 'levelNeeds' },
|
|
12
|
+
{ value: 'off', label: 'levelOff' },
|
|
13
|
+
];
|
|
14
|
+
/** A value of the data of the package, read again when any page changes it. */
|
|
15
|
+
function useStored(pi, key, parse) {
|
|
16
|
+
const [value, setValue] = react_1.React.useState(() => parse(undefined));
|
|
17
|
+
react_1.React.useEffect(() => {
|
|
18
|
+
let live = true;
|
|
19
|
+
const read = () => void pi.storage.get(key).then(stored => live && setValue(parse(stored)), () => undefined);
|
|
20
|
+
read();
|
|
21
|
+
const stop = pi.storage.onChange(keys => keys.includes(key) && read());
|
|
22
|
+
return () => {
|
|
23
|
+
live = false;
|
|
24
|
+
stop();
|
|
25
|
+
};
|
|
26
|
+
}, [pi, key, parse]);
|
|
27
|
+
const set = (next) => {
|
|
28
|
+
setValue(next);
|
|
29
|
+
pi.storage.set(key, next).catch(error => pi.ui.notify(error instanceof Error ? error.message : String(error), 'error'));
|
|
30
|
+
};
|
|
31
|
+
return [value, set];
|
|
32
|
+
}
|
|
33
|
+
function LevelSetting({ pi }) {
|
|
34
|
+
const words = i18n_1.NotifyWords.of(pi.ui.language);
|
|
35
|
+
const [level, setLevel] = useStored(pi, notify_protocol_1.Keys.LEVEL, notify_util_1.NotifyUtil.level);
|
|
36
|
+
return (react_1.React.createElement("fieldset", { className: "ta-segmented", "aria-label": words.levelLabel }, LEVELS.map(choice => (react_1.React.createElement("button", { key: choice.value, type: "button", "aria-pressed": choice.value === level, className: choice.value === level ? 'ta-on' : '', onClick: () => setLevel(choice.value) }, words[choice.label])))));
|
|
37
|
+
}
|
|
38
|
+
var SystemNotices;
|
|
39
|
+
(function (SystemNotices) {
|
|
40
|
+
function state() {
|
|
41
|
+
return typeof Notification === 'undefined' ? 'none' : Notification.permission;
|
|
42
|
+
}
|
|
43
|
+
SystemNotices.state = state;
|
|
44
|
+
})(SystemNotices || (exports.SystemNotices = SystemNotices = {}));
|
|
45
|
+
/** Notices of the system: whether this browser has them, and a button to allow them. */
|
|
46
|
+
function SystemSetting({ pi }) {
|
|
47
|
+
const words = i18n_1.NotifyWords.of(pi.ui.language);
|
|
48
|
+
const [state, setState] = react_1.React.useState(SystemNotices.state);
|
|
49
|
+
if (state === 'default') {
|
|
50
|
+
return (react_1.React.createElement("button", { type: "button", className: "ta-button", onClick: () => void Notification.requestPermission().then(() => setState(SystemNotices.state()), () => undefined) }, words.systemAllow));
|
|
51
|
+
}
|
|
52
|
+
return react_1.React.createElement("span", { className: "ta-notify-state" }, state === 'granted' ? words.systemOn : state === 'denied' ? words.systemDenied : words.systemNone);
|
|
53
|
+
}
|
|
54
|
+
function MutedSetting({ pi }) {
|
|
55
|
+
const words = i18n_1.NotifyWords.of(pi.ui.language);
|
|
56
|
+
const [muted] = useStored(pi, notify_protocol_1.Keys.MUTED, notify_util_1.NotifyUtil.muted);
|
|
57
|
+
if (muted.length === 0) {
|
|
58
|
+
return react_1.React.createElement("span", { className: "ta-notify-state" }, words.mutedNone);
|
|
59
|
+
}
|
|
60
|
+
const unmute = (item) => void pi.callHost('mute', item.target, false).catch(error => pi.ui.notify(error instanceof Error ? error.message : String(error), 'error'));
|
|
61
|
+
return (react_1.React.createElement("ul", { className: "ta-notify-muted" }, muted.map(item => (react_1.React.createElement("li", { key: item.target },
|
|
62
|
+
react_1.React.createElement("span", { className: "ta-notify-muted-name", title: item.target }, item.title || words.untitled),
|
|
63
|
+
react_1.React.createElement("button", { type: "button", className: "ta-button", onClick: () => unmute(item) }, words.unmute))))));
|
|
64
|
+
}
|
|
65
|
+
/** Notifications, in the settings: of what the user is told, the notices of the system, and the conversations muted. */
|
|
66
|
+
function notifySettings(pi) {
|
|
67
|
+
var _a;
|
|
68
|
+
const words = () => i18n_1.NotifyWords.of(pi.ui.language);
|
|
69
|
+
return {
|
|
70
|
+
title: () => words().settingsTitle,
|
|
71
|
+
icon: (_a = pi.ui.icons.Bell) !== null && _a !== void 0 ? _a : pi.ui.icons.BellOff,
|
|
72
|
+
rows: [
|
|
73
|
+
{ key: 'level', label: () => words().levelLabel, description: () => words().levelHint, render: () => react_1.React.createElement(LevelSetting, { pi: pi }) },
|
|
74
|
+
{ key: 'system', label: () => words().systemLabel, description: () => words().systemHint, render: () => react_1.React.createElement(SystemSetting, { pi: pi }) },
|
|
75
|
+
{
|
|
76
|
+
key: 'muted',
|
|
77
|
+
label: () => words().mutedLabel,
|
|
78
|
+
description: () => words().mutedHint,
|
|
79
|
+
stacked: true,
|
|
80
|
+
render: () => react_1.React.createElement(MutedSetting, { pi: pi }),
|
|
81
|
+
},
|
|
82
|
+
],
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
//# sourceMappingURL=settings.js.map
|