pi-web-ui 0.48.2 → 0.49.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/dist/server/index.js +1 -3
- package/dist/server/webui-context.js +6 -4
- package/package.json +100 -110
- package/themes/cyberpunk.css +7658 -0
- package/themes/dazzle.css +7985 -0
- package/web/dist/assets/{TerminalPanel-m1Uq9P_a.js → TerminalPanel-CsLJErXe.js} +1 -1
- package/web/dist/assets/index-B4Bb2-Uw.css +10 -0
- package/web/dist/assets/index-verW8_Ym.js +319 -0
- package/web/dist/index.html +2 -2
- package/electron/main.mjs +0 -427
- package/web/dist/assets/index-B8YOHfUN.css +0 -10
- package/web/dist/assets/index-Dg-bQ98a.js +0 -319
package/dist/server/index.js
CHANGED
|
@@ -179,9 +179,7 @@ const here = dirname(fileURLToPath(import.meta.url)); // <pkg>/dist/server or <p
|
|
|
179
179
|
// Resolve the package root robustly: dev runs from <repo>/server (tsx), prod
|
|
180
180
|
// from <pkg>/dist/server — the ancestor that actually has package.json wins.
|
|
181
181
|
function resolvePkgRoot() {
|
|
182
|
-
//
|
|
183
|
-
//(process.resourcesPath)加载 web/dist 和 themes。通过这个 env var 告诉
|
|
184
|
-
// server 去哪里找 pkgRoot,避免 resolvePkgRoot 的候选路径找不到 package.json。
|
|
182
|
+
// 可选:显式指定 pkgRoot(如部署在自定义目录时),否则按候选路径探测。
|
|
185
183
|
if (process.env.PI_WEB_PKG_ROOT)
|
|
186
184
|
return process.env.PI_WEB_PKG_ROOT;
|
|
187
185
|
const candidates = [
|
|
@@ -115,12 +115,14 @@ export class WebUIContext {
|
|
|
115
115
|
});
|
|
116
116
|
}
|
|
117
117
|
// -- notifications --------------------------------------------------------
|
|
118
|
-
|
|
118
|
+
// Instance arrows so these survive the SDK's wrapUIPromptContext `{ ...ui }`
|
|
119
|
+
// (object spread copies own properties only, not class prototype methods).
|
|
120
|
+
notify = (message, type) => {
|
|
119
121
|
this.emit({ type: "notice", level: type ?? "info", text: message });
|
|
120
|
-
}
|
|
122
|
+
};
|
|
121
123
|
// -- footer status (pi-lens "LSP Inactive", pi-cache-optimizer cache stats) --
|
|
122
124
|
statuses = new Map();
|
|
123
|
-
setStatus(key, text) {
|
|
125
|
+
setStatus = (key, text) => {
|
|
124
126
|
if (text === undefined || text === "") {
|
|
125
127
|
this.statuses.delete(key);
|
|
126
128
|
}
|
|
@@ -133,7 +135,7 @@ export class WebUIContext {
|
|
|
133
135
|
this.statuses.set(key, clean);
|
|
134
136
|
}
|
|
135
137
|
this.pushStatuses();
|
|
136
|
-
}
|
|
138
|
+
};
|
|
137
139
|
pushStatuses() {
|
|
138
140
|
this.emit({
|
|
139
141
|
type: "statuses",
|
package/package.json
CHANGED
|
@@ -1,110 +1,100 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "pi-web-ui",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Web chat interface for the pi coding agent, powered by the pi SDK (@earendil-works/pi-coding-agent) — one-command run, Docker/systemd/launchd deployable",
|
|
5
|
-
"license": "MIT",
|
|
6
|
-
"author": {
|
|
7
|
-
"name": "xingshuyin",
|
|
8
|
-
"email": "xingshuyin@users.noreply.github.com"
|
|
9
|
-
},
|
|
10
|
-
"type": "module",
|
|
11
|
-
"bin": {
|
|
12
|
-
"pi-web-ui": "bin/pi-web-ui.mjs"
|
|
13
|
-
},
|
|
14
|
-
"main": "
|
|
15
|
-
"files": [
|
|
16
|
-
"bin/",
|
|
17
|
-
"dist/",
|
|
18
|
-
"web/dist/",
|
|
19
|
-
"web/public/",
|
|
20
|
-
"themes/",
|
|
21
|
-
"deploy/",
|
|
22
|
-
"extensions/",
|
|
23
|
-
"README.md",
|
|
24
|
-
"LICENSE"
|
|
25
|
-
],
|
|
26
|
-
"keywords": [
|
|
27
|
-
"pi",
|
|
28
|
-
"pi-package",
|
|
29
|
-
"coding-agent",
|
|
30
|
-
"ai",
|
|
31
|
-
"chat",
|
|
32
|
-
"web-ui",
|
|
33
|
-
"terminal",
|
|
34
|
-
"llm"
|
|
35
|
-
],
|
|
36
|
-
"repository": {
|
|
37
|
-
"type": "git",
|
|
38
|
-
"url": "git+https://github.com/xing-shuyin/pi-web-ui.git"
|
|
39
|
-
},
|
|
40
|
-
"pi": {
|
|
41
|
-
"extensions": [
|
|
42
|
-
"./extensions"
|
|
43
|
-
]
|
|
44
|
-
},
|
|
45
|
-
"engines": {
|
|
46
|
-
"node": ">=22.19.0"
|
|
47
|
-
},
|
|
48
|
-
"scripts": {
|
|
49
|
-
"prepublishOnly": "npm run build",
|
|
50
|
-
"dev": "concurrently -k -n server,web -c blue,green \"npm:dev:server\" \"npm:dev:web\"",
|
|
51
|
-
"dev:server": "cross-env PORT=8788 PI_WEB_ALLOW_ORIGINS=http://localhost:5173,http://127.0.0.1:5173 node --watch --import tsx server/index.ts",
|
|
52
|
-
"dev:web": "vite --config web/vite.config.ts",
|
|
53
|
-
"build": "npm run build:web && npm run build:server",
|
|
54
|
-
"build:web": "vite build --config web/vite.config.ts",
|
|
55
|
-
"build:server": "tsc -p tsconfig.server.json",
|
|
56
|
-
"typecheck": "tsc -p tsconfig.server.json --noEmit && tsc -p web/tsconfig.json --noEmit && tsc -p tsconfig.tests.json --noEmit",
|
|
57
|
-
"test": "vitest run",
|
|
58
|
-
"test:unit": "vitest run",
|
|
59
|
-
"test:smoke": "node tests/run-smoke.mjs",
|
|
60
|
-
"check:protocol": "node scripts/check-protocol-sync.mjs",
|
|
61
|
-
"test:freeze": "node tests/freeze-test.mjs",
|
|
62
|
-
"start": "node dist/server/index.js"
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
"highlight
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
"
|
|
83
|
-
"
|
|
84
|
-
"
|
|
85
|
-
"
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
"@
|
|
89
|
-
"
|
|
90
|
-
"
|
|
91
|
-
"
|
|
92
|
-
"
|
|
93
|
-
"
|
|
94
|
-
"
|
|
95
|
-
"
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
"
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
"vitest": "^4.1.11",
|
|
102
|
-
"electron": "^41.0.0",
|
|
103
|
-
"electron-builder": "^25.0.0",
|
|
104
|
-
"electron-updater": "^6.0.0"
|
|
105
|
-
},
|
|
106
|
-
"allowScripts": {
|
|
107
|
-
"node-pty@1.1.0": true,
|
|
108
|
-
"electron@41.10.7": true
|
|
109
|
-
}
|
|
110
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "pi-web-ui",
|
|
3
|
+
"version": "0.49.0",
|
|
4
|
+
"description": "Web chat interface for the pi coding agent, powered by the pi SDK (@earendil-works/pi-coding-agent) — one-command run, Docker/systemd/launchd deployable",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": {
|
|
7
|
+
"name": "xingshuyin",
|
|
8
|
+
"email": "xingshuyin@users.noreply.github.com"
|
|
9
|
+
},
|
|
10
|
+
"type": "module",
|
|
11
|
+
"bin": {
|
|
12
|
+
"pi-web-ui": "bin/pi-web-ui.mjs"
|
|
13
|
+
},
|
|
14
|
+
"main": "bin/pi-web-ui.mjs",
|
|
15
|
+
"files": [
|
|
16
|
+
"bin/",
|
|
17
|
+
"dist/",
|
|
18
|
+
"web/dist/",
|
|
19
|
+
"web/public/",
|
|
20
|
+
"themes/",
|
|
21
|
+
"deploy/",
|
|
22
|
+
"extensions/",
|
|
23
|
+
"README.md",
|
|
24
|
+
"LICENSE"
|
|
25
|
+
],
|
|
26
|
+
"keywords": [
|
|
27
|
+
"pi",
|
|
28
|
+
"pi-package",
|
|
29
|
+
"coding-agent",
|
|
30
|
+
"ai",
|
|
31
|
+
"chat",
|
|
32
|
+
"web-ui",
|
|
33
|
+
"terminal",
|
|
34
|
+
"llm"
|
|
35
|
+
],
|
|
36
|
+
"repository": {
|
|
37
|
+
"type": "git",
|
|
38
|
+
"url": "git+https://github.com/xing-shuyin/pi-web-ui.git"
|
|
39
|
+
},
|
|
40
|
+
"pi": {
|
|
41
|
+
"extensions": [
|
|
42
|
+
"./extensions"
|
|
43
|
+
]
|
|
44
|
+
},
|
|
45
|
+
"engines": {
|
|
46
|
+
"node": ">=22.19.0"
|
|
47
|
+
},
|
|
48
|
+
"scripts": {
|
|
49
|
+
"prepublishOnly": "npm run build",
|
|
50
|
+
"dev": "concurrently -k -n server,web -c blue,green \"npm:dev:server\" \"npm:dev:web\"",
|
|
51
|
+
"dev:server": "cross-env PORT=8788 PI_WEB_ALLOW_ORIGINS=http://localhost:5173,http://127.0.0.1:5173 node --watch --import tsx server/index.ts",
|
|
52
|
+
"dev:web": "vite --config web/vite.config.ts",
|
|
53
|
+
"build": "npm run build:web && npm run build:server",
|
|
54
|
+
"build:web": "vite build --config web/vite.config.ts",
|
|
55
|
+
"build:server": "tsc -p tsconfig.server.json",
|
|
56
|
+
"typecheck": "tsc -p tsconfig.server.json --noEmit && tsc -p web/tsconfig.json --noEmit && tsc -p tsconfig.tests.json --noEmit",
|
|
57
|
+
"test": "vitest run",
|
|
58
|
+
"test:unit": "vitest run",
|
|
59
|
+
"test:smoke": "node tests/run-smoke.mjs",
|
|
60
|
+
"check:protocol": "node scripts/check-protocol-sync.mjs",
|
|
61
|
+
"test:freeze": "node tests/freeze-test.mjs",
|
|
62
|
+
"start": "node dist/server/index.js"
|
|
63
|
+
},
|
|
64
|
+
"dependencies": {
|
|
65
|
+
"@earendil-works/pi-coding-agent": "^0.84.4",
|
|
66
|
+
"@xterm/addon-fit": "^0.11.0",
|
|
67
|
+
"@xterm/xterm": "^6.0.0",
|
|
68
|
+
"compression": "^1.8.1",
|
|
69
|
+
"express": "^4.21.2",
|
|
70
|
+
"highlight.js": "^11.10.0",
|
|
71
|
+
"node-pty": "^1.1.0",
|
|
72
|
+
"react": "^18.3.1",
|
|
73
|
+
"react-dom": "^18.3.1",
|
|
74
|
+
"react-icons": "^5.7.0",
|
|
75
|
+
"react-markdown": "^9.0.1",
|
|
76
|
+
"rehype-highlight": "^7.0.1",
|
|
77
|
+
"remark-gfm": "^4.0.0",
|
|
78
|
+
"typebox": "^1.3.14",
|
|
79
|
+
"ws": "^8.18.0"
|
|
80
|
+
},
|
|
81
|
+
"devDependencies": {
|
|
82
|
+
"@types/compression": "^1.8.1",
|
|
83
|
+
"@types/express": "^4.17.21",
|
|
84
|
+
"@types/node": "^22.10.0",
|
|
85
|
+
"@types/react": "^18.3.12",
|
|
86
|
+
"@types/react-dom": "^18.3.1",
|
|
87
|
+
"@types/ws": "^8.5.13",
|
|
88
|
+
"@vitejs/plugin-react": "^4.3.4",
|
|
89
|
+
"concurrently": "^9.1.0",
|
|
90
|
+
"cross-env": "^10.1.0",
|
|
91
|
+
"playwright-core": "^1.62.1",
|
|
92
|
+
"tsx": "^4.19.2",
|
|
93
|
+
"typescript": "^5.7.2",
|
|
94
|
+
"vite": "^6.0.3",
|
|
95
|
+
"vitest": "^4.1.11"
|
|
96
|
+
},
|
|
97
|
+
"allowScripts": {
|
|
98
|
+
"node-pty@1.1.0": true
|
|
99
|
+
}
|
|
100
|
+
}
|