@hheei/pi-ext-ui 0.7.2 → 0.8.1
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/dist/tool-group-view.js +14 -1
- package/package.json +5 -6
package/dist/tool-group-view.js
CHANGED
|
@@ -16,13 +16,26 @@ export function memberParts(member) {
|
|
|
16
16
|
function isBlankRow(row) {
|
|
17
17
|
return row === undefined || visibleWidth(row) === 0;
|
|
18
18
|
}
|
|
19
|
+
/**
|
|
20
|
+
* Whether this tail's own rows can still change. A tool earns the floor until its final result
|
|
21
|
+
* arrives, and a thinking run while its text is streaming into a visible body; a settled tool, a
|
|
22
|
+
* hidden thinking preview, and a notice have drawn their last frame, so padding them adds no
|
|
23
|
+
* stability and only empty rows.
|
|
24
|
+
*/
|
|
25
|
+
function stillGrowing(member) {
|
|
26
|
+
if (member.kind === "tool")
|
|
27
|
+
return member.completed !== true;
|
|
28
|
+
return member.kind === "thinking" && member.thinkingHidden !== true;
|
|
29
|
+
}
|
|
19
30
|
export class TailUnit {
|
|
20
31
|
#parts;
|
|
21
32
|
#background;
|
|
33
|
+
#floor;
|
|
22
34
|
#offsets = [];
|
|
23
35
|
constructor(member, background) {
|
|
24
36
|
this.#parts = memberParts(member);
|
|
25
37
|
this.#background = background;
|
|
38
|
+
this.#floor = stillGrowing(member);
|
|
26
39
|
}
|
|
27
40
|
render(width) {
|
|
28
41
|
const offsets = [];
|
|
@@ -52,7 +65,7 @@ export class TailUnit {
|
|
|
52
65
|
const shift = out.length - rows.length;
|
|
53
66
|
this.#offsets = offsets.map((offset) => ({ ...offset, top: offset.top + shift }));
|
|
54
67
|
// Surface padding counts toward the minimum; added rows stay outside surfaces and hit areas.
|
|
55
|
-
const minimum = this.#background() ? 4 : 2;
|
|
68
|
+
const minimum = this.#floor ? (this.#background() ? 4 : 2) : 0;
|
|
56
69
|
if (contentRows > 0) {
|
|
57
70
|
for (let row = contentRows; row < minimum; row++)
|
|
58
71
|
out.push("");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hheei/pi-ext-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.1",
|
|
4
4
|
"description": "Collapsible tool rendering frame and tool renderer pilot for Pi.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -22,29 +22,28 @@
|
|
|
22
22
|
"pi",
|
|
23
23
|
"pi-package",
|
|
24
24
|
"pi-extension",
|
|
25
|
-
"hepi",
|
|
26
25
|
"ui",
|
|
27
26
|
"collapsible"
|
|
28
27
|
],
|
|
29
28
|
"license": "MIT",
|
|
30
29
|
"repository": {
|
|
31
30
|
"type": "git",
|
|
32
|
-
"url": "git+https://github.com/hheei/
|
|
31
|
+
"url": "git+https://github.com/hheei/pi-mono.git",
|
|
33
32
|
"directory": "packages/pi-ext-ui"
|
|
34
33
|
},
|
|
35
34
|
"publishConfig": {
|
|
36
35
|
"access": "public"
|
|
37
36
|
},
|
|
38
37
|
"dependencies": {
|
|
39
|
-
"@hheei/pi-ext-core": "^0.
|
|
38
|
+
"@hheei/pi-ext-core": "^0.8.0"
|
|
40
39
|
},
|
|
41
40
|
"peerDependencies": {
|
|
42
41
|
"@earendil-works/pi-coding-agent": ">=1.0.1",
|
|
43
42
|
"@earendil-works/pi-tui": ">=1.0.1"
|
|
44
43
|
},
|
|
45
44
|
"devDependencies": {
|
|
46
|
-
"@earendil-works/pi-coding-agent": "1.
|
|
47
|
-
"@earendil-works/pi-tui": "1.
|
|
45
|
+
"@earendil-works/pi-coding-agent": "^1.4.0",
|
|
46
|
+
"@earendil-works/pi-tui": "^1.4.0"
|
|
48
47
|
},
|
|
49
48
|
"scripts": {
|
|
50
49
|
"build": "node -e \"import { rmSync } from 'node:fs'; rmSync('dist', { recursive: true, force: true })\" && tsc -p tsconfig.build.json"
|