@firstpick/pi-package-webui 0.6.6 → 0.6.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 +15 -11
- package/bin/pi-webui.mjs +533 -172
- package/lib/WEBUI_TUI_NATIVE_PARITY.json +13 -0
- package/lib/auth-actions.mjs +30 -51
- package/lib/codex-usage-auth.mjs +61 -0
- package/lib/git-command-errors.mjs +68 -0
- package/lib/git-workflow-preferences.mjs +34 -1
- package/lib/native-export-payload.mjs +13 -0
- package/lib/npm-command.mjs +105 -0
- package/lib/process-tree.mjs +53 -0
- package/lib/update-commands.mjs +20 -0
- package/package.json +2 -2
- package/public/app.js +1765 -211
- package/public/index.html +48 -11
- package/public/styles.css +828 -174
- package/tests/app-runner-process-tree-harness.test.mjs +162 -0
- package/tests/codex-usage-auth.test.mjs +65 -0
- package/tests/document-artifact-static.test.mjs +18 -0
- package/tests/fixtures/fake-pi.mjs +72 -2
- package/tests/git-command-errors.test.mjs +42 -0
- package/tests/git-workflow-preferences.test.mjs +14 -2
- package/tests/http-endpoints-harness.test.mjs +182 -0
- package/tests/mobile-static.test.mjs +100 -19
- package/tests/native-export-payload.test.mjs +26 -0
- package/tests/native-parity-harness.test.mjs +1 -1
- package/tests/native-parity.test.mjs +11 -2
- package/tests/npm-command.test.mjs +64 -0
- package/tests/remote-auth-settings-harness.test.mjs +33 -1
- package/tests/resource-defaults-helper.test.mjs +126 -0
- package/tests/session-auth-harness.test.mjs +2 -2
- package/tests/update-commands.test.mjs +44 -0
- package/webui-rpc-helper.mjs +47 -16
package/public/index.html
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
<link rel="manifest" href="/manifest.webmanifest" />
|
|
13
13
|
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
|
14
14
|
<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
|
|
15
|
-
<link rel="stylesheet" href="/styles.css?v=
|
|
15
|
+
<link rel="stylesheet" href="/styles.css?v=73" />
|
|
16
16
|
</head>
|
|
17
17
|
<body>
|
|
18
18
|
<button id="sidePanelExpandButton" class="side-panel-expand-button" type="button" aria-controls="sidePanel" aria-expanded="false" aria-label="Expand side panel" title="Expand side panel">
|
|
@@ -76,6 +76,7 @@
|
|
|
76
76
|
<button id="splitTabButton" class="terminal-split-button" type="button" aria-label="Split the active terminal to the right" aria-pressed="false"><svg class="terminal-split-icon terminal-split-icon-split" viewBox="0 0 24 24" aria-hidden="true" focusable="false"><rect x="4" y="5" width="16" height="14" rx="2" fill="none" stroke="currentColor" stroke-width="2"/><path d="M12 5v14M15 12h4m0 0-2-2m2 2-2 2" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg><svg class="terminal-split-icon terminal-split-icon-unsplit" viewBox="0 0 24 24" aria-hidden="true" focusable="false"><rect x="4" y="5" width="16" height="14" rx="2" fill="none" stroke="currentColor" stroke-width="2"/><path d="M12 5v14M19 12h-4m0 0 2-2m-2 2 2 2" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg></button>
|
|
77
77
|
<button id="commandPaletteButton" class="terminal-command-palette-button" type="button" aria-label="Open command palette" data-tooltip="Command palette: • Search and run actions, slash commands, models, and tabs. • Shortcut: Ctrl/Cmd+K."><svg class="composer-icon command-palette-launcher-icon" viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="M5 7.5h14" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"/><path d="M5 12h9" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"/><path d="M5 16.5h5" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"/><path d="M17 14.5 19.5 17 17 19.5" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg></button>
|
|
78
78
|
<button id="workspaceDashboardToggleButton" class="terminal-dashboard-button" type="button" aria-controls="workspaceDashboard" aria-expanded="false" aria-label="Show workspace overview" data-tooltip="Workspace overview: • Shows current tab, cwd, model, context, session, and queue. • Opens common workspace/session actions from one place."><svg class="composer-icon workspace-overview-icon" viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="M4 11.4 12 4l8 7.4" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M6.5 10.5V20h11v-9.5" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M10 20v-5h4v5" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg></button>
|
|
79
|
+
<div id="remoteAccessIndicator" class="remote-access-indicator" role="status" aria-live="polite" hidden>Remote access open</div>
|
|
79
80
|
<button id="closeAllTabsButton" class="terminal-close-all-button" type="button" aria-label="Close all terminal tabs">Close all Tabs</button>
|
|
80
81
|
</header>
|
|
81
82
|
<section id="workspaceDashboard" class="workspace-dashboard" aria-label="Workspace dashboard"></section>
|
|
@@ -125,6 +126,7 @@
|
|
|
125
126
|
>Follow-up</button>
|
|
126
127
|
<div id="sessionSkillTags" class="composer-skill-tags" aria-live="polite" hidden></div>
|
|
127
128
|
<button id="conversationModeChip" class="composer-conversation-mode-chip" type="button" aria-live="polite" hidden>Voice: off</button>
|
|
129
|
+
<button id="workflowModeChip" class="composer-workflow-mode-chip" type="button" aria-live="polite" aria-pressed="true" hidden>Workflow: on</button>
|
|
128
130
|
</div>
|
|
129
131
|
<div id="busyPromptBehaviorMenu" class="composer-busy-mode-menu" role="menu" aria-labelledby="busyPromptBehaviorTag" hidden>
|
|
130
132
|
<button class="composer-busy-mode-menu-item" type="button" role="menuitemradio" data-busy-prompt-behavior="followUp" aria-checked="true">
|
|
@@ -136,7 +138,7 @@
|
|
|
136
138
|
<span class="composer-busy-mode-menu-description">Guide the active run immediately.</span>
|
|
137
139
|
</button>
|
|
138
140
|
</div>
|
|
139
|
-
<textarea id="promptInput" rows="1" enterkeyhint="enter" placeholder="Ask Pi…" autofocus></textarea>
|
|
141
|
+
<textarea id="promptInput" rows="1" enterkeyhint="enter" placeholder="Ask Pi…" role="combobox" aria-autocomplete="list" aria-controls="commandSuggest" aria-expanded="false" autofocus></textarea>
|
|
140
142
|
<button
|
|
141
143
|
id="attachButton"
|
|
142
144
|
class="composer-icon-button composer-attach-button"
|
|
@@ -153,6 +155,15 @@
|
|
|
153
155
|
<div id="composerActionsPanel" class="composer-actions-panel" aria-label="Composer actions">
|
|
154
156
|
<button id="newSessionButton" class="composer-new-button" type="button">New</button>
|
|
155
157
|
<button id="compactButton" class="composer-compact-button" type="button" title="Compact the current Pi session context">Compact</button>
|
|
158
|
+
<button
|
|
159
|
+
id="workflowModeButton"
|
|
160
|
+
class="composer-workflow-mode-button"
|
|
161
|
+
type="button"
|
|
162
|
+
aria-pressed="false"
|
|
163
|
+
title="Toggle JavaScript Workflow Mode"
|
|
164
|
+
data-tooltip="Workflow Mode: generate and run reusable JavaScript orchestration for substantive prompts."
|
|
165
|
+
hidden
|
|
166
|
+
><span>Workflow</span></button>
|
|
156
167
|
<button
|
|
157
168
|
id="gitWorkflowButton"
|
|
158
169
|
class="composer-icon-button composer-git-button"
|
|
@@ -214,7 +225,7 @@
|
|
|
214
225
|
aria-haspopup="menu"
|
|
215
226
|
aria-expanded="false"
|
|
216
227
|
aria-controls="optionsMenu"
|
|
217
|
-
data-tooltip="Options: command palette, Guided Git Setup, Git-footer Visibility, natural conversation, resume, reload, remote, name, clone, settings, export, fork, or tree."
|
|
228
|
+
data-tooltip="Options: command palette, Safety Guard Setup, Guided Git Setup, Git-footer Visibility, natural conversation, resume, reload, remote, name, clone, settings, export, fork, or tree."
|
|
218
229
|
><svg class="composer-icon" viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="M4 7h16M4 12h16M4 17h16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"/><circle cx="8" cy="7" r="1.6" fill="currentColor"/><circle cx="16" cy="12" r="1.6" fill="currentColor"/><circle cx="11" cy="17" r="1.6" fill="currentColor"/></svg></button>
|
|
219
230
|
<div id="optionsMenu" class="composer-publish-menu-panel composer-options-menu-panel composer-auto-height-menu-panel" role="menu" aria-label="Common Pi options">
|
|
220
231
|
<button id="optionsCommandPaletteButton" class="composer-publish-menu-item composer-options-menu-item" type="button" role="menuitem">
|
|
@@ -241,6 +252,9 @@
|
|
|
241
252
|
<button id="optionsSettingsButton" class="composer-publish-menu-item composer-options-menu-item" type="button" role="menuitem" data-command="/settings">
|
|
242
253
|
<span>Settings</span>
|
|
243
254
|
</button>
|
|
255
|
+
<button id="optionsSafetyGuardSetupButton" class="composer-publish-menu-item composer-options-menu-item" type="button" role="menuitem" data-command="/safety-guard-setup" hidden>
|
|
256
|
+
<span>Safety Guard Setup</span>
|
|
257
|
+
</button>
|
|
244
258
|
<button id="optionsGitWorkflowSetupButton" class="composer-publish-menu-item composer-options-menu-item" type="button" role="menuitem" data-command="/git-workflow-setup">
|
|
245
259
|
<span>Guided Git Setup</span>
|
|
246
260
|
</button>
|
|
@@ -371,7 +385,7 @@
|
|
|
371
385
|
</section>
|
|
372
386
|
|
|
373
387
|
<button id="sidePanelBackdrop" class="side-panel-backdrop" type="button" aria-label="Close side panel" hidden></button>
|
|
374
|
-
<aside id="sidePanel" class="side-panel">
|
|
388
|
+
<aside id="sidePanel" class="side-panel" role="dialog" aria-label="Control Deck">
|
|
375
389
|
<div class="side-panel-header">
|
|
376
390
|
<div>
|
|
377
391
|
<span class="side-panel-kicker">Pi Web UI</span>
|
|
@@ -457,9 +471,9 @@
|
|
|
457
471
|
<div id="backgroundStatus" class="background-status muted">Theme default</div>
|
|
458
472
|
</div>
|
|
459
473
|
<div id="networkControlField" class="control-field network-control-field" hidden>
|
|
460
|
-
<label>Remote
|
|
474
|
+
<label>Remote access</label>
|
|
461
475
|
<div id="networkStatus" class="network-status closed">Local only</div>
|
|
462
|
-
<label class="toggle-control remote-auth-toggle" for="remoteAuthToggle">
|
|
476
|
+
<label class="toggle-control remote-auth-toggle" for="remoteAuthToggle" hidden>
|
|
463
477
|
<input id="remoteAuthToggle" type="checkbox" />
|
|
464
478
|
<span>
|
|
465
479
|
<span class="toggle-control-label">Remote PIN auth</span>
|
|
@@ -467,7 +481,7 @@
|
|
|
467
481
|
</span>
|
|
468
482
|
</label>
|
|
469
483
|
<div class="network-action-row">
|
|
470
|
-
<button id="openNetworkButton" type="button">Open
|
|
484
|
+
<button id="openNetworkButton" type="button">Open for remote access</button>
|
|
471
485
|
<button id="showRemoteQrButton" type="button" hidden>Show QR code</button>
|
|
472
486
|
</div>
|
|
473
487
|
</div>
|
|
@@ -518,7 +532,6 @@
|
|
|
518
532
|
<input id="fileTreeSearchInput" class="file-tree-search-input" type="search" placeholder="Search files and folders…" autocomplete="off" spellcheck="false" aria-label="Search workspace files and folders" />
|
|
519
533
|
<button id="fileTreeSearchClearButton" type="button" aria-label="Clear file search" hidden disabled>Clear</button>
|
|
520
534
|
</div>
|
|
521
|
-
<p class="file-tree-hint muted">Double-click a file to open it in WebUI. Right-click files or folders for WebUI/default-editor actions. Folders expand lazily and start collapsed.</p>
|
|
522
535
|
<div id="fileTreeRoot" class="file-tree" role="tree" aria-label="Workspace file tree"></div>
|
|
523
536
|
<p id="fileTreeStatus" class="file-tree-status muted" role="status" aria-live="polite"></p>
|
|
524
537
|
</div>
|
|
@@ -576,7 +589,7 @@
|
|
|
576
589
|
</button>
|
|
577
590
|
</h2>
|
|
578
591
|
<div id="sidePanelSectionSession" class="side-panel-section-content" hidden>
|
|
579
|
-
<
|
|
592
|
+
<div id="stateDetails" class="session-details" aria-label="Current session details"></div>
|
|
580
593
|
</div>
|
|
581
594
|
</section>
|
|
582
595
|
<section class="side-panel-section collapsed" data-side-panel-section="subagents">
|
|
@@ -650,6 +663,30 @@
|
|
|
650
663
|
<button type="button" role="menuitem" class="danger" data-file-menu-action="delete">Delete…</button>
|
|
651
664
|
</div>
|
|
652
665
|
|
|
666
|
+
<aside id="undoToast" class="undo-toast" aria-live="polite" aria-atomic="true" hidden>
|
|
667
|
+
<span id="undoToastMessage" class="undo-toast-message"></span>
|
|
668
|
+
<span id="undoToastTime" class="undo-toast-time">Undo available for 10 seconds</span>
|
|
669
|
+
<button id="undoToastButton" class="undo-toast-button" type="button">Undo</button>
|
|
670
|
+
<button id="undoToastDismissButton" class="undo-toast-dismiss" type="button" aria-label="Dismiss Undo message">×</button>
|
|
671
|
+
<span class="undo-toast-progress" aria-hidden="true"></span>
|
|
672
|
+
</aside>
|
|
673
|
+
|
|
674
|
+
<dialog id="confirmationDialog" class="extension-dialog confirmation-dialog">
|
|
675
|
+
<form method="dialog">
|
|
676
|
+
<h2 id="confirmationTitle">Confirm action</h2>
|
|
677
|
+
<p id="confirmationSummary"></p>
|
|
678
|
+
<dl class="confirmation-details">
|
|
679
|
+
<div><dt>Affected</dt><dd id="confirmationAffected"></dd></div>
|
|
680
|
+
<div><dt>Undo</dt><dd id="confirmationUndo"></dd></div>
|
|
681
|
+
<div><dt>Safer option</dt><dd id="confirmationAlternative"></dd></div>
|
|
682
|
+
</dl>
|
|
683
|
+
<menu>
|
|
684
|
+
<button id="confirmationCancelButton" type="button">Cancel</button>
|
|
685
|
+
<button id="confirmationConfirmButton" class="danger" type="button">Continue</button>
|
|
686
|
+
</menu>
|
|
687
|
+
</form>
|
|
688
|
+
</dialog>
|
|
689
|
+
|
|
653
690
|
<dialog id="extensionDialog" class="extension-dialog">
|
|
654
691
|
<form id="dialogForm" method="dialog">
|
|
655
692
|
<h2 id="dialogTitle">Pi request</h2>
|
|
@@ -768,7 +805,7 @@
|
|
|
768
805
|
<button id="commandPaletteCloseButton" class="command-palette-close-button" type="button" aria-label="Close command palette" title="Close command palette">Close</button>
|
|
769
806
|
</div>
|
|
770
807
|
</div>
|
|
771
|
-
<input id="commandPaletteInput" class="dialog-input command-palette-input" type="search" autocomplete="off" spellcheck="false" placeholder="Search commands, tabs, models, sessions…" aria-label="Search command palette" />
|
|
808
|
+
<input id="commandPaletteInput" class="dialog-input command-palette-input" type="search" autocomplete="off" spellcheck="false" placeholder="Search commands, tabs, models, sessions…" role="combobox" aria-autocomplete="list" aria-controls="commandPaletteList" aria-expanded="true" aria-label="Search command palette" />
|
|
772
809
|
<div id="commandPaletteList" class="command-palette-list" role="listbox" aria-label="Command palette results"></div>
|
|
773
810
|
<p id="commandPaletteHint" class="command-palette-hint muted">Use ↑/↓ then Enter. Escape closes.</p>
|
|
774
811
|
</form>
|
|
@@ -901,6 +938,6 @@
|
|
|
901
938
|
</form>
|
|
902
939
|
</dialog>
|
|
903
940
|
|
|
904
|
-
<script type="module" src="/app.js?v=
|
|
941
|
+
<script type="module" src="/app.js?v=73"></script>
|
|
905
942
|
</body>
|
|
906
943
|
</html>
|