pi-web-ui 0.17.0 → 0.18.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.
|
@@ -1675,6 +1675,7 @@ export class ClientSession {
|
|
|
1675
1675
|
argumentHint: "<off|low|medium|high>",
|
|
1676
1676
|
},
|
|
1677
1677
|
{ name: "resume", description: "刷新会话列表" },
|
|
1678
|
+
{ name: "reload", description: "重新加载扩展、技能与模板" },
|
|
1678
1679
|
{ name: "help", description: "显示全部命令" },
|
|
1679
1680
|
{ name: "copy", description: "复制上一条助手回复" },
|
|
1680
1681
|
];
|
|
@@ -1796,6 +1797,26 @@ export class ClientSession {
|
|
|
1796
1797
|
text: "会话列表已刷新,请在左侧「历史对话」中选择",
|
|
1797
1798
|
});
|
|
1798
1799
|
return true;
|
|
1800
|
+
case "reload":
|
|
1801
|
+
try {
|
|
1802
|
+
// Re-discovers extensions / skills / prompt templates from disk and
|
|
1803
|
+
// re-pushes the picker catalog (the CLI's /reload semantics).
|
|
1804
|
+
await this.session.reload();
|
|
1805
|
+
await this.pushSlashCommands();
|
|
1806
|
+
this.emit({
|
|
1807
|
+
type: "notice",
|
|
1808
|
+
level: "info",
|
|
1809
|
+
text: "已重新加载扩展、技能与提示模板",
|
|
1810
|
+
});
|
|
1811
|
+
}
|
|
1812
|
+
catch (err) {
|
|
1813
|
+
this.emit({
|
|
1814
|
+
type: "notice",
|
|
1815
|
+
level: "error",
|
|
1816
|
+
text: `重新加载失败:${err.message}`,
|
|
1817
|
+
});
|
|
1818
|
+
}
|
|
1819
|
+
return true;
|
|
1799
1820
|
case "help":
|
|
1800
1821
|
case "copy":
|
|
1801
1822
|
// Client-side UI actions — the client handles them before sending;
|
|
@@ -2384,6 +2405,9 @@ export class ClientSession {
|
|
|
2384
2405
|
this.removeConversation(displaced.id);
|
|
2385
2406
|
await this.bindSession();
|
|
2386
2407
|
this.emitConversations();
|
|
2408
|
+
// The new runtime re-discovered skills/templates — refresh the catalog
|
|
2409
|
+
// so the picker stops showing the previous runtime's list.
|
|
2410
|
+
void this.pushSlashCommands();
|
|
2387
2411
|
}
|
|
2388
2412
|
catch (err) {
|
|
2389
2413
|
this.emit({
|
|
@@ -2441,6 +2465,8 @@ export class ClientSession {
|
|
|
2441
2465
|
this.conv.lastActiveAt = Date.now();
|
|
2442
2466
|
this.webUi.refresh();
|
|
2443
2467
|
this.emitConversations();
|
|
2468
|
+
// The switched-to conversation has its own runtime (own resource cache).
|
|
2469
|
+
void this.pushSlashCommands();
|
|
2444
2470
|
this.flushSnapshot();
|
|
2445
2471
|
}
|
|
2446
2472
|
/** Push the current project's running-conversation list to the client. */
|
|
@@ -2517,6 +2543,8 @@ export class ClientSession {
|
|
|
2517
2543
|
// switches away without sending a new message.
|
|
2518
2544
|
this.conv.promptedSinceActive = true;
|
|
2519
2545
|
this.emitConversations();
|
|
2546
|
+
// switchSession replaced the runtime — its resource cache is fresh.
|
|
2547
|
+
void this.pushSlashCommands();
|
|
2520
2548
|
}
|
|
2521
2549
|
catch (err) {
|
|
2522
2550
|
this.emit({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-web-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.0",
|
|
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",
|