@celljs/ta-extensions 4.11.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@celljs/ta-extensions",
3
- "version": "4.11.0",
3
+ "version": "4.12.0",
4
4
  "description": "A pi package for Ta: the page of extensions, where the user makes one by saying what it should do, and hands extensions on or takes them in as one file",
5
5
  "keywords": [
6
6
  "pi-package"
@@ -27,9 +27,9 @@
27
27
  "watch": "tsc -b -w --preserveWatchOutput"
28
28
  },
29
29
  "devDependencies": {
30
- "@celljs/ta-harness": "4.11.0",
31
- "@celljs/ta-protocol": "4.11.0",
32
- "@celljs/ta-web": "4.11.0",
30
+ "@celljs/ta-harness": "4.12.0",
31
+ "@celljs/ta-protocol": "4.12.0",
32
+ "@celljs/ta-web": "4.12.0",
33
33
  "@types/react": "^19.3.0"
34
34
  },
35
35
  "publishConfig": {
@@ -59,6 +59,7 @@ export default function (pi) {
59
59
  - `on(type, handler)`: events of the conversation shown, as pi sends them (`agent_start`, `agent_end`, `message_end`, `tool_execution_end`, ...).
60
60
  - `sendUserMessage(text)`: sends a message to the conversation shown as if the user typed it; `'/name args'` runs a command of a pi extension.
61
61
  - `switchSession(sessionId, opening?)`: shows another open session of ta serve (an id of `server.listSessions()`) as the conversation; on a phone the drawer closes. Pass a promise of the id for a session still opening (`{ title, cwd }` in `opening` says what it is): it is in front at once, showing that it opens, so a click never waits on the server.
62
+ - `openChat(sessionFile)`: shows the conversation of a session file of Ta as the lists open it, at once from what the page or the device has, opened again in one round trip when it closed; resolves false when no conversation has it. Prefer it to finding the file with `server.listSavedSessions()` and `switchSession`. Newer than some Ta apps: `pi.openChat?.(file)`.
62
63
  - `reloadExtensions()`: after the extension installed, imported, turned on or off (`packages.setPackageEnabled(id, enabled)`) or removed a package itself (`packages.installPackage`, `packages.removePackage`), loads the web extensions and the pi extensions of the conversation again, as the end of a reply does. `packages.listPackages()` lists every package Ta loads, with what each holds.
63
64
  - `ui.notify(message, type?)`: a short notice; `type` is `'info'`, `'warning'` or `'error'`. `ui.confirm(title, message?, { confirmLabel?, danger? })` asks before going ahead and resolves with the answer; `danger` for what cannot be undone.
64
65
  - `ui.notifySession({ key, sessionId?, sessionFile?, cwd?, level, text, options?, actions? })`: tells the user what a conversation said, as a messenger tells of a message; `level` is `'ask'` (it needs them), `'failed'` or `'done'`. The page decides how: nothing while they look at that conversation (nor for a task the double follows, unless it asks), on a phone or a tablet nothing pops up (the unread dots of the list and of the Chats tab tell), on a computer a banner with its face and name while the page is in front (a tap opens it; `options` are answers sent as their message, once from whichever page), a notice of the system otherwise. Give each piece of news one `key` on every page; call it with `?.` for an older Ta app. The built-in `ta-notify` already tells of every turn, failure, dialog and `notify_user`: use this only for news of your own.