@celljs/ta 4.10.0 → 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 +1675 -51
- package/dist/gateway.mjs +167 -5
- package/dist/pi/CHANGELOG.md +23 -0
- package/dist/pi/package.json +1 -1
- package/dist/pi/packages/ta-agents/extension/index.mjs +166 -139
- package/dist/pi/packages/ta-agents/lib/acp-agent.js +30 -10
- 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/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 +132 -69
- package/dist/pi/packages/ta-channels/lib/style.d.ts +1 -1
- package/dist/pi/packages/ta-channels/lib/style.js +69 -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 +21 -16
- package/dist/pi/packages/ta-channels/lib/views.js +60 -31
- package/dist/pi/packages/ta-channels/package.json +2 -1
- package/dist/pi/packages/ta-channels/web/index.js +1507 -309
- 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 +19 -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 +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 +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-D9uU0Tx2.js} +1 -1
- package/dist/public/assets/{architecture-WOLXFQ4H-XgsdQ7ul.js → architecture-WOLXFQ4H-f7Nm7EIo.js} +1 -1
- package/dist/public/assets/{architectureDiagram-YGSQEFNW--sVhMS03.js → architectureDiagram-YGSQEFNW-DSAqlcms.js} +1 -1
- package/dist/public/assets/{blockDiagram-APKKGZFW-8f9b-9k2.js → blockDiagram-APKKGZFW-C0lPIW9g.js} +1 -1
- package/dist/public/assets/{browser-DOHZ0JCf.js → browser-WLpgVYno.js} +1 -1
- package/dist/public/assets/{c4Diagram-KJ2TOQU5-CwYQ0Jfy.js → c4Diagram-KJ2TOQU5-CDcZ7mJq.js} +1 -1
- package/dist/public/assets/{chunk-6MUBBAK2-7Y9ezehi.js → chunk-6MUBBAK2-CXPuyqPL.js} +1 -1
- package/dist/public/assets/{chunk-AXFCVDMN-CZIH4pWz.js → chunk-AXFCVDMN-Du6JRX1x.js} +1 -1
- package/dist/public/assets/{chunk-BG4553SI-DsNATY2m.js → chunk-BG4553SI-D592E55X.js} +1 -1
- package/dist/public/assets/{chunk-DQASFODM-CoXkfYE-.js → chunk-DQASFODM-BW2r2SL4.js} +1 -1
- package/dist/public/assets/{chunk-HFQBQIA3-C5OLqki8.js → chunk-HFQBQIA3-C3yoe54R.js} +1 -1
- package/dist/public/assets/{chunk-KQLB2F66-DMHuYGEF.js → chunk-KQLB2F66-DF8gfYCy.js} +1 -1
- package/dist/public/assets/{chunk-KS47KZWR-BKeOttO1.js → chunk-KS47KZWR-C8CRMTv1.js} +1 -1
- package/dist/public/assets/{chunk-LEVMRMFU-D6zCwkk7.js → chunk-LEVMRMFU-BDcMKiwj.js} +1 -1
- package/dist/public/assets/{chunk-M57EVK23-B5-QqcZg.js → chunk-M57EVK23-CKJPBygc.js} +1 -1
- package/dist/public/assets/{chunk-OY52VR5R-DQrq3n0T.js → chunk-OY52VR5R-B3ZWH07L.js} +1 -1
- package/dist/public/assets/{chunk-QB3YPZ4I-j6ZT7EDR.js → chunk-QB3YPZ4I-DI-z4UPL.js} +1 -1
- package/dist/public/assets/{chunk-R3KSYZAL-D5MXUO36.js → chunk-R3KSYZAL-Bg4-haAc.js} +1 -1
- package/dist/public/assets/{chunk-STOXU5M4-DaBkw4dD.js → chunk-STOXU5M4-l_SHib3p.js} +1 -1
- package/dist/public/assets/{chunk-TU62E6Q5-vXcRfGci.js → chunk-TU62E6Q5-BINu9tIm.js} +1 -1
- package/dist/public/assets/{chunk-X4PVCEUW-CIh6H4Y2.js → chunk-X4PVCEUW-BQn-mvV5.js} +1 -1
- package/dist/public/assets/{chunk-XXDRQBXY-C_Vwv1FM.js → chunk-XXDRQBXY-uvpAu0Ys.js} +1 -1
- package/dist/public/assets/{classDiagram-v2-L25IHNXF-DccDWEJn.js → classDiagram-v2-L25IHNXF-BIowooW1.js} +1 -1
- package/dist/public/assets/{cose-bilkent-JH36ORCC-BX47lumZ.js → cose-bilkent-JH36ORCC-BTyx1Mh2.js} +1 -1
- package/dist/public/assets/cynefin-EF2NZ3EQ-Dg54eFzZ.js +1 -0
- package/dist/public/assets/{cynefinDiagram-L36ESFBY-BE6WOGxW.js → cynefinDiagram-L36ESFBY-D64EU9I0.js} +1 -1
- package/dist/public/assets/{d3-selection-ZcE6yRN5.js → d3-selection-CN9k6_B9.js} +1 -1
- package/dist/public/assets/{dagre-SPEB5RXH-CE6SOOcN.js → dagre-SPEB5RXH-FCbz2-Kk.js} +1 -1
- package/dist/public/assets/{diagram-3B7GL73J-xC8VtiYL.js → diagram-3B7GL73J-OhHUSI7j.js} +1 -1
- package/dist/public/assets/{diagram-DNEMPZML-4dmcBbjL.js → diagram-DNEMPZML-Be4xMtp6.js} +1 -1
- package/dist/public/assets/{diagram-L3MUGCDN-D14Yn3sQ.js → diagram-L3MUGCDN-CmKSs3aG.js} +1 -1
- package/dist/public/assets/{diagram-LA4NIPWU-GxSXIhsK.js → diagram-LA4NIPWU-D1C32rMN.js} +1 -1
- package/dist/public/assets/{diagram-MHCOC4E2-Cm7Prlpc.js → diagram-MHCOC4E2-BjoE6JXs.js} +1 -1
- package/dist/public/assets/{diagram-XPFHEONP-mkUnnKFu.js → diagram-XPFHEONP-B22k4v8R.js} +1 -1
- package/dist/public/assets/{dist-acJS-BlA.js → dist-DcBP8Cf6.js} +1 -1
- package/dist/public/assets/{ebnfDiagram-UZSYDL2S-m77ua3UQ.js → ebnfDiagram-UZSYDL2S-Tn-K8-X7.js} +1 -1
- package/dist/public/assets/{editor.api-CljTm-EQ.js → editor.api-Bz4sjRz_.js} +1 -1
- package/dist/public/assets/{elk-XV6XMXQE-DsQY1hw9.js → elk-XV6XMXQE-COnQsWlN.js} +1 -1
- package/dist/public/assets/{erDiagram-EYBAPDEH-CV8gJM0P.js → erDiagram-EYBAPDEH-c53dJilq.js} +1 -1
- package/dist/public/assets/{eventmodeling-K75KTNOO-C1pymbUr.js → eventmodeling-K75KTNOO-DaFpPPks.js} +1 -1
- package/dist/public/assets/flowDiagram-MALGAFMO-V5qkYWIO.js +1 -0
- package/dist/public/assets/{freemarker2-DYJXaMHN.js → freemarker2-BLxfRHsw.js} +1 -1
- package/dist/public/assets/{ganttDiagram-23REXITY-CppxOWRh.js → ganttDiagram-23REXITY-Md-SavIS.js} +1 -1
- package/dist/public/assets/gitGraph-VSP46ZUC-1q8ldRXU.js +1 -0
- package/dist/public/assets/{gitGraphDiagram-STJD7YCW-CrQrZhcP.js → gitGraphDiagram-STJD7YCW-CMSwTghO.js} +1 -1
- package/dist/public/assets/{handlebars-DZCnH9e2.js → handlebars-sNpu01kP.js} +1 -1
- package/dist/public/assets/{html-DuzouNES.js → html-C_tKd-uP.js} +1 -1
- package/dist/public/assets/{index-B7OYKvCE.js → index-Bn86rI4n.js} +2 -2
- package/dist/public/assets/info-OHQRW6UA-Crere6sx.js +1 -0
- package/dist/public/assets/{infoDiagram-KBXO4MBG-6pby19tQ.js → infoDiagram-KBXO4MBG-CwgNj-7i.js} +1 -1
- package/dist/public/assets/{ishikawaDiagram-M35NCXHK-Duf8c8rQ.js → ishikawaDiagram-M35NCXHK-BSlzQNMN.js} +1 -1
- package/dist/public/assets/{javascript-2d_L6cVd.js → javascript-l3qKw0L-.js} +1 -1
- package/dist/public/assets/{journeyDiagram-OPLOXDXO-Dvv-xzNo.js → journeyDiagram-OPLOXDXO-B09LPEnF.js} +1 -1
- package/dist/public/assets/{jsonMode-CFadYXyI.js → jsonMode-5SQQn1EX.js} +1 -1
- package/dist/public/assets/{kanban-definition-BZKZHSQY-Dsk6F-TT.js → kanban-definition-BZKZHSQY-BiW4aJ29.js} +1 -1
- package/dist/public/assets/{liquid-Din4CF34.js → liquid-BGyTIIUt.js} +1 -1
- package/dist/public/assets/{mdx-DivDuCWI.js → mdx-8tGjz4em.js} +1 -1
- package/dist/public/assets/{mermaid-parser.core-BfCv4CYZ.js → mermaid-parser.core-CctN5b0z.js} +3 -3
- package/dist/public/assets/{mermaid.core-DC20ZwJj.js → mermaid.core-7ERSdZ4-.js} +4 -4
- package/dist/public/assets/{mindmap-definition-I2QAS2VK-DRZRrJU_.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-D1d6MOPe.js → monaco-B_9hlk78.js} +3 -3
- package/dist/public/assets/packet-JDAUHWVQ-qMf5LkHT.js +1 -0
- package/dist/public/assets/{pegDiagram-FD4XPPHP-DcGr3Tbk.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-GF7pu6ch.js → pieDiagram-J4AKIIQI-CXFHLYTg.js} +1 -1
- package/dist/public/assets/{python-BQbTTTT5.js → python-e-JK0s5M.js} +1 -1
- package/dist/public/assets/{quadrantDiagram-XTYBLID2-D-bcu7Ey.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-BiBHsI-K.js → railroad-abnf-LNEFI6M7-CDOSPZwX.js} +1 -1
- package/dist/public/assets/{railroad-ebnf-DWYD2UWJ-zKjrfkHs.js → railroad-ebnf-DWYD2UWJ-BTrNQ0DX.js} +1 -1
- package/dist/public/assets/{railroad-peg-JR7BVNR7-DKuVn0GT.js → railroad-peg-JR7BVNR7-B7NtVofS.js} +1 -1
- package/dist/public/assets/{railroadDiagram-MRQ6NCDL-Cyn-16mJ.js → railroadDiagram-MRQ6NCDL-DsDrT0Jf.js} +1 -1
- package/dist/public/assets/{razor-DiLk54O0.js → razor-DtSPwumi.js} +1 -1
- package/dist/public/assets/{requirementDiagram-Y7LWUY3S-CwU2EBkW.js → requirementDiagram-Y7LWUY3S-BQh0hFuA.js} +1 -1
- package/dist/public/assets/{sankeyDiagram-WGJFYUXA-ajf00HyW.js → sankeyDiagram-WGJFYUXA-BUXNAQEF.js} +1 -1
- package/dist/public/assets/{sequenceDiagram-5NDRBG5M-DiX_OIAw.js → sequenceDiagram-5NDRBG5M-05f-N5V_.js} +1 -1
- package/dist/public/assets/{stateDiagram-v2-FJ4FJNEA-CV5bRqB7.js → stateDiagram-v2-FJ4FJNEA-D6V1fGWV.js} +1 -1
- package/dist/public/assets/{swimlanes-UMQ2AFYF-BGQKSlj7.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-DhQoApff.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-COQ1g-up.js → typescript-65jNyipU.js} +1 -1
- package/dist/public/assets/{usecaseDiagram-AFA6YXN4-CmLFzjie.js → usecaseDiagram-AFA6YXN4-BQTHUX1f.js} +1 -1
- package/dist/public/assets/{vennDiagram-NNMJR3RB-DOa6JR5K.js → vennDiagram-NNMJR3RB-BULkVTfA.js} +1 -1
- package/dist/public/assets/wardley-7MLQ67FV-DfSjKzbJ.js +1 -0
- package/dist/public/assets/{wardleyDiagram-S7YFUSEH-BV7EEShp.js → wardleyDiagram-S7YFUSEH-Cek6l8lz.js} +1 -1
- package/dist/public/assets/{xml-BbvtjuaG.js → xml-DWBejfu-.js} +1 -1
- package/dist/public/assets/{xychartDiagram-GGNKY7IX-DtMpPbsq.js → xychartDiagram-GGNKY7IX-ujnZQTWA.js} +1 -1
- package/dist/public/assets/{yaml-Bw8NFga9.js → yaml-CwRCT7q1.js} +1 -1
- package/dist/public/index.html +1 -1
- package/dist/serve/index.mjs +5853 -2164
- 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
|
@@ -0,0 +1,1038 @@
|
|
|
1
|
+
// web-src/conversations.ts
|
|
2
|
+
var RecallConversations;
|
|
3
|
+
((RecallConversations) => {
|
|
4
|
+
async function open(pi, file) {
|
|
5
|
+
const open2 = (await pi.server.listSessions()).find((session) => session.sessionFile === file);
|
|
6
|
+
if (open2) {
|
|
7
|
+
await pi.switchSession(open2.sessionId);
|
|
8
|
+
pi.ui.showView("");
|
|
9
|
+
return true;
|
|
10
|
+
}
|
|
11
|
+
const saved = (await pi.server.listSavedSessions()).find((session) => session.sessionFile === file);
|
|
12
|
+
if (!saved) {
|
|
13
|
+
return false;
|
|
14
|
+
}
|
|
15
|
+
const sessionId = pi.server.openSession({ cwd: saved.cwd, sessionFile: file, ...saved.group ? { group: saved.group } : {} }).then((session) => session.sessionId);
|
|
16
|
+
await pi.switchSession(sessionId, { title: saved.sessionName || saved.firstMessage, cwd: saved.cwd, sessionFile: file });
|
|
17
|
+
pi.ui.showView("");
|
|
18
|
+
return true;
|
|
19
|
+
}
|
|
20
|
+
RecallConversations.open = open;
|
|
21
|
+
function question(text) {
|
|
22
|
+
return `<context>
|
|
23
|
+
[ta-recall:ask]
|
|
24
|
+
The user asks about their earlier work with Ta. Search their conversations with search_conversations (several words, in both languages they may have used), and git history when it is about code; answer briefly, and link the conversations you used as [title](session file).
|
|
25
|
+
</context>
|
|
26
|
+
${text}`;
|
|
27
|
+
}
|
|
28
|
+
RecallConversations.question = question;
|
|
29
|
+
async function ask(pi, text) {
|
|
30
|
+
const { cwd } = await pi.server.getServerInfo();
|
|
31
|
+
const opened = pi.server.openSession({ cwd });
|
|
32
|
+
const sessionId = opened.then((session) => session.sessionId);
|
|
33
|
+
const kept = opened.then((session) => session.sessionFile && pi.callHost("keepAsked", session.sessionFile)).catch(() => {
|
|
34
|
+
return;
|
|
35
|
+
});
|
|
36
|
+
await pi.switchSession(sessionId, { title: text, cwd });
|
|
37
|
+
pi.ui.showView("");
|
|
38
|
+
await kept;
|
|
39
|
+
await pi.server.prompt(await sessionId, { clientMessageId: `ta-recall-ask:${Date.now()}`, message: question(text) });
|
|
40
|
+
}
|
|
41
|
+
RecallConversations.ask = ask;
|
|
42
|
+
})(RecallConversations ||= {});
|
|
43
|
+
|
|
44
|
+
// web-src/i18n.ts
|
|
45
|
+
var en = {
|
|
46
|
+
settingsTitle: "Recall",
|
|
47
|
+
briefLabel: "Daily brief",
|
|
48
|
+
briefHint: "Each day at this time Ta writes what got done, what waits for you and what is next into the conversation Daily brief, when something happened.",
|
|
49
|
+
briefTime: "Time of the brief",
|
|
50
|
+
briefNow: "Write one now",
|
|
51
|
+
briefNowButton: "Write",
|
|
52
|
+
briefNothing: "Nothing happened since the last brief.",
|
|
53
|
+
suggestLabel: "Offer to keep as a skill",
|
|
54
|
+
suggestHint: "When you ask for something again that you asked for in another conversation, Ta offers to keep how it is done as a skill.",
|
|
55
|
+
skillAsk: "Keep as a skill?",
|
|
56
|
+
skillShow: "Show the steps",
|
|
57
|
+
skillHide: "Hide the steps",
|
|
58
|
+
skillSave: "Save as a skill",
|
|
59
|
+
skillNo: "No thanks",
|
|
60
|
+
skillSaved: "Saved as the skill {name}: new conversations use it, or type /skill:{name}.",
|
|
61
|
+
skillDeclined: "Not kept. Ta will not offer it again for the like.",
|
|
62
|
+
makeSkill: "Keep as a skill",
|
|
63
|
+
makeSkillDetail: "Ta writes how this was done as a skill to reuse",
|
|
64
|
+
searchTitle: "Ask Ta",
|
|
65
|
+
searchAsk: "Ask Ta: {query}",
|
|
66
|
+
searchAskDetail: "Ta looks through your conversations and answers, with where it found it",
|
|
67
|
+
briefCounts: "{done} done · {waiting} waiting for you",
|
|
68
|
+
briefCountsDone: "{done} done",
|
|
69
|
+
briefCardEmpty: "The first brief comes at {time}",
|
|
70
|
+
briefNoneWaiting: "Nothing waits for you",
|
|
71
|
+
briefTick: "Mark as handled",
|
|
72
|
+
briefUntick: "Mark as not handled",
|
|
73
|
+
briefMore: "{count} more in the brief",
|
|
74
|
+
briefToday: "Today",
|
|
75
|
+
toolSearch: "Search conversations",
|
|
76
|
+
toolPropose: "Draft a skill",
|
|
77
|
+
failed: "Could not do it: {message}"
|
|
78
|
+
};
|
|
79
|
+
var zh = {
|
|
80
|
+
settingsTitle: "回顾",
|
|
81
|
+
briefLabel: "每日简报",
|
|
82
|
+
briefHint: "每天这个时间,只要有新动静,Ta 就把做完的、等你定的和下一步写进“每日简报”对话。",
|
|
83
|
+
briefTime: "简报时间",
|
|
84
|
+
briefNow: "现在写一份",
|
|
85
|
+
briefNowButton: "生成",
|
|
86
|
+
briefNothing: "上次简报以来没有新的动静。",
|
|
87
|
+
suggestLabel: "建议存成技能",
|
|
88
|
+
suggestHint: "在别的对话里交代过的事又交代一次时,Ta 会问要不要把做法存成技能。",
|
|
89
|
+
skillAsk: "存成技能?",
|
|
90
|
+
skillShow: "查看步骤",
|
|
91
|
+
skillHide: "收起步骤",
|
|
92
|
+
skillSave: "保存为技能",
|
|
93
|
+
skillNo: "不用",
|
|
94
|
+
skillSaved: "已保存为技能 {name}:新对话会自动用上,也可以输入 /skill:{name}。",
|
|
95
|
+
skillDeclined: "没有保存,类似的事不会再问。",
|
|
96
|
+
makeSkill: "存成技能",
|
|
97
|
+
makeSkillDetail: "Ta 把这个对话里的做法写成技能,以后照着做",
|
|
98
|
+
searchTitle: "问 Ta",
|
|
99
|
+
searchAsk: "问 Ta:{query}",
|
|
100
|
+
searchAskDetail: "Ta 翻一遍你的对话再回答,并给出出处",
|
|
101
|
+
briefCounts: "做完 {done} · 等你定 {waiting}",
|
|
102
|
+
briefCountsDone: "做完 {done}",
|
|
103
|
+
briefCardEmpty: "每天 {time} 写第一份简报",
|
|
104
|
+
briefNoneWaiting: "没有等你定的事",
|
|
105
|
+
briefTick: "标为已处理",
|
|
106
|
+
briefUntick: "标为未处理",
|
|
107
|
+
briefMore: "简报里还有 {count} 项",
|
|
108
|
+
briefToday: "今天",
|
|
109
|
+
toolSearch: "搜索对话",
|
|
110
|
+
toolPropose: "起草技能",
|
|
111
|
+
failed: "没有做成:{message}"
|
|
112
|
+
};
|
|
113
|
+
var RecallWords;
|
|
114
|
+
((RecallWords) => {
|
|
115
|
+
function of(language) {
|
|
116
|
+
return /^zh/i.test(language) ? zh : en;
|
|
117
|
+
}
|
|
118
|
+
RecallWords.of = of;
|
|
119
|
+
function format(text, values) {
|
|
120
|
+
return text.replace(/\{(\w+)\}/g, (all, key) => values[key] ?? all);
|
|
121
|
+
}
|
|
122
|
+
RecallWords.format = format;
|
|
123
|
+
})(RecallWords ||= {});
|
|
124
|
+
|
|
125
|
+
// web-src/recall-protocol.ts
|
|
126
|
+
var TOOL_NAME = "search_conversations";
|
|
127
|
+
var PROPOSE_TOOL = "propose_skill";
|
|
128
|
+
var SKILL_TYPE = "ta-recall-skill";
|
|
129
|
+
var SKILL_BLOCK = "ta-skill";
|
|
130
|
+
var Keys;
|
|
131
|
+
((Keys) => {
|
|
132
|
+
Keys.SUGGEST = "suggest";
|
|
133
|
+
Keys.BRIEF = "brief";
|
|
134
|
+
Keys.BRIEF_FILE = "briefFile";
|
|
135
|
+
Keys.BRIEF_LAST = "briefLast";
|
|
136
|
+
Keys.ASKED = "asked";
|
|
137
|
+
Keys.BRIEF_SUMMARY = "briefSummary";
|
|
138
|
+
Keys.BRIEF_SEEN = "briefSeen";
|
|
139
|
+
Keys.BRIEF_PINNED = "briefPinned";
|
|
140
|
+
Keys.BRIEF_HANDLED = "briefHandled";
|
|
141
|
+
Keys.DECIDED = "decided";
|
|
142
|
+
Keys.DECLINED = "declined";
|
|
143
|
+
})(Keys ||= {});
|
|
144
|
+
var Limits;
|
|
145
|
+
((Limits) => {
|
|
146
|
+
Limits.SEARCH_DAYS = 30;
|
|
147
|
+
Limits.SEARCH_HITS = 8;
|
|
148
|
+
Limits.SNIPPETS = 3;
|
|
149
|
+
Limits.SNIPPET_CHARS = 240;
|
|
150
|
+
Limits.SIMILAR_DAYS = 60;
|
|
151
|
+
Limits.SIMILAR_MIN_CHARS = 16;
|
|
152
|
+
Limits.SIMILAR_SCORE = 0.5;
|
|
153
|
+
Limits.DECLINED_KEPT = 100;
|
|
154
|
+
Limits.ASKED_KEPT = 200;
|
|
155
|
+
Limits.BRIEF_CONVERSATIONS = 30;
|
|
156
|
+
Limits.BRIEF_ITEMS = 5;
|
|
157
|
+
Limits.ASKED_ARCHIVE_DAYS = 7;
|
|
158
|
+
})(Limits ||= {});
|
|
159
|
+
|
|
160
|
+
// web-src/brief-home.ts
|
|
161
|
+
var BriefHomeUtil;
|
|
162
|
+
((BriefHomeUtil) => {
|
|
163
|
+
function summary(value) {
|
|
164
|
+
const summary2 = value;
|
|
165
|
+
return summary2 && typeof summary2.at === "number" && typeof summary2.file === "string" ? summary2 : undefined;
|
|
166
|
+
}
|
|
167
|
+
BriefHomeUtil.summary = summary;
|
|
168
|
+
function handled(value, summary2) {
|
|
169
|
+
const stored = value;
|
|
170
|
+
return summary2 && stored && stored.at === summary2.at && Array.isArray(stored.done) ? stored.done.filter((at) => typeof at === "number") : [];
|
|
171
|
+
}
|
|
172
|
+
BriefHomeUtil.handled = handled;
|
|
173
|
+
function left(summary2, done) {
|
|
174
|
+
if (!summary2.items) {
|
|
175
|
+
return { waiting: summary2.waiting, top: summary2.top };
|
|
176
|
+
}
|
|
177
|
+
const ticked = done.filter((at) => at < (summary2.items?.length ?? 0)).length;
|
|
178
|
+
return { waiting: Math.max(0, summary2.waiting - ticked), top: summary2.items.find((_, at) => !done.includes(at))?.text };
|
|
179
|
+
}
|
|
180
|
+
BriefHomeUtil.left = left;
|
|
181
|
+
function detail(summary2, language, done = []) {
|
|
182
|
+
const words = RecallWords.of(language);
|
|
183
|
+
const { waiting, top } = left(summary2, done);
|
|
184
|
+
const counts = RecallWords.format(waiting ? words.briefCounts : words.briefCountsDone, {
|
|
185
|
+
done: String(summary2.done),
|
|
186
|
+
waiting: String(waiting)
|
|
187
|
+
});
|
|
188
|
+
return top && waiting ? `${counts} · ${top}` : counts;
|
|
189
|
+
}
|
|
190
|
+
BriefHomeUtil.detail = detail;
|
|
191
|
+
})(BriefHomeUtil ||= {});
|
|
192
|
+
var KEYS = [Keys.BRIEF_SUMMARY, Keys.BRIEF_SEEN, Keys.BRIEF_HANDLED];
|
|
193
|
+
|
|
194
|
+
class BriefStore {
|
|
195
|
+
pi;
|
|
196
|
+
current = { loaded: false, seen: 0, done: [] };
|
|
197
|
+
listeners = new Set;
|
|
198
|
+
constructor(pi) {
|
|
199
|
+
this.pi = pi;
|
|
200
|
+
this.read();
|
|
201
|
+
pi.storage.onChange((keys) => keys.some((key) => KEYS.includes(key)) && this.read());
|
|
202
|
+
}
|
|
203
|
+
get state() {
|
|
204
|
+
return this.current;
|
|
205
|
+
}
|
|
206
|
+
subscribe(listener) {
|
|
207
|
+
this.listeners.add(listener);
|
|
208
|
+
return () => this.listeners.delete(listener);
|
|
209
|
+
}
|
|
210
|
+
async open(item) {
|
|
211
|
+
const { summary } = this.current;
|
|
212
|
+
if (!summary) {
|
|
213
|
+
return;
|
|
214
|
+
}
|
|
215
|
+
this.see();
|
|
216
|
+
if (!item?.file || !await RecallConversations.open(this.pi, item.file)) {
|
|
217
|
+
await RecallConversations.open(this.pi, summary.file);
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
async tick(at, done) {
|
|
221
|
+
const { summary } = this.current;
|
|
222
|
+
if (!summary) {
|
|
223
|
+
return;
|
|
224
|
+
}
|
|
225
|
+
const others = this.current.done.filter((one) => one !== at);
|
|
226
|
+
const next = done ? [...others, at].sort((a, b) => a - b) : others;
|
|
227
|
+
this.set({ ...this.current, done: next });
|
|
228
|
+
this.see();
|
|
229
|
+
await this.pi.storage.set(Keys.BRIEF_HANDLED, { at: summary.at, done: next });
|
|
230
|
+
}
|
|
231
|
+
see() {
|
|
232
|
+
const { summary, seen } = this.current;
|
|
233
|
+
if (summary && summary.at > seen) {
|
|
234
|
+
this.set({ ...this.current, seen: summary.at });
|
|
235
|
+
this.pi.storage.set(Keys.BRIEF_SEEN, summary.at).catch(() => {
|
|
236
|
+
return;
|
|
237
|
+
});
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
read() {
|
|
241
|
+
Promise.all(KEYS.map((key) => this.pi.storage.get(key))).then(([stored, seen, handled]) => {
|
|
242
|
+
const summary = BriefHomeUtil.summary(stored);
|
|
243
|
+
this.set({ loaded: true, summary, seen: typeof seen === "number" ? seen : 0, done: BriefHomeUtil.handled(handled, summary) });
|
|
244
|
+
}, () => this.set({ ...this.current, loaded: true }));
|
|
245
|
+
}
|
|
246
|
+
set(state) {
|
|
247
|
+
this.current = state;
|
|
248
|
+
for (const listener of this.listeners) {
|
|
249
|
+
listener();
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
function briefHome(pi, store) {
|
|
254
|
+
let items = [];
|
|
255
|
+
let built;
|
|
256
|
+
return {
|
|
257
|
+
items: () => {
|
|
258
|
+
const state = store.state;
|
|
259
|
+
if (state !== built) {
|
|
260
|
+
built = state;
|
|
261
|
+
const icon = pi.ui.icons.ScrollText;
|
|
262
|
+
const { summary } = state;
|
|
263
|
+
items = summary && icon ? [
|
|
264
|
+
{
|
|
265
|
+
id: "brief",
|
|
266
|
+
title: RecallWords.of(pi.ui.language).briefLabel,
|
|
267
|
+
detail: BriefHomeUtil.detail(summary, pi.ui.language, state.done),
|
|
268
|
+
icon,
|
|
269
|
+
tint: "daily-brief",
|
|
270
|
+
at: summary.at,
|
|
271
|
+
unseen: summary.at > state.seen,
|
|
272
|
+
open: () => store.open()
|
|
273
|
+
}
|
|
274
|
+
] : [];
|
|
275
|
+
}
|
|
276
|
+
return items;
|
|
277
|
+
},
|
|
278
|
+
subscribe: (listener) => store.subscribe(listener)
|
|
279
|
+
};
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
// web-src/brief-util.ts
|
|
283
|
+
var DAY_MS = 24 * 60 * 60000;
|
|
284
|
+
var ASKS = 3;
|
|
285
|
+
var ASK_CHARS = 160;
|
|
286
|
+
var ANSWER_CHARS = 500;
|
|
287
|
+
var SUMMARY_CHARS = 300;
|
|
288
|
+
var BriefUtil;
|
|
289
|
+
((BriefUtil) => {
|
|
290
|
+
BriefUtil.DEFAULT = { enabled: true, time: "09:00" };
|
|
291
|
+
function settings(value) {
|
|
292
|
+
const stored = value && typeof value === "object" ? value : {};
|
|
293
|
+
return {
|
|
294
|
+
enabled: typeof stored.enabled === "boolean" ? stored.enabled : BriefUtil.DEFAULT.enabled,
|
|
295
|
+
time: typeof stored.time === "string" && parseTime(stored.time) ? stored.time : BriefUtil.DEFAULT.time
|
|
296
|
+
};
|
|
297
|
+
}
|
|
298
|
+
BriefUtil.settings = settings;
|
|
299
|
+
function parseTime(text) {
|
|
300
|
+
const match = /^(\d{1,2}):(\d{2})$/.exec(text.trim());
|
|
301
|
+
if (!match) {
|
|
302
|
+
return;
|
|
303
|
+
}
|
|
304
|
+
const hours = Number(match[1]);
|
|
305
|
+
const minutes = Number(match[2]);
|
|
306
|
+
return hours < 24 && minutes < 60 ? { hours, minutes } : undefined;
|
|
307
|
+
}
|
|
308
|
+
BriefUtil.parseTime = parseTime;
|
|
309
|
+
function today(settings2, now) {
|
|
310
|
+
const { hours, minutes } = parseTime(settings2.time) ?? { hours: 9, minutes: 0 };
|
|
311
|
+
const day = new Date(now);
|
|
312
|
+
day.setHours(hours, minutes, 0, 0);
|
|
313
|
+
return day.getTime();
|
|
314
|
+
}
|
|
315
|
+
BriefUtil.today = today;
|
|
316
|
+
function due(settings2, last, now) {
|
|
317
|
+
const time = today(settings2, now);
|
|
318
|
+
return settings2.enabled && now >= time && (last === undefined || last < time);
|
|
319
|
+
}
|
|
320
|
+
BriefUtil.due = due;
|
|
321
|
+
function since(last, now) {
|
|
322
|
+
return last && last > now - 7 * DAY_MS ? last : now - DAY_MS;
|
|
323
|
+
}
|
|
324
|
+
BriefUtil.since = since;
|
|
325
|
+
function material(input) {
|
|
326
|
+
const conversations = input.conversations.filter((conversation) => conversation.updatedAt >= input.since && conversation.file !== input.briefFile).slice(0, Limits.BRIEF_CONVERSATIONS);
|
|
327
|
+
const parts = [];
|
|
328
|
+
if (conversations.length > 0) {
|
|
329
|
+
parts.push("Conversations:");
|
|
330
|
+
for (const conversation of conversations) {
|
|
331
|
+
parts.push(...conversationLines(conversation, input.since, input.states?.get(conversation.file)));
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
const waiting = (input.notices ?? []).filter((notice) => notice.at >= input.since && (notice.level === "ask" || notice.level === "failed"));
|
|
335
|
+
if (waiting.length > 0) {
|
|
336
|
+
parts.push("", "Notices of the time (asks and failures):");
|
|
337
|
+
for (const notice of waiting) {
|
|
338
|
+
parts.push(`- ${notice.level}: ${line(notice.text, ASK_CHARS)}${notice.title ? ` (in "${notice.title}"${notice.sessionFile ? `, ${notice.sessionFile}` : ""})` : ""}`);
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
const runs = (input.runs ?? []).filter((run) => run.at >= input.since);
|
|
342
|
+
if (runs.length > 0) {
|
|
343
|
+
parts.push("", "Scheduled tasks that ran:");
|
|
344
|
+
for (const run of runs) {
|
|
345
|
+
parts.push(`- ${run.name}: ${run.status ?? "ran"}${run.summary ? ` — ${line(run.summary, SUMMARY_CHARS)}` : ""}`);
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
return parts.join(`
|
|
349
|
+
`);
|
|
350
|
+
}
|
|
351
|
+
BriefUtil.material = material;
|
|
352
|
+
function conversationLines(conversation, since2, state) {
|
|
353
|
+
const recent = conversation.said.filter((said) => said.at >= since2);
|
|
354
|
+
const asks = recent.filter((said) => said.role === "user" && !/^\/\S+$/.test(said.text)).slice(-ASKS);
|
|
355
|
+
const answer = [...recent].reverse().find((said) => said.role === "assistant");
|
|
356
|
+
const now = state?.waiting ? " · waits for the user" : state?.streaming ? " · still working" : "";
|
|
357
|
+
const where = conversation.group ? `${conversation.cwd} · of ${conversation.group}` : conversation.cwd;
|
|
358
|
+
return [
|
|
359
|
+
`- [${conversation.title || "Untitled"}](${conversation.file}) · ${where}${now}`,
|
|
360
|
+
...asks.map((ask) => ` - asked: ${line(ask.text, ASK_CHARS)}`),
|
|
361
|
+
...answer ? [` - last answer: ${line(answer.text, ANSWER_CHARS)}`] : []
|
|
362
|
+
];
|
|
363
|
+
}
|
|
364
|
+
function line(text, chars) {
|
|
365
|
+
const flat = text.replace(/\s+/g, " ").trim();
|
|
366
|
+
return flat.length > chars ? `${flat.slice(0, chars)}…` : flat;
|
|
367
|
+
}
|
|
368
|
+
BriefUtil.HEADINGS = { zh: ["做完了", "等你定", "下一步"], en: ["Done", "Waiting for you", "Next"] };
|
|
369
|
+
const PARTS = {
|
|
370
|
+
做完了: "done",
|
|
371
|
+
done: "done",
|
|
372
|
+
等你定: "waiting",
|
|
373
|
+
"waiting for you": "waiting",
|
|
374
|
+
下一步: "next",
|
|
375
|
+
next: "next"
|
|
376
|
+
};
|
|
377
|
+
function summary(text, file, at) {
|
|
378
|
+
const counts = { done: 0, waiting: 0, next: 0 };
|
|
379
|
+
let part;
|
|
380
|
+
let found = false;
|
|
381
|
+
let top;
|
|
382
|
+
const items = [];
|
|
383
|
+
for (const line2 of text.split(/\r?\n/)) {
|
|
384
|
+
const heading = /^\s*#{1,6}\s+(.+?)\s*#*\s*$/.exec(line2) ?? /^\s*\*\*(.+?)\*\*\s*[::]?\s*$/.exec(line2);
|
|
385
|
+
if (heading) {
|
|
386
|
+
part = PARTS[heading[1].replace(/[::]$/, "").trim().toLowerCase()];
|
|
387
|
+
found ||= !!part;
|
|
388
|
+
continue;
|
|
389
|
+
}
|
|
390
|
+
const item = /^\s*(?:[-*+]|\d+[.)])\s+(.+)$/.exec(line2);
|
|
391
|
+
if (part && item) {
|
|
392
|
+
counts[part]++;
|
|
393
|
+
if (part === "waiting") {
|
|
394
|
+
top ??= plain(item[1]);
|
|
395
|
+
if (items.length < Limits.BRIEF_ITEMS) {
|
|
396
|
+
items.push(briefItem(item[1]));
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
return found ? { at, file, ...counts, ...top ? { top } : {}, ...items.length ? { items } : {} } : undefined;
|
|
402
|
+
}
|
|
403
|
+
BriefUtil.summary = summary;
|
|
404
|
+
function briefItem(line2) {
|
|
405
|
+
const link = /\]\(<?([^)>]+?\.jsonl)>?\)/.exec(line2);
|
|
406
|
+
return { text: plain(line2), ...link ? { file: link[1].trim() } : {} };
|
|
407
|
+
}
|
|
408
|
+
function plain(text) {
|
|
409
|
+
return text.replace(/!?\[([^\]]*)\]\([^)]*\)/g, "$1").replace(/[*_`~]+/g, "").replace(/\s+/g, " ").trim().slice(0, 160);
|
|
410
|
+
}
|
|
411
|
+
BriefUtil.plain = plain;
|
|
412
|
+
function message(material2, since2, zh2) {
|
|
413
|
+
const heads = zh2 ? BriefUtil.HEADINGS.zh : BriefUtil.HEADINGS.en;
|
|
414
|
+
const context = [
|
|
415
|
+
"[ta-recall:brief]",
|
|
416
|
+
`Write the daily brief of the user from what happened since ${new Date(since2).toISOString()}, below, in ${zh2 ? "Chinese" : "English"}. Short, for a phone: up to three parts, each a heading of level 3 with exactly these words, then a list of one line each (Ta counts them),`,
|
|
417
|
+
`- ### ${heads[0]}: what got done;`,
|
|
418
|
+
`- ### ${heads[1]}: what waits for a decision of the user, failed or was left half done, and what they should do, the most pressing first;`,
|
|
419
|
+
`- ### ${heads[2]}: two or three concrete next steps.`,
|
|
420
|
+
"Each line links its conversation as [title](session file). Leave out a part with nothing in it, small talk, and this conversation itself. Use no tools unless something must be checked.",
|
|
421
|
+
"",
|
|
422
|
+
material2
|
|
423
|
+
].join(`
|
|
424
|
+
`);
|
|
425
|
+
return `<context>
|
|
426
|
+
${context}
|
|
427
|
+
</context>
|
|
428
|
+
${zh2 ? "写今天的简报" : "Write today's brief"}`;
|
|
429
|
+
}
|
|
430
|
+
BriefUtil.message = message;
|
|
431
|
+
})(BriefUtil ||= {});
|
|
432
|
+
|
|
433
|
+
// web-src/react.ts
|
|
434
|
+
var React;
|
|
435
|
+
function bind(react) {
|
|
436
|
+
React = react;
|
|
437
|
+
}
|
|
438
|
+
var idle = () => [false, async (action) => await action()];
|
|
439
|
+
function useBusy(ui) {
|
|
440
|
+
return (ui.useBusy ?? idle)();
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
// web-src/stored.ts
|
|
444
|
+
function useStored(pi, key, parse) {
|
|
445
|
+
const [value, setValue] = React.useState(() => parse(undefined));
|
|
446
|
+
React.useEffect(() => {
|
|
447
|
+
let live = true;
|
|
448
|
+
const read = () => void pi.storage.get(key).then((stored) => live && setValue(parse(stored)), () => {
|
|
449
|
+
return;
|
|
450
|
+
});
|
|
451
|
+
read();
|
|
452
|
+
const stop = pi.storage.onChange((keys) => keys.includes(key) && read());
|
|
453
|
+
return () => {
|
|
454
|
+
live = false;
|
|
455
|
+
stop();
|
|
456
|
+
};
|
|
457
|
+
}, [pi, key, parse]);
|
|
458
|
+
const set = React.useCallback((next) => {
|
|
459
|
+
setValue(next);
|
|
460
|
+
return pi.storage.set(key, next);
|
|
461
|
+
}, [pi, key]);
|
|
462
|
+
return [value, set];
|
|
463
|
+
}
|
|
464
|
+
function message(error) {
|
|
465
|
+
return error instanceof Error ? error.message : String(error);
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
// web-src/brief-card.tsx
|
|
469
|
+
var SHOWN = 3;
|
|
470
|
+
var BriefCardUtil;
|
|
471
|
+
((BriefCardUtil) => {
|
|
472
|
+
function lines(state, shown = SHOWN) {
|
|
473
|
+
const items = (state.summary?.items ?? []).map((item, at) => ({ item, at, done: state.done.includes(at) }));
|
|
474
|
+
return [...items.filter((line) => !line.done), ...items.filter((line) => line.done)].slice(0, shown);
|
|
475
|
+
}
|
|
476
|
+
BriefCardUtil.lines = lines;
|
|
477
|
+
function when(at, now, language) {
|
|
478
|
+
const date = new Date(at);
|
|
479
|
+
const time = date.toLocaleTimeString(language, { hour: "2-digit", minute: "2-digit", hour12: false });
|
|
480
|
+
const today = new Date(now).toDateString() === date.toDateString();
|
|
481
|
+
const day = today ? RecallWords.of(language).briefToday : date.toLocaleDateString(language, { month: "numeric", day: "numeric" });
|
|
482
|
+
return `${day} ${time}`;
|
|
483
|
+
}
|
|
484
|
+
BriefCardUtil.when = when;
|
|
485
|
+
})(BriefCardUtil ||= {});
|
|
486
|
+
function briefCard(pi, store) {
|
|
487
|
+
return function BriefCard() {
|
|
488
|
+
const state = React.useSyncExternalStore((listener) => store.subscribe(listener), () => store.state);
|
|
489
|
+
const [settings] = useStored(pi, Keys.BRIEF, BriefUtil.settings);
|
|
490
|
+
const words = RecallWords.of(pi.ui.language);
|
|
491
|
+
const { summary } = state;
|
|
492
|
+
if (!state.loaded) {
|
|
493
|
+
return /* @__PURE__ */ React.createElement(pi.ui.Skeleton, {
|
|
494
|
+
rows: 2
|
|
495
|
+
});
|
|
496
|
+
}
|
|
497
|
+
if (!summary) {
|
|
498
|
+
return /* @__PURE__ */ React.createElement(pi.ui.Empty, {
|
|
499
|
+
title: RecallWords.format(words.briefCardEmpty, { time: settings.time }),
|
|
500
|
+
compact: true
|
|
501
|
+
});
|
|
502
|
+
}
|
|
503
|
+
const Check = pi.ui.icons.Check;
|
|
504
|
+
const Chevron = pi.ui.icons.ChevronRight;
|
|
505
|
+
const { waiting } = BriefHomeUtil.left(summary, state.done);
|
|
506
|
+
const counts = RecallWords.format(waiting ? words.briefCounts : words.briefCountsDone, { done: String(summary.done), waiting: String(waiting) });
|
|
507
|
+
const lines = BriefCardUtil.lines(state);
|
|
508
|
+
const more = summary.waiting - lines.length;
|
|
509
|
+
return /* @__PURE__ */ React.createElement("div", {
|
|
510
|
+
className: "tar-brief-card"
|
|
511
|
+
}, /* @__PURE__ */ React.createElement("button", {
|
|
512
|
+
type: "button",
|
|
513
|
+
className: "tar-brief-meta",
|
|
514
|
+
onClick: () => void store.open()
|
|
515
|
+
}, /* @__PURE__ */ React.createElement("span", {
|
|
516
|
+
className: "tar-brief-when"
|
|
517
|
+
}, BriefCardUtil.when(summary.at, Date.now(), pi.ui.language)), /* @__PURE__ */ React.createElement("span", {
|
|
518
|
+
className: "tar-brief-counts"
|
|
519
|
+
}, counts), Chevron && /* @__PURE__ */ React.createElement(Chevron, {
|
|
520
|
+
size: 14,
|
|
521
|
+
strokeWidth: 2
|
|
522
|
+
})), lines.length > 0 ? /* @__PURE__ */ React.createElement("ul", {
|
|
523
|
+
className: "tar-brief-lines"
|
|
524
|
+
}, lines.map(({ item, at, done }) => /* @__PURE__ */ React.createElement("li", {
|
|
525
|
+
key: at,
|
|
526
|
+
className: "tar-brief-line",
|
|
527
|
+
"data-done": done ? "" : undefined
|
|
528
|
+
}, /* @__PURE__ */ React.createElement("button", {
|
|
529
|
+
type: "button",
|
|
530
|
+
className: "tar-brief-tick",
|
|
531
|
+
"aria-pressed": done,
|
|
532
|
+
"aria-label": done ? words.briefUntick : words.briefTick,
|
|
533
|
+
title: done ? words.briefUntick : words.briefTick,
|
|
534
|
+
onClick: () => void store.tick(at, !done).catch(() => {
|
|
535
|
+
return;
|
|
536
|
+
})
|
|
537
|
+
}, done && Check && /* @__PURE__ */ React.createElement(Check, {
|
|
538
|
+
size: 11,
|
|
539
|
+
strokeWidth: 3
|
|
540
|
+
})), /* @__PURE__ */ React.createElement("button", {
|
|
541
|
+
type: "button",
|
|
542
|
+
className: "tar-brief-text",
|
|
543
|
+
onClick: () => void store.open(item)
|
|
544
|
+
}, item.text)))) : summary.waiting === 0 && /* @__PURE__ */ React.createElement("div", {
|
|
545
|
+
className: "tar-brief-none"
|
|
546
|
+
}, words.briefNoneWaiting), more > 0 && /* @__PURE__ */ React.createElement("button", {
|
|
547
|
+
type: "button",
|
|
548
|
+
className: "tar-brief-more",
|
|
549
|
+
onClick: () => void store.open()
|
|
550
|
+
}, RecallWords.format(words.briefMore, { count: String(more) })));
|
|
551
|
+
};
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
// web-src/chat-icons.ts
|
|
555
|
+
async function pinOnce(pi, file) {
|
|
556
|
+
if (!pi.ui.pinChat || await pi.storage.get(Keys.BRIEF_PINNED).catch(() => file) === file) {
|
|
557
|
+
return;
|
|
558
|
+
}
|
|
559
|
+
await pi.storage.set(Keys.BRIEF_PINNED, file);
|
|
560
|
+
pi.ui.pinChat(file);
|
|
561
|
+
}
|
|
562
|
+
function chatIcons(pi) {
|
|
563
|
+
let brief;
|
|
564
|
+
let asked = new Set;
|
|
565
|
+
const listeners = new Set;
|
|
566
|
+
const read = () => void Promise.all([pi.storage.get(Keys.BRIEF_FILE), pi.storage.get(Keys.ASKED)]).then(([file, files]) => {
|
|
567
|
+
brief = typeof file === "string" && file ? file : undefined;
|
|
568
|
+
if (brief) {
|
|
569
|
+
pinOnce(pi, brief);
|
|
570
|
+
}
|
|
571
|
+
asked = new Set(Array.isArray(files) ? files.filter((item) => typeof item === "string") : []);
|
|
572
|
+
for (const listener of listeners) {
|
|
573
|
+
listener();
|
|
574
|
+
}
|
|
575
|
+
}, () => {
|
|
576
|
+
return;
|
|
577
|
+
});
|
|
578
|
+
read();
|
|
579
|
+
pi.storage.onChange((keys) => (keys.includes(Keys.BRIEF_FILE) || keys.includes(Keys.ASKED)) && read());
|
|
580
|
+
return {
|
|
581
|
+
icon: (chat) => {
|
|
582
|
+
if (!chat.sessionFile) {
|
|
583
|
+
return;
|
|
584
|
+
}
|
|
585
|
+
if (chat.sessionFile === brief) {
|
|
586
|
+
return pi.ui.icons.ScrollText && { icon: pi.ui.icons.ScrollText, tint: "daily-brief" };
|
|
587
|
+
}
|
|
588
|
+
return asked.has(chat.sessionFile) && pi.ui.icons.Sparkles ? { icon: pi.ui.icons.Sparkles, tint: "ask-ta", archiveDays: Limits.ASKED_ARCHIVE_DAYS } : undefined;
|
|
589
|
+
},
|
|
590
|
+
subscribe: (listener) => {
|
|
591
|
+
listeners.add(listener);
|
|
592
|
+
return () => listeners.delete(listener);
|
|
593
|
+
}
|
|
594
|
+
};
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
// web-src/brief-seen.tsx
|
|
598
|
+
var seenOf = (value) => typeof value === "number" ? value : 0;
|
|
599
|
+
function briefSeen(pi) {
|
|
600
|
+
return function BriefSeen({ conversation }) {
|
|
601
|
+
const [summary] = useStored(pi, Keys.BRIEF_SUMMARY, BriefHomeUtil.summary);
|
|
602
|
+
const [seen, setSeen] = useStored(pi, Keys.BRIEF_SEEN, seenOf);
|
|
603
|
+
const here = !!summary && summary.at > seen && !!conversation.sessionFile && conversation.sessionFile === summary.file;
|
|
604
|
+
React.useEffect(() => {
|
|
605
|
+
if (here && summary) {
|
|
606
|
+
setSeen(summary.at).catch(() => {
|
|
607
|
+
return;
|
|
608
|
+
});
|
|
609
|
+
}
|
|
610
|
+
}, [here, summary, setSeen]);
|
|
611
|
+
return null;
|
|
612
|
+
};
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
// web-src/skill-util.ts
|
|
616
|
+
var FENCE = "```";
|
|
617
|
+
var NAME_CHARS = 64;
|
|
618
|
+
var DESCRIPTION_CHARS = 1024;
|
|
619
|
+
var SkillUtil;
|
|
620
|
+
((SkillUtil) => {
|
|
621
|
+
function find(text) {
|
|
622
|
+
const lines = text.split(/\r?\n/);
|
|
623
|
+
let found;
|
|
624
|
+
for (let index = 0;index < lines.length; index++) {
|
|
625
|
+
const open = /^\s*(`{3,})\s*([\w-]+)\s*$/.exec(lines[index]);
|
|
626
|
+
if (open?.[2] !== SKILL_BLOCK) {
|
|
627
|
+
continue;
|
|
628
|
+
}
|
|
629
|
+
const close = new RegExp(`^\\s*${open[1]}\`*\\s*$`);
|
|
630
|
+
const end = lines.findIndex((line, at) => at > index && close.test(line));
|
|
631
|
+
found = lines.slice(index + 1, end < 0 ? lines.length : end);
|
|
632
|
+
index = end < 0 ? lines.length : end;
|
|
633
|
+
}
|
|
634
|
+
return found && parse(found);
|
|
635
|
+
}
|
|
636
|
+
SkillUtil.find = find;
|
|
637
|
+
function parse(lines) {
|
|
638
|
+
const rule = lines.findIndex((line) => line.trim() === "---");
|
|
639
|
+
const head = rule < 0 ? [] : lines.slice(0, rule);
|
|
640
|
+
const body = lines.slice(rule + 1).join(`
|
|
641
|
+
`).trim();
|
|
642
|
+
if (!body) {
|
|
643
|
+
return;
|
|
644
|
+
}
|
|
645
|
+
const field = (key) => head.map((line) => new RegExp(`^\\s*${key}\\s*:\\s*(.*)$`, "i").exec(line)?.[1].trim().replace(/^["'](.*)["']$/, "$1")).find((value) => value !== undefined);
|
|
646
|
+
const description = (field("description") ?? "").replace(/\s+/g, " ").slice(0, DESCRIPTION_CHARS);
|
|
647
|
+
return { name: name(field("name") ?? "") || name(description) || "skill", description, body };
|
|
648
|
+
}
|
|
649
|
+
function name(text) {
|
|
650
|
+
return text.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, NAME_CHARS).replace(/-+$/, "");
|
|
651
|
+
}
|
|
652
|
+
SkillUtil.name = name;
|
|
653
|
+
function check(draft) {
|
|
654
|
+
const body = typeof draft?.body === "string" ? draft.body.trim() : "";
|
|
655
|
+
if (!body) {
|
|
656
|
+
throw new Error("A skill needs a body.");
|
|
657
|
+
}
|
|
658
|
+
const description = (typeof draft.description === "string" ? draft.description : "").replace(/\s+/g, " ").trim().slice(0, DESCRIPTION_CHARS);
|
|
659
|
+
return { name: name(typeof draft.name === "string" ? draft.name : "") || "skill", description: description || body.split(`
|
|
660
|
+
`)[0].slice(0, 200), body };
|
|
661
|
+
}
|
|
662
|
+
SkillUtil.check = check;
|
|
663
|
+
function markdown(draft) {
|
|
664
|
+
return `---
|
|
665
|
+
name: ${draft.name}
|
|
666
|
+
description: ${JSON.stringify(draft.description)}
|
|
667
|
+
---
|
|
668
|
+
|
|
669
|
+
${draft.body.trim()}
|
|
670
|
+
`;
|
|
671
|
+
}
|
|
672
|
+
SkillUtil.markdown = markdown;
|
|
673
|
+
function blockHelp() {
|
|
674
|
+
return [
|
|
675
|
+
`${FENCE}${SKILL_BLOCK}`,
|
|
676
|
+
"name: <lowercase-words-with-dashes>",
|
|
677
|
+
"description: <one line: what it does and when to use it>",
|
|
678
|
+
"---",
|
|
679
|
+
"<the body: the goal, then the steps, commands, files and checks that worked, in general terms, without what held only this once>",
|
|
680
|
+
FENCE,
|
|
681
|
+
"Use a longer fence when the body has fences of its own. Write it in the language of the user."
|
|
682
|
+
].join(`
|
|
683
|
+
`);
|
|
684
|
+
}
|
|
685
|
+
SkillUtil.blockHelp = blockHelp;
|
|
686
|
+
function hint(asks) {
|
|
687
|
+
const lines = asks.map((ask2) => `- "${ask2.title}" (${new Date(ask2.at).toISOString().slice(0, 10)}): ${JSON.stringify(ask2.text.replace(/\s+/g, " ").slice(0, 200))}`);
|
|
688
|
+
return [
|
|
689
|
+
"The user asked for much the same in other conversations before:",
|
|
690
|
+
...lines,
|
|
691
|
+
`Do what is asked first. Then, if it is a way of working worth doing the same way again (steps, commands, checks; not a one-off answer), offer to keep it as a skill in one short sentence and draft it with ${PROPOSE_TOOL}, which Ta shows as a card the user saves with a tap. Without that tool, end your answer with the draft in a fenced block of the language ${SKILL_BLOCK} instead:`,
|
|
692
|
+
blockHelp(),
|
|
693
|
+
"Offer nothing when it is not worth keeping."
|
|
694
|
+
].join(`
|
|
695
|
+
`);
|
|
696
|
+
}
|
|
697
|
+
SkillUtil.hint = hint;
|
|
698
|
+
function ask(language) {
|
|
699
|
+
const context = [
|
|
700
|
+
"[ta-recall:skill]",
|
|
701
|
+
"The user wants the way of working of this conversation kept as a skill of Ta, which Ta loads in every new conversation: written so that one who never saw this conversation does it the same way.",
|
|
702
|
+
"- Keep what worked: the goal, the steps, the commands, files, checks and pitfalls; leave out what was only tried and dropped and what holds only this once.",
|
|
703
|
+
`- Draft it with ${PROPOSE_TOOL}, which Ta shows as a card the user saves, and say in a line what it does; do not write the skill file yourself. Without that tool, end your answer with the draft in a fenced block of the language ${SKILL_BLOCK}:`,
|
|
704
|
+
blockHelp(),
|
|
705
|
+
"- When the conversation holds no way of working worth keeping, say so and draft nothing."
|
|
706
|
+
].join(`
|
|
707
|
+
`);
|
|
708
|
+
return `<context>
|
|
709
|
+
${context}
|
|
710
|
+
</context>
|
|
711
|
+
${/^zh/i.test(language) ? "把这个对话里的做法存成技能" : "Keep how this was done as a skill"}`;
|
|
712
|
+
}
|
|
713
|
+
SkillUtil.ask = ask;
|
|
714
|
+
})(SkillUtil ||= {});
|
|
715
|
+
|
|
716
|
+
// web-src/composer.tsx
|
|
717
|
+
function composerAddon(pi) {
|
|
718
|
+
return {
|
|
719
|
+
above: briefSeen(pi),
|
|
720
|
+
actions: (conversation) => {
|
|
721
|
+
const words = RecallWords.of(pi.ui.language);
|
|
722
|
+
const Sparkles = pi.ui.icons.Sparkles;
|
|
723
|
+
return [
|
|
724
|
+
{
|
|
725
|
+
key: "make-skill",
|
|
726
|
+
label: words.makeSkill,
|
|
727
|
+
detail: words.makeSkillDetail,
|
|
728
|
+
icon: Sparkles ? /* @__PURE__ */ React.createElement(Sparkles, {
|
|
729
|
+
size: 16
|
|
730
|
+
}) : undefined,
|
|
731
|
+
run: () => void pi.server.prompt(conversation.sessionId, {
|
|
732
|
+
clientMessageId: `ta-recall-skill:${Date.now()}`,
|
|
733
|
+
message: SkillUtil.ask(pi.ui.language),
|
|
734
|
+
streamingBehavior: "followUp"
|
|
735
|
+
}).catch((error) => pi.ui.notify(RecallWords.format(words.failed, { message: message(error) }), "error"))
|
|
736
|
+
}
|
|
737
|
+
];
|
|
738
|
+
}
|
|
739
|
+
};
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
// web-src/search-source.ts
|
|
743
|
+
var DAYS = 90;
|
|
744
|
+
var HITS = 6;
|
|
745
|
+
function recallSearch(pi) {
|
|
746
|
+
const words = () => RecallWords.of(pi.ui.language);
|
|
747
|
+
const notify = (error) => pi.ui.notify(RecallWords.format(words().failed, { message: error instanceof Error ? error.message : String(error) }), "error");
|
|
748
|
+
return {
|
|
749
|
+
key: "ta-recall",
|
|
750
|
+
title: () => words().searchTitle,
|
|
751
|
+
order: 40,
|
|
752
|
+
remote: true,
|
|
753
|
+
async search(query, offset) {
|
|
754
|
+
const text = query.trim();
|
|
755
|
+
if (!text || offset > 0) {
|
|
756
|
+
return { items: [] };
|
|
757
|
+
}
|
|
758
|
+
const ask = {
|
|
759
|
+
key: "ask",
|
|
760
|
+
title: RecallWords.format(words().searchAsk, { query: text }),
|
|
761
|
+
detail: words().searchAskDetail,
|
|
762
|
+
icon: pi.ui.icons.Sparkles,
|
|
763
|
+
open: () => RecallConversations.ask(pi, text).catch(notify)
|
|
764
|
+
};
|
|
765
|
+
const hits = await pi.callHost("search", { query: text, all: true, days: DAYS, limit: HITS }).catch(() => []);
|
|
766
|
+
return {
|
|
767
|
+
items: [
|
|
768
|
+
ask,
|
|
769
|
+
...hits.map((hit) => ({
|
|
770
|
+
key: hit.file,
|
|
771
|
+
title: hit.title || hit.file.split("/").pop() || hit.file,
|
|
772
|
+
detail: hit.snippets.at(-1)?.text,
|
|
773
|
+
icon: pi.ui.icons.MessageSquareText,
|
|
774
|
+
open: () => RecallConversations.open(pi, hit.file).catch(notify)
|
|
775
|
+
}))
|
|
776
|
+
]
|
|
777
|
+
};
|
|
778
|
+
}
|
|
779
|
+
};
|
|
780
|
+
}
|
|
781
|
+
|
|
782
|
+
// web-src/settings.tsx
|
|
783
|
+
var suggests = (value) => value !== false;
|
|
784
|
+
function notifyFailure(pi, error) {
|
|
785
|
+
pi.ui.notify(RecallWords.format(RecallWords.of(pi.ui.language).failed, { message: message(error) }), "error");
|
|
786
|
+
}
|
|
787
|
+
function Toggle({ pi, checked, label, onChange }) {
|
|
788
|
+
const Switch = pi.ui.Switch;
|
|
789
|
+
if (Switch) {
|
|
790
|
+
return /* @__PURE__ */ React.createElement(Switch, {
|
|
791
|
+
checked,
|
|
792
|
+
label,
|
|
793
|
+
onChange: (on) => onChange(on).catch((error) => notifyFailure(pi, error))
|
|
794
|
+
});
|
|
795
|
+
}
|
|
796
|
+
return /* @__PURE__ */ React.createElement("input", {
|
|
797
|
+
type: "checkbox",
|
|
798
|
+
role: "switch",
|
|
799
|
+
className: "ta-switch",
|
|
800
|
+
checked,
|
|
801
|
+
"aria-checked": checked,
|
|
802
|
+
"aria-label": label,
|
|
803
|
+
onChange: (event) => void onChange(event.target.checked).catch((error) => notifyFailure(pi, error))
|
|
804
|
+
});
|
|
805
|
+
}
|
|
806
|
+
function BriefSwitch({ pi }) {
|
|
807
|
+
const words = RecallWords.of(pi.ui.language);
|
|
808
|
+
const [brief, setBrief] = useStored(pi, Keys.BRIEF, BriefUtil.settings);
|
|
809
|
+
return /* @__PURE__ */ React.createElement(Toggle, {
|
|
810
|
+
pi,
|
|
811
|
+
checked: brief.enabled,
|
|
812
|
+
label: words.briefLabel,
|
|
813
|
+
onChange: (enabled) => setBrief({ ...brief, enabled })
|
|
814
|
+
});
|
|
815
|
+
}
|
|
816
|
+
function BriefTime({ pi }) {
|
|
817
|
+
const words = RecallWords.of(pi.ui.language);
|
|
818
|
+
const [brief, setBrief] = useStored(pi, Keys.BRIEF, BriefUtil.settings);
|
|
819
|
+
const change = (time) => {
|
|
820
|
+
if (BriefUtil.parseTime(time)) {
|
|
821
|
+
setBrief({ ...brief, time }).catch((error) => notifyFailure(pi, error));
|
|
822
|
+
}
|
|
823
|
+
};
|
|
824
|
+
return /* @__PURE__ */ React.createElement("input", {
|
|
825
|
+
type: "time",
|
|
826
|
+
className: "tar-time",
|
|
827
|
+
"aria-label": words.briefTime,
|
|
828
|
+
value: brief.time,
|
|
829
|
+
disabled: !brief.enabled,
|
|
830
|
+
onChange: (event) => change(event.target.value)
|
|
831
|
+
});
|
|
832
|
+
}
|
|
833
|
+
function BriefNow({ pi }) {
|
|
834
|
+
const words = RecallWords.of(pi.ui.language);
|
|
835
|
+
const [busy, run] = useBusy(pi.ui);
|
|
836
|
+
const write = async () => {
|
|
837
|
+
try {
|
|
838
|
+
const file = await pi.callHost("briefNow");
|
|
839
|
+
if (!file) {
|
|
840
|
+
pi.ui.notify(words.briefNothing, "info");
|
|
841
|
+
} else if (!await RecallConversations.open(pi, file)) {
|
|
842
|
+
pi.ui.notify(words.briefLabel, "info");
|
|
843
|
+
}
|
|
844
|
+
} catch (error) {
|
|
845
|
+
notifyFailure(pi, error);
|
|
846
|
+
}
|
|
847
|
+
};
|
|
848
|
+
return /* @__PURE__ */ React.createElement("button", {
|
|
849
|
+
type: "button",
|
|
850
|
+
className: `ta-button${busy ? " ta-busy" : ""}`,
|
|
851
|
+
disabled: busy,
|
|
852
|
+
onClick: () => void run(write)
|
|
853
|
+
}, busy && /* @__PURE__ */ React.createElement("span", {
|
|
854
|
+
className: "ta-spinner ta-busy-mark"
|
|
855
|
+
}), /* @__PURE__ */ React.createElement("span", null, words.briefNowButton));
|
|
856
|
+
}
|
|
857
|
+
function SuggestSwitch({ pi }) {
|
|
858
|
+
const words = RecallWords.of(pi.ui.language);
|
|
859
|
+
const [on, setOn] = useStored(pi, Keys.SUGGEST, suggests);
|
|
860
|
+
return /* @__PURE__ */ React.createElement(Toggle, {
|
|
861
|
+
pi,
|
|
862
|
+
checked: on,
|
|
863
|
+
label: words.suggestLabel,
|
|
864
|
+
onChange: setOn
|
|
865
|
+
});
|
|
866
|
+
}
|
|
867
|
+
function recallSettings(pi) {
|
|
868
|
+
const words = () => RecallWords.of(pi.ui.language);
|
|
869
|
+
return {
|
|
870
|
+
title: () => words().settingsTitle,
|
|
871
|
+
icon: pi.ui.icons.ScrollText,
|
|
872
|
+
rows: [
|
|
873
|
+
{ key: "brief", label: () => words().briefLabel, description: () => words().briefHint, render: () => /* @__PURE__ */ React.createElement(BriefSwitch, {
|
|
874
|
+
pi
|
|
875
|
+
}) },
|
|
876
|
+
{ key: "brief-time", label: () => words().briefTime, render: () => /* @__PURE__ */ React.createElement(BriefTime, {
|
|
877
|
+
pi
|
|
878
|
+
}) },
|
|
879
|
+
{ key: "brief-now", label: () => words().briefNow, render: () => /* @__PURE__ */ React.createElement(BriefNow, {
|
|
880
|
+
pi
|
|
881
|
+
}) },
|
|
882
|
+
{ key: "suggest", label: () => words().suggestLabel, description: () => words().suggestHint, render: () => /* @__PURE__ */ React.createElement(SuggestSwitch, {
|
|
883
|
+
pi
|
|
884
|
+
}) }
|
|
885
|
+
]
|
|
886
|
+
};
|
|
887
|
+
}
|
|
888
|
+
|
|
889
|
+
// web-src/skill-card.tsx
|
|
890
|
+
function decisions(value) {
|
|
891
|
+
return value && typeof value === "object" ? value : {};
|
|
892
|
+
}
|
|
893
|
+
function skillCard(pi) {
|
|
894
|
+
return function SkillCardView({ message: custom }) {
|
|
895
|
+
const words = RecallWords.of(pi.ui.language);
|
|
896
|
+
const [decided] = useStored(pi, Keys.DECIDED, decisions);
|
|
897
|
+
const [open, setOpen] = React.useState(false);
|
|
898
|
+
const [saving, save] = useBusy(pi.ui);
|
|
899
|
+
const [declining, decline] = useBusy(pi.ui);
|
|
900
|
+
const card = custom.details;
|
|
901
|
+
if (!card?.draft?.body) {
|
|
902
|
+
return null;
|
|
903
|
+
}
|
|
904
|
+
const decision = decided[card.key];
|
|
905
|
+
const Sparkles = pi.ui.icons.Sparkles;
|
|
906
|
+
const Markdown = pi.ui.Markdown;
|
|
907
|
+
const run = (action) => action().catch((error) => pi.ui.notify(RecallWords.format(words.failed, { message: message(error) }), "error"));
|
|
908
|
+
const busy = saving || declining;
|
|
909
|
+
return /* @__PURE__ */ React.createElement("div", {
|
|
910
|
+
className: "tar-skill"
|
|
911
|
+
}, /* @__PURE__ */ React.createElement("div", {
|
|
912
|
+
className: "tar-skill-head"
|
|
913
|
+
}, Sparkles && /* @__PURE__ */ React.createElement(Sparkles, {
|
|
914
|
+
size: 14
|
|
915
|
+
}), /* @__PURE__ */ React.createElement("span", null, words.skillAsk)), /* @__PURE__ */ React.createElement("div", {
|
|
916
|
+
className: "tar-skill-title"
|
|
917
|
+
}, /* @__PURE__ */ React.createElement("span", {
|
|
918
|
+
className: "tar-skill-name"
|
|
919
|
+
}, card.draft.name)), card.draft.description && /* @__PURE__ */ React.createElement("div", {
|
|
920
|
+
className: "tar-skill-description"
|
|
921
|
+
}, card.draft.description), /* @__PURE__ */ React.createElement("button", {
|
|
922
|
+
type: "button",
|
|
923
|
+
className: "tar-skill-toggle",
|
|
924
|
+
"aria-expanded": open,
|
|
925
|
+
onClick: () => setOpen(!open)
|
|
926
|
+
}, open ? words.skillHide : words.skillShow), open && /* @__PURE__ */ React.createElement("div", {
|
|
927
|
+
className: "tar-skill-body"
|
|
928
|
+
}, /* @__PURE__ */ React.createElement(Markdown, {
|
|
929
|
+
text: card.draft.body
|
|
930
|
+
})), decision && "saved" in decision ? /* @__PURE__ */ React.createElement("div", {
|
|
931
|
+
className: "tar-skill-done tar-saved"
|
|
932
|
+
}, RecallWords.format(words.skillSaved, { name: decision.name })) : decision ? /* @__PURE__ */ React.createElement("div", {
|
|
933
|
+
className: "tar-skill-done"
|
|
934
|
+
}, words.skillDeclined) : /* @__PURE__ */ React.createElement("div", {
|
|
935
|
+
className: "tar-skill-actions"
|
|
936
|
+
}, /* @__PURE__ */ React.createElement("button", {
|
|
937
|
+
type: "button",
|
|
938
|
+
className: `ta-button ta-primary${saving ? " ta-busy" : ""}`,
|
|
939
|
+
disabled: busy,
|
|
940
|
+
onClick: () => void save(() => run(() => pi.callHost("saveSkill", card.key, card.draft)))
|
|
941
|
+
}, saving && /* @__PURE__ */ React.createElement("span", {
|
|
942
|
+
className: "ta-spinner ta-busy-mark ta-on-brand"
|
|
943
|
+
}), /* @__PURE__ */ React.createElement("span", null, words.skillSave)), /* @__PURE__ */ React.createElement("button", {
|
|
944
|
+
type: "button",
|
|
945
|
+
className: `ta-button${declining ? " ta-busy" : ""}`,
|
|
946
|
+
disabled: busy,
|
|
947
|
+
onClick: () => void decline(() => run(() => pi.callHost("declineSkill", card.key, card.ask)))
|
|
948
|
+
}, declining && /* @__PURE__ */ React.createElement("span", {
|
|
949
|
+
className: "ta-spinner ta-busy-mark"
|
|
950
|
+
}), /* @__PURE__ */ React.createElement("span", null, words.skillNo))));
|
|
951
|
+
};
|
|
952
|
+
}
|
|
953
|
+
|
|
954
|
+
// web-src/style.ts
|
|
955
|
+
var STYLE = `
|
|
956
|
+
/* A draft skill in its conversation, to save with a tap */
|
|
957
|
+
.tar-skill { margin: 4px 0; padding: 10px 12px; border: 1px solid var(--ta-border-muted); border-radius: 10px; background: var(--ta-card); font-size: calc(13px * var(--ta-font-scale)); max-width: 620px; }
|
|
958
|
+
.tar-skill-head { display: flex; align-items: center; gap: 6px; color: var(--ta-muted); font-size: calc(12px * var(--ta-font-scale)); }
|
|
959
|
+
.tar-skill-title { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
|
|
960
|
+
.tar-skill-name { font-family: var(--ta-font-mono, ui-monospace, SFMono-Regular, Menlo, monospace); font-size: calc(13px * var(--ta-font-scale)); font-weight: 600; color: var(--ta-text); overflow-wrap: anywhere; }
|
|
961
|
+
.tar-skill-description { margin-top: 4px; color: var(--ta-text); line-height: 1.55; overflow-wrap: anywhere; }
|
|
962
|
+
.tar-skill-toggle { margin-top: 6px; padding: 0; border: 0; background: none; color: var(--ta-muted); font: inherit; font-size: calc(12px * var(--ta-font-scale)); cursor: pointer; }
|
|
963
|
+
.tar-skill-toggle:hover { color: var(--ta-text); }
|
|
964
|
+
.tar-skill-body { margin-top: 6px; max-height: 280px; overflow: auto; padding: 2px 10px; border-radius: 8px; background: var(--ta-hover); font-size: calc(12px * var(--ta-font-scale)); }
|
|
965
|
+
.tar-skill-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
|
|
966
|
+
.tar-skill-done { margin-top: 8px; color: var(--ta-muted); font-size: calc(12px * var(--ta-font-scale)); line-height: 1.5; overflow-wrap: anywhere; }
|
|
967
|
+
.tar-skill-done.tar-saved { color: var(--ta-green); }
|
|
968
|
+
[data-touch] .tar-skill-actions .ta-button { min-height: 38px; }
|
|
969
|
+
/* The card of the daily brief on the board: its time and counts, then the lines that wait, each ticked off by its circle */
|
|
970
|
+
.tar-brief-card { display: flex; flex-direction: column; margin: -4px -6px; }
|
|
971
|
+
.tar-brief-meta { display: flex; align-items: center; gap: 8px; min-height: 30px; padding: 0 6px; border: 0; border-radius: 8px; background: none; color: var(--ta-muted); font: inherit; font-size: calc(12.5px * var(--ta-font-scale)); text-align: left; cursor: pointer; }
|
|
972
|
+
.tar-brief-meta:hover { background: var(--ta-hover); color: var(--ta-text); }
|
|
973
|
+
.tar-brief-when { flex: none; font-variant-numeric: tabular-nums; }
|
|
974
|
+
.tar-brief-counts { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
975
|
+
.tar-brief-lines { margin: 2px 0 0; padding: 0; list-style: none; }
|
|
976
|
+
.tar-brief-line { display: flex; align-items: center; gap: 2px; min-height: 36px; }
|
|
977
|
+
.tar-brief-tick { flex: none; display: grid; place-items: center; width: 32px; height: 36px; padding: 0; border: 0; background: none; color: var(--ta-main); cursor: pointer; -webkit-tap-highlight-color: transparent; }
|
|
978
|
+
.tar-brief-tick::before { content: ''; grid-area: 1 / 1; width: 16px; height: 16px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--ta-border-field); transition: background 140ms, box-shadow 140ms; }
|
|
979
|
+
.tar-brief-tick:hover::before { box-shadow: inset 0 0 0 1.5px var(--ta-muted); }
|
|
980
|
+
.tar-brief-tick > svg { grid-area: 1 / 1; position: relative; }
|
|
981
|
+
.tar-brief-line[data-done] .tar-brief-tick::before { background: var(--ta-green); box-shadow: none; }
|
|
982
|
+
.tar-brief-text { flex: 1; min-width: 0; min-height: 36px; padding: 0 6px 0 2px; border: 0; border-radius: 8px; background: none; color: var(--ta-text); font: inherit; font-size: calc(14px * var(--ta-font-scale)); text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
|
|
983
|
+
.tar-brief-text:hover { background: var(--ta-hover); }
|
|
984
|
+
.tar-brief-line[data-done] .tar-brief-text { color: var(--ta-muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--ta-muted) 60%, transparent); }
|
|
985
|
+
.tar-brief-none { padding: 6px 6px 2px; color: var(--ta-muted); font-size: calc(13px * var(--ta-font-scale)); }
|
|
986
|
+
.tar-brief-more { align-self: flex-start; margin-top: 2px; padding: 4px 6px; border: 0; border-radius: 8px; background: none; color: var(--ta-muted); font: inherit; font-size: calc(12.5px * var(--ta-font-scale)); cursor: pointer; }
|
|
987
|
+
.tar-brief-more:hover { background: var(--ta-hover); color: var(--ta-text); }
|
|
988
|
+
.tar-time { height: 32px; padding: 0 8px; border: 1px solid var(--ta-border-field); border-radius: 8px; background: transparent; color: var(--ta-text); font: inherit; font-size: calc(13px * var(--ta-font-scale)); }
|
|
989
|
+
`;
|
|
990
|
+
function injectStyle() {
|
|
991
|
+
const element = document.createElement("style");
|
|
992
|
+
element.dataset.taPackage = "ta-recall";
|
|
993
|
+
element.textContent = STYLE;
|
|
994
|
+
document.head.appendChild(element);
|
|
995
|
+
return () => element.remove();
|
|
996
|
+
}
|
|
997
|
+
|
|
998
|
+
// web-src/tool-line.ts
|
|
999
|
+
var RecallToolLine;
|
|
1000
|
+
((RecallToolLine) => {
|
|
1001
|
+
function renderCall(args, t) {
|
|
1002
|
+
return { verb: t("toolSearch"), target: typeof args.query === "string" ? args.query.trim() : "" };
|
|
1003
|
+
}
|
|
1004
|
+
RecallToolLine.renderCall = renderCall;
|
|
1005
|
+
function renderPropose(args, t) {
|
|
1006
|
+
return { verb: t("toolPropose"), target: typeof args.name === "string" ? args.name.trim() : "" };
|
|
1007
|
+
}
|
|
1008
|
+
RecallToolLine.renderPropose = renderPropose;
|
|
1009
|
+
function register(pi, t) {
|
|
1010
|
+
pi.registerToolRenderer?.((name, next) => name === TOOL_NAME ? { renderCall: (args) => renderCall(args, t) } : name === PROPOSE_TOOL ? { renderCall: (args) => renderPropose(args, t) } : next());
|
|
1011
|
+
}
|
|
1012
|
+
RecallToolLine.register = register;
|
|
1013
|
+
})(RecallToolLine ||= {});
|
|
1014
|
+
|
|
1015
|
+
// web-src/index.tsx
|
|
1016
|
+
function activate(pi) {
|
|
1017
|
+
bind(pi.React);
|
|
1018
|
+
const removeStyle = injectStyle();
|
|
1019
|
+
pi.registerSettings(recallSettings(pi));
|
|
1020
|
+
pi.registerMessageRenderer(SKILL_TYPE, skillCard(pi));
|
|
1021
|
+
pi.registerComposerAddon(composerAddon(pi));
|
|
1022
|
+
pi.registerSearch(recallSearch(pi));
|
|
1023
|
+
pi.registerChatIcon?.(chatIcons(pi));
|
|
1024
|
+
const brief = new BriefStore(pi);
|
|
1025
|
+
pi.registerHomeItems?.(briefHome(pi, brief));
|
|
1026
|
+
pi.registerView("brief", {
|
|
1027
|
+
title: () => RecallWords.of(pi.ui.language).briefLabel,
|
|
1028
|
+
icon: pi.ui.icons.ScrollText,
|
|
1029
|
+
location: "board",
|
|
1030
|
+
order: 5,
|
|
1031
|
+
render: briefCard(pi, brief)
|
|
1032
|
+
});
|
|
1033
|
+
RecallToolLine.register(pi, (key) => RecallWords.of(pi.ui.language)[key]);
|
|
1034
|
+
return removeStyle;
|
|
1035
|
+
}
|
|
1036
|
+
export {
|
|
1037
|
+
activate as default
|
|
1038
|
+
};
|