webhelm 1.0.37 → 1.0.39
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/package.json +1 -1
- package/runtime/chatgpt/chatgpt-queue.mjs +3 -3
- package/runtime/chatgpt/lifecycle-common.mjs +14 -0
- package/runtime/chatgpt/submission-script.mjs +6 -11
- package/runtime/extension/manifest.json +1 -1
- package/runtime/extension/popup-data.mjs +11 -0
- package/runtime/extension/popup.html +12 -13
- package/runtime/extension/popup.mjs +87 -99
package/package.json
CHANGED
|
@@ -313,9 +313,9 @@ export class ChatGPTQueue extends DurableQueueCore {
|
|
|
313
313
|
delay: this.intervalMs / 1000,
|
|
314
314
|
receipt: receipt.diagnostic,
|
|
315
315
|
});
|
|
316
|
-
} else if (
|
|
317
|
-
//
|
|
318
|
-
//
|
|
316
|
+
} else if (receipt?.verified_by === "stop-button-visible") {
|
|
317
|
+
// Post-click Stop confirms the reply started; no fixed 60s gap is needed.
|
|
318
|
+
// The next turn is re-probed; RUNNING still blocks overlapping sends.
|
|
319
319
|
this.transition(item.id, owner, "SENDING", "SENT", {
|
|
320
320
|
delay: 0, receipt: receipt.verified_by,
|
|
321
321
|
});
|
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
import { waitUntilStable } from "./readiness.mjs";
|
|
2
2
|
export const SEND_ENABLED_JS =
|
|
3
3
|
`(() => { const buttons=[...document.querySelectorAll('button[data-testid="send-button"],button[aria-label="Send prompt"],button[aria-label="Send"],form button[type="submit"]')]; const b=buttons.find(e=>e.getClientRects().length>0); return !!b && !b.disabled && b.getAttribute('aria-disabled') !== 'true'; })()`;
|
|
4
|
+
// Only post-click Stop visibility acknowledges queue submission.
|
|
5
|
+
// The same selector family is used to detect ongoing generation before a send.
|
|
6
|
+
export const STOP_VISIBLE_JS = `(() => {
|
|
7
|
+
const visible = b => !!b?.getClientRects().length && getComputedStyle(b).visibility !== 'hidden';
|
|
8
|
+
return [...document.querySelectorAll('button')].some(b => {
|
|
9
|
+
if (!visible(b)) return false;
|
|
10
|
+
const label=(b.getAttribute('aria-label')||'').trim().toLowerCase();
|
|
11
|
+
const title=(b.getAttribute('title')||'').trim().toLowerCase();
|
|
12
|
+
const testId=(b.getAttribute('data-testid')||'').trim().toLowerCase();
|
|
13
|
+
return ['stop generating','stop answering','stop response','stop'].includes(label) ||
|
|
14
|
+
['stop generating','stop answering'].includes(title) ||
|
|
15
|
+
['stop-button','stop-generating-button'].includes(testId);
|
|
16
|
+
});
|
|
17
|
+
})()`;
|
|
4
18
|
export const CLICK_SEND_JS =
|
|
5
19
|
`(() => { const visible=e=>!!e&&!!e.getClientRects().length; const running=[...document.querySelectorAll('button')].some(b=>{ if(!visible(b))return false; const l=(b.getAttribute('aria-label')||'').trim().toLowerCase(),t=(b.getAttribute('title')||'').trim().toLowerCase(),d=(b.getAttribute('data-testid')||'').trim().toLowerCase(); return ['stop generating','stop answering','stop response','stop'].includes(l)||['stop generating','stop answering'].includes(t)||['stop-button','stop-generating-button'].includes(d); }); if(running)return false; const b=document.querySelector('button[data-testid="send-button"],button[aria-label="Send prompt"],button[aria-label="Send"],form button[type="submit"]'); if(!b||b.disabled||b.getAttribute('aria-disabled')==='true')return false; b.click(); return true; })()`;
|
|
6
20
|
export function targetUrl(
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import { PROBE_JS } from "./chatgpt-probe.mjs";
|
|
2
|
-
import { SEND_ENABLED_JS } from "./lifecycle-common.mjs";
|
|
2
|
+
import { SEND_ENABLED_JS, STOP_VISIBLE_JS } from "./lifecycle-common.mjs";
|
|
3
3
|
|
|
4
4
|
/** Source executed inside a caller-owned WebHelm Session, never a separate tab. */
|
|
5
5
|
export function submissionScript(item) {
|
|
6
|
-
const prompt = item.message.slice(0, 120);
|
|
7
6
|
const selectorJS = "(() => { const selector=\'button[aria-label=\"Send\"],button[data-testid=\"send-button\"],button[aria-label=\"Send prompt\"],form button[type=\"submit\"]\'; for(const b of document.querySelectorAll(\'[data-webhelm-queue-send]\'))b.removeAttribute(\'data-webhelm-queue-send\'); for(const b of document.querySelectorAll(selector)){if(!b.getClientRects().length||b.disabled||b.getAttribute(\'aria-disabled\')===\'true\')continue;b.setAttribute(\'data-webhelm-queue-send\',\'1\');return \'[data-webhelm-queue-send=\"1\"]\';} return null; })()";
|
|
8
|
-
const userTurnsJS = "(() => [...document.querySelectorAll('h4[data-conversation-role=\"user\"]')].filter(h=>(h.parentElement?.innerText||'').includes(" +
|
|
9
|
-
JSON.stringify(prompt) + ")).length)()";
|
|
10
7
|
return [
|
|
11
8
|
"return await (async()=>{",
|
|
12
9
|
"const gate=await js("+JSON.stringify(PROBE_JS)+");",
|
|
@@ -21,16 +18,14 @@ export function submissionScript(item) {
|
|
|
21
18
|
" return {diagnostic:'pre_send_gate_not_ready'};",
|
|
22
19
|
"const selector=await js("+JSON.stringify(selectorJS)+");",
|
|
23
20
|
"if(!selector)return {diagnostic:'send_control_not_found'};",
|
|
24
|
-
"const before=(await js("+JSON.stringify(userTurnsJS)+"))||0;",
|
|
25
21
|
"await click(selector);",
|
|
26
|
-
|
|
27
|
-
"
|
|
28
|
-
" if(
|
|
29
|
-
"
|
|
30
|
-
" return {verified_by:'send-button-disabled'};",
|
|
22
|
+
// Stay below the WebHelm 30-second Session exec deadline on a missing Stop.
|
|
23
|
+
"for(let i=0;i<60;i++){",
|
|
24
|
+
" if(await js("+JSON.stringify(STOP_VISIBLE_JS)+"))",
|
|
25
|
+
" return {verified_by:'stop-button-visible'};",
|
|
31
26
|
" await sleep(250);",
|
|
32
27
|
"}",
|
|
33
|
-
"return {diagnostic:'
|
|
28
|
+
"return {diagnostic:'post_submit_stop_not_observed_no_resend'};",
|
|
34
29
|
"})()",
|
|
35
30
|
].join("\n");
|
|
36
31
|
}
|
|
@@ -96,6 +96,17 @@ export function queueStatusText(item,{head=item,remaining=0}={}) {
|
|
|
96
96
|
return message;
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
+
// Snapshot elapsed time once when the extension menu opens.
|
|
100
|
+
export function formatQueueElapsed(createdAt, snapshotSeconds) {
|
|
101
|
+
const created=Number(createdAt);
|
|
102
|
+
if(!Number.isFinite(created)||created<=0)return null;
|
|
103
|
+
const elapsed=Math.max(0,Math.floor(snapshotSeconds-created));
|
|
104
|
+
if(elapsed<60)return elapsed+'s';
|
|
105
|
+
if(elapsed<3600)return Math.floor(elapsed/60)+'m';
|
|
106
|
+
if(elapsed<86400)return Math.floor(elapsed/3600)+'h';
|
|
107
|
+
return Math.floor(elapsed/86400)+'d';
|
|
108
|
+
}
|
|
109
|
+
|
|
99
110
|
// Keep hidden groups out of the toolbar even if a running older worker has
|
|
100
111
|
// not yet reloaded its control RPC. Do not mutate the persisted configuration.
|
|
101
112
|
export const WORKSPACE_STORAGE_KEY='browserWorkspaceManager.v1';
|
|
@@ -45,20 +45,19 @@
|
|
|
45
45
|
#queue-list { border-top:1px solid light-dark(var(--border),#334155); margin-top:6px; padding-top:4px; max-height:240px; }
|
|
46
46
|
.queue-platform { padding:3px 0; }
|
|
47
47
|
.queue-platform + .queue-platform { border-top:1px solid light-dark(var(--border),#334155); }
|
|
48
|
-
.queue-platform-
|
|
49
|
-
.queue-
|
|
50
|
-
.queue-
|
|
51
|
-
|
|
52
|
-
.queue-row { display:flex; align-items:center; gap:
|
|
53
|
-
.queue-
|
|
54
|
-
.queue-
|
|
55
|
-
.queue-
|
|
56
|
-
.queue-info span.queue-warning { color:light-dark(var(--warning),#f7a4ad); font-weight:500; }
|
|
48
|
+
.queue-platform-title { display:block; font-size:11px; }
|
|
49
|
+
.queue-thread { padding:3px 0 3px 6px; }
|
|
50
|
+
.queue-thread + .queue-thread { border-top:1px solid light-dark(var(--border),#334155); }
|
|
51
|
+
.queue-thread-link { display:block; font-size:10px; font-family:ui-monospace,monospace; font-weight:500; color:light-dark(var(--accent),#8dbdff); overflow-wrap:anywhere; text-decoration:underline; cursor:pointer; }
|
|
52
|
+
.queue-row { display:flex; align-items:center; gap:5px; padding:2px 0 2px 9px; }
|
|
53
|
+
.queue-info { min-width:0; flex:1; display:flex; gap:4px; align-items:baseline; overflow:hidden; }
|
|
54
|
+
.queue-meta { flex-shrink:0; white-space:nowrap; color:light-dark(var(--muted),#acb8c9); font-size:9px; }
|
|
55
|
+
.queue-unconfirmed .queue-title { color:light-dark(var(--warning),#f7a4ad); }
|
|
57
56
|
.queue-row button.queue-remove { flex:0 0 20px; width:20px; height:20px; padding:0; border:0; background:transparent; color:light-dark(var(--muted),#acb8c9); font-size:16px; font-weight:400; line-height:18px; }
|
|
58
|
-
button.tab-title
|
|
59
|
-
|
|
60
|
-
button.tab-title:hover
|
|
61
|
-
button.tab-title:disabled
|
|
57
|
+
button.tab-title { flex:1; min-width:0; width:100%; padding:0; border:0; border-radius:2px; background:transparent; color:inherit; text-align:left; font-size:12px; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; cursor:pointer; }
|
|
58
|
+
.queue-title { flex:1; min-width:0; font-size:10px; font-weight:400; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
|
|
59
|
+
button.tab-title:hover { text-decoration:underline; }
|
|
60
|
+
button.tab-title:disabled { cursor:default; text-decoration:none; }
|
|
62
61
|
.session-info, .queue-info { overflow:hidden; }
|
|
63
62
|
.queue-info .queue-title { margin:0; }
|
|
64
63
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {readKeptSites, setStoredSite,
|
|
1
|
+
import {readKeptSites, setStoredSite, readMenuWorkspaces, formatQueueElapsed} from './popup-data.mjs';
|
|
2
2
|
const el = id => document.getElementById(id);
|
|
3
3
|
el('extension-version').textContent = `v${chrome.runtime.getManifest().version}`;
|
|
4
4
|
let confirming = false;
|
|
@@ -9,12 +9,13 @@ let lastSiteSignature = '';
|
|
|
9
9
|
let currentSites = [];
|
|
10
10
|
let refreshRunning = false;
|
|
11
11
|
let canControlSites = false;
|
|
12
|
-
let queueExpanded = false;
|
|
13
12
|
let currentQueue = [];
|
|
14
13
|
let queueBusy = false;
|
|
15
14
|
let queueConnected = false;
|
|
16
15
|
const queueRows = new Map();
|
|
17
16
|
const queueGroups = new Map();
|
|
17
|
+
const queueThreadGroups = new Map();
|
|
18
|
+
const queueOpenedAtSeconds=Math.floor(Date.now()/1000);
|
|
18
19
|
|
|
19
20
|
async function rpc(method, args = {}) {
|
|
20
21
|
const response = await chrome.runtime.sendMessage({method, args});
|
|
@@ -150,117 +151,104 @@ function renderWorkspaces(workspaces, busy, connected) {
|
|
|
150
151
|
}
|
|
151
152
|
}
|
|
152
153
|
|
|
153
|
-
const queueToggle=actionButton('Show all',false,()=>{
|
|
154
|
-
queueExpanded=!queueExpanded;
|
|
155
|
-
lastQueueSignature='';
|
|
156
|
-
renderQueue(currentQueue,queueBusy,queueConnected);
|
|
157
|
-
});
|
|
158
|
-
queueToggle.id='queue-toggle';
|
|
159
|
-
queueToggle.setAttribute('aria-controls','queue-list');
|
|
160
|
-
|
|
161
154
|
function renderQueue(items, busy, connected) {
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
behind:[...view.behind],relations:shown.map(item=>[item.id,view.headFor.get(item.id)?.id,view.headFor.get(item.id)?.state]),busy,connected,queueExpanded});
|
|
168
|
-
if (signature===lastQueueSignature) return;
|
|
155
|
+
const signature=JSON.stringify({
|
|
156
|
+
items:items.map(item=>[item.id,item.platform,item.thread_id,item.title,item.url,item.state,item.attempts,item.created_at]),
|
|
157
|
+
busy,connected,
|
|
158
|
+
});
|
|
159
|
+
if(signature===lastQueueSignature)return;
|
|
169
160
|
lastQueueSignature=signature;
|
|
170
161
|
const target=el('queue-list');
|
|
171
|
-
const platformCounts=new Map();
|
|
172
|
-
for (const item of items) {
|
|
173
|
-
const platform=String(item.platform||'Queue');
|
|
174
|
-
if(!platformCounts.has(platform))platformCounts.set(platform,{total:0,threads:new Set()});
|
|
175
|
-
const stat=platformCounts.get(platform);
|
|
176
|
-
stat.total++;
|
|
177
|
-
stat.threads.add(item.thread_id||item.id);
|
|
178
|
-
}
|
|
179
162
|
target.hidden=!items.length;
|
|
180
|
-
queueToggle.hidden=!(queueExpanded || view.hidden>0);
|
|
181
|
-
queueToggle.textContent=queueExpanded?'Show less':'Show all '+view.total;
|
|
182
|
-
queueToggle.setAttribute('aria-expanded',String(queueExpanded));
|
|
183
163
|
const grouped=new Map();
|
|
184
|
-
for
|
|
164
|
+
for(const item of items) {
|
|
185
165
|
const platform=String(item.platform||'Queue');
|
|
186
|
-
|
|
187
|
-
grouped.
|
|
166
|
+
const threadId=String(item.thread_id||item.id);
|
|
167
|
+
if(!grouped.has(platform))grouped.set(platform,new Map());
|
|
168
|
+
const threads=grouped.get(platform);
|
|
169
|
+
if(!threads.has(threadId))threads.set(threadId,[]);
|
|
170
|
+
threads.get(threadId).push(item);
|
|
188
171
|
}
|
|
189
|
-
const
|
|
190
|
-
const
|
|
191
|
-
for
|
|
172
|
+
const activePlatforms=new Set(grouped.keys());
|
|
173
|
+
const activeRows=new Set(items.map(item=>(item.platform||'Queue')+':'+item.id));
|
|
174
|
+
for(const [key,row] of queueRows)if(!activeRows.has(key)){row.remove();queueRows.delete(key);}
|
|
175
|
+
for(const [key,group] of queueThreadGroups)
|
|
176
|
+
if(!grouped.has(key.split('\u0000')[0])||!grouped.get(key.split('\u0000')[0]).has(key.split('\u0000')[1])){
|
|
177
|
+
group.remove();queueThreadGroups.delete(key);
|
|
178
|
+
}
|
|
179
|
+
for(const [key,group] of queueGroups)if(!activePlatforms.has(key)){
|
|
192
180
|
group.remove();queueGroups.delete(key);
|
|
193
181
|
}
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
}
|
|
197
|
-
if(!items.length) {
|
|
198
|
-
target.replaceChildren();queueGroups.clear();queueRows.clear();
|
|
199
|
-
return;
|
|
200
|
-
}
|
|
201
|
-
for (const [platform,entries] of grouped) {
|
|
182
|
+
if(!items.length){target.replaceChildren();queueGroups.clear();queueThreadGroups.clear();queueRows.clear();return;}
|
|
183
|
+
for(const [platform,threads] of grouped){
|
|
202
184
|
let group=queueGroups.get(platform);
|
|
203
|
-
if(!group)
|
|
185
|
+
if(!group){
|
|
204
186
|
group=document.createElement('section');group.className='queue-platform';
|
|
205
|
-
const header=document.createElement('div');header.className='queue-platform-header';
|
|
206
187
|
const heading=document.createElement('strong');heading.className='queue-platform-title';
|
|
207
|
-
heading.textContent=platform==='Queue'?'Queue'
|
|
208
|
-
const
|
|
209
|
-
|
|
210
|
-
header.append(heading,count);
|
|
211
|
-
group.append(header,rows);queueGroups.set(platform,group);target.append(group);
|
|
188
|
+
heading.textContent=platform==='Queue'?'Queue':platform+' Queue';
|
|
189
|
+
const list=document.createElement('div');list.className='queue-platform-threads';
|
|
190
|
+
group.append(heading,list);queueGroups.set(platform,group);
|
|
212
191
|
}
|
|
213
|
-
const
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
(
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
try
|
|
192
|
+
const list=group.querySelector('.queue-platform-threads');
|
|
193
|
+
for(const [threadId,entries] of threads){
|
|
194
|
+
const threadKey=platform+'\u0000'+threadId;
|
|
195
|
+
let thread=queueThreadGroups.get(threadKey);
|
|
196
|
+
if(!thread){
|
|
197
|
+
thread=document.createElement('section');thread.className='queue-thread';
|
|
198
|
+
const link=document.createElement('a');link.className='queue-thread-link';
|
|
199
|
+
link.textContent=threadId;
|
|
200
|
+
link.addEventListener('click',async event=>{
|
|
201
|
+
event.preventDefault();
|
|
202
|
+
const queueId=thread.querySelector('.queue-row')?.dataset.queueId;
|
|
203
|
+
if(!queueId)return;
|
|
204
|
+
try{await rpc('workspace.control.openQueue',{queueId});}
|
|
226
205
|
catch(error){el('message').textContent=error.message;}
|
|
227
|
-
}
|
|
228
|
-
const
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
row
|
|
206
|
+
});
|
|
207
|
+
const rows=document.createElement('div');rows.className='queue-thread-rows';
|
|
208
|
+
thread.append(link,rows);queueThreadGroups.set(threadKey,thread);
|
|
209
|
+
}
|
|
210
|
+
const link=thread.querySelector('.queue-thread-link');
|
|
211
|
+
const url=entries.find(item=>item.url)?.url;
|
|
212
|
+
if(connected&&url)link.href=url;
|
|
213
|
+
else link.removeAttribute('href');
|
|
214
|
+
link.title=threadId;
|
|
215
|
+
const rows=thread.querySelector('.queue-thread-rows');
|
|
216
|
+
for(const item of entries){
|
|
217
|
+
const key=platform+':'+item.id;
|
|
218
|
+
let row=queueRows.get(key);
|
|
219
|
+
if(!row){
|
|
220
|
+
row=document.createElement('div');row.className='queue-row';
|
|
221
|
+
const info=document.createElement('div');info.className='queue-info';
|
|
222
|
+
const title=document.createElement('span');title.className='queue-title';
|
|
223
|
+
const meta=document.createElement('span');meta.className='queue-meta';
|
|
224
|
+
const remove=actionButton('×',false,async()=>{
|
|
225
|
+
try{
|
|
226
|
+
if(row.dataset.state==='UNCERTAIN' && !confirm('This send is unconfirmed. It may already have reached ChatGPT. Removing it may unblock later messages. Remove?'))return;
|
|
227
|
+
const result=await rpc('workspace.control.queueCancel',{queueId:item.id});
|
|
228
|
+
if(!result.id)throw Error('Missing queue request ID');
|
|
229
|
+
el('message').textContent='Waiting for WebHelm daemon…';
|
|
230
|
+
}catch(error){el('message').textContent=error.message;}
|
|
231
|
+
refresh();
|
|
232
|
+
},'queue-remove');
|
|
233
|
+
info.append(title,meta);row.append(info,remove);queueRows.set(key,row);
|
|
234
|
+
}
|
|
235
|
+
const title=row.querySelector('.queue-title');
|
|
236
|
+
title.textContent=item.title||platform+' message';
|
|
237
|
+
title.title=(item.title||platform+' message')+(item.state==='UNCERTAIN'?' — Send not confirmed; check thread before removing.':'');
|
|
238
|
+
row.dataset.queueId=item.id;
|
|
239
|
+
row.dataset.state=item.state;
|
|
240
|
+
row.classList.toggle('queue-unconfirmed',item.state==='UNCERTAIN');
|
|
241
|
+
const elapsed=formatQueueElapsed(item.created_at,queueOpenedAtSeconds);
|
|
242
|
+
const attempts=Math.max(0,Number(item.attempts)||0);
|
|
243
|
+
row.querySelector('.queue-meta').textContent='('+(elapsed??'–')+'/'+attempts+')';
|
|
244
|
+
const remove=row.querySelector('.queue-remove');
|
|
245
|
+
const cancellable=['QUEUED','WAITING','BLOCKED','UNCERTAIN'].includes(item.state);
|
|
246
|
+
remove.disabled=!cancellable||busy||!connected;
|
|
247
|
+
remove.title=cancellable?'Remove '+title.textContent+' from queue':'Cannot remove a running or completed submission';
|
|
248
|
+
remove.setAttribute('aria-label',remove.title);
|
|
249
|
+
if(row.parentElement!==rows)rows.append(row);
|
|
240
250
|
}
|
|
241
|
-
|
|
242
|
-
title.textContent=item.title||`${platform} message`;
|
|
243
|
-
title.title=item.title||`${platform} message`;
|
|
244
|
-
title.disabled=!connected||!item.url;
|
|
245
|
-
row.dataset.state=item.state;
|
|
246
|
-
const head=view.headFor.get(item.id)||item;
|
|
247
|
-
const following=head.id!==item.id;
|
|
248
|
-
row.classList.toggle('queue-followup',following);
|
|
249
|
-
const detail=row.querySelector('.queue-detail');
|
|
250
|
-
detail.textContent=queueStatusText(item,{head,remaining:!queueExpanded?(view.behind.get(item.id)||0):0});
|
|
251
|
-
detail.classList.toggle('queue-warning',item.state==='UNCERTAIN' || (following && head.state==='UNCERTAIN'));
|
|
252
|
-
const remove=row.querySelector('button:last-child');
|
|
253
|
-
const safe=['QUEUED','WAITING','BLOCKED','UNCERTAIN'].includes(item.state);
|
|
254
|
-
remove.disabled=!safe||busy||!connected;
|
|
255
|
-
remove.title=safe?'Remove '+title.textContent+' from queue':'Cannot remove a running or completed submission';
|
|
256
|
-
remove.setAttribute('aria-label',remove.title);
|
|
257
|
-
detail.title=item.state==='UNCERTAIN'
|
|
258
|
-
? 'A send was attempted but no delivery receipt was confirmed. The message may already be in ChatGPT; it will not be retried automatically.'
|
|
259
|
-
: following && head.state==='UNCERTAIN'
|
|
260
|
-
? 'This message has not been sent. It waits until the earlier unconfirmed send is resolved.'
|
|
261
|
-
: '';
|
|
262
|
-
const rows=group.querySelector('.queue-platform-rows');
|
|
263
|
-
if(row.parentElement!==rows)rows.append(row);
|
|
251
|
+
if(thread.parentElement!==list)list.append(thread);
|
|
264
252
|
}
|
|
265
253
|
if(group.parentElement!==target)target.append(group);
|
|
266
254
|
}
|
|
@@ -286,7 +274,7 @@ async function refresh() {
|
|
|
286
274
|
el('message').textContent = 'Applying WebHelm action…';
|
|
287
275
|
} else if (state.lastResult) {
|
|
288
276
|
el('message').textContent = state.lastResult.ok
|
|
289
|
-
? (state.lastResult.queue_id ? '
|
|
277
|
+
? (state.lastResult.queue_id ? '' : `Last action: stopped ${state.lastResult.stoppedCount} session(s).`)
|
|
290
278
|
: `Last action failed: ${state.lastResult.error}`;
|
|
291
279
|
}
|
|
292
280
|
} catch (error) {
|