@celljs/ta 4.10.0 → 4.12.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 +1675 -51
- package/dist/gateway.mjs +167 -5
- package/dist/pi/CHANGELOG.md +27 -0
- package/dist/pi/package.json +1 -1
- package/dist/pi/packages/ta-agents/extension/index.mjs +359 -155
- package/dist/pi/packages/ta-agents/lib/acp-agent.js +30 -10
- package/dist/pi/packages/ta-agents/lib/acp-protocol.d.ts +5 -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 +9 -0
- package/dist/pi/packages/ta-agents/lib/agent-prompt.js +25 -0
- package/dist/pi/packages/ta-agents/lib/agent-session.d.ts +71 -1
- package/dist/pi/packages/ta-agents/lib/agent-session.js +177 -17
- package/dist/pi/packages/ta-agents/lib/agent-streamer.js +23 -2
- package/dist/pi/packages/ta-agents/lib/agent-tool.js +4 -3
- package/dist/pi/packages/ta-agents/lib/agent-turn.d.ts +7 -1
- package/dist/pi/packages/ta-agents/lib/agent-turn.js +26 -3
- package/dist/pi/packages/ta-agents/lib/extension.js +7 -0
- package/dist/pi/packages/ta-agents/lib/texts.d.ts +12 -0
- package/dist/pi/packages/ta-agents/lib/texts.js +12 -0
- package/dist/pi/packages/ta-agents/package.json +1 -1
- package/dist/pi/packages/ta-bots/extension/index.mjs +31 -299
- package/dist/pi/packages/ta-bots/host/index.mjs +143 -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 +4 -3
- package/dist/pi/packages/ta-channels/README.md +4 -3
- package/dist/pi/packages/ta-channels/extension/index.mjs +350 -28
- package/dist/pi/packages/ta-channels/host/index.mjs +588 -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 +3 -1
- 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 +6 -0
- 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 +45 -0
- package/dist/pi/packages/ta-channels/lib/i18n.js +90 -0
- 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/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 +13 -2
- package/dist/pi/packages/ta-channels/lib/sidebar.d.ts +1 -6
- package/dist/pi/packages/ta-channels/lib/sidebar.js +160 -79
- package/dist/pi/packages/ta-channels/lib/style.d.ts +1 -1
- package/dist/pi/packages/ta-channels/lib/style.js +72 -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 +33 -16
- package/dist/pi/packages/ta-channels/lib/views.js +79 -31
- package/dist/pi/packages/ta-channels/package.json +2 -1
- package/dist/pi/packages/ta-channels/web/index.js +1551 -308
- package/dist/pi/packages/ta-computer-use/package.json +6 -1
- package/dist/pi/packages/ta-cron/README.en.md +4 -2
- package/dist/pi/packages/ta-cron/README.md +4 -2
- package/dist/pi/packages/ta-cron/extension/index.mjs +416 -44
- package/dist/pi/packages/ta-cron/host/index.mjs +24 -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 +5 -3
- 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 +18 -0
- package/dist/pi/packages/ta-cron/lib/i18n.js +36 -0
- package/dist/pi/packages/ta-cron/lib/index.js +4 -0
- package/dist/pi/packages/ta-cron/lib/page.d.ts +5 -1
- package/dist/pi/packages/ta-cron/lib/page.js +12 -0
- 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 +11 -13
- package/dist/pi/packages/ta-cron/lib/task-util.d.ts +2 -0
- package/dist/pi/packages/ta-cron/lib/task-util.js +20 -1
- package/dist/pi/packages/ta-cron/lib/tasks-view.js +6 -2
- 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 +661 -254
- package/dist/pi/packages/ta-extensions/README.en.md +1 -1
- package/dist/pi/packages/ta-extensions/README.md +1 -1
- 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 +13 -4
- 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/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 +12 -7
- 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/style.d.ts +1 -1
- package/dist/pi/packages/ta-extensions/lib/style.js +3 -2
- package/dist/pi/packages/ta-extensions/package.json +6 -1
- package/dist/pi/packages/ta-extensions/skills/ta-package/SKILL.md +20 -8
- package/dist/pi/packages/ta-extensions/web/index.js +191 -22
- 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 +269 -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 +7 -0
- package/dist/pi/packages/ta-glance/lib/glance-spec.js +206 -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 +241 -0
- package/dist/pi/packages/ta-glance/package.json +53 -0
- package/dist/pi/packages/ta-glance/web/index.js +1013 -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-c.d.ts +2 -0
- package/dist/pi/packages/ta-manual/lib/pictures-c.js +53 -0
- package/dist/pi/packages/ta-manual/lib/pictures.d.ts +9 -0
- package/dist/pi/packages/ta-manual/lib/pictures.js +17 -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 +43 -0
- package/dist/pi/packages/ta-manual/lib/topics.js +388 -0
- package/dist/pi/packages/ta-manual/package.json +54 -0
- package/dist/pi/packages/ta-manual/skills/ta-manual/SKILL.md +130 -0
- package/dist/pi/packages/ta-manual/web/index.js +2408 -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 +615 -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 +52 -0
- package/dist/pi/packages/ta-recall/lib/extension.d.ts +24 -0
- package/dist/pi/packages/ta-recall/lib/extension.js +132 -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 +1042 -0
- package/dist/pi/packages/ta-rooms/README.en.md +29 -0
- package/dist/pi/packages/ta-rooms/README.md +29 -0
- package/dist/pi/packages/ta-rooms/extension/index.mjs +362 -0
- package/dist/pi/packages/ta-rooms/host/index.mjs +966 -0
- package/dist/pi/packages/ta-rooms/lib/agents-view.d.ts +25 -0
- package/dist/pi/packages/ta-rooms/lib/agents-view.js +128 -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/double-host.d.ts +114 -0
- package/dist/pi/packages/ta-rooms/lib/double-host.js +645 -0
- package/dist/pi/packages/ta-rooms/lib/double-i18n.d.ts +85 -0
- package/dist/pi/packages/ta-rooms/lib/double-i18n.js +172 -0
- package/dist/pi/packages/ta-rooms/lib/double-protocol.d.ts +165 -0
- package/dist/pi/packages/ta-rooms/lib/double-protocol.js +73 -0
- package/dist/pi/packages/ta-rooms/lib/double-util.d.ts +99 -0
- package/dist/pi/packages/ta-rooms/lib/double-util.js +180 -0
- package/dist/pi/packages/ta-rooms/lib/doubles-store.d.ts +45 -0
- package/dist/pi/packages/ta-rooms/lib/doubles-store.js +145 -0
- package/dist/pi/packages/ta-rooms/lib/doubles-view.d.ts +34 -0
- package/dist/pi/packages/ta-rooms/lib/doubles-view.js +223 -0
- package/dist/pi/packages/ta-rooms/lib/extension.d.ts +24 -0
- package/dist/pi/packages/ta-rooms/lib/extension.js +176 -0
- package/dist/pi/packages/ta-rooms/lib/host.d.ts +7 -0
- package/dist/pi/packages/ta-rooms/lib/host.js +18 -0
- package/dist/pi/packages/ta-rooms/lib/i18n.d.ts +105 -0
- package/dist/pi/packages/ta-rooms/lib/i18n.js +211 -0
- package/dist/pi/packages/ta-rooms/lib/index.d.ts +9 -0
- package/dist/pi/packages/ta-rooms/lib/index.js +106 -0
- package/dist/pi/packages/ta-rooms/lib/members-view.d.ts +3 -0
- package/dist/pi/packages/ta-rooms/lib/members-view.js +94 -0
- package/dist/pi/packages/ta-rooms/lib/page.d.ts +154 -0
- package/dist/pi/packages/ta-rooms/lib/page.js +400 -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 +15 -0
- package/dist/pi/packages/ta-rooms/lib/room-view.js +168 -0
- package/dist/pi/packages/ta-rooms/lib/rooms-home.d.ts +32 -0
- package/dist/pi/packages/ta-rooms/lib/rooms-home.js +141 -0
- package/dist/pi/packages/ta-rooms/lib/rooms-page.d.ts +14 -0
- package/dist/pi/packages/ta-rooms/lib/rooms-page.js +217 -0
- package/dist/pi/packages/ta-rooms/lib/style.d.ts +4 -0
- package/dist/pi/packages/ta-rooms/lib/style.js +205 -0
- package/dist/pi/packages/ta-rooms/package.json +56 -0
- package/dist/pi/packages/ta-rooms/web/index.js +3165 -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 +78 -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 +117 -0
- package/dist/pi/packages/ta-share/package.json +56 -0
- package/dist/pi/packages/ta-share/web/index.js +1224 -0
- 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/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/editors.js +29 -2
- package/dist/pi/packages/ta-workspace/lib/i18n.d.ts +13 -2
- package/dist/pi/packages/ta-workspace/lib/i18n.js +29 -7
- package/dist/pi/packages/ta-workspace/lib/index.js +2 -0
- package/dist/pi/packages/ta-workspace/lib/preview.d.ts +10 -1
- package/dist/pi/packages/ta-workspace/lib/preview.js +136 -11
- package/dist/pi/packages/ta-workspace/lib/style.d.ts +1 -1
- package/dist/pi/packages/ta-workspace/lib/style.js +56 -40
- 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/preview.d.ts +27 -0
- package/dist/pi/packages/ta-workspace/lib/util/preview.js +74 -0
- 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 +823 -341
- package/dist/public/assets/OrbitControls-DVf70a7w.js +1 -0
- package/dist/public/assets/{abnfDiagram-S7VZAUFO-BmIko5tV.js → abnfDiagram-S7VZAUFO-BnqtcbpZ.js} +1 -1
- package/dist/public/assets/{architecture-WOLXFQ4H-XgsdQ7ul.js → architecture-WOLXFQ4H-BzPq1Ioe.js} +1 -1
- package/dist/public/assets/{architectureDiagram-YGSQEFNW--sVhMS03.js → architectureDiagram-YGSQEFNW-BsquO3a7.js} +1 -1
- package/dist/public/assets/{blockDiagram-APKKGZFW-8f9b-9k2.js → blockDiagram-APKKGZFW-BQNYOEP4.js} +1 -1
- package/dist/public/assets/{browser-DOHZ0JCf.js → browser-DS711n7Y.js} +1 -1
- package/dist/public/assets/{c4Diagram-KJ2TOQU5-CwYQ0Jfy.js → c4Diagram-KJ2TOQU5-D6e79Ycq.js} +1 -1
- package/dist/public/assets/{chunk-6MUBBAK2-7Y9ezehi.js → chunk-6MUBBAK2-B-sgaPoU.js} +1 -1
- package/dist/public/assets/{chunk-AXFCVDMN-CZIH4pWz.js → chunk-AXFCVDMN-D8pJKIg2.js} +1 -1
- package/dist/public/assets/{chunk-BG4553SI-DsNATY2m.js → chunk-BG4553SI-86TL-vCz.js} +1 -1
- package/dist/public/assets/{chunk-DQASFODM-CoXkfYE-.js → chunk-DQASFODM-CfUVuGjc.js} +1 -1
- package/dist/public/assets/{chunk-HFQBQIA3-C5OLqki8.js → chunk-HFQBQIA3-Drm0FEYk.js} +1 -1
- package/dist/public/assets/{chunk-KQLB2F66-DMHuYGEF.js → chunk-KQLB2F66-BVFRADlC.js} +1 -1
- package/dist/public/assets/{chunk-KS47KZWR-BKeOttO1.js → chunk-KS47KZWR-DfyALEmP.js} +1 -1
- package/dist/public/assets/{chunk-LEVMRMFU-D6zCwkk7.js → chunk-LEVMRMFU-DtJVzk2c.js} +1 -1
- package/dist/public/assets/{chunk-M57EVK23-B5-QqcZg.js → chunk-M57EVK23-DTy27PHQ.js} +1 -1
- package/dist/public/assets/{chunk-OY52VR5R-DQrq3n0T.js → chunk-OY52VR5R-nSgn7jZg.js} +1 -1
- package/dist/public/assets/{chunk-QB3YPZ4I-j6ZT7EDR.js → chunk-QB3YPZ4I-CkSxO_X6.js} +1 -1
- package/dist/public/assets/{chunk-R3KSYZAL-D5MXUO36.js → chunk-R3KSYZAL-Ck6iAjAL.js} +1 -1
- package/dist/public/assets/{chunk-STOXU5M4-DaBkw4dD.js → chunk-STOXU5M4-DQPHdSTh.js} +1 -1
- package/dist/public/assets/{chunk-TU62E6Q5-vXcRfGci.js → chunk-TU62E6Q5-Bc2AbV2Y.js} +1 -1
- package/dist/public/assets/{chunk-X4PVCEUW-CIh6H4Y2.js → chunk-X4PVCEUW-Cgpm0IXm.js} +1 -1
- package/dist/public/assets/{chunk-XXDRQBXY-C_Vwv1FM.js → chunk-XXDRQBXY-CGE4eLpg.js} +1 -1
- package/dist/public/assets/{classDiagram-v2-L25IHNXF-DccDWEJn.js → classDiagram-v2-L25IHNXF-4eQuDPEo.js} +1 -1
- package/dist/public/assets/{cose-bilkent-JH36ORCC-BX47lumZ.js → cose-bilkent-JH36ORCC-tDLCWq07.js} +1 -1
- package/dist/public/assets/cynefin-EF2NZ3EQ-Dd40W2Jh.js +1 -0
- package/dist/public/assets/{cynefinDiagram-L36ESFBY-BE6WOGxW.js → cynefinDiagram-L36ESFBY-ByqcZ8x9.js} +1 -1
- package/dist/public/assets/{d3-selection-ZcE6yRN5.js → d3-selection-Bgn1374-.js} +1 -1
- package/dist/public/assets/{dagre-SPEB5RXH-CE6SOOcN.js → dagre-SPEB5RXH-mCgr71mV.js} +1 -1
- package/dist/public/assets/{diagram-3B7GL73J-xC8VtiYL.js → diagram-3B7GL73J-DpYSwpQ0.js} +1 -1
- package/dist/public/assets/{diagram-DNEMPZML-4dmcBbjL.js → diagram-DNEMPZML-DMozUQzi.js} +1 -1
- package/dist/public/assets/{diagram-L3MUGCDN-D14Yn3sQ.js → diagram-L3MUGCDN-Bk5Uf8PD.js} +1 -1
- package/dist/public/assets/{diagram-LA4NIPWU-GxSXIhsK.js → diagram-LA4NIPWU-DFt5cPVK.js} +1 -1
- package/dist/public/assets/{diagram-MHCOC4E2-Cm7Prlpc.js → diagram-MHCOC4E2-BkZZcKqK.js} +1 -1
- package/dist/public/assets/{diagram-XPFHEONP-mkUnnKFu.js → diagram-XPFHEONP-HEY6kyyN.js} +1 -1
- package/dist/public/assets/{dist-acJS-BlA.js → dist-Bj2CrKn7.js} +1 -1
- package/dist/public/assets/{ebnfDiagram-UZSYDL2S-m77ua3UQ.js → ebnfDiagram-UZSYDL2S-D4JvYyVb.js} +1 -1
- package/dist/public/assets/{editor.api-CljTm-EQ.js → editor.api-BpJFzYbl.js} +1 -1
- package/dist/public/assets/{elk-XV6XMXQE-DsQY1hw9.js → elk-XV6XMXQE-CT6qLJkF.js} +1 -1
- package/dist/public/assets/{erDiagram-EYBAPDEH-CV8gJM0P.js → erDiagram-EYBAPDEH-BGng1goR.js} +1 -1
- package/dist/public/assets/{eventmodeling-K75KTNOO-C1pymbUr.js → eventmodeling-K75KTNOO-Tt8O-Q1Z.js} +1 -1
- package/dist/public/assets/flowDiagram-MALGAFMO-uFzenfA3.js +1 -0
- package/dist/public/assets/{freemarker2-DYJXaMHN.js → freemarker2-Dd5ksoRn.js} +1 -1
- package/dist/public/assets/{ganttDiagram-23REXITY-CppxOWRh.js → ganttDiagram-23REXITY-Jl8VO_g2.js} +1 -1
- package/dist/public/assets/gitGraph-VSP46ZUC-D28I_jUc.js +1 -0
- package/dist/public/assets/{gitGraphDiagram-STJD7YCW-CrQrZhcP.js → gitGraphDiagram-STJD7YCW-Be4qXALb.js} +1 -1
- package/dist/public/assets/{handlebars-DZCnH9e2.js → handlebars-4xabgUi4.js} +1 -1
- package/dist/public/assets/{html-DuzouNES.js → html-Dk3kt2w_.js} +1 -1
- package/dist/public/assets/{index-B7OYKvCE.js → index-Bx0c7eoh.js} +2 -2
- package/dist/public/assets/info-OHQRW6UA-5vIGEIq7.js +1 -0
- package/dist/public/assets/{infoDiagram-KBXO4MBG-6pby19tQ.js → infoDiagram-KBXO4MBG-Coc0tdwb.js} +1 -1
- package/dist/public/assets/{ishikawaDiagram-M35NCXHK-Duf8c8rQ.js → ishikawaDiagram-M35NCXHK-CE_1VQCg.js} +1 -1
- package/dist/public/assets/{javascript-2d_L6cVd.js → javascript-DKLGqy6v.js} +1 -1
- package/dist/public/assets/{journeyDiagram-OPLOXDXO-Dvv-xzNo.js → journeyDiagram-OPLOXDXO-CrolRZ_7.js} +1 -1
- package/dist/public/assets/{jsonMode-CFadYXyI.js → jsonMode-Chcs19_y.js} +1 -1
- package/dist/public/assets/{kanban-definition-BZKZHSQY-Dsk6F-TT.js → kanban-definition-BZKZHSQY-CjJj47De.js} +1 -1
- package/dist/public/assets/{liquid-Din4CF34.js → liquid-jff3p-Ji.js} +1 -1
- package/dist/public/assets/{mdx-DivDuCWI.js → mdx-DW4uRDfJ.js} +1 -1
- package/dist/public/assets/{mermaid-parser.core-BfCv4CYZ.js → mermaid-parser.core-XhQj6FvH.js} +3 -3
- package/dist/public/assets/{mermaid.core-DC20ZwJj.js → mermaid.core-OD4Atimg.js} +4 -4
- package/dist/public/assets/{mindmap-definition-I2QAS2VK-DRZRrJU_.js → mindmap-definition-I2QAS2VK-DpGelVY7.js} +1 -1
- package/dist/public/assets/module-CrD0OHQp.js +1 -0
- package/dist/public/assets/module-DEBMgdtf.js +2273 -0
- package/dist/public/assets/{monaco-D1d6MOPe.js → monaco-BTVZP-tU.js} +3 -3
- package/dist/public/assets/packet-JDAUHWVQ-CBxQ5Mzy.js +1 -0
- package/dist/public/assets/{pegDiagram-FD4XPPHP-DcGr3Tbk.js → pegDiagram-FD4XPPHP-CqcBmPfB.js} +1 -1
- package/dist/public/assets/phaser.esm-BxCDEWDb.js +3202 -0
- package/dist/public/assets/pie-XZMESJXO-DT5V3581.js +1 -0
- package/dist/public/assets/{pieDiagram-J4AKIIQI-GF7pu6ch.js → pieDiagram-J4AKIIQI-CRir3beB.js} +1 -1
- package/dist/public/assets/{python-BQbTTTT5.js → python-BwW_0207.js} +1 -1
- package/dist/public/assets/{quadrantDiagram-XTYBLID2-D-bcu7Ey.js → quadrantDiagram-XTYBLID2-DIY6gdcf.js} +1 -1
- package/dist/public/assets/radar-ABXABTNO-BAOovYEa.js +1 -0
- package/dist/public/assets/railroad-I3PHUGI6-RZ2Rnwzh.js +1 -0
- package/dist/public/assets/{railroad-abnf-LNEFI6M7-BiBHsI-K.js → railroad-abnf-LNEFI6M7-XWNOzunl.js} +1 -1
- package/dist/public/assets/{railroad-ebnf-DWYD2UWJ-zKjrfkHs.js → railroad-ebnf-DWYD2UWJ-CI0-j1Jz.js} +1 -1
- package/dist/public/assets/{railroad-peg-JR7BVNR7-DKuVn0GT.js → railroad-peg-JR7BVNR7-BVB_IaIG.js} +1 -1
- package/dist/public/assets/{railroadDiagram-MRQ6NCDL-Cyn-16mJ.js → railroadDiagram-MRQ6NCDL-CudwT6q2.js} +1 -1
- package/dist/public/assets/{razor-DiLk54O0.js → razor-DrjCyQqB.js} +1 -1
- package/dist/public/assets/{requirementDiagram-Y7LWUY3S-CwU2EBkW.js → requirementDiagram-Y7LWUY3S-CvRMeRqj.js} +1 -1
- package/dist/public/assets/{sankeyDiagram-WGJFYUXA-ajf00HyW.js → sankeyDiagram-WGJFYUXA-adxYCJKr.js} +1 -1
- package/dist/public/assets/{sequenceDiagram-5NDRBG5M-DiX_OIAw.js → sequenceDiagram-5NDRBG5M-lCRsoLUp.js} +1 -1
- package/dist/public/assets/{stateDiagram-v2-FJ4FJNEA-CV5bRqB7.js → stateDiagram-v2-FJ4FJNEA-DNst1BLg.js} +1 -1
- package/dist/public/assets/{swimlanes-UMQ2AFYF-BGQKSlj7.js → swimlanes-UMQ2AFYF-S_omrdvA.js} +1 -1
- package/dist/public/assets/swimlanesDiagram-OMPLPG4O-By5lnz4u.js +8 -0
- package/dist/public/assets/three.module-CeVBJVoU.js +4225 -0
- package/dist/public/assets/{timeline-definition-SEUHKTQE-DhQoApff.js → timeline-definition-SEUHKTQE-_pMGrTE-.js} +1 -1
- package/dist/public/assets/treeView-D4JQ5SDB-Cyb9N8KY.js +1 -0
- package/dist/public/assets/treemap-SAJKECNS-BkMo57pG.js +1 -0
- package/dist/public/assets/{typescript-COQ1g-up.js → typescript-0-z_OYCU.js} +1 -1
- package/dist/public/assets/{usecaseDiagram-AFA6YXN4-CmLFzjie.js → usecaseDiagram-AFA6YXN4-B2oJKi5Q.js} +1 -1
- package/dist/public/assets/{vennDiagram-NNMJR3RB-DOa6JR5K.js → vennDiagram-NNMJR3RB-inPs2Kkr.js} +1 -1
- package/dist/public/assets/wardley-7MLQ67FV-CSt-uQ-Y.js +1 -0
- package/dist/public/assets/{wardleyDiagram-S7YFUSEH-BV7EEShp.js → wardleyDiagram-S7YFUSEH-DNhNHM7b.js} +1 -1
- package/dist/public/assets/{xml-BbvtjuaG.js → xml-BXPxQzKF.js} +1 -1
- package/dist/public/assets/{xychartDiagram-GGNKY7IX-DtMpPbsq.js → xychartDiagram-GGNKY7IX-DJc93dNT.js} +1 -1
- package/dist/public/assets/{yaml-Bw8NFga9.js → yaml-CGmD9Rya.js} +1 -1
- package/dist/public/index.html +1 -1
- package/dist/serve/index.mjs +6664 -2480
- package/package.json +32 -25
- package/dist/public/assets/cynefin-EF2NZ3EQ-MaI-3dMQ.js +0 -1
- package/dist/public/assets/flowDiagram-MALGAFMO-shBnAQFk.js +0 -1
- package/dist/public/assets/gitGraph-VSP46ZUC-BtQWboBz.js +0 -1
- package/dist/public/assets/info-OHQRW6UA-CDSLjba_.js +0 -1
- package/dist/public/assets/module-BAQaY56j.js +0 -1
- package/dist/public/assets/module-DxRGg3ED.js +0 -1947
- package/dist/public/assets/packet-JDAUHWVQ-dYb4P9eU.js +0 -1
- package/dist/public/assets/pie-XZMESJXO-CIompBnc.js +0 -1
- package/dist/public/assets/radar-ABXABTNO-DiJl7BtK.js +0 -1
- package/dist/public/assets/railroad-I3PHUGI6-B5cRBukM.js +0 -1
- package/dist/public/assets/swimlanesDiagram-OMPLPG4O-DxXlavVT.js +0 -8
- package/dist/public/assets/treeView-D4JQ5SDB-BOP6mkZC.js +0 -1
- package/dist/public/assets/treemap-SAJKECNS-BJxuPMz3.js +0 -1
- package/dist/public/assets/wardley-7MLQ67FV-jqlowjVL.js +0 -1
|
@@ -4,7 +4,7 @@ A pi package that comes with Ta: the workspace of the conversation shown, in the
|
|
|
4
4
|
|
|
5
5
|
| View | What it does |
|
|
6
6
|
| --- | --- |
|
|
7
|
-
| Explorer | The files of the conversation's directory, with the file icons of VS Code, the colors and letters of git (folders take the change inside them, ignored files are dimmed) and indent guides; it follows the tab shown. As VS Code's default `files.exclude`, it hides `.git`, `.svn`, `.hg`, `.DS_Store` and `Thumbs.db` (`TaExcludedFiles`); the eye of its header shows them, kept for the user in every browser. A click opens a file as a preview tab (the next preview takes its place), a double click keeps it: Markdown, HTML, images, videos, sounds and PDFs as a preview, the rest in Monaco (`pi.ui.CodeEditor`), saved with Ctrl+S or Cmd+S. New file and folder (`a/b.ts` makes the folders), rename and delete in place, with the checks of VS Code on names; a context menu with copy path and relative path, find in folder, upload files or a folder, and download (a folder as a zip made in the page); in Ta Desktop, reveal in Finder (File Explorer on Windows, the file manager on Linux) for directories of this machine (`pi.ui.desktop`). Drag an item onto a folder to move it there (a closed folder opens while it is held over it), files or folders of the system onto the tree to upload them, and an item onto the message box (an `@` reference) or a terminal (its path) (`pi.ui.fileDrag`); the keys of a tree (arrows, Home/End, F2 or Enter on a Mac, Delete) |
|
|
7
|
+
| Explorer | The files of the conversation's directory, with the file icons of VS Code, the colors and letters of git (folders take the change inside them, ignored files are dimmed) and indent guides; it follows the tab shown. As VS Code's default `files.exclude`, it hides `.git`, `.svn`, `.hg`, `.DS_Store` and `Thumbs.db` (`TaExcludedFiles`); the eye of its header shows them, kept for the user in every browser. A click opens a file as a preview tab (the next preview takes its place), a double click keeps it: Markdown, HTML, images, videos, sounds and PDFs as a preview (a picture zooms as in a viewer of pictures, and ← → or the buttons at its sides go through the pictures of its folder in the same preview tab, "2 / 5" above it), the rest in Monaco (`pi.ui.CodeEditor`), saved with Ctrl+S or Cmd+S. New file and folder (`a/b.ts` makes the folders), rename and delete in place, with the checks of VS Code on names; a context menu with copy path and relative path, find in folder, upload files or a folder, and download (a folder as a zip made in the page); in Ta Desktop, reveal in Finder (File Explorer on Windows, the file manager on Linux) for directories of this machine (`pi.ui.desktop`). Drag an item onto a folder to move it there (a closed folder opens while it is held over it), files or folders of the system onto the tree to upload them, and an item onto the message box (an `@` reference) or a terminal (its path) (`pi.ui.fileDrag`); the keys of a tree (arrows, Home/End, F2 or Enter on a Mac, Delete) |
|
|
8
8
|
| Open files | The tabs of files and changes this package opened, the one shown marked; close, close others, close below, reveal in the explorer |
|
|
9
9
|
| Search | Text in the files (ripgrep, git grep or grep, whichever the machine has): match case, whole word, a regular expression (its error shown), files to include and to exclude (globs separated by commas, a folder takes all inside it); each match of a line is a result, which opens the file selected on it. Replace one, in a file or all (with `$1` for a group), the change shown on each result; dismiss results (a file or a folder); collapse and expand all; the results as a list or a tree of folders |
|
|
10
10
|
| Source control | The branch with what it is ahead and behind, a box for the commit message (Ctrl+Enter or Cmd+Enter; with nothing staged it offers to stage all), merge changes, staged changes and changes, as a list or a tree; stage, unstage and discard a file or a group (discarding asks; for an untracked file it deletes), pull, push and fetch. A change opens in Monaco's diff editor, side by side or inline, the unchanged lines folded; a change not staged can be edited there and saved |
|
|
@@ -4,7 +4,7 @@ Ta 自带的 pi 包:`ta serve` 的 web 客户端中会话的工作区,以 ID
|
|
|
4
4
|
|
|
5
5
|
| 视图 | 功能 |
|
|
6
6
|
| --- | --- |
|
|
7
|
-
| 资源管理器 | 会话目录的文件,带有 VS Code 的文件图标、git 的颜色和字母(文件夹显示其内部的更改,被忽略的文件变暗)并缩进指南;它遵循显示的标签页。和 VS Code 默认的 `files.exclude` 一样,它隐藏 `.git`、`.svn`、`.hg`、`.DS_Store` 和 `Thumbs.db`(`TaExcludedFiles`);顶栏的眼睛按钮可以显示它们,这个选择按用户保存,在每个浏览器里都一样。单击打开文件作为预览标签页(下一个预览替换它),双击保留它:Markdown、HTML、图像、视频、声音和 PDF
|
|
7
|
+
| 资源管理器 | 会话目录的文件,带有 VS Code 的文件图标、git 的颜色和字母(文件夹显示其内部的更改,被忽略的文件变暗)并缩进指南;它遵循显示的标签页。和 VS Code 默认的 `files.exclude` 一样,它隐藏 `.git`、`.svn`、`.hg`、`.DS_Store` 和 `Thumbs.db`(`TaExcludedFiles`);顶栏的眼睛按钮可以显示它们,这个选择按用户保存,在每个浏览器里都一样。单击打开文件作为预览标签页(下一个预览替换它),双击保留它:Markdown、HTML、图像、视频、声音和 PDF 作为预览(图片可以像看图软件一样缩放,← → 或两侧按钮在同一个预览标签里切换同目录的图片,上方显示"2 / 5"),其余的在 Monaco(`pi.ui.CodeEditor`)中,用 Ctrl+S 或 Cmd+S 保存。新建文件和文件夹(`a/b.ts` 创建文件夹)、就地重命名和删除,带有 VS Code 的名称检查;右键菜单有复制路径和相对路径、在文件夹中查找、上传文件或文件夹、下载(文件夹在页面里打包成 zip);在 Ta 桌面版里,本机目录还可以在 Finder 中显示(Windows 上是文件资源管理器,Linux 上是文件管理器,`pi.ui.desktop`)。把一项拖到文件夹上即移到那里(悬停在关着的文件夹上会展开),把系统里的文件或文件夹拖进树里即上传,拖到输入框成为 `@` 引用、拖到终端输入它的路径(`pi.ui.fileDrag`);树的按键(箭头、Home/End、F2 或 Mac 上的 Enter、Delete) |
|
|
8
8
|
| 打开的文件 | 此包打开的文件和更改的标签页,显示的被标记;关闭、关闭其他、关闭下方、在资源管理器中显示 |
|
|
9
9
|
| 搜索 | 文件中的文本(ripgrep、git grep 或 grep,机器有哪个就用哪个):匹配大小写、全词、正则表达式(其错误显示)、要包含和排除的文件(逗号分隔的 glob,一个文件夹包含其内部所有文件);一行的每个匹配都是一个结果,在它上面打开选中的文件。替换一个、在一个文件中或全部(用 `$1` 表示组),变更显示在每个结果上;关闭结果(一个文件或文件夹);全部折叠和展开;结果作为列表或文件夹树 |
|
|
10
10
|
| 源代码管理 | 分支及其领先和落后的情况,提交消息的框(Ctrl+Enter 或 Cmd+Enter;没有暂存任何东西时提供暂存全部),合并变更、暂存的变更和变更,作为列表或树;暂存、取消暂存和放弃一个文件或组(放弃询问;对于未跟踪的文件它删除)、拉取、推送和获取。不暂存的变更在 Monaco 的 diff 编辑器中打开,并排或内联,未更改的行折叠;不暂存的变更可以在那里编辑并保存 |
|
|
@@ -30,7 +30,7 @@ export interface BrowserBarProps {
|
|
|
30
30
|
}
|
|
31
31
|
/** The bar of the browser: back, forward, reload or stop, the address, the start page, out of Ta. */
|
|
32
32
|
export declare function BrowserBar(props: BrowserBarProps): import("react").JSX.Element;
|
|
33
|
-
/** The start page:
|
|
33
|
+
/** The start page: the sites opened lately (the ports dev servers take, before any), `extra` and `foot` quiet at the bottom. */
|
|
34
34
|
export declare function Home({ onOpen, foot, extra }: {
|
|
35
35
|
onOpen(url: string): void;
|
|
36
36
|
foot?: string;
|
|
@@ -61,15 +61,14 @@ var Recent;
|
|
|
61
61
|
})(Recent || (exports.Recent = Recent = {}));
|
|
62
62
|
/** Addresses to try on an empty start page: the ports dev servers take by default. */
|
|
63
63
|
const SUGGESTIONS = ['localhost:5173', 'localhost:3000', 'localhost:8080'];
|
|
64
|
-
/** The
|
|
65
|
-
function
|
|
64
|
+
/** The host of an address, and where its icon would be. */
|
|
65
|
+
function siteOf(url) {
|
|
66
66
|
try {
|
|
67
67
|
const parsed = new URL(url);
|
|
68
|
-
|
|
69
|
-
return { host: parsed.host || url, rest };
|
|
68
|
+
return { host: parsed.host || url, icon: parsed.host ? `${parsed.origin}/favicon.ico` : undefined };
|
|
70
69
|
}
|
|
71
70
|
catch (_a) {
|
|
72
|
-
return { host: url
|
|
71
|
+
return { host: url };
|
|
73
72
|
}
|
|
74
73
|
}
|
|
75
74
|
/** The icon of the address: the page loading, its own icon when it gave one, else a globe. */
|
|
@@ -120,33 +119,33 @@ function BrowserBar(props) {
|
|
|
120
119
|
react_1.React.createElement(common_1.Action, { icon: "ExternalLink", label: props.outsideLabel, disabled: !props.onOpenOutside, onClick: () => { var _a; return (_a = props.onOpenOutside) === null || _a === void 0 ? void 0 : _a.call(props); } }),
|
|
121
120
|
loading ? react_1.React.createElement("span", { className: "taw-browser-loading" }) : undefined));
|
|
122
121
|
}
|
|
123
|
-
/**
|
|
122
|
+
/** A site of the start page: its icon, else a letter or, for a server on this machine, a server; its host under it. */
|
|
123
|
+
function Site({ address, onOpen, onRemove }) {
|
|
124
|
+
const { host, icon } = siteOf(address);
|
|
125
|
+
const name = host.replace(/^www\./, '');
|
|
126
|
+
const local = workspace_1.WorkspaceUtil.localPort(address) !== undefined;
|
|
127
|
+
const [broken, setBroken] = react_1.React.useState(local || !icon);
|
|
128
|
+
// One of the nine tints of the theme (--ta-tint-<n>), by its name.
|
|
129
|
+
let index = 0;
|
|
130
|
+
for (const char of name) {
|
|
131
|
+
index = (index * 31 + char.charCodeAt(0)) % 9;
|
|
132
|
+
}
|
|
133
|
+
return (react_1.React.createElement("div", { className: "taw-browser-site" },
|
|
134
|
+
react_1.React.createElement("button", { type: "button", className: "taw-browser-site-main", title: address, onClick: () => onOpen(address) },
|
|
135
|
+
react_1.React.createElement("span", { className: "taw-browser-tile", style: local ? undefined : { '--taw-tint': `var(--ta-tint-${index})`, '--taw-ink': `var(--ta-tint-ink-${index})` } }, broken ? (local ? (react_1.React.createElement(common_1.Glyph, { name: "Server", size: 18 })) : (name.charAt(0).toUpperCase())) : (react_1.React.createElement("img", { src: icon, alt: "", referrerPolicy: "no-referrer", onError: () => setBroken(true) }))),
|
|
136
|
+
react_1.React.createElement("span", { className: "taw-browser-host" }, name)),
|
|
137
|
+
onRemove ? (react_1.React.createElement("button", { type: "button", className: "taw-action taw-browser-remove", title: (0, i18n_1.t)('removeRecent'), "aria-label": (0, i18n_1.t)('removeRecent'), onClick: onRemove },
|
|
138
|
+
react_1.React.createElement(common_1.Glyph, { name: "X", size: 11 }))) : undefined));
|
|
139
|
+
}
|
|
140
|
+
/** The start page: the sites opened lately (the ports dev servers take, before any), `extra` and `foot` quiet at the bottom. */
|
|
124
141
|
function Home({ onOpen, foot, extra }) {
|
|
125
142
|
const recent = react_1.React.useSyncExternalStore(Recent.subscribe, Recent.all);
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
react_1.React.createElement("
|
|
132
|
-
recent.length === 0 ? (react_1.React.createElement("div", { className: "taw-browser-chips" }, SUGGESTIONS.map(address => (react_1.React.createElement("button", { type: "button", key: address, className: "taw-browser-chip", onClick: () => onOpen(`http://${address}`) }, address))))) : undefined,
|
|
133
|
-
extra),
|
|
134
|
-
recent.length > 0 ? (react_1.React.createElement("section", { className: "taw-browser-recent" },
|
|
135
|
-
react_1.React.createElement("h3", { className: "taw-browser-heading" }, (0, i18n_1.t)('recent')),
|
|
136
|
-
recent.map(address => {
|
|
137
|
-
const { host, rest } = parts(address);
|
|
138
|
-
return (react_1.React.createElement("div", { key: address, className: "taw-browser-site" },
|
|
139
|
-
react_1.React.createElement("button", { type: "button", className: "taw-browser-site-main", title: address, onClick: () => onOpen(address) },
|
|
140
|
-
react_1.React.createElement("span", { className: "taw-browser-letter" }, host
|
|
141
|
-
.replace(/^www\./, '')
|
|
142
|
-
.charAt(0)
|
|
143
|
-
.toUpperCase()),
|
|
144
|
-
react_1.React.createElement("span", { className: "taw-browser-host" }, host),
|
|
145
|
-
react_1.React.createElement("span", { className: "taw-browser-path" }, rest)),
|
|
146
|
-
react_1.React.createElement("button", { type: "button", className: "taw-action taw-browser-remove", title: (0, i18n_1.t)('removeRecent'), "aria-label": (0, i18n_1.t)('removeRecent'), onClick: () => Recent.remove(address) },
|
|
147
|
-
react_1.React.createElement(common_1.Glyph, { name: "X", size: 13 }))));
|
|
148
|
-
}))) : undefined,
|
|
149
|
-
foot ? react_1.React.createElement("p", { className: "taw-browser-foot" }, foot) : undefined));
|
|
143
|
+
const sites = recent.length > 0 ? recent : SUGGESTIONS.map(address => `http://${address}`);
|
|
144
|
+
return (react_1.React.createElement("div", { className: "taw-browser-home" },
|
|
145
|
+
react_1.React.createElement("nav", { className: "taw-browser-sites", "aria-label": (0, i18n_1.t)('recent') }, sites.map(address => (react_1.React.createElement(Site, { key: address, address: address, onOpen: onOpen, onRemove: recent.length > 0 ? () => Recent.remove(address) : undefined })))),
|
|
146
|
+
extra || foot ? (react_1.React.createElement("footer", { className: "taw-browser-foot" },
|
|
147
|
+
extra,
|
|
148
|
+
foot ? react_1.React.createElement("span", null, foot) : undefined)) : undefined));
|
|
150
149
|
}
|
|
151
150
|
/** A page to show, from a link of a reply. */
|
|
152
151
|
exports.ShowPage = new host_1.Channel();
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { WebExtensionAPI, WebToolLine } from '@celljs/ta-web/lib/browser/extension/web-extension-api';
|
|
2
|
+
import type { t } from './i18n';
|
|
3
|
+
type Key = Parameters<typeof t>[0];
|
|
4
|
+
/** How a call of the browser tool reads in a conversation: what it does in the page, and on what. */
|
|
5
|
+
export declare namespace BrowserToolLine {
|
|
6
|
+
function renderCall(args: Record<string, unknown>, words: (key: Key) => string): WebToolLine;
|
|
7
|
+
/**
|
|
8
|
+
* Wherever the page runs, not only where the tool does (Ta Desktop): a phone shows the calls of a
|
|
9
|
+
* conversation that worked the browser on the computer too. On a Ta app built before registerToolRenderer,
|
|
10
|
+
* they read as the tool's name.
|
|
11
|
+
*/
|
|
12
|
+
function register(pi: WebExtensionAPI, words: (key: Key) => string): void;
|
|
13
|
+
}
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=browser-tool-line.d.ts.map
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BrowserToolLine = void 0;
|
|
4
|
+
const browser_agent_1 = require("./browser-agent");
|
|
5
|
+
const VERBS = {
|
|
6
|
+
navigate: 'agentNavigate',
|
|
7
|
+
back: 'agentBack',
|
|
8
|
+
forward: 'agentForward',
|
|
9
|
+
reload: 'agentReload',
|
|
10
|
+
snapshot: 'agentSnapshot',
|
|
11
|
+
click: 'agentClick',
|
|
12
|
+
type: 'agentType',
|
|
13
|
+
press: 'agentPress',
|
|
14
|
+
scroll: 'agentScroll',
|
|
15
|
+
screenshot: 'agentScreenshot',
|
|
16
|
+
evaluate: 'agentEvaluate',
|
|
17
|
+
wait: 'agentWait',
|
|
18
|
+
cdp: 'agentCdp',
|
|
19
|
+
};
|
|
20
|
+
function text(value) {
|
|
21
|
+
return typeof value === 'string' ? value.trim() : '';
|
|
22
|
+
}
|
|
23
|
+
/** An element of the last snapshot, `[12]`, or a point of the screenshot. */
|
|
24
|
+
function at(args) {
|
|
25
|
+
if (typeof args.ref === 'number') {
|
|
26
|
+
return `[${args.ref}]`;
|
|
27
|
+
}
|
|
28
|
+
return typeof args.x === 'number' && typeof args.y === 'number' ? `${Math.round(args.x)}, ${Math.round(args.y)}` : '';
|
|
29
|
+
}
|
|
30
|
+
/** How a call of the browser tool reads in a conversation: what it does in the page, and on what. */
|
|
31
|
+
var BrowserToolLine;
|
|
32
|
+
(function (BrowserToolLine) {
|
|
33
|
+
function renderCall(args, words) {
|
|
34
|
+
var _a;
|
|
35
|
+
const action = text(args.action);
|
|
36
|
+
const verb = words((_a = VERBS[action]) !== null && _a !== void 0 ? _a : 'browser');
|
|
37
|
+
switch (action) {
|
|
38
|
+
case 'navigate':
|
|
39
|
+
return { verb, target: text(args.url) };
|
|
40
|
+
case 'click':
|
|
41
|
+
return { verb, target: at(args) };
|
|
42
|
+
case 'type':
|
|
43
|
+
return { verb, target: [at(args), text(args.text)].filter(Boolean).join(' ') };
|
|
44
|
+
case 'press':
|
|
45
|
+
return { verb, target: text(args.key), code: true };
|
|
46
|
+
case 'scroll':
|
|
47
|
+
return { verb, target: at(args) || (args.direction === 'up' ? '↑' : args.direction === 'down' ? '↓' : '') };
|
|
48
|
+
case 'evaluate':
|
|
49
|
+
return { verb, target: text(args.expression).split('\n')[0], code: true };
|
|
50
|
+
case 'wait':
|
|
51
|
+
return { verb, target: text(args.text) || (typeof args.ms === 'number' ? `${args.ms} ms` : '') };
|
|
52
|
+
case 'cdp':
|
|
53
|
+
return { verb, target: text(args.method), code: true };
|
|
54
|
+
default:
|
|
55
|
+
return { verb };
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
BrowserToolLine.renderCall = renderCall;
|
|
59
|
+
/**
|
|
60
|
+
* Wherever the page runs, not only where the tool does (Ta Desktop): a phone shows the calls of a
|
|
61
|
+
* conversation that worked the browser on the computer too. On a Ta app built before registerToolRenderer,
|
|
62
|
+
* they read as the tool's name.
|
|
63
|
+
*/
|
|
64
|
+
function register(pi, words) {
|
|
65
|
+
var _a;
|
|
66
|
+
(_a = pi.registerToolRenderer) === null || _a === void 0 ? void 0 : _a.call(pi, (name, next) => (name === browser_agent_1.AgentBrowser.TOOL.name ? { renderCall: args => renderCall(args, words) } : next()));
|
|
67
|
+
}
|
|
68
|
+
BrowserToolLine.register = register;
|
|
69
|
+
})(BrowserToolLine || (exports.BrowserToolLine = BrowserToolLine = {}));
|
|
70
|
+
//# sourceMappingURL=browser-tool-line.js.map
|
|
@@ -160,9 +160,22 @@ function closeEditor(id) {
|
|
|
160
160
|
function Message({ children, tone }) {
|
|
161
161
|
return react_1.React.createElement("div", { className: `taw-message ${tone === 'error' ? 'taw-error' : ''}` }, children);
|
|
162
162
|
}
|
|
163
|
+
/**
|
|
164
|
+
* Where the file is, as the breadcrumbs of an editor: its directories, then its icon and name. Short of room,
|
|
165
|
+
* the directories give way first; the whole path is the title.
|
|
166
|
+
*/
|
|
163
167
|
function Header({ path, extra }) {
|
|
168
|
+
var _a;
|
|
169
|
+
const parts = path.split(/[\\/]/).filter(Boolean);
|
|
170
|
+
const name = (_a = parts.pop()) !== null && _a !== void 0 ? _a : path;
|
|
164
171
|
return (react_1.React.createElement("header", { className: "taw-editor-head" },
|
|
165
|
-
react_1.React.createElement("span", { className: "taw-
|
|
172
|
+
react_1.React.createElement("span", { className: "taw-crumbs", title: path },
|
|
173
|
+
parts.map((part, index) => (react_1.React.createElement(react_1.React.Fragment, { key: index },
|
|
174
|
+
react_1.React.createElement("span", { className: "taw-crumb" }, part),
|
|
175
|
+
react_1.React.createElement(common_1.Glyph, { name: "ChevronRight", size: 12 })))),
|
|
176
|
+
react_1.React.createElement("span", { className: "taw-crumb taw-crumb-file" },
|
|
177
|
+
react_1.React.createElement(file_icon_1.FileIcon, { path: name, size: 14 }),
|
|
178
|
+
react_1.React.createElement("span", null, name))),
|
|
166
179
|
extra));
|
|
167
180
|
}
|
|
168
181
|
/** The ETag and the size of the file at `url`, read again when the agent may have changed files. */
|
|
@@ -223,6 +236,16 @@ function FileEditor({ id, cwd, path }) {
|
|
|
223
236
|
const media = !byUrl && !!kind && kind !== 'markdown' && kind !== 'html';
|
|
224
237
|
const bytes = (0, bytes_1.useFileBytesUrl)(media ? url.value : undefined, changed);
|
|
225
238
|
const [info, setInfo] = react_1.React.useState();
|
|
239
|
+
// The pictures of its folder: ← → and the side buttons go through them, each in the preview tab.
|
|
240
|
+
const pictures = (0, host_1.useLoad)(async () => (kind === 'image' ? preview_2.PreviewUtil.siblings(await host_1.pi.workspace.listDirectory(workspace_1.WorkspaceUtil.dirname(path), cwd), path) : undefined), [cwd, path, changed]);
|
|
241
|
+
const siblings = pictures.value;
|
|
242
|
+
const browsedAt = (0, preview_1.useBrowsedTo)(id);
|
|
243
|
+
const showPicture = (to) => to === undefined
|
|
244
|
+
? undefined
|
|
245
|
+
: () => {
|
|
246
|
+
(0, preview_1.browsePicture)(fileId(cwd, to));
|
|
247
|
+
openFile(cwd, to, undefined, { preview: true });
|
|
248
|
+
};
|
|
226
249
|
/** The user's text while it differs from the file's; undefined when they are the same. */
|
|
227
250
|
const [draft, setDraft] = react_1.React.useState();
|
|
228
251
|
/** The file's text when the user started changing it: another one means the file changed meanwhile. */
|
|
@@ -273,6 +296,10 @@ function FileEditor({ id, cwd, path }) {
|
|
|
273
296
|
const readOnly = !!((_c = file.value) === null || _c === void 0 ? void 0 : _c.truncated);
|
|
274
297
|
const showPreview = !!kind && (mode === 'preview' || !textual);
|
|
275
298
|
const extra = (react_1.React.createElement("div", { className: "taw-editor-tools" },
|
|
299
|
+
showPreview && siblings && (react_1.React.createElement("span", { className: "taw-note" },
|
|
300
|
+
siblings.index + 1,
|
|
301
|
+
" / ",
|
|
302
|
+
siblings.count)),
|
|
276
303
|
showPreview && info && react_1.React.createElement("span", { className: "taw-note" }, info),
|
|
277
304
|
!showPreview && readOnly && react_1.React.createElement("span", { className: "taw-note" }, (0, i18n_1.t)('truncated')),
|
|
278
305
|
!showPreview && dirty && base !== undefined && base !== text && (react_1.React.createElement("span", { className: "taw-note taw-warning" },
|
|
@@ -290,7 +317,7 @@ function FileEditor({ id, cwd, path }) {
|
|
|
290
317
|
react_1.React.createElement(Header, { path: path, extra: extra }),
|
|
291
318
|
showPreview && fileUrl && kind === 'markdown' && react_1.React.createElement(preview_1.MarkdownPreview, { text: (_f = draft !== null && draft !== void 0 ? draft : text) !== null && _f !== void 0 ? _f : '', url: fileUrl }),
|
|
292
319
|
showPreview && kind === 'html' && react_1.React.createElement(preview_1.PagePreview, { url: byUrl ? fileUrl : undefined, text: (_g = draft !== null && draft !== void 0 ? draft : text) !== null && _g !== void 0 ? _g : '' }),
|
|
293
|
-
showPreview && kind && kind !== 'markdown' && kind !== 'html' && shownUrl && (react_1.React.createElement(preview_1.MediaPreview, { key: shownUrl, kind: kind, url: shownUrl, size: (_k = (_j = (_h = (_d = file.value) === null || _d === void 0 ? void 0 : _d.size) !== null && _h !== void 0 ? _h : bytes.size) !== null && _j !== void 0 ? _j : size) !== null && _k !== void 0 ? _k : 0, onInfo: setInfo })),
|
|
320
|
+
showPreview && kind && kind !== 'markdown' && kind !== 'html' && shownUrl && (react_1.React.createElement(preview_1.MediaPreview, { key: shownUrl, kind: kind, url: shownUrl, size: (_k = (_j = (_h = (_d = file.value) === null || _d === void 0 ? void 0 : _d.size) !== null && _h !== void 0 ? _h : bytes.size) !== null && _j !== void 0 ? _j : size) !== null && _k !== void 0 ? _k : 0, onInfo: setInfo, previous: showPicture(siblings === null || siblings === void 0 ? void 0 : siblings.previous), next: showPicture(siblings === null || siblings === void 0 ? void 0 : siblings.next), browsedAt: browsedAt })),
|
|
294
321
|
showPreview && kind && kind !== 'markdown' && kind !== 'html' && !shownUrl && (react_1.React.createElement(Message, { tone: bytes.error ? 'error' : undefined }, (_l = bytes.error) !== null && _l !== void 0 ? _l : (0, i18n_1.t)('loading'))),
|
|
295
322
|
!showPreview && (react_1.React.createElement(host_1.pi.ui.CodeEditor, { path: path, value: (_m = draft !== null && draft !== void 0 ? draft : text) !== null && _m !== void 0 ? _m : '', readOnly: readOnly, line: target === null || target === void 0 ? void 0 : target.line, column: target === null || target === void 0 ? void 0 : target.column, endColumn: target === null || target === void 0 ? void 0 : target.endColumn, selection: (target === null || target === void 0 ? void 0 : target.endLine)
|
|
296
323
|
? { startLine: target.line, startColumn: target.column, endLine: target.endLine, endColumn: target.endColumn }
|
|
@@ -112,6 +112,19 @@ declare const ZH: {
|
|
|
112
112
|
scm: string;
|
|
113
113
|
terminal: string;
|
|
114
114
|
browser: string;
|
|
115
|
+
agentNavigate: string;
|
|
116
|
+
agentBack: string;
|
|
117
|
+
agentForward: string;
|
|
118
|
+
agentReload: string;
|
|
119
|
+
agentSnapshot: string;
|
|
120
|
+
agentClick: string;
|
|
121
|
+
agentType: string;
|
|
122
|
+
agentPress: string;
|
|
123
|
+
agentScroll: string;
|
|
124
|
+
agentScreenshot: string;
|
|
125
|
+
agentEvaluate: string;
|
|
126
|
+
agentWait: string;
|
|
127
|
+
agentCdp: string;
|
|
115
128
|
refresh: string;
|
|
116
129
|
collapseAll: string;
|
|
117
130
|
showExcluded: string;
|
|
@@ -152,8 +165,6 @@ declare const ZH: {
|
|
|
152
165
|
forward: string;
|
|
153
166
|
openExternal: string;
|
|
154
167
|
recent: string;
|
|
155
|
-
browserTitle: string;
|
|
156
|
-
browserHint: string;
|
|
157
168
|
home: string;
|
|
158
169
|
removeRecent: string;
|
|
159
170
|
frameHint: string;
|
|
@@ -118,6 +118,19 @@ const ZH = {
|
|
|
118
118
|
scm: '源代码管理',
|
|
119
119
|
terminal: '终端',
|
|
120
120
|
browser: '浏览器',
|
|
121
|
+
agentNavigate: '打开网页',
|
|
122
|
+
agentBack: '网页后退',
|
|
123
|
+
agentForward: '网页前进',
|
|
124
|
+
agentReload: '刷新网页',
|
|
125
|
+
agentSnapshot: '读取网页',
|
|
126
|
+
agentClick: '点击',
|
|
127
|
+
agentType: '输入',
|
|
128
|
+
agentPress: '按键',
|
|
129
|
+
agentScroll: '滚动网页',
|
|
130
|
+
agentScreenshot: '网页截图',
|
|
131
|
+
agentEvaluate: '在网页里运行',
|
|
132
|
+
agentWait: '等待网页',
|
|
133
|
+
agentCdp: '调试网页',
|
|
121
134
|
refresh: '刷新',
|
|
122
135
|
collapseAll: '全部折叠',
|
|
123
136
|
showExcluded: '显示默认隐藏的文件(.git、.DS_Store 等)',
|
|
@@ -158,18 +171,16 @@ const ZH = {
|
|
|
158
171
|
forward: '前进',
|
|
159
172
|
openExternal: '在新窗口打开',
|
|
160
173
|
recent: '最近访问',
|
|
161
|
-
browserTitle: '在这里打开网页',
|
|
162
|
-
browserHint: '输入网址或搜索,也可以打开本机的开发服务器。',
|
|
163
174
|
home: '起始页',
|
|
164
175
|
removeRecent: '从最近访问中移除',
|
|
165
|
-
frameHint: '
|
|
176
|
+
frameHint: '页面空白时,可在新窗口打开',
|
|
166
177
|
stop: '停止',
|
|
167
178
|
openBrowser: '在默认浏览器中打开',
|
|
168
179
|
loadFailed: '无法打开这个网页',
|
|
169
180
|
pageCrashed: '这个网页崩溃了',
|
|
170
181
|
retry: '重试',
|
|
171
182
|
agentDriving: 'Ta 正在操作',
|
|
172
|
-
importSignIns: '
|
|
183
|
+
importSignIns: '导入浏览器登录状态',
|
|
173
184
|
importTitle: '导入登录状态',
|
|
174
185
|
importHint: '把所选浏览器的 Cookie 复制到这里,你和 Agent 都能直接使用已登录的网站。不导入密码和浏览记录。',
|
|
175
186
|
importFrom: '从哪个浏览器导入',
|
|
@@ -313,6 +324,19 @@ const EN = {
|
|
|
313
324
|
scm: 'Source control',
|
|
314
325
|
terminal: 'Terminal',
|
|
315
326
|
browser: 'Browser',
|
|
327
|
+
agentNavigate: 'Open',
|
|
328
|
+
agentBack: 'Go back',
|
|
329
|
+
agentForward: 'Go forward',
|
|
330
|
+
agentReload: 'Reload the page',
|
|
331
|
+
agentSnapshot: 'Read the page',
|
|
332
|
+
agentClick: 'Click',
|
|
333
|
+
agentType: 'Type',
|
|
334
|
+
agentPress: 'Press',
|
|
335
|
+
agentScroll: 'Scroll the page',
|
|
336
|
+
agentScreenshot: 'Screenshot the page',
|
|
337
|
+
agentEvaluate: 'Run in the page',
|
|
338
|
+
agentWait: 'Wait for the page',
|
|
339
|
+
agentCdp: 'Debug the page',
|
|
316
340
|
refresh: 'Refresh',
|
|
317
341
|
collapseAll: 'Collapse all',
|
|
318
342
|
showExcluded: 'Show files hidden by default (.git, .DS_Store…)',
|
|
@@ -353,11 +377,9 @@ const EN = {
|
|
|
353
377
|
forward: 'Forward',
|
|
354
378
|
openExternal: 'Open in a new window',
|
|
355
379
|
recent: 'Recent',
|
|
356
|
-
browserTitle: 'Open a page here',
|
|
357
|
-
browserHint: 'Enter an address or search, or open a dev server on this machine.',
|
|
358
380
|
home: 'Start page',
|
|
359
381
|
removeRecent: 'Remove from recent',
|
|
360
|
-
frameHint: '
|
|
382
|
+
frameHint: 'Page blank? Open it in a new window',
|
|
361
383
|
stop: 'Stop',
|
|
362
384
|
openBrowser: 'Open in the default browser',
|
|
363
385
|
loadFailed: 'This page did not open',
|
|
@@ -4,6 +4,7 @@ exports.default = activate;
|
|
|
4
4
|
const browser_1 = require("./browser");
|
|
5
5
|
const browser_agent_1 = require("./browser-agent");
|
|
6
6
|
const browser_common_1 = require("./browser-common");
|
|
7
|
+
const browser_tool_line_1 = require("./browser-tool-line");
|
|
7
8
|
const editors_1 = require("./editors");
|
|
8
9
|
const explorer_1 = require("./explorer");
|
|
9
10
|
const host_1 = require("./host");
|
|
@@ -62,6 +63,7 @@ function activate(pi) {
|
|
|
62
63
|
if (pi.ui.debugWebview) {
|
|
63
64
|
pi.registerTool(browser_agent_1.AgentBrowser.TOOL);
|
|
64
65
|
}
|
|
66
|
+
browser_tool_line_1.BrowserToolLine.register(pi, key => (0, i18n_1.t)(key));
|
|
65
67
|
// From anywhere, a page or the lists of a phone too: the launcher's section and the keys of VS Code.
|
|
66
68
|
pi.registerView('launcher', { title: (0, i18n_1.label)('workbench'), icon: host_1.Host.icon('SquareTerminal'), render: launcher_1.LauncherTools, location: 'launcher', order: -10 });
|
|
67
69
|
const onKey = (event) => {
|
|
@@ -3,6 +3,10 @@ export declare function MarkdownPreview({ text, url }: {
|
|
|
3
3
|
text: string;
|
|
4
4
|
url: string;
|
|
5
5
|
}): import("react").JSX.Element;
|
|
6
|
+
/** The user goes to the picture of the tab `id` from the one beside it: that one goes on with the keys. */
|
|
7
|
+
export declare function browsePicture(id: string): void;
|
|
8
|
+
/** A React hook of the editor of the tab `id`: when it was last gone to by browsePicture (Date.now()), 0 before. */
|
|
9
|
+
export declare function useBrowsedTo(id: string): number;
|
|
6
10
|
/**
|
|
7
11
|
* A page of the workspace: as it is, loaded by its URL from ta serve (TaWorkspaceServer.fileUrl), or — where
|
|
8
12
|
* the page cannot load that URL, over a relay — from the text of the file, in a frame that reaches nothing but
|
|
@@ -17,10 +21,15 @@ export declare function PagePreview({ url, text }: {
|
|
|
17
21
|
* A file as it is: an image, a video, a sound or a PDF, loaded from ta serve (TaWorkspaceServer.fileUrl).
|
|
18
22
|
* It loads again when the file changed (its ETag), not on every run of a tool.
|
|
19
23
|
*/
|
|
20
|
-
export declare function MediaPreview({ kind, url, size, onInfo, }: {
|
|
24
|
+
export declare function MediaPreview({ kind, url, size, onInfo, previous, next, browsedAt, }: {
|
|
21
25
|
kind: Exclude<PreviewKind, 'markdown' | 'html'>;
|
|
22
26
|
url: string;
|
|
23
27
|
size: number;
|
|
24
28
|
onInfo(info: string): void;
|
|
29
|
+
/** The pictures beside a picture in its folder. */
|
|
30
|
+
previous?(): void;
|
|
31
|
+
next?(): void;
|
|
32
|
+
/** When the user went to it from the picture beside it (useBrowsedTo). */
|
|
33
|
+
browsedAt?: number;
|
|
25
34
|
}): import("react").JSX.Element;
|
|
26
35
|
//# sourceMappingURL=preview.d.ts.map
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.MarkdownPreview = MarkdownPreview;
|
|
4
|
+
exports.browsePicture = browsePicture;
|
|
5
|
+
exports.useBrowsedTo = useBrowsedTo;
|
|
4
6
|
exports.PagePreview = PagePreview;
|
|
5
7
|
exports.MediaPreview = MediaPreview;
|
|
6
8
|
const marked_1 = require("marked");
|
|
@@ -27,10 +29,30 @@ const LINKED = [
|
|
|
27
29
|
function themeValue(name) {
|
|
28
30
|
return getComputedStyle(document.documentElement).getPropertyValue(name).trim();
|
|
29
31
|
}
|
|
30
|
-
|
|
32
|
+
/**
|
|
33
|
+
* The tables of `.table[data-cards=width]` as cards on a page narrower than `width`: a card a row, its first cell
|
|
34
|
+
* the title, the others each under the name of its column.
|
|
35
|
+
*/
|
|
36
|
+
function cardStyle(width, v) {
|
|
37
|
+
const table = `.table[data-cards='${width}']`;
|
|
38
|
+
return `
|
|
39
|
+
@media (max-width: ${width - 0.02}px) {
|
|
40
|
+
${table} { width: auto; overflow: visible; border: 0; border-radius: 0; }
|
|
41
|
+
${table} :is(table, tbody, tr, td) { display: block; }
|
|
42
|
+
${table} thead { display: none; }
|
|
43
|
+
${table} tr { margin: 0 0 10px; padding: 8px 14px 6px; border: 1px solid ${v('border')}; border-radius: 10px; background: ${v('card')}; }
|
|
44
|
+
${table} tr:last-child { margin-bottom: 0; }
|
|
45
|
+
${table} td { display: grid; grid-template-columns: min(34%, 9em) minmax(0, 1fr); gap: 12px; min-width: 0; padding: 4px 0; border: 0; white-space: normal; overflow-wrap: anywhere; text-align: left; }
|
|
46
|
+
${table} td > .label { display: block; color: ${v('muted')}; }
|
|
47
|
+
${table} td:first-child { display: block; padding: 2px 0 8px; margin-bottom: 4px; border-bottom: 1px solid ${v('border-muted')}; color: ${v('text')}; font-weight: 600; }
|
|
48
|
+
${table} td:first-child > .label, ${table} td:not(:first-child):has(> .value:empty) { display: none; }
|
|
49
|
+
}`;
|
|
50
|
+
}
|
|
51
|
+
function markdownStyle(cards) {
|
|
31
52
|
const v = (name) => themeValue(`--ta-${name}`);
|
|
32
53
|
return `
|
|
33
54
|
:root { color-scheme: ${host_1.pi.ui.theme}; }
|
|
55
|
+
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
|
|
34
56
|
html, body { margin: 0; overscroll-behavior: none; background: ${v('main')}; color: ${v('body')}; font: 14px/1.7 ${v('sans')}; -webkit-font-smoothing: antialiased; }
|
|
35
57
|
.markdown { max-width: 860px; margin: 0 auto; padding: 24px 32px 48px; overflow-wrap: break-word; }
|
|
36
58
|
.markdown > :first-child { margin-top: 0; }
|
|
@@ -47,14 +69,72 @@ code { padding: 0.15em 0.4em; border-radius: 5px; background: ${v('chip')}; font
|
|
|
47
69
|
pre { padding: 12px 14px; overflow: auto; border: 1px solid ${v('border')}; border-radius: 10px; background: ${v('code')}; line-height: 1.55; }
|
|
48
70
|
pre code { padding: 0; background: none; font-size: 12.5px; }
|
|
49
71
|
blockquote { padding: 0 1em; border-left: 3px solid ${v('border-field')}; color: ${v('secondary')}; }
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
72
|
+
/* A table: short cells keep to one line, long ones wrap from a width that reads; wider than the page, it scrolls
|
|
73
|
+
in its frame — or, on a narrow page, shows its rows as cards (cardStyle) — rather than squeezes its columns.
|
|
74
|
+
Its frame, rows and head are those of a table in a conversation (.ta-table of the page). */
|
|
75
|
+
.table { width: fit-content; max-width: 100%; margin: 0 0 1em; overflow-x: auto; overscroll-behavior-x: contain; border: 1px solid ${v('border')}; border-radius: 10px; }
|
|
76
|
+
.table > table { margin: 0; border-collapse: collapse; font-variant-numeric: tabular-nums; }
|
|
77
|
+
th, td { padding: 7px 12px; border: 0; border-bottom: 1px solid ${v('border-muted')}; text-align: left; vertical-align: top; white-space: nowrap; }
|
|
78
|
+
tr:last-child > td { border-bottom: 0; }
|
|
79
|
+
th { background: ${v('raised')}; font-weight: 600; color: ${v('text')}; }
|
|
80
|
+
:is(th, td)[align='center'] { text-align: center; } :is(th, td)[align='right'] { text-align: right; }
|
|
81
|
+
:is(th, td).long { min-width: 14em; white-space: normal; overflow-wrap: anywhere; }
|
|
82
|
+
td > .label { display: none; }
|
|
83
|
+
img, video { max-width: 100%; height: auto; } img { border-radius: 4px; }
|
|
53
84
|
hr { height: 0; margin: 1.6em 0; border: 0; border-top: 1px solid ${v('border')}; }
|
|
54
|
-
@media (max-width: 600px) {
|
|
85
|
+
@media (max-width: 600px) {
|
|
86
|
+
.markdown { padding: 16px 16px 32px; }
|
|
87
|
+
h1 { font-size: 1.6em; } h2 { font-size: 1.3em; } h3 { font-size: 1.12em; }
|
|
88
|
+
ul, ol { padding-left: 1.3em; }
|
|
89
|
+
blockquote { padding: 0 0.8em; }
|
|
90
|
+
pre { padding: 10px 12px; } pre code { font-size: 12px; }
|
|
91
|
+
}
|
|
92
|
+
:not(pre) > code { overflow-wrap: anywhere; }
|
|
55
93
|
kbd { padding: 1px 5px; border: 1px solid ${v('border')}; border-bottom-width: 2px; border-radius: 4px; font-family: ${v('mono')}; font-size: 0.85em; }
|
|
94
|
+
${[...new Set(cards)].map(width => cardStyle(width, v)).join('')}
|
|
56
95
|
`;
|
|
57
96
|
}
|
|
97
|
+
/**
|
|
98
|
+
* The tables of `body` made to read on any width: each in a frame it scrolls in, its long cells marked to wrap,
|
|
99
|
+
* and the name of each column in its cells, for the cards it shows as on a page narrower than it
|
|
100
|
+
* (PreviewUtil.cardsBelow). The widths it changes at, for the styles of the document.
|
|
101
|
+
*/
|
|
102
|
+
function fitTables(body) {
|
|
103
|
+
var _a, _b;
|
|
104
|
+
var _c;
|
|
105
|
+
const widths = [];
|
|
106
|
+
for (const table of body.querySelectorAll('table')) {
|
|
107
|
+
const rows = [...table.rows];
|
|
108
|
+
const text = rows.map(row => [...row.cells].map(cell => { var _a; return (_a = cell.textContent) !== null && _a !== void 0 ? _a : ''; }));
|
|
109
|
+
const head = (_a = table.tHead) === null || _a === void 0 ? void 0 : _a.rows[0];
|
|
110
|
+
for (const [index, row] of rows.entries()) {
|
|
111
|
+
for (const [column, cell] of [...row.cells].entries()) {
|
|
112
|
+
if (preview_1.PreviewUtil.longCell(text[index][column])) {
|
|
113
|
+
cell.classList.add('long');
|
|
114
|
+
}
|
|
115
|
+
if (cell.tagName === 'TD') {
|
|
116
|
+
const value = body.ownerDocument.createElement('span');
|
|
117
|
+
value.className = 'value';
|
|
118
|
+
value.append(...cell.childNodes);
|
|
119
|
+
const label = body.ownerDocument.createElement('span');
|
|
120
|
+
label.className = 'label';
|
|
121
|
+
label.innerHTML = (_c = (_b = head === null || head === void 0 ? void 0 : head.cells[column]) === null || _b === void 0 ? void 0 : _b.innerHTML) !== null && _c !== void 0 ? _c : '';
|
|
122
|
+
cell.append(label, value);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
const frame = body.ownerDocument.createElement('div');
|
|
127
|
+
frame.className = 'table';
|
|
128
|
+
const below = preview_1.PreviewUtil.cardsBelow(text);
|
|
129
|
+
if (below) {
|
|
130
|
+
frame.dataset.cards = String(below);
|
|
131
|
+
widths.push(below);
|
|
132
|
+
}
|
|
133
|
+
table.replaceWith(frame);
|
|
134
|
+
frame.append(table);
|
|
135
|
+
}
|
|
136
|
+
return widths;
|
|
137
|
+
}
|
|
58
138
|
/**
|
|
59
139
|
* Markdown as GitHub shows it: relative images and links point beside the file, links open in a tab of
|
|
60
140
|
* their own, headings get ids for links to them. Parsed by the browser without running anything.
|
|
@@ -79,16 +159,61 @@ function renderMarkdown(text, directory) {
|
|
|
79
159
|
for (const heading of body.querySelectorAll('h1, h2, h3, h4, h5, h6')) {
|
|
80
160
|
heading.id || (heading.id = preview_1.PreviewUtil.slug((_c = heading.textContent) !== null && _c !== void 0 ? _c : '', taken));
|
|
81
161
|
}
|
|
82
|
-
|
|
162
|
+
const cards = fitTables(body);
|
|
163
|
+
return preview_1.PreviewUtil.markdownDocument(body.innerHTML, markdownStyle(cards));
|
|
83
164
|
}
|
|
84
165
|
function MarkdownPreview({ text, url }) {
|
|
85
166
|
const theme = (0, host_1.useTheme)();
|
|
86
167
|
const document = react_1.React.useMemo(() => renderMarkdown(text, preview_1.PreviewUtil.directoryUrl(new URL(url, location.href).href)), [text, url, theme]);
|
|
87
168
|
return react_1.React.createElement("iframe", { className: "taw-preview-frame", title: "Markdown", sandbox: MARKDOWN_SANDBOX, srcDoc: document });
|
|
88
169
|
}
|
|
89
|
-
/**
|
|
90
|
-
|
|
91
|
-
|
|
170
|
+
/** The tab of the picture the user went to by ← → or the side buttons of the one before: it takes the keys. */
|
|
171
|
+
let browsedTo;
|
|
172
|
+
const browseListeners = new Set();
|
|
173
|
+
/** How long after it was gone to a picture still takes the keys as it shows (it loads first, and again once its version is known). */
|
|
174
|
+
const BROWSE_FOCUS_MS = 2000;
|
|
175
|
+
/** The user goes to the picture of the tab `id` from the one beside it: that one goes on with the keys. */
|
|
176
|
+
function browsePicture(id) {
|
|
177
|
+
browsedTo = id;
|
|
178
|
+
for (const listener of browseListeners) {
|
|
179
|
+
listener();
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
/** A React hook of the editor of the tab `id`: when it was last gone to by browsePicture (Date.now()), 0 before. */
|
|
183
|
+
function useBrowsedTo(id) {
|
|
184
|
+
const [at, setAt] = react_1.React.useState(0);
|
|
185
|
+
react_1.React.useEffect(() => {
|
|
186
|
+
const take = () => {
|
|
187
|
+
if (browsedTo === id) {
|
|
188
|
+
browsedTo = undefined;
|
|
189
|
+
setAt(Date.now());
|
|
190
|
+
}
|
|
191
|
+
};
|
|
192
|
+
take();
|
|
193
|
+
browseListeners.add(take);
|
|
194
|
+
return () => {
|
|
195
|
+
browseListeners.delete(take);
|
|
196
|
+
};
|
|
197
|
+
}, [id]);
|
|
198
|
+
return at;
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* A picture as the viewers of pictures show it (pi.ui.ImageViewer): pinched, zoomed and dragged, on a
|
|
202
|
+
* checkerboard; `previous` / `next` go to the pictures beside it in its folder. Gone to from one of them a
|
|
203
|
+
* moment ago (`browsedAt`, useBrowsedTo), it takes the keys once it is shown.
|
|
204
|
+
*/
|
|
205
|
+
function ImagePreview({ url, size, onInfo, previous, next, browsedAt = 0, }) {
|
|
206
|
+
const root = react_1.React.useRef(null);
|
|
207
|
+
react_1.React.useEffect(() => {
|
|
208
|
+
if (Date.now() - browsedAt > BROWSE_FOCUS_MS) {
|
|
209
|
+
return;
|
|
210
|
+
}
|
|
211
|
+
// Its tab shows in the frame after.
|
|
212
|
+
const frame = requestAnimationFrame(() => { var _a, _b; return (_b = (_a = root.current) === null || _a === void 0 ? void 0 : _a.querySelector('.ta-zoom-viewport')) === null || _b === void 0 ? void 0 : _b.focus({ preventScroll: true }); });
|
|
213
|
+
return () => cancelAnimationFrame(frame);
|
|
214
|
+
}, [browsedAt]);
|
|
215
|
+
return (react_1.React.createElement("div", { ref: root, className: "taw-preview-picture" },
|
|
216
|
+
react_1.React.createElement(host_1.pi.ui.ImageViewer, { src: url, className: "taw-preview-image", onLoad: image => onInfo(`${image.width} × ${image.height} · ${workspace_1.WorkspaceUtil.size(size)}`), onPrevious: previous, onNext: next })));
|
|
92
217
|
}
|
|
93
218
|
/**
|
|
94
219
|
* A page of the workspace: as it is, loaded by its URL from ta serve (TaWorkspaceServer.fileUrl), or — where
|
|
@@ -106,12 +231,12 @@ function PagePreview({ url, text }) {
|
|
|
106
231
|
* A file as it is: an image, a video, a sound or a PDF, loaded from ta serve (TaWorkspaceServer.fileUrl).
|
|
107
232
|
* It loads again when the file changed (its ETag), not on every run of a tool.
|
|
108
233
|
*/
|
|
109
|
-
function MediaPreview({ kind, url, size, onInfo, }) {
|
|
234
|
+
function MediaPreview({ kind, url, size, onInfo, previous, next, browsedAt, }) {
|
|
110
235
|
switch (kind) {
|
|
111
236
|
case 'pdf':
|
|
112
237
|
return react_1.React.createElement("iframe", { className: "taw-preview-frame", title: "PDF", src: url });
|
|
113
238
|
case 'image':
|
|
114
|
-
return react_1.React.createElement(ImagePreview, { url: url, size: size, onInfo: onInfo });
|
|
239
|
+
return react_1.React.createElement(ImagePreview, { url: url, size: size, onInfo: onInfo, previous: previous, next: next, browsedAt: browsedAt });
|
|
115
240
|
case 'video':
|
|
116
241
|
return (react_1.React.createElement("div", { className: "taw-preview-media" },
|
|
117
242
|
react_1.React.createElement("video", { src: url, controls: true, preload: "metadata" })));
|