@firstpick/pi-package-webui 0.9.7 → 0.9.8
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 +7 -3
- package/bin/pi-webui.mjs +114 -25
- package/index.ts +2 -1
- package/lib/optional-feature-catalog.mjs +1 -1
- package/package.json +1 -1
- package/public/app.js +629 -98
- package/public/guided-git-command-state.mjs +175 -1
- package/public/index.html +12 -9
- package/public/service-worker.js +1 -1
- package/public/styles.css +133 -31
- package/public/transcript-renderer.mjs +62 -0
- package/tests/boot-failure-diagnostics.test.mjs +3 -3
- package/tests/browser/footer-model-advanced-layout.spec.mjs +512 -0
- package/tests/browser/guided-git-extension-command.spec.mjs +180 -0
- package/tests/browser/guided-git-fallback.spec.mjs +68 -3
- package/tests/browser/interaction-continuity.spec.mjs +33 -0
- package/tests/codex-fast-mode-static.test.mjs +2 -2
- package/tests/compaction-static.test.mjs +1 -1
- package/tests/composer-action-grid-reorder-static.test.mjs +3 -3
- package/tests/control-visibility-static.test.mjs +3 -3
- package/tests/controls-layout-static.test.mjs +3 -3
- package/tests/events-tree-context-menu-static.test.mjs +3 -3
- package/tests/fast-mode-client-static.test.mjs +1 -1
- package/tests/feature-decision-output-popup-static.test.mjs +2 -2
- package/tests/file-viewer-image-static.test.mjs +3 -3
- package/tests/fixtures/fake-pi.mjs +34 -3
- package/tests/git-footer-context-menu-static.test.mjs +103 -1
- package/tests/guided-git-activation-http.test.mjs +194 -0
- package/tests/guided-git-activation-static.test.mjs +80 -0
- package/tests/guided-git-activation.test.mjs +244 -0
- package/tests/guided-git-fallback-runtime.test.mjs +1 -0
- package/tests/guided-git-fallback-ui-static.test.mjs +2 -2
- package/tests/guided-git-message-reliability-static.test.mjs +2 -1
- package/tests/guided-git-optional-feature.test.mjs +31 -0
- package/tests/http-endpoints-harness.test.mjs +3 -0
- package/tests/interaction-state-stability-static.test.mjs +1 -1
- package/tests/intercom-conversation-viewer-static.test.mjs +3 -3
- package/tests/main-output-loading-static.test.mjs +11 -9
- package/tests/middle-button-drag-scroll-static.test.mjs +3 -3
- package/tests/mobile-continuity-tablet-static.test.mjs +3 -3
- package/tests/mobile-foundation-static.test.mjs +3 -3
- package/tests/mobile-phone-experience-static.test.mjs +1 -1
- package/tests/mobile-static.test.mjs +85 -4
- package/tests/open-issue-wizard-static.test.mjs +1 -1
- package/tests/persistent-ui-layout-static.test.mjs +3 -3
- package/tests/prompt-input-vertical-scroll-static.test.mjs +6 -6
- package/tests/prompt-routing-input-clear-static.test.mjs +1 -1
- package/tests/questionnaire-dialog.test.mjs +3 -3
- package/tests/session-sampling-ui-static.test.mjs +3 -3
- package/tests/side-panel-section-height-removal-static.test.mjs +3 -3
- package/tests/subagent-observability-static.test.mjs +2 -2
- package/tests/syntax-highlighting-static.test.mjs +3 -3
- package/tests/tab-close-continuity-static.test.mjs +2 -0
- package/tests/theme-customizer-static.test.mjs +1 -1
- package/tests/thinking-block-grouping.test.mjs +79 -0
package/README.md
CHANGED
|
@@ -18,7 +18,7 @@ Pi Web UI keeps the normal Pi agent experience while giving you more room to man
|
|
|
18
18
|
| Area | Highlights |
|
|
19
19
|
| --- | --- |
|
|
20
20
|
| **Sessions and workspaces** | Run several isolated Pi sessions, resume prior work, switch projects, preserve per-tab drafts, add another tab directly from the tab strip, and create branch worktrees. |
|
|
21
|
-
| **Live agent work** | Follow streaming Markdown with syntax highlighting for code blocks, thinking, tool output, queues, todo progress, managed agent runs, and direct agent-to-agent conversations without leaving the browser. |
|
|
21
|
+
| **Live agent work** | Follow streaming Markdown with syntax highlighting for code blocks, grouped consecutive thinking, tool output, queues, todo progress, managed agent runs, and direct agent-to-agent conversations without leaving the browser. |
|
|
22
22
|
| **Models and controls** | Change models and thinking effort, manage scoped models, configure tools and skills, and use the command palette. |
|
|
23
23
|
| **Files and prompts** | Upload or paste files and images, edit text attachments, use slash-command suggestions, browse project files, and reference project paths with `@`. |
|
|
24
24
|
| **Git workflows** | Inspect changes, switch branches, review diffs, stage work, generate commit messages with an optional one-shot fallback model, push, and prepare pull requests through guided steps. |
|
|
@@ -67,7 +67,7 @@ Check the server at any time with:
|
|
|
67
67
|
|
|
68
68
|
When session history is still loading, the main window shows **Loading agent output…** with a small inline spinner. Existing transcript content and controls remain available; no popup interrupts your work.
|
|
69
69
|
|
|
70
|
-
Open **Events** to see bounded tool activity details such as status, duration, a safe target when available, and a shortened call ID. Use **Show** to isolate errors and failures, warnings, tool activity, or rows with **Tree…** available; **All events** restores the full browser-held history. Select a row to jump to its chat card. Right-click any row, or use its keyboard context-menu shortcut, to switch between **Detailed** and **Compact** display. Compact keeps the timestamp and summary while hiding secondary metadata; tool rows retain a colored lifecycle accent. Eligible tool rows also offer **Tree…** to confirm navigation to that exact point in the session; use `/tree` to navigate back.
|
|
70
|
+
Open **Events** to see bounded tool activity details such as status, duration, a safe target when available, and a shortened call ID. Use **Show** to isolate errors and failures, warnings, tool activity, or rows with **Tree…** available; **All events** restores the full browser-held history. Select a row to jump to its chat card. Right-click any row, or use its keyboard context-menu shortcut, to switch between **Detailed** and **Compact** display. Compact keeps the timestamp and summary while hiding secondary metadata; tool rows retain a colored lifecycle accent. Eligible tool rows also offer **Tree…** to confirm navigation to that exact point in the session; use `/tree` to navigate back. Repeated successful subagent Auto-Clear activity stays in one row whose finished-run count increases.
|
|
71
71
|
|
|
72
72
|
Tracked skills appear as compact tags above the composer. Select a named tag to open its skill file; when space is limited, select the **+X** tag to expand the remaining selectable tags upward.
|
|
73
73
|
|
|
@@ -154,6 +154,8 @@ Choose the supported reasoning effort before sending the next prompt. Local mode
|
|
|
154
154
|
|
|
155
155
|
Search available models and control project or global model scope and cycling order.
|
|
156
156
|
|
|
157
|
+
For a long scoped-model list, right-click the Git footer **Model** box and choose **Toggle advanced**. The picker groups models into alphabetized provider columns. Drag a model within its provider column, or use `Alt+Up` / `Alt+Down`, to change that provider's cycling order. Models cannot move between providers. Use the arrow keys to navigate, `Enter` or `Space` to select, and `Escape` to close. On desktop the picker grows with the provider count, can overlay the side panels, and stops at the viewport edge with internal scrolling. Choose **Toggle Simple** to return to the flat list.
|
|
158
|
+
|
|
157
159
|
#### Tools setup
|
|
158
160
|
|
|
159
161
|

|
|
@@ -184,7 +186,9 @@ Launch detected development servers, tests, builds, scripts, and project-defined
|
|
|
184
186
|
|
|
185
187
|

|
|
186
188
|
|
|
187
|
-
**Optional
|
|
189
|
+
**Optional features needed:** `@firstpick/pi-extension-git-guided-workflow` provides the preferred `/git-guided-workflow` launcher and bundles `@firstpick/pi-prompts-git-pr` for generated commit messages, branch names, and pull-request content. `@firstpick/pi-extension-aur-review` optionally adds the staged-review gate. The Optional features panel installs and audits the Guided Git extension as one complete feature.
|
|
190
|
+
|
|
191
|
+
Run `/git-guided-workflow` in the browser composer or use the **Guided Git workflow** button. The extension starts the workflow in the originating tab without sending a repository path, diff, or Git data in its activation request. Existing prompt-only installations retain a temporary compatibility launcher, but installing the workflow extension is the supported path.
|
|
188
192
|
|
|
189
193
|
Move through review, staging, commit-message generation, commit, push, and pull-request steps with explicit confirmations. In **Guided Git Setup**, you can optionally choose a fallback model and its own reasoning effort. If the primary model reaches a final generation failure, Guided Git tries the fallback once, reports the change in the workflow, and restores the tab’s prior model and effort afterward. Validation failures, cancellation, Git command failures, and a stopped Pi process do not trigger fallback.
|
|
190
194
|
|
package/bin/pi-webui.mjs
CHANGED
|
@@ -450,6 +450,12 @@ let optionalFeatureStartupReady = false;
|
|
|
450
450
|
const UPDATE_PACKAGE_NAMES = [...CORE_UPDATE_PACKAGE_NAMES].sort();
|
|
451
451
|
const NATURAL_CONVERSATION_STATUS_KEY = "natural-conversation";
|
|
452
452
|
const NATURAL_CONVERSATION_COMMAND_NAMES = ["talk", "voice", "conversation"];
|
|
453
|
+
const GUIDED_GIT_START_STATUS_KEY = "git-guided-workflow:webui-start";
|
|
454
|
+
const GUIDED_GIT_START_PAYLOAD_TYPE = "firstpick.pi-extension-git-guided-workflow.start";
|
|
455
|
+
const GUIDED_GIT_START_PAYLOAD_VERSION = 1;
|
|
456
|
+
const GUIDED_GIT_LAUNCH_TTL_MS = 15_000;
|
|
457
|
+
const GUIDED_GIT_UUID_V4 = /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/u;
|
|
458
|
+
const GUIDED_GIT_COMMAND_MESSAGE = /^\/git-guided-workflow(?::\d+)?$/u;
|
|
453
459
|
// Codex subscription Fast mode is owned by the optional @firstpick/pi-extension-codex-fast-mode
|
|
454
460
|
// package. The Web UI never inspects ChatGPT credentials or request payloads; it only mirrors the
|
|
455
461
|
// extension-published status key and drives the package-owned /fast-mode command over RPC.
|
|
@@ -7717,7 +7723,7 @@ async function readGitWorkflowMessages(cwd, { generationId = "", generation = nu
|
|
|
7717
7723
|
return gitWorkflowMessagePendingPayload(root, messageCwd, paths, generationId, "This commit-message generation is no longer active. Regenerate the message files.", { expired: true });
|
|
7718
7724
|
}
|
|
7719
7725
|
if (generationId && !generation.terminal) {
|
|
7720
|
-
return gitWorkflowMessagePendingPayload(root, messageCwd, paths, generationId, "The correlated commit-message generation is still running.");
|
|
7726
|
+
return gitWorkflowMessagePendingPayload(root, messageCwd, paths, generationId, "The correlated commit-message generation is still running.", { running: true });
|
|
7721
7727
|
}
|
|
7722
7728
|
if (generationId && !generation.successful) {
|
|
7723
7729
|
return gitWorkflowMessagePendingPayload(root, messageCwd, paths, generationId, "The correlated commit-message generation did not finish successfully. Regenerate the message files.", { expired: true });
|
|
@@ -10174,6 +10180,65 @@ function extensionStatusMap(tab) {
|
|
|
10174
10180
|
return tab.extensionStatuses;
|
|
10175
10181
|
}
|
|
10176
10182
|
|
|
10183
|
+
function isGuidedGitWorkflowCommandMessage(message) {
|
|
10184
|
+
return GUIDED_GIT_COMMAND_MESSAGE.test(String(message || "").trim());
|
|
10185
|
+
}
|
|
10186
|
+
|
|
10187
|
+
function prunePendingGuidedGitLaunch(tab, nowMs = Date.now()) {
|
|
10188
|
+
const pending = tab?.guidedGitPendingLaunch;
|
|
10189
|
+
if (pending && nowMs - pending.acceptedAt > GUIDED_GIT_LAUNCH_TTL_MS) tab.guidedGitPendingLaunch = null;
|
|
10190
|
+
return tab?.guidedGitPendingLaunch || null;
|
|
10191
|
+
}
|
|
10192
|
+
|
|
10193
|
+
function clearPendingGuidedGitLaunch(tab, launchId) {
|
|
10194
|
+
if (!tab?.guidedGitPendingLaunch) return;
|
|
10195
|
+
if (!launchId || tab.guidedGitPendingLaunch.launchId === launchId) tab.guidedGitPendingLaunch = null;
|
|
10196
|
+
}
|
|
10197
|
+
|
|
10198
|
+
function validGuidedGitStartStatusText(statusText) {
|
|
10199
|
+
if (typeof statusText !== "string" || !statusText || Buffer.byteLength(statusText, "utf8") > 1024) return false;
|
|
10200
|
+
try {
|
|
10201
|
+
const payload = JSON.parse(statusText);
|
|
10202
|
+
if (!payload || typeof payload !== "object" || Array.isArray(payload)) return false;
|
|
10203
|
+
const keys = Object.keys(payload).sort();
|
|
10204
|
+
if (keys.length !== 4 || keys.join(",") !== "action,requestId,type,version") return false;
|
|
10205
|
+
return payload.type === GUIDED_GIT_START_PAYLOAD_TYPE
|
|
10206
|
+
&& payload.version === GUIDED_GIT_START_PAYLOAD_VERSION
|
|
10207
|
+
&& payload.action === "start"
|
|
10208
|
+
&& GUIDED_GIT_UUID_V4.test(String(payload.requestId || ""));
|
|
10209
|
+
} catch {
|
|
10210
|
+
return false;
|
|
10211
|
+
}
|
|
10212
|
+
}
|
|
10213
|
+
|
|
10214
|
+
function scopedGuidedGitLaunchEvent(tab, event, nowMs = Date.now()) {
|
|
10215
|
+
if (event?.type !== "extension_ui_request" || event.method !== "setStatus" || event.statusKey !== GUIDED_GIT_START_STATUS_KEY) return event;
|
|
10216
|
+
if (!event.statusText) {
|
|
10217
|
+
clearPendingGuidedGitLaunch(tab);
|
|
10218
|
+
return event;
|
|
10219
|
+
}
|
|
10220
|
+
if (!validGuidedGitStartStatusText(event.statusText)) return event;
|
|
10221
|
+
const pending = prunePendingGuidedGitLaunch(tab, nowMs);
|
|
10222
|
+
if (!pending) return event;
|
|
10223
|
+
tab.guidedGitPendingLaunch = null;
|
|
10224
|
+
return { ...event, guidedGitLaunchId: pending.launchId };
|
|
10225
|
+
}
|
|
10226
|
+
|
|
10227
|
+
async function authoritativeGuidedGitLaunchAdmission(tab, { launchId = "", reserve = false } = {}) {
|
|
10228
|
+
const pending = prunePendingGuidedGitLaunch(tab);
|
|
10229
|
+
if (pending) throw makeHttpError(409, "A Guided Git activation is already pending for this tab.");
|
|
10230
|
+
if (reserve && !GUIDED_GIT_UUID_V4.test(String(launchId || ""))) throw makeHttpError(400, "guidedGitLaunchId must be a UUID v4");
|
|
10231
|
+
const state = await currentSessionState(tab);
|
|
10232
|
+
if (state.isStreaming) throw makeHttpError(409, "Wait for the current agent run to finish before starting Guided Git.");
|
|
10233
|
+
if (state.isCompacting) throw makeHttpError(409, "Wait for compaction to finish before starting Guided Git.");
|
|
10234
|
+
if (Number(state.pendingMessageCount || 0) > 0 || compactionQueueForTab(tab).length > 0) {
|
|
10235
|
+
throw makeHttpError(409, "Wait for pending messages to finish before starting Guided Git.");
|
|
10236
|
+
}
|
|
10237
|
+
if (prunePendingGuidedGitLaunch(tab)) throw makeHttpError(409, "A Guided Git activation is already pending for this tab.");
|
|
10238
|
+
if (reserve) tab.guidedGitPendingLaunch = { launchId, acceptedAt: Date.now() };
|
|
10239
|
+
return { admitted: true };
|
|
10240
|
+
}
|
|
10241
|
+
|
|
10177
10242
|
function extensionWidgetMap(tab) {
|
|
10178
10243
|
if (!tab.extensionWidgets) tab.extensionWidgets = new Map();
|
|
10179
10244
|
return tab.extensionWidgets;
|
|
@@ -11281,7 +11346,7 @@ function attachRpcToTab(tab, rpc) {
|
|
|
11281
11346
|
if (resolveWebuiHelperResponse(tab, event) || resolveWebuiHelperRpcResponse(tab, event) || rememberWebuiSubagentsStatusEvent(tab, event) || consumeSessionSummaryRpcEvent(tab, event)) return;
|
|
11282
11347
|
const gitWorkflowFinalError = event?.type === "agent_settled" && tab.pendingTurnFailure === true;
|
|
11283
11348
|
updateTabActivityFromEvent(tab, event);
|
|
11284
|
-
let scopedEvent = eventForTabClients(tab, event);
|
|
11349
|
+
let scopedEvent = scopedGuidedGitLaunchEvent(tab, eventForTabClients(tab, event));
|
|
11285
11350
|
if (event?.type === "pi_process_exit" || event?.type === "pi_process_error") {
|
|
11286
11351
|
if (tab.gitWorkflowGeneration) tab.gitWorkflowGeneration.processLost = true;
|
|
11287
11352
|
if (tab.gitWorkflowArtifactGeneration) {
|
|
@@ -11294,6 +11359,7 @@ function attachRpcToTab(tab, rpc) {
|
|
|
11294
11359
|
clearPendingExtensionUiRequests(tab);
|
|
11295
11360
|
clearExtensionStatuses(tab);
|
|
11296
11361
|
clearExtensionWidgets(tab);
|
|
11362
|
+
clearPendingGuidedGitLaunch(tab);
|
|
11297
11363
|
clearWebuiSubagents(tab);
|
|
11298
11364
|
resetNaturalConversationMode(tab);
|
|
11299
11365
|
resetCodexFastMode(tab);
|
|
@@ -11351,6 +11417,7 @@ function createTabRecord({ id, index, title, titleSource, conversationStarted, c
|
|
|
11351
11417
|
rpcUnsubscribe: undefined,
|
|
11352
11418
|
sseClients: new Set(),
|
|
11353
11419
|
browserPromptRequests: new Map(),
|
|
11420
|
+
guidedGitPendingLaunch: null,
|
|
11354
11421
|
};
|
|
11355
11422
|
resetNaturalConversationMode(tab);
|
|
11356
11423
|
resetCodexFastMode(tab);
|
|
@@ -16017,30 +16084,45 @@ async function handlePromptRequest(tab, body, req) {
|
|
|
16017
16084
|
if (isNaturalConversationActive(tab) && naturalConversationSlashCommandName(body.message) && !isNaturalConversationSlashCommand(body.message)) {
|
|
16018
16085
|
blockNaturalConversationAction("slash commands are blocked from the Web UI shell");
|
|
16019
16086
|
}
|
|
16020
|
-
const
|
|
16021
|
-
|
|
16022
|
-
|
|
16023
|
-
|
|
16024
|
-
|
|
16025
|
-
|
|
16026
|
-
|
|
16027
|
-
|
|
16028
|
-
|
|
16029
|
-
|
|
16030
|
-
|
|
16031
|
-
|
|
16032
|
-
|
|
16033
|
-
|
|
16034
|
-
|
|
16035
|
-
|
|
16036
|
-
|
|
16037
|
-
|
|
16038
|
-
|
|
16039
|
-
|
|
16087
|
+
const guidedGitLaunch = isGuidedGitWorkflowCommandMessage(body.message);
|
|
16088
|
+
const guidedGitLaunchId = guidedGitLaunch ? String(body.guidedGitLaunchId || "") : "";
|
|
16089
|
+
if (guidedGitLaunch) await authoritativeGuidedGitLaunchAdmission(tab, { launchId: guidedGitLaunchId, reserve: true });
|
|
16090
|
+
const releaseGuidedGitLaunch = () => clearPendingGuidedGitLaunch(tab, guidedGitLaunchId);
|
|
16091
|
+
try {
|
|
16092
|
+
const nativeResponse = await handleNativeSlashCommand(tab, body, req);
|
|
16093
|
+
if (nativeResponse) {
|
|
16094
|
+
if (nativeResponse.success === false) releaseGuidedGitLaunch();
|
|
16095
|
+
return { status: nativeResponse.success === false ? 400 : 200, payload: responseWithTab(nativeResponse, tab) };
|
|
16096
|
+
}
|
|
16097
|
+
const command = commandFromPost("/api/prompt", body);
|
|
16098
|
+
enforceNaturalConversationCommandAllowed(tab, command);
|
|
16099
|
+
const queuedForCompaction = guidedGitLaunch ? null : maybeQueueCommandDuringCompaction(tab, command);
|
|
16100
|
+
if (queuedForCompaction) return { status: 202, payload: responseWithTab(queuedForCompaction, tab) };
|
|
16101
|
+
const naturalConversationSafetyResponse = await ensureNaturalConversationPromptSafety(tab, command);
|
|
16102
|
+
if (naturalConversationSafetyResponse?.success === false) {
|
|
16103
|
+
releaseGuidedGitLaunch();
|
|
16104
|
+
return { status: 400, payload: responseWithTab(naturalConversationSafetyResponse, tab) };
|
|
16105
|
+
}
|
|
16106
|
+
const pendingThinkingResponse = await applyPendingThinkingBeforePrompt(tab);
|
|
16107
|
+
if (pendingThinkingResponse?.success === false) {
|
|
16108
|
+
releaseGuidedGitLaunch();
|
|
16109
|
+
return { status: 400, payload: responseWithTab(pendingThinkingResponse, tab) };
|
|
16110
|
+
}
|
|
16111
|
+
const startsVisibleWork = commandStartsVisibleWork(command);
|
|
16112
|
+
if (startsVisibleWork) {
|
|
16113
|
+
maybeNameTabForConversation(tab, command);
|
|
16114
|
+
markTabWorking(tab);
|
|
16115
|
+
}
|
|
16116
|
+
const response = await tab.rpc.send(command, PROMPT_REQUEST_TIMEOUT_MS);
|
|
16117
|
+
if (response.success === false) {
|
|
16118
|
+
releaseGuidedGitLaunch();
|
|
16119
|
+
if (startsVisibleWork) markTabIdle(tab);
|
|
16120
|
+
}
|
|
16121
|
+
return { status: response.success === false ? 400 : 200, payload: responseWithTab(response, tab) };
|
|
16122
|
+
} catch (error) {
|
|
16123
|
+
releaseGuidedGitLaunch();
|
|
16124
|
+
throw error;
|
|
16040
16125
|
}
|
|
16041
|
-
const response = await tab.rpc.send(command, PROMPT_REQUEST_TIMEOUT_MS);
|
|
16042
|
-
if (response.success === false && startsVisibleWork) markTabIdle(tab);
|
|
16043
|
-
return { status: response.success === false ? 400 : 200, payload: responseWithTab(response, tab) };
|
|
16044
16126
|
}
|
|
16045
16127
|
|
|
16046
16128
|
const server = createServer(async (req, res) => {
|
|
@@ -17198,6 +17280,13 @@ const server = createServer(async (req, res) => {
|
|
|
17198
17280
|
return;
|
|
17199
17281
|
}
|
|
17200
17282
|
|
|
17283
|
+
if (url.pathname === "/api/git-workflow/launch-admission" && req.method === "POST") {
|
|
17284
|
+
const body = await readJsonBody(req);
|
|
17285
|
+
const tab = getRequestedTab(req, url, body);
|
|
17286
|
+
sendJson(res, 200, { ok: true, data: await authoritativeGuidedGitLaunchAdmission(tab) });
|
|
17287
|
+
return;
|
|
17288
|
+
}
|
|
17289
|
+
|
|
17201
17290
|
if (url.pathname === "/api/git-workflow/preferences" && req.method === "POST") {
|
|
17202
17291
|
const body = await readJsonBody(req);
|
|
17203
17292
|
const tab = getRequestedTab(req, url, body);
|
package/index.ts
CHANGED
|
@@ -30,6 +30,7 @@ const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
|
30
30
|
const packageRoot = __dirname;
|
|
31
31
|
const webuiBin = path.join(packageRoot, "bin", "pi-webui-launcher.mjs");
|
|
32
32
|
const agentDir = process.env.PI_CODING_AGENT_DIR || path.join(homedir(), ".pi", "agent");
|
|
33
|
+
const nodeExecutable = ["node", "node.exe"].includes(path.basename(process.execPath).toLowerCase()) ? process.execPath : "node";
|
|
33
34
|
|
|
34
35
|
const DEFAULT_HOST = "127.0.0.1";
|
|
35
36
|
const DEFAULT_PORT = 31415;
|
|
@@ -478,7 +479,7 @@ async function startWebui(options: StartWebuiOptions, ctx: ExtensionCommandConte
|
|
|
478
479
|
const env = { ...process.env };
|
|
479
480
|
if (restoreTabs.length > 0) env.PI_WEBUI_RESTORE_FILE = (await createRestoreFile(agentDir, restoreTabs)).file;
|
|
480
481
|
|
|
481
|
-
const child = spawn(
|
|
482
|
+
const child = spawn(nodeExecutable, args, {
|
|
482
483
|
cwd: ctx.cwd,
|
|
483
484
|
env,
|
|
484
485
|
detached: true,
|
|
@@ -2,7 +2,7 @@ const entries = [
|
|
|
2
2
|
["bangCommandAutocomplete", "@firstpick/pi-extension-bang-command-autocomplete", "^0.2.2"],
|
|
3
3
|
["fishUserBash", "@firstpick/pi-extension-fish-user-bash", "^0.2.2"],
|
|
4
4
|
["btwCommand", "@firstpick/pi-extension-btw", "^0.1.4"],
|
|
5
|
-
["gitWorkflow", "@firstpick/pi-
|
|
5
|
+
["gitWorkflow", "@firstpick/pi-extension-git-guided-workflow", "^0.1.0"],
|
|
6
6
|
["releaseNpm", "@firstpick/pi-extension-release-npm", "^0.4.4"],
|
|
7
7
|
["releaseAur", "@firstpick/pi-extension-release-aur", "^0.1.8"],
|
|
8
8
|
["aurReview", "@firstpick/pi-extension-aur-review", "^0.1.1"],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@firstpick/pi-package-webui",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.8",
|
|
4
4
|
"description": "Pi Web UI companion package with a local browser UI CLI plus /webui-start and /webui-status commands.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://github.com/Firstp1ck/pi-coding-agent-forge/tree/main/pi-package-webui#readme",
|