@chainingintention/pi-web-cn 2.202610.4 → 2.202610.5
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/client/assets/{CommandPicker-gK2biReF.js → CommandPicker-8oDe6AaV.js} +1 -1
- package/dist/client/assets/{PiWebApp-Do_8tp5d.js → PiWebApp-TCQVYghs.js} +241 -241
- package/dist/client/assets/{SettingsDialog-vGDo1-BJ.js → SettingsDialog-DFUpwUyp.js} +1 -1
- package/dist/client/assets/{index-Ura0RJyr.js → index-DzMPXVth.js} +2 -2
- package/dist/client/index.html +1 -1
- package/dist/pi-packages/relays/relayDiscovery.js +5 -1
- package/dist/pi-web-plugins/custom-ui-codex/README.md +2 -0
- package/dist/pi-web-plugins/custom-ui-codex/chat-settings.css +15 -2
- package/dist/pi-web-plugins/files/browser/pi-web-plugin.js +87 -50
- package/dist/pi-web-plugins/workspace-tasks/tasksPanelElement.js +21 -6
- package/dist/pi-web-plugins/zh-cn/bundled.json +31 -18
- package/dist/pi-web-plugins/zh-cn/components.json +2 -0
- package/dist/pi-web-plugins/zh-cn/files.json +7 -0
- package/dist/pi-web-plugins/zh-cn/server-main.json +4 -4
- package/dist/plugin-api.d.ts +9 -0
- package/dist/server/app.js +3 -0
- package/dist/server/app.js.map +1 -1
- package/dist/server/managementAgents.js +179 -0
- package/dist/server/managementAgents.js.map +1 -0
- package/dist/server/managementAgentsRoutes.js +42 -0
- package/dist/server/managementAgentsRoutes.js.map +1 -0
- package/dist/server/managementEmbed.js +23 -43
- package/dist/server/managementEmbed.js.map +1 -1
- package/dist/server/sessions/piSessionService.js +10 -2
- package/dist/server/sessions/piSessionService.js.map +1 -1
- package/dist/server/workspaceExplorerRoutes.js +3 -1
- package/dist/server/workspaceExplorerRoutes.js.map +1 -1
- package/dist/shared/apiTypes.js.map +1 -1
- package/dist/shared/federatedRoutes.js +2 -0
- package/dist/shared/federatedRoutes.js.map +1 -1
- package/dist/shared/managedAgents.js +2 -0
- package/dist/shared/managedAgents.js.map +1 -0
- package/dist/shared/pluginApiTypes.d.ts +14 -0
- package/docs/config.md +3 -1
- package/docs/plugins.md +20 -5
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{$ as e,$t as t,G as n,Gt as r,M as i,P as a,Q as o,Qt as s,R as c,V as l,W as u,X as d,Z as f,_ as p,cn as m,et as h,g,h as ee,ht as _,it as v,l as te,ln as y,mt as ne,n as re,p as ie,qt as ae,sn as b,st as oe,t as se,tt as ce,u as x,v as S,xt as C,y as w,yt as T}from"./CommandPicker-
|
|
1
|
+
import{$ as e,$t as t,G as n,Gt as r,M as i,P as a,Q as o,Qt as s,R as c,V as l,W as u,X as d,Z as f,_ as p,cn as m,et as h,g,h as ee,ht as _,it as v,l as te,ln as y,mt as ne,n as re,p as ie,qt as ae,sn as b,st as oe,t as se,tt as ce,u as x,v as S,xt as C,y as w,yt as T}from"./CommandPicker-8oDe6AaV.js";import{$ as E,J as D,R as O,U as k,W as A,j as le,o as ue}from"./managementEmbed-Bx8Mwzdw.js";var j=c(`.ui-settings-section{border-bottom:1px solid var(--pi-border-muted);gap:14px;min-width:0;padding:16px;display:grid}.ui-settings-heading{gap:6px;min-width:0;display:grid}.ui-settings-heading h3{margin:0;font-size:14px;line-height:1.4}.ui-settings-heading p{color:var(--pi-muted);margin:0;line-height:1.45}.ui-settings-fields{gap:14px;min-width:0;display:grid}.ui-settings-actions{flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:8px;min-width:0;display:flex}.ui-settings-path{background:var(--pi-bg);min-width:0;color:var(--pi-muted);overflow-wrap:anywhere;gap:5px;padding:12px;display:grid}.ui-settings-summary{background:var(--pi-bg);gap:10px;min-width:0;padding:12px;display:grid}.ui-settings-list{gap:0;min-width:0;display:grid}.ui-settings-row{border-bottom:1px solid var(--pi-border-muted);flex-wrap:wrap;align-items:center;gap:12px;min-width:0;padding:12px 16px;display:flex}@media (width<=480px){.ui-settings-actions{grid-template-columns:minmax(0,1fr);display:grid}}`),de=c(`.ui-notice{border-inline-start:3px solid var(--pi-border);background:var(--pi-surface);overflow-wrap:anywhere;min-width:0;padding:12px 16px;line-height:1.45}.ui-notice.error{border-color:var(--pi-danger);color:var(--pi-danger);background:color-mix(in srgb, var(--pi-danger) 10%, var(--pi-surface))}.ui-notice.success{border-color:var(--pi-success-border);color:var(--pi-success);background:var(--pi-success-surface)}.ui-notice.warning{border-color:var(--pi-warning-border);color:var(--pi-text);background:var(--pi-warning-surface)}.ui-notice.info{color:var(--pi-muted)}`),fe={availability:`error`,error:`error`,success:`success`,security:`warning`,warning:`warning`,info:`info`};function pe(e){return e.tone??fe[e.type]}var M=class extends k{constructor(){super(),this.heading=``,this.description=``,this.actionLabel=``,this.actionTitle=``,this.actionDisabled=!1,this.notices=[],i.createController(this)}render(){return D`
|
|
2
2
|
<section class="panel" aria-label=${this.heading||O(`ui.settingsPanelFrame.settingsPanel`,`Settings panel`)}>
|
|
3
3
|
<header class="section-heading">
|
|
4
4
|
<div class="heading-copy">
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./PiWebApp-
|
|
2
|
-
import{I as e,J as t,L as n,R as r,V as i,X as a}from"./managementEmbed-Bx8Mwzdw.js";import{n as o,t as s}from"./preload-helper-XpATwJ5c.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();async function c(e=async()=>(await o(`pi-web-plugins/localization.json`,{shouldLoadPlugin:e=>e.id===`zh-cn`})).registrations){n(`en`,{});try{let i=(await e()).find(e=>e.id===`zh-cn`&&e.machineId===void 0);if(i!==void 0){let e=new AbortController,o=(await i.plugin.activate({apiVersion:4,pluginId:i.id,runtimePluginId:i.id,html:t,svg:a,translate:r,signal:e.signal,lifetimeSignal:e.signal})).contributions.localizations?.find(e=>e.locale===`zh-CN`);o!==void 0&&n(o.locale,o.messages)}}catch(e){console.warn(`Could not initialize UI localization; using English`,e)}}function l(t){t.documentElement.lang=e();let n=t.querySelector(`meta[name="description"]`);n!==null&&(n.content=r(`app.description`,`Remote web UI and browser control plane for persistent Pi Coding Agent sessions.`));let a=t.querySelector(`link[rel="manifest"]`);a!==null&&(a.href=i(e()===`zh-CN`?`pi-web-plugins/zh-cn/manifest.webmanifest`:`manifest.webmanifest`))}await c(),l(document),await s(()=>import(`./PiWebApp-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./PiWebApp-TCQVYghs.js","./CommandPicker-8oDe6AaV.js","./managementEmbed-Bx8Mwzdw.js","./preload-helper-XpATwJ5c.js","./vendor-editor-core-BfnHL1Dg.js","./vendor-editor-languages-bNquDJP0.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{I as e,J as t,L as n,R as r,V as i,X as a}from"./managementEmbed-Bx8Mwzdw.js";import{n as o,t as s}from"./preload-helper-XpATwJ5c.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();async function c(e=async()=>(await o(`pi-web-plugins/localization.json`,{shouldLoadPlugin:e=>e.id===`zh-cn`})).registrations){n(`en`,{});try{let i=(await e()).find(e=>e.id===`zh-cn`&&e.machineId===void 0);if(i!==void 0){let e=new AbortController,o=(await i.plugin.activate({apiVersion:4,pluginId:i.id,runtimePluginId:i.id,html:t,svg:a,translate:r,signal:e.signal,lifetimeSignal:e.signal})).contributions.localizations?.find(e=>e.locale===`zh-CN`);o!==void 0&&n(o.locale,o.messages)}}catch(e){console.warn(`Could not initialize UI localization; using English`,e)}}function l(t){t.documentElement.lang=e();let n=t.querySelector(`meta[name="description"]`);n!==null&&(n.content=r(`app.description`,`Remote web UI and browser control plane for persistent Pi Coding Agent sessions.`));let a=t.querySelector(`link[rel="manifest"]`);a!==null&&(a.href=i(e()===`zh-CN`?`pi-web-plugins/zh-cn/manifest.webmanifest`:`manifest.webmanifest`))}await c(),l(document),await s(()=>import(`./PiWebApp-TCQVYghs.js`),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url);
|
package/dist/client/index.html
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
<link rel="apple-touch-icon" href="./apple-touch-icon.png" />
|
|
11
11
|
<link rel="manifest" crossorigin="use-credentials" href="./manifest.webmanifest" />
|
|
12
12
|
<style>:root{--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--pi-control-font-size:16px;--pi-control-font-family:var(--pi-font,system-ui, sans-serif);--pi-control-monospace-font-family:var(--pi-mono,ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);--pi-bg:#0d1117;--pi-surface:#161b22;--pi-surface-hover:#21262d;--pi-terminal-bg:#05070a;--pi-terminal-text:#e6edf3;--pi-border:#30363d;--pi-border-muted:#21262d;--pi-text:#e6edf3;--pi-text-secondary:#c9d1d9;--pi-text-bright:#f0f6fc;--pi-muted:#8b949e;--pi-dim:#6e7681;--pi-accent:#58a6ff;--pi-accent-border:#2f81f7;--pi-selection-bg:#0d2847;--pi-success:#3fb950;--pi-success-border:#238636;--pi-success-bg:#0f1b12;--pi-success-surface:#0f2a16;--pi-success-ring:#3fb95055;--pi-warning:#d29922;--pi-warning-border:#6e5200;--pi-warning-surface:#1f1a10;--pi-danger:#ff7b72;--pi-purple:#d2a8ff;--pi-purple-border:#a371f7;--pi-purple-surface:#21132f;--pi-overlay:#0008;--pi-shadow-soft:#0006;--pi-shadow:#0008;--pi-shadow-strong:#000b;--pi-bg-overlay-soft:#0d1117dd;--pi-bg-overlay:#0d1117e6;--pi-success-bg-overlay:#0f1b12ee;--pi-terminal-selection:#264f78}html,body{background:var(--pi-bg);height:100%;color:var(--pi-text);margin:0;overflow:hidden}body{min-height:100dvh}</style>
|
|
13
|
-
<script type="module" crossorigin src="./assets/index-
|
|
13
|
+
<script type="module" crossorigin src="./assets/index-DzMPXVth.js"></script>
|
|
14
14
|
<link rel="modulepreload" crossorigin href="./assets/managementEmbed-Bx8Mwzdw.js">
|
|
15
15
|
<link rel="modulepreload" crossorigin href="./assets/preload-helper-XpATwJ5c.js">
|
|
16
16
|
</head>
|
|
@@ -41,7 +41,9 @@ export async function listRelayDocumentTree(files, relayPath) {
|
|
|
41
41
|
/** Read one relay document. Never rejects. */
|
|
42
42
|
export async function readRelayDocument(files, documentPath) {
|
|
43
43
|
try {
|
|
44
|
-
const file = await files.readFile(documentPath);
|
|
44
|
+
const file = await (files.readOptionalFile === undefined ? files.readFile(documentPath) : files.readOptionalFile(documentPath));
|
|
45
|
+
if (file === undefined)
|
|
46
|
+
return { kind: "missing" };
|
|
45
47
|
return { kind: "loaded", content: file.content, truncated: file.truncated, binary: file.binary };
|
|
46
48
|
}
|
|
47
49
|
catch (error) {
|
|
@@ -195,6 +197,8 @@ function anchorIndexOf(name) {
|
|
|
195
197
|
return index === -1 ? RELAY_ANCHOR_DOCUMENTS.length : index;
|
|
196
198
|
}
|
|
197
199
|
function fileAccessFailure(error) {
|
|
200
|
+
if (error instanceof Error && "status" in error && error.status === 404)
|
|
201
|
+
return { kind: "missing" };
|
|
198
202
|
if (error instanceof Error && missingListingErrorMessages.has(error.message))
|
|
199
203
|
return { kind: "missing" };
|
|
200
204
|
return { kind: "unavailable", detail: error instanceof Error ? error.message : String(error) };
|
|
@@ -4,6 +4,8 @@ PI WEB 的可选 Lit 展示插件,随包提供且默认启用。插件 ID 为
|
|
|
4
4
|
|
|
5
5
|
导航将当前选中项目、工作区与会话组合为嵌套分支,普通文件夹省略重复的工作区层;顶部提供新会话、搜索及添加项目入口,设置位于底部。标题栏以文字“操作”按钮打开宿主操作面板,不显示闪电图标。侧栏使用浅薄荷色或深炭色,聊天输入区居中、最大宽度为 816px。桌面设置采用全屏布局与 240px 导航栏,窄屏改为可横向滚动的分区导航。可用操作遵循宿主权限,管理视图不增加普通模式操作。
|
|
6
6
|
|
|
7
|
+
输入框下方紧邻显示与输入内容对齐的上下文用量和会话费用,沿用宿主状态条的数据、计算与警告操作;发送按钮左侧不显示分隔线。主操作位空闲时显示发送,运行中常显停止,不依赖悬停、焦点或草稿;独立引导按钮与键盘排队仍使用宿主行为。这些展示调整仅由插件样式提供,关闭插件后恢复宿主默认表现。
|
|
8
|
+
|
|
7
9
|
树形布局只展开当前选中分支,项目和工作区通过节点按钮展开或收起,手机端也不使用单层互斥折叠;定向定位会话会先展开所选祖先。数据仍由宿主按选择加载,不同时读取未选中项目的会话。左侧附件按钮的来源菜单采用起始对齐,在窄屏保留可读空间。上传、删除、附件移除、信任和会话菜单继续使用原有功能;切换展示不重建消息视图和输入编辑器,不清除草稿或附件。
|
|
8
10
|
|
|
9
11
|
在网关的插件设置中禁用,或在有效机器配置中设置:
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
flex: 0 0 auto;
|
|
21
21
|
width: 100%;
|
|
22
22
|
max-width: 816px;
|
|
23
|
-
padding: 12px 28px
|
|
23
|
+
padding: 12px 28px 4px;
|
|
24
24
|
margin-inline: auto;
|
|
25
25
|
}
|
|
26
26
|
:host(chat-view) .chat-wrap { border: 0; background: var(--pi-bg); }
|
|
@@ -69,6 +69,7 @@
|
|
|
69
69
|
background: transparent;
|
|
70
70
|
}
|
|
71
71
|
:host(prompt-editor) .compact-status { align-items: center; justify-content: flex-end; }
|
|
72
|
+
:host(prompt-editor) .actions > .ui-toolbar-group { border-inline-start: 0; }
|
|
72
73
|
:host(prompt-editor) .actions .ui-button { min-height: 36px; border: 0; border-radius: 6px; padding-inline: 8px; background: transparent; }
|
|
73
74
|
:host(prompt-editor) .actions .ui-button:hover:not(:disabled) { background: var(--pi-surface-hover); }
|
|
74
75
|
:host(prompt-editor) .actions .ui-button--icon { width: 36px; min-width: 36px; padding: 0; }
|
|
@@ -90,11 +91,21 @@
|
|
|
90
91
|
:host(prompt-editor) .editor-input .editor-attach .prompt-action-icon { width: 18px; height: 18px; }
|
|
91
92
|
:host(prompt-editor) .actions .default-send-action:not(:disabled) { border-radius: 50%; background: var(--pi-text); color: var(--pi-bg); }
|
|
92
93
|
:host(prompt-editor) .actions .default-send-action:hover:not(:disabled) { background: var(--pi-text-secondary); }
|
|
94
|
+
:host(prompt-editor) .actions .send-button, :host(prompt-editor) .actions .stop-button { width: 36px; height: 36px; }
|
|
95
|
+
:host(prompt-editor) footer:not([data-active-work]) .actions .stop-button { display: none; }
|
|
96
|
+
:host(prompt-editor) footer[data-active-work] .actions > .ui-toolbar-group > .send-button { display: none; }
|
|
97
|
+
:host(prompt-editor) footer[data-active-work] .actions .stop-button { display: inline-grid; border-radius: 50%; background: var(--pi-text); color: var(--pi-bg); }
|
|
98
|
+
:host(prompt-editor) .actions .stop-button:hover:not(:disabled) { background: var(--pi-text-secondary); }
|
|
99
|
+
:host(prompt-editor) .actions .steer-button.default-send-action:not(:disabled) { border-radius: 6px; background: transparent; color: var(--pi-text-secondary); }
|
|
100
|
+
:host(prompt-editor) .actions .steer-button.default-send-action:hover:not(:disabled) { background: var(--pi-surface-hover); }
|
|
93
101
|
:host(prompt-editor) .editor-chat-navigation { inset-inline-end: 10px; top: 8px; border: 0; border-radius: 6px; }
|
|
94
102
|
:host(prompt-editor) .editor-chat-navigation .chat-jumps button + button { border: 0; }
|
|
95
103
|
:host(prompt-editor) .attachments, :host(prompt-editor) .prompt-chips { margin: 8px 14px; }
|
|
96
104
|
:host(prompt-editor) .attachment-remove { min-width: 32px; }
|
|
97
105
|
:host(prompt-editor) .attach-source-panel { --ui-popup-placement: above-start; padding: 4px; border-radius: 8px; }
|
|
106
|
+
:host(status-bar) { box-sizing: border-box; width: calc(100% - 56px); max-width: 760px; margin-inline: auto; }
|
|
107
|
+
:host(status-bar) .bar { gap: 12px; flex-wrap: wrap; padding: 4px 0 18px; border: 0; background: transparent; overflow: visible; }
|
|
108
|
+
:host(status-bar) .context, :host(status-bar) .cost { flex: 0 0 auto; }
|
|
98
109
|
:host(prompt-editor) .mode-hint { bottom: 54px; right: 14px; }
|
|
99
110
|
:host(autocomplete-menu) .menu { padding: 4px; border-radius: 8px; }
|
|
100
111
|
:host(autocomplete-menu) button { border: 0; border-radius: 6px; }
|
|
@@ -242,7 +253,9 @@
|
|
|
242
253
|
:host(settings-general-panel) .field > :is(input, select, textarea) { grid-column: 1; }
|
|
243
254
|
}
|
|
244
255
|
@media (max-width: 600px) {
|
|
245
|
-
:host(pi-web-ui-presentation) .codex-composer { padding: 8px 12px
|
|
256
|
+
:host(pi-web-ui-presentation) .codex-composer { padding: 8px 12px 4px; }
|
|
257
|
+
:host(status-bar) { width: calc(100% - 24px); }
|
|
258
|
+
:host(status-bar) .bar { gap: 10px; padding-block-end: max(12px, env(safe-area-inset-bottom)); }
|
|
246
259
|
:host(chat-view) .chat { padding: 20px 16px 36px; }
|
|
247
260
|
:host(chat-view) .msg.user { max-width: 92%; }
|
|
248
261
|
:host(prompt-editor) .select-model { padding-inline: 4px; }
|