pi-web-ui 0.26.1 → 0.26.2
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.md +13 -2
- package/README.zh-CN.md +14 -2
- package/dist/server/agent-service.js +19 -0
- package/package.json +1 -1
- package/web/dist/assets/{index-CFbrzMlt.js → index-CgclPvXC.js} +49 -49
- package/web/dist/assets/{index-nGxyor_h.css → index-DMPXQsfo.css} +1 -1
- package/web/dist/index.html +2 -2
package/README.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
**English** | [简体中文](https://github.com/xing-shuyin/pi-web-ui/blob/main/README.zh-CN.md)
|
|
4
4
|
|
|
5
|
+
[](https://www.npmjs.com/package/pi-web-ui)
|
|
6
|
+
[](https://nodejs.org/)
|
|
7
|
+
[](LICENSE)
|
|
8
|
+
|
|
9
|
+
> A polished browser interface for pi: stream conversations, inspect tools, manage files,
|
|
10
|
+
> and run your workspace from one place.
|
|
11
|
+
|
|
5
12
|
A web chat interface for the [pi coding agent](https://pi.dev) — the agent runs
|
|
6
13
|
in-process via the pi SDK and streams events to the browser over WebSocket. Chat
|
|
7
14
|
with thinking blocks and tool calls, attach files, ask about images, use a
|
|
@@ -9,6 +16,12 @@ built-in terminal, manage models, tweak the system prompt, toggle skills and
|
|
|
9
16
|
extensions on/off, and save/apply settings presets — all from a settings panel.
|
|
10
17
|
Requires Node.js ≥ 22.19 and a configured pi install.
|
|
11
18
|
|
|
19
|
+
## More from the author
|
|
20
|
+
|
|
21
|
+
> **Building with DSH?**
|
|
22
|
+
>
|
|
23
|
+
> [**dsh-ui-tools**](https://github.com/xing-shuyin/dsh-ui-tools) is the author's companion project for building and extending UI tools in the DSH ecosystem.
|
|
24
|
+
|
|
12
25
|
## Features
|
|
13
26
|
|
|
14
27
|
**Chat**
|
|
@@ -229,7 +242,5 @@ Full working example (with an frp tunnel): `deploy/nginx-subpath.conf`.
|
|
|
229
242
|
|
|
230
243
|
## License
|
|
231
244
|
|
|
232
|
-
## License
|
|
233
|
-
|
|
234
245
|
MIT
|
|
235
246
|
|
package/README.zh-CN.md
CHANGED
|
@@ -2,11 +2,25 @@
|
|
|
2
2
|
|
|
3
3
|
[English](https://github.com/xing-shuyin/pi-web-ui/blob/main/README.md) | **简体中文**
|
|
4
4
|
|
|
5
|
+
[](https://www.npmjs.com/package/pi-web-ui)
|
|
6
|
+
[](https://nodejs.org/)
|
|
7
|
+
[](LICENSE)
|
|
8
|
+
|
|
9
|
+
> 一个精致的 pi 浏览器界面:流式对话、查看工具调用、管理文件,
|
|
10
|
+
> 在一个工作台里完成开发任务。
|
|
11
|
+
|
|
5
12
|
[pi 编码智能体](https://pi.dev) 的 Web 聊天界面 —— 智能体通过 pi SDK 在服务端进程内运行,
|
|
6
13
|
事件经 WebSocket 流式推送到浏览器。支持思考块与工具调用、附件与图片问答、内置终端、
|
|
7
14
|
模型管理,以及设置面板(自定义系统提示词、技能/插件开关、设置预设一键应用)等功能。
|
|
8
15
|
需要 Node.js ≥ 22.19 及配置好的 pi 环境。
|
|
9
16
|
|
|
17
|
+
## 作者的其他项目
|
|
18
|
+
|
|
19
|
+
> **正在使用 DSH 构建工具?**
|
|
20
|
+
>
|
|
21
|
+
> [**dsh-ui-tools**](https://github.com/xing-shuyin/dsh-ui-tools) 是作者的配套项目,
|
|
22
|
+
> 用于在 DSH 生态中构建和扩展 UI 工具。
|
|
23
|
+
|
|
10
24
|
## 功能特性
|
|
11
25
|
|
|
12
26
|
**对话**
|
|
@@ -213,6 +227,4 @@ server {
|
|
|
213
227
|
|
|
214
228
|
## License
|
|
215
229
|
|
|
216
|
-
## License
|
|
217
|
-
|
|
218
230
|
MIT
|
|
@@ -2191,6 +2191,25 @@ export class ClientSession {
|
|
|
2191
2191
|
};
|
|
2192
2192
|
mkdirSync(this.agentDir, { recursive: true });
|
|
2193
2193
|
writeFileSync(this.modelsConfigPath(), JSON.stringify({ providers }, null, 2) + "\n");
|
|
2194
|
+
// Allow a custom models.json entry to reuse the provider credential
|
|
2195
|
+
// already stored in auth.json. Seed the shared runtime too, because
|
|
2196
|
+
// older pi-ai versions did not always fall back to stored credentials
|
|
2197
|
+
// for a newly-created custom provider. Never copy the secret into
|
|
2198
|
+
// models.json.
|
|
2199
|
+
try {
|
|
2200
|
+
const auth = JSON.parse(readFileSync(join(this.agentDir, "auth.json"), "utf8"));
|
|
2201
|
+
const credential = auth[pid];
|
|
2202
|
+
if (credential &&
|
|
2203
|
+
typeof credential === "object" &&
|
|
2204
|
+
"key" in credential &&
|
|
2205
|
+
typeof credential.key === "string" &&
|
|
2206
|
+
credential.key.trim()) {
|
|
2207
|
+
await this.runtime.services.modelRuntime.setRuntimeApiKey(pid, credential.key);
|
|
2208
|
+
}
|
|
2209
|
+
}
|
|
2210
|
+
catch {
|
|
2211
|
+
// auth.json is optional; models.json can still use its own apiKey.
|
|
2212
|
+
}
|
|
2194
2213
|
await this.runtime.services.modelRuntime.refresh();
|
|
2195
2214
|
await this.listModelsConfig();
|
|
2196
2215
|
await this.listModels();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-web-ui",
|
|
3
|
-
"version": "0.26.
|
|
3
|
+
"version": "0.26.2",
|
|
4
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
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|