@firstpick/pi-package-webui 0.1.2 → 0.1.4

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/public/index.html CHANGED
@@ -31,7 +31,13 @@
31
31
  </div>
32
32
  </header>
33
33
  <div id="widgetArea" class="widget-area"></div>
34
- <div id="chat" class="chat" aria-live="polite"></div>
34
+ <div id="chat" class="chat" aria-live="polite">
35
+ <button id="stickyUserPromptButton" class="sticky-user-prompt-button" type="button" aria-controls="chat" hidden></button>
36
+ </div>
37
+ <div id="feedbackTray" class="feedback-tray" aria-live="polite" hidden>
38
+ <span id="feedbackTraySummary">No action feedback queued.</span>
39
+ <button id="sendFeedbackButton" type="button">Send &amp; create LEARNING</button>
40
+ </div>
35
41
  <button id="jumpToLatestButton" class="jump-to-latest-button" type="button" hidden>Latest ↓</button>
36
42
  <div id="statusBar" class="statusbar" aria-live="polite"></div>
37
43
  <section id="gitWorkflowPanel" class="git-workflow-panel" aria-live="polite" hidden>
@@ -48,8 +54,8 @@
48
54
  <div id="gitWorkflowActions" class="git-workflow-actions"></div>
49
55
  </section>
50
56
  <form id="composer" class="composer">
51
- <textarea id="promptInput" rows="1" enterkeyhint="enter" placeholder="Ask Pi…"></textarea>
52
- <div id="commandSuggest" class="command-suggest" role="listbox" aria-label="Command suggestions" hidden></div>
57
+ <textarea id="promptInput" rows="1" enterkeyhint="enter" placeholder="Ask Pi…" autofocus></textarea>
58
+ <div id="commandSuggest" class="command-suggest" role="listbox" aria-label="Command and path suggestions" hidden></div>
53
59
  <div class="composer-row">
54
60
  <button id="composerActionsButton" class="composer-actions-button" type="button" aria-controls="composerActionsPanel" aria-expanded="false">Actions</button>
55
61
  <div id="composerActionsPanel" class="composer-actions-panel" aria-label="Composer actions">
@@ -70,6 +76,26 @@
70
76
  aria-label="Start guided Git workflow: git add dot, run git-staged-msg, preview messages, commit short or long, then git push. Cancel is available at each step."
71
77
  data-tooltip="Guided Git workflow:&#10;1. Run git add .&#10;2. Run /git-staged-msg&#10;3. Preview short + long messages&#10;4. Commit with short or long message&#10;5. Run git push&#10;Cancel is available at each step."
72
78
  >Git workflow</button>
79
+ <div class="composer-publish-menu">
80
+ <button
81
+ id="publishButton"
82
+ class="composer-publish-button"
83
+ type="button"
84
+ title="Choose a publish workflow"
85
+ aria-label="Open publish workflows"
86
+ aria-haspopup="menu"
87
+ aria-expanded="false"
88
+ aria-controls="publishMenu"
89
+ >Publish</button>
90
+ <div id="publishMenu" class="composer-publish-menu-panel" role="menu" aria-label="Publish workflows">
91
+ <button id="releaseNpmButton" class="composer-publish-menu-item" type="button" role="menuitem" data-command="/release-npm">
92
+ <span>NPM Release</span>
93
+ </button>
94
+ <button id="releaseAurButton" class="composer-publish-menu-item" type="button" role="menuitem" data-command="/release-aur">
95
+ <span>AUR Release</span>
96
+ </button>
97
+ </div>
98
+ </div>
73
99
  </div>
74
100
  <div class="spacer"></div>
75
101
  <button
@@ -126,11 +152,25 @@
126
152
  </select>
127
153
  <button id="setThinkingButton" type="button">Set thinking</button>
128
154
  </div>
155
+ <div class="control-field">
156
+ <label for="themeSelect">Theme</label>
157
+ <select id="themeSelect" title="Theme"></select>
158
+ </div>
129
159
  <div class="control-field network-control-field">
130
160
  <label>Network</label>
131
161
  <div id="networkStatus" class="network-status closed">Local only</div>
132
162
  <button id="openNetworkButton" type="button">Open to network</button>
133
163
  </div>
164
+ <div class="control-field notification-control-field">
165
+ <span class="control-label">Notifications</span>
166
+ <label class="toggle-control" for="agentDoneNotificationsToggle">
167
+ <input id="agentDoneNotificationsToggle" type="checkbox" />
168
+ <span>
169
+ <span class="toggle-control-label">Agent done notifications</span>
170
+ <span id="agentDoneNotificationsStatus" class="toggle-control-hint">Off</span>
171
+ </span>
172
+ </label>
173
+ </div>
134
174
  <button id="abortButton" type="button" class="danger">Abort</button>
135
175
  </div>
136
176
  <h2>Session</h2>
@@ -1,4 +1,4 @@
1
- const CACHE_NAME = "pi-webui-pwa-v1";
1
+ const CACHE_NAME = "pi-webui-pwa-v10";
2
2
  const APP_SHELL = [
3
3
  "/",
4
4
  "/index.html",
@@ -23,6 +23,18 @@ self.addEventListener("activate", (event) => {
23
23
  );
24
24
  });
25
25
 
26
+ self.addEventListener("notificationclick", (event) => {
27
+ event.notification.close();
28
+ const targetUrl = event.notification.data?.url || `${self.location.origin}/`;
29
+ event.waitUntil(
30
+ self.clients.matchAll({ type: "window", includeUncontrolled: true }).then((clients) => {
31
+ const webuiClient = clients.find((client) => client.url.startsWith(self.location.origin));
32
+ if (webuiClient) return webuiClient.focus();
33
+ return self.clients.openWindow?.(targetUrl);
34
+ }),
35
+ );
36
+ });
37
+
26
38
  self.addEventListener("fetch", (event) => {
27
39
  const { request } = event;
28
40
  if (request.method !== "GET") return;