@celljs/ta-glance 4.29.0 → 4.31.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 +2 -1
- package/README.md +2 -1
- package/extension/index.mjs +275 -131
- package/package.json +6 -3
- package/web/index.js +1230 -1019
package/README.en.md
CHANGED
|
@@ -7,8 +7,9 @@ A pi package that comes with Ta (on by default; Settings → Extensions of the w
|
|
|
7
7
|
- **Waiting for you**: a turn whose reply ends with a card of choices (`options`) or `status: "blocked"` is marked in the session with a `ta-ask` entry (`TA_ASK_ENTRY`, which the model never reads): the list of chats, its tab, the double's tasks and Quick open show that the conversation waits for you to decide, until you answer, by a tap or in words. Until then the card is framed in blue with a ?; once answered it shows the choice on every device, after a reload too (`WebCodeRendererProps.answer`).
|
|
8
8
|
- **Elsewhere**: the preview of the list of conversations shows the first line; replies to WeChat and WeCom bots draw no card and stay short paragraphs; `ta` in a terminal replies as before. External agents (ta-agents) get the section too.
|
|
9
9
|
- **Charts**: a key number may have a small line of its values over time (`trend`), and a card may have a line chart (`line`, up to 4 series) and the parts of a whole (`share`), drawn in plain SVG, with no library.
|
|
10
|
+
- **Boards**: a `board` block draws a chart laid out in a grid: nine palaces, four pillars or six lines fill it in order, and a cell may sit at a place and take several (`at`, `span`), so twelve houses go round a middle; each cell has a name, a tag in its corner and a few short lines, the one that matters drawn apart, a tone for good or bad.
|
|
10
11
|
- **Icons**: a key number, a node of a flow, a choice, a note and a thing to ask next may have a lucide icon (`icon`), to tell items apart at a glance; the prompt gives the model 31 common ones and tells it never to write an emoji. An icon the page does not have is not drawn.
|
|
11
12
|
|
|
12
|
-
The card's format is in `
|
|
13
|
+
The card's format is in `glance-protocol.ts` of `@celljs/ta-protocol` (read by `glance-json.ts` and `glance-spec.ts` there, which the pages of the relay draw cards with too), the prompt in `web-src/glance-prompt.ts`. Other packages draw cards for fenced blocks of their own languages with `registerCodeRenderer`.
|
|
13
14
|
|
|
14
15
|
Design notes: `docs/design/ta-glance.md`.
|
package/README.md
CHANGED
|
@@ -7,8 +7,9 @@ Ta 自带的 pi 包(默认开启,可在 Web 客户端的 设置 → 扩展
|
|
|
7
7
|
- **待你决定**:一轮回复以带选项(`options`)或 `status: "blocked"` 的卡片结束时,pi 扩展在会话里记一条 `ta-ask`(`TA_ASK_ENTRY`,模型读不到),对话列表、标签、分身任务和快捷打开就显示这个对话在等你决定,直到你回答(点选或打字都算)。卡片在你回答前用蓝框和问号标出;回答后各设备都显示已选,刷新也保留(`WebCodeRendererProps.answer`)。
|
|
8
8
|
- **别处**:对话列表的预览显示第一行结论;发到微信、企业微信机器人的回复不画卡片,照常是短段落;终端里的 `ta` 回复照旧。外部 Agent(ta-agents)也会拿到这段写法。
|
|
9
9
|
- **图表**:关键数字可以带一条小走势线(`trend`),还有趋势线(`line`,最多 4 条)和占比(`share`),用原生 SVG 画、不加依赖。
|
|
10
|
+
- **排盘**:`board` 块把盘面画成宫格:九宫、四柱、六爻按顺序排;格子可以指定位置并跨格(`at`、`span`),紫微十二宫就绕着中间的命盘排;每格有名字、角标和几行短字,重点格高亮,可以标好坏色。
|
|
10
11
|
- **图标**:关键数字、流程节点、方案、提示、下一步可以带一个 lucide 图标(`icon`),一眼分清各项说的是什么;提示词给模型 31 个常用图标,并要求不用 emoji。页面没有的图标不画。
|
|
11
12
|
|
|
12
|
-
卡片的格式见 `
|
|
13
|
+
卡片的格式见 `@celljs/ta-protocol` 的 `glance-protocol.ts`(解析在同处的 `glance-json.ts`、`glance-spec.ts`,中继的网页也用它们画卡片),提示词见 `web-src/glance-prompt.ts`。别的包也能用 `registerCodeRenderer` 为自己的代码块语言画卡片。
|
|
13
14
|
|
|
14
15
|
设计记录:`docs/design/ta-glance.md`。
|