ai-agentmanager 1.23.0 → 1.25.0
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/CHANGELOG.md +18 -0
- package/package.json +1 -1
- package/public/actions.js +200 -0
- package/public/app.js +45 -4
- package/public/diagram.js +38 -0
- package/public/index.html +13 -0
- package/public/issues.js +82 -28
- package/public/keys.js +21 -2
- package/public/menu.js +13 -0
- package/public/rowkeys.js +54 -0
- package/public/share.js +3 -2
- package/public/speak.js +69 -2
- package/public/standup.js +43 -9
- package/public/style.css +19 -1
- package/src/actions.js +172 -0
- package/src/assistant.js +64 -5
- package/src/cli.js +69 -2
- package/src/issues.js +141 -20
- package/src/jira.js +75 -2
- package/src/manager.js +20 -9
- package/src/server.js +27 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.25.0 (2026-11-06)
|
|
4
|
+
|
|
5
|
+
- **Actions: what's asked of you in Slack and in meeting notes, in one list.** The assistant reads your Slack messages and mentions and your meetings' Notes by Gemini on its checks, and lists what's asked of you (or what you agreed to do) with who asked, where (a link), when and any due date. Decide on each on the left (assign to an agent, skip, done, remove), kept across restarts and changeable any time; **Discuss** talks one through with Claude in a session of its own, which suggests what to do and drafts any reply, but never sends anything. Turn it on under Assistant (on by default for new and existing setups); `agentmgr actions` lists them.
|
|
6
|
+
- **Turn off what you don't use**: Settings → What you use has Jira, Slack and Meeting notes. Off, its list and button are hidden and the assistant stops looking there; changes reach a running assistant with its next check. Settings also has your name and email, so the assistant knows what's asked of you.
|
|
7
|
+
- **More keyboard shortcuts**: `o` Actions, `h` Assistant, `,` Settings. In the Jira and Actions lists, `j`/`k` move between rows, `a` `s` `d` `x` assign, skip, mark done or remove, `c` discusses an action, Enter opens the source, `[` `]` switch filters. In the standup, Space plays or pauses and ← → move between agents. `?` lists them all.
|
|
8
|
+
|
|
9
|
+
## 1.24.0 (2026-11-06)
|
|
10
|
+
|
|
11
|
+
- **Your action on each Jira issue: assign, skip, done or remove.** A picker on the left of every issue in the Jira tab. Your choice is kept by the daemon, so a restart or an update doesn't ask again, and you can change it any time (a removed issue is under Removed, to bring back). Assign starts an agent for an issue not started yet. The assistant doesn't propose or start agents for issues you skipped, marked done or removed. Also `agentmgr issues set <assign|skip|done|remove|clear> <keys...>`.
|
|
12
|
+
- **Every open Jira issue assigned to you is listed**, epics too, until it's closed or integrated, with or without an agent. Needs your Jira site, email and API token in Settings → Jira.
|
|
13
|
+
- **A synopsis under each issue**: what it's about in a sentence or two, from its Jira description (or the agent's design doc).
|
|
14
|
+
- **A clearer standup voice.** The standup used a different voice for each agent, picked from every voice installed, and on a Mac that includes the old robotic ones. Now it uses only the clearest on-device voices (Premium, Enhanced and Siri voices first), names are read as words, and you can pick one voice under the player; it's used for everything read aloud. Online voices (Chrome's Google ones) are offered but never picked for you, since they send the text to Google.
|
|
15
|
+
|
|
16
|
+
## 1.23.1 (2026-11-06)
|
|
17
|
+
|
|
18
|
+
- **Diagrams that fail to draw no longer litter the page.** Mermaid's "Syntax error" picture was left at the bottom of the page when an agent's diagram didn't parse. Now the diagram's own spot says it couldn't be drawn and shows its source. A diagram whose node labels have unquoted parentheses or braces (`A[GetView(s)]`, which agents often write) is drawn again with those labels quoted, so most of them now draw.
|
|
19
|
+
- **The page reloads itself after an update.** While restarting, the old daemon keeps serving the old version until its agents are closed, so a reload during that time (even Shift+Reload) still showed the old one. Now any open page, including one on a phone over remote access, reloads by itself as soon as the new version is up.
|
|
20
|
+
|
|
3
21
|
## 1.23.0 (2026-11-06)
|
|
4
22
|
|
|
5
23
|
- **Reviews.** Reviewer agents for other people's pull requests. **Reviews** (or `g`) lists PRs where your review is requested; tick them, or paste any PR link. A reviewer works read-only on the PR's head: a verdict (approve, approve with nits, blocked), the approval blockers with file, line, why and what would resolve them, critical questions for the author, risks, test gaps and nits. Tick what to send and **Post as pending review** (a draft review under your name that you submit on GitHub), or **Copy**. When the author pushes, the reviewer re-checks its blockers. **🔊 Explain** reads it aloud. The assistant's GitHub reviews source starts reviewers, or only lists them when you pick. `agentmgr review <PR>`, `agentmgr reviews` (`show`, `post`, `dismiss`).
|
package/package.json
CHANGED
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
// Actions: what's asked of you in Slack and in meeting notes (Notes by Gemini), found by the
|
|
2
|
+
// assistant on its checks, in one list so nothing is missed. Your decision on the left of each
|
|
3
|
+
// (assign to an agent, skip, done, remove) is kept by the daemon and can be changed any time;
|
|
4
|
+
// Discuss talks one through with Claude in a session of its own.
|
|
5
|
+
|
|
6
|
+
import { rowKeys } from './rowkeys.js';
|
|
7
|
+
|
|
8
|
+
const SAVED = 'agentmgr.actionsFilter';
|
|
9
|
+
const PROJECT = 'agentmgr.actionsProject';
|
|
10
|
+
const FILTERS = [
|
|
11
|
+
['open', 'Open'],
|
|
12
|
+
['assigned', 'Assigned'],
|
|
13
|
+
['skipped', 'Skipped'],
|
|
14
|
+
['done', 'Done'],
|
|
15
|
+
['all', 'All'],
|
|
16
|
+
['removed', 'Removed'],
|
|
17
|
+
];
|
|
18
|
+
const STATES = [
|
|
19
|
+
['open', '—', 'Not decided yet'],
|
|
20
|
+
['assign', 'Assign', 'An agent does it (in the project picked above)'],
|
|
21
|
+
['skip', 'Skip', 'Not now'],
|
|
22
|
+
['done', 'Done', 'Handled'],
|
|
23
|
+
['remove', 'Remove', 'Not mine, or not needed: off the list (under Removed)'],
|
|
24
|
+
];
|
|
25
|
+
const ICON = { slack: '💬', gemini: '📝', other: '•' };
|
|
26
|
+
|
|
27
|
+
export function initActions({ api, $, esc, ago, toast, openAgent, projects = () => [] }) {
|
|
28
|
+
const dialog = $('#actions-dialog');
|
|
29
|
+
const body = $('#actions-body');
|
|
30
|
+
let data = null;
|
|
31
|
+
let filter = 'open';
|
|
32
|
+
let busy = false;
|
|
33
|
+
let project = '';
|
|
34
|
+
try {
|
|
35
|
+
filter = localStorage.getItem(SAVED) || 'open';
|
|
36
|
+
project = localStorage.getItem(PROJECT) || '';
|
|
37
|
+
} catch {}
|
|
38
|
+
|
|
39
|
+
async function load({ quiet = false } = {}) {
|
|
40
|
+
try {
|
|
41
|
+
data = await api('GET', '/actions');
|
|
42
|
+
} catch (e) {
|
|
43
|
+
if (!quiet) toast?.(e.message, 5000);
|
|
44
|
+
}
|
|
45
|
+
badge();
|
|
46
|
+
render();
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
function badge() {
|
|
50
|
+
const n = data ? data.rows.filter((r) => r.group === 'open').length : 0;
|
|
51
|
+
const el = $('#actions-count');
|
|
52
|
+
if (el) {
|
|
53
|
+
el.textContent = n ? String(n) : '';
|
|
54
|
+
el.title = n ? `${n} to decide on` : '';
|
|
55
|
+
}
|
|
56
|
+
const f = data?.features;
|
|
57
|
+
const btn = $('#actions-btn');
|
|
58
|
+
if (btn && f) btn.hidden = !f.slack && !f.gemini;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
function row(r) {
|
|
62
|
+
const opts = STATES.map(([v, label, title]) => `<option value="${v}" title="${esc(title)}" ${r.status === v ? 'selected' : ''}>${label}</option>`).join('');
|
|
63
|
+
const where = r.link ? `<a href="${esc(r.link)}" target="_blank" rel="noopener" title="Open where it was asked">${esc(r.sourceLabel)} ↗</a>` : esc(r.sourceLabel);
|
|
64
|
+
const meta = [`${ICON[r.source] ?? '•'} ${where}`, r.from && `from <b>${esc(r.from)}</b>`, r.due && `<span class="action-due">due ${esc(r.due)}</span>`, `<span title="${esc(new Date(r.when).toLocaleString())}">${esc(ago(r.when))}</span>`].filter(Boolean).join(' · ');
|
|
65
|
+
const agent = r.agent ? `<button class="link" data-act-open="${esc(r.agent.id)}" title="Open the agent doing it">${esc(r.agent.name)}</button>` : '';
|
|
66
|
+
const talk = r.discussion
|
|
67
|
+
? `<button class="small" data-act-open="${esc(r.discussion.id)}" title="Open the conversation about it">💬 Open talk</button>`
|
|
68
|
+
: `<button class="small" data-act-discuss="${esc(r.id)}" title="Talk it through with Claude: what it asks, and what to do (c)">💬 Discuss</button>`;
|
|
69
|
+
return `<tr data-row-id="${esc(r.id)}" class="action-${esc(r.status)}">
|
|
70
|
+
<td class="issue-action"><select data-act-state="${esc(r.id)}" class="act-${esc(r.status === 'assign' ? 'none' : r.status)}" aria-label="Your decision">${opts}</select></td>
|
|
71
|
+
<td><div class="action-text">${esc(r.text)}</div>${r.context ? `<div class="issue-synopsis" title="${esc(r.context)}">${esc(r.context)}</div>` : ''}<div class="hint action-meta">${meta}</div></td>
|
|
72
|
+
<td class="nowrap">${talk}${agent ? `<div class="hint">Agent: ${agent}</div>` : ''}</td>
|
|
73
|
+
</tr>`;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
function render() {
|
|
77
|
+
if (!dialog.open) return;
|
|
78
|
+
if (!data) {
|
|
79
|
+
body.innerHTML = '<p class="hint">Loading…</p>';
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
const inGroup = (r, g) => (g === 'all' ? r.group !== 'removed' : r.group === g);
|
|
83
|
+
const count = (g) => data.rows.filter((r) => inGroup(r, g)).length;
|
|
84
|
+
const rows = data.rows.filter((r) => inGroup(r, filter));
|
|
85
|
+
const f = data.features ?? {};
|
|
86
|
+
const from = [f.slack && 'Slack', f.gemini && 'meeting notes (Notes by Gemini)'].filter(Boolean).join(' and ');
|
|
87
|
+
const list = projects();
|
|
88
|
+
body.innerHTML = `
|
|
89
|
+
<div class="issues-head">
|
|
90
|
+
<h2>Actions</h2>
|
|
91
|
+
<div class="chips" role="tablist">${FILTERS.map(([k, label]) => `<button class="chip ${k === filter ? 'active' : ''}" role="tab" aria-selected="${k === filter}" data-act-filter="${k}">${label} <span class="count">${count(k)}</span></button>`).join('')}</div>
|
|
92
|
+
<span class="spacer"></span>
|
|
93
|
+
<label class="hint" title="Where an agent works when you assign an action to one">Agents in <select data-act-project class="small">
|
|
94
|
+
<option value="">pick a project</option>
|
|
95
|
+
${list.map((p) => `<option value="${esc(p.key)}" ${p.key === project ? 'selected' : ''}>${esc(p.name ?? p.key)}</option>`).join('')}
|
|
96
|
+
</select></label>
|
|
97
|
+
<button class="small" data-act="refresh" title="Look again (r)">↻</button>
|
|
98
|
+
<button class="small" data-act="close" title="Close (Esc)">Close</button>
|
|
99
|
+
</div>
|
|
100
|
+
<p class="hint">What's asked of you in ${esc(from || 'Slack and meeting notes')}, found by the assistant on its checks. Decide on the left; <b>Discuss</b> talks one through with Claude. Keys: j/k move, a assign, s skip, d done, x remove, o open again, c discuss, Enter opens the source.</p>
|
|
101
|
+
${rows.length
|
|
102
|
+
? `<div class="issues-scroll"><table class="issues actions-table">
|
|
103
|
+
<thead><tr><th class="issue-action">Decision</th><th>Action</th><th></th></tr></thead>
|
|
104
|
+
<tbody>${rows.map(row).join('')}</tbody>
|
|
105
|
+
</table></div>`
|
|
106
|
+
: `<p class="hint issues-empty">${esc(
|
|
107
|
+
!data.rows.length
|
|
108
|
+
? `Nothing yet. With the Assistant running and "Things asked of me in Slack and in meeting notes" on, what's asked of you shows up here after its next check (or: agentmgr actions add).`
|
|
109
|
+
: filter === 'open'
|
|
110
|
+
? 'Nothing left to decide.'
|
|
111
|
+
: 'None here.',
|
|
112
|
+
)}</p>`}`;
|
|
113
|
+
keys.redraw();
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
async function set(ids, state) {
|
|
117
|
+
if (busy) return;
|
|
118
|
+
busy = true;
|
|
119
|
+
try {
|
|
120
|
+
const r = await api('POST', '/actions/set', { ids, state, project: project || null });
|
|
121
|
+
const bad = r.failed.map((x) => x.reason).join('; ');
|
|
122
|
+
const label = STATES.find(([v]) => v === state)?.[1] ?? state;
|
|
123
|
+
toast?.(r.started.length ? `Agent ${r.started.map((x) => x.agent.name).join(', ')} started` : bad ? `Not changed: ${bad}` : state === 'open' ? 'Open again' : label, bad ? 8000 : 2500);
|
|
124
|
+
} catch (err) {
|
|
125
|
+
toast?.(err.message, 6000);
|
|
126
|
+
} finally {
|
|
127
|
+
busy = false;
|
|
128
|
+
}
|
|
129
|
+
load();
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
async function discuss(id) {
|
|
133
|
+
try {
|
|
134
|
+
const r = await api('POST', `/actions/${id}/discuss`, {});
|
|
135
|
+
dialog.close();
|
|
136
|
+
openAgent(r.agent.id);
|
|
137
|
+
} catch (err) {
|
|
138
|
+
toast?.(err.message, 6000);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
const keys = rowKeys(dialog, {
|
|
143
|
+
rows: () => [...body.querySelectorAll('tbody tr[data-row-id]')],
|
|
144
|
+
filters: () => [...body.querySelectorAll('[data-act-filter]')],
|
|
145
|
+
keys: {
|
|
146
|
+
a: (r) => set([r.dataset.rowId], 'assign'),
|
|
147
|
+
s: (r) => set([r.dataset.rowId], 'skip'),
|
|
148
|
+
d: (r) => set([r.dataset.rowId], 'done'),
|
|
149
|
+
x: (r) => set([r.dataset.rowId], 'remove'),
|
|
150
|
+
o: (r) => set([r.dataset.rowId], 'open'),
|
|
151
|
+
c: (r) => discuss(r.dataset.rowId),
|
|
152
|
+
Enter: (r) => r.querySelector('.action-meta a')?.click(),
|
|
153
|
+
r: Object.assign(() => load(), { needsRow: false }),
|
|
154
|
+
},
|
|
155
|
+
});
|
|
156
|
+
|
|
157
|
+
body.addEventListener('change', (e) => {
|
|
158
|
+
const id = e.target.dataset.actState;
|
|
159
|
+
if (id) return set([id], e.target.value);
|
|
160
|
+
if (e.target.dataset.actProject !== undefined) {
|
|
161
|
+
project = e.target.value;
|
|
162
|
+
try {
|
|
163
|
+
localStorage.setItem(PROJECT, project);
|
|
164
|
+
} catch {}
|
|
165
|
+
}
|
|
166
|
+
});
|
|
167
|
+
|
|
168
|
+
body.addEventListener('click', (e) => {
|
|
169
|
+
const o = e.target.closest('[data-act-open]');
|
|
170
|
+
if (o) {
|
|
171
|
+
dialog.close();
|
|
172
|
+
return openAgent(o.dataset.actOpen);
|
|
173
|
+
}
|
|
174
|
+
const t = e.target.closest('[data-act-discuss]');
|
|
175
|
+
if (t) return discuss(t.dataset.actDiscuss);
|
|
176
|
+
const f = e.target.closest('[data-act-filter]');
|
|
177
|
+
if (f) {
|
|
178
|
+
filter = f.dataset.actFilter;
|
|
179
|
+
try {
|
|
180
|
+
localStorage.setItem(SAVED, filter);
|
|
181
|
+
} catch {}
|
|
182
|
+
return render();
|
|
183
|
+
}
|
|
184
|
+
const b = e.target.closest('[data-act]')?.dataset.act;
|
|
185
|
+
if (b === 'close') return dialog.close();
|
|
186
|
+
if (b === 'refresh') return load();
|
|
187
|
+
});
|
|
188
|
+
|
|
189
|
+
function open() {
|
|
190
|
+
if (dialog.open) return dialog.close();
|
|
191
|
+
dialog.showModal();
|
|
192
|
+
render();
|
|
193
|
+
load();
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
load({ quiet: true });
|
|
197
|
+
// The assistant adds them on its checks: look now and then for the count.
|
|
198
|
+
setInterval(() => load({ quiet: true }), 2 * 60_000);
|
|
199
|
+
return { open, load, isOpen: () => dialog.open };
|
|
200
|
+
}
|
package/public/app.js
CHANGED
|
@@ -26,9 +26,11 @@ import { initMachine } from '/machine.js';
|
|
|
26
26
|
import { initWatch } from '/watch.js';
|
|
27
27
|
import { initStandup } from '/standup.js';
|
|
28
28
|
import { initIssues } from '/issues.js';
|
|
29
|
+
import { initActions } from '/actions.js';
|
|
29
30
|
import { reviewSpeech } from '/prvoice.js';
|
|
30
31
|
import { initDesigns } from '/designs.js';
|
|
31
32
|
import { initReviews } from '/reviews.js';
|
|
33
|
+
import { drawDiagram } from '/diagram.js';
|
|
32
34
|
import { initValue } from '/value.js';
|
|
33
35
|
import { initCodeMap } from '/codemap.js';
|
|
34
36
|
import { initKeys } from '/keys.js';
|
|
@@ -220,6 +222,28 @@ const issuesUi = initIssues({
|
|
|
220
222
|
openDoc: (id, kind) => (showTab('agents'), select(id), openDoc(id, kind)),
|
|
221
223
|
});
|
|
222
224
|
$('#issues-btn').onclick = () => issuesUi.open();
|
|
225
|
+
// Actions: what's asked of you in Slack and meeting notes.
|
|
226
|
+
const actionsUi = initActions({
|
|
227
|
+
api,
|
|
228
|
+
$,
|
|
229
|
+
esc,
|
|
230
|
+
ago,
|
|
231
|
+
toast: (m, ms) => toast(m, ms),
|
|
232
|
+
openAgent: (id) => (showTab('agents'), select(id)),
|
|
233
|
+
projects: () => projectsState.map((p) => ({ key: p.shortcut, name: p.name })),
|
|
234
|
+
});
|
|
235
|
+
$('#actions-btn').onclick = () => actionsUi.open();
|
|
236
|
+
// What you use (Settings): lists you turned off are hidden.
|
|
237
|
+
function applyFeatures(f) {
|
|
238
|
+
if (!f) return;
|
|
239
|
+
$('#issues-btn').hidden = !f.jira;
|
|
240
|
+
$('#actions-btn').hidden = !f.slack && !f.gemini;
|
|
241
|
+
}
|
|
242
|
+
api('GET', '/features').then((r) => applyFeatures(r.features)).catch(() => {});
|
|
243
|
+
document.addEventListener('agentmgr:features', (e) => {
|
|
244
|
+
applyFeatures(e.detail);
|
|
245
|
+
actionsUi.load();
|
|
246
|
+
});
|
|
223
247
|
// Designs: every agent's design doc, the ones waiting for your review first.
|
|
224
248
|
const designsUi = initDesigns({
|
|
225
249
|
api,
|
|
@@ -278,7 +302,11 @@ function shortcut(act) {
|
|
|
278
302
|
if (act === 'watch') return $('#watch-btn') ? $('#watch-btn').click() : false;
|
|
279
303
|
if (act === 'standup') return standupUi.open();
|
|
280
304
|
if (act === 'map') return $('#map-btn').click();
|
|
281
|
-
if (act === 'issues') return issuesUi.open();
|
|
305
|
+
if (act === 'issues') return $('#issues-btn').hidden ? false : issuesUi.open();
|
|
306
|
+
if (act === 'actions') return $('#actions-btn').hidden ? false : actionsUi.open();
|
|
307
|
+
if (act === 'assistant') return $('#assistant-btn').click();
|
|
308
|
+
if (act === 'settings') return $('#settings-btn').click();
|
|
309
|
+
if (act === 'results') return $('#spend-btn').click();
|
|
282
310
|
if (act === 'designs') return designsUi.open();
|
|
283
311
|
if (act === 'reviews') return reviewsUi.open();
|
|
284
312
|
if (act === 'value') return valueUi.open();
|
|
@@ -337,7 +365,8 @@ const isDark = () => {
|
|
|
337
365
|
};
|
|
338
366
|
// SVG text labels rather than HTML ones: a diagram then exports to PNG (the browser won't turn
|
|
339
367
|
// HTML-in-SVG into an image).
|
|
340
|
-
|
|
368
|
+
// suppressErrorRendering: a diagram that fails shows our message, not Mermaid's error picture.
|
|
369
|
+
const mermaidConfig = () => ({ startOnLoad: false, suppressErrorRendering: true, securityLevel: 'strict', theme: isDark() ? 'dark' : 'default', htmlLabels: false, flowchart: { htmlLabels: false } });
|
|
341
370
|
// Diagrams are drawn in the theme's colors: redraw them when it changes.
|
|
342
371
|
window.addEventListener('agentmgr-theme', () => {
|
|
343
372
|
diagrams.clear();
|
|
@@ -372,7 +401,7 @@ async function renderDiagrams(root) {
|
|
|
372
401
|
mermaidLib = (await import('/vendor/mermaid/mermaid.esm.min.mjs')).default;
|
|
373
402
|
mermaidLib.initialize(mermaidConfig());
|
|
374
403
|
}
|
|
375
|
-
const { svg } = await mermaidLib
|
|
404
|
+
const { svg } = await drawDiagram(mermaidLib, `mmd-${diagrams.size}-${Date.now()}`, src);
|
|
376
405
|
diagrams.set(src, { svg });
|
|
377
406
|
} catch (err) {
|
|
378
407
|
diagrams.set(src, { error: String(err?.message || err).split('\n')[0] });
|
|
@@ -4020,6 +4049,17 @@ async function loadAbout() {
|
|
|
4020
4049
|
return aboutInfo;
|
|
4021
4050
|
}
|
|
4022
4051
|
loadAbout().catch(() => {});
|
|
4052
|
+
|
|
4053
|
+
// After an update the old daemon keeps answering (with the old version and old pages) while it
|
|
4054
|
+
// closes its agents, so a reload then still shows the old one. Whenever the event stream
|
|
4055
|
+
// connects again, a daemon running a different version means this page is stale: reload it.
|
|
4056
|
+
async function reloadIfUpdated() {
|
|
4057
|
+
if (!aboutInfo) return;
|
|
4058
|
+
const was = aboutInfo.version;
|
|
4059
|
+
try {
|
|
4060
|
+
if ((await loadAbout()).version !== was) location.reload();
|
|
4061
|
+
} catch {}
|
|
4062
|
+
}
|
|
4023
4063
|
function renderAbout(a) {
|
|
4024
4064
|
const link = (url, text = url.replace(/^https:\/\//, '')) => `<a href="${esc(url)}" target="_blank" rel="noopener">${esc(text)}</a>`;
|
|
4025
4065
|
const when = (iso) => new Date(iso).toLocaleString();
|
|
@@ -4225,6 +4265,7 @@ function connectEvents() {
|
|
|
4225
4265
|
onOpen: () => {
|
|
4226
4266
|
$('#conn').textContent = REMOTE ? 'connected (remote)' : 'daemon connected';
|
|
4227
4267
|
$('#conn').className = 'conn ok';
|
|
4268
|
+
reloadIfUpdated();
|
|
4228
4269
|
},
|
|
4229
4270
|
onMessage: handleEvent,
|
|
4230
4271
|
onClose: async () => {
|
|
@@ -4530,7 +4571,7 @@ $('#edit-form').addEventListener('submit', async (e) => {
|
|
|
4530
4571
|
|
|
4531
4572
|
// ------------------------------------------------------------------ assistant
|
|
4532
4573
|
|
|
4533
|
-
const ASSISTANT_SOURCES = ['jira', 'comments', 'reviews', 'ci', 'slack', 'linear'];
|
|
4574
|
+
const ASSISTANT_SOURCES = ['jira', 'comments', 'reviews', 'ci', 'slack', 'linear', 'actions'];
|
|
4534
4575
|
let assistantState = null;
|
|
4535
4576
|
|
|
4536
4577
|
function renderAssistantDot() {
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
// Drawing a Mermaid diagram an agent wrote. Agents often put parentheses or braces in a node's
|
|
2
|
+
// label without quotes (MV[GetMaintenanceView(s)]), which Mermaid reads as a shape and refuses:
|
|
3
|
+
// when a diagram fails, it's drawn again once with those labels quoted. A failed render never
|
|
4
|
+
// leaves Mermaid's error picture in the page.
|
|
5
|
+
|
|
6
|
+
// A node's label in [ ], unquoted, with ( ) { } inside that aren't one of Mermaid's [( )] shapes.
|
|
7
|
+
const LABEL = /(\b[\w-]+)\[(?!["(/\\[])([^\[\]"\n]*[(){}][^\[\]"\n]*)\]/g;
|
|
8
|
+
|
|
9
|
+
/** The source with such labels quoted ("" inside a label becomes #quot;). Unchanged when none. */
|
|
10
|
+
export function quoteLabels(src) {
|
|
11
|
+
return String(src ?? '').replace(LABEL, (_, id, label) => `${id}["${label.replace(/"/g, '#quot;')}"]`);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/** Mermaid's own leftovers from a failed render: its temporary containers and the error picture. */
|
|
15
|
+
function sweep(id) {
|
|
16
|
+
for (const sel of [`#${id}`, `#d${id}`, `#i${id}`]) {
|
|
17
|
+
try {
|
|
18
|
+
document.querySelector(sel)?.remove();
|
|
19
|
+
} catch {}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/** Render `src` with the Mermaid library `lib`: { svg }, or throws the first error. */
|
|
24
|
+
export async function drawDiagram(lib, id, src) {
|
|
25
|
+
try {
|
|
26
|
+
return await lib.render(id, src);
|
|
27
|
+
} catch (err) {
|
|
28
|
+
sweep(id);
|
|
29
|
+
const fixed = quoteLabels(src);
|
|
30
|
+
if (fixed === src) throw err;
|
|
31
|
+
try {
|
|
32
|
+
return await lib.render(`${id}-q`, fixed);
|
|
33
|
+
} catch {
|
|
34
|
+
sweep(`${id}-q`);
|
|
35
|
+
throw err;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
package/public/index.html
CHANGED
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
<button id="assistant-btn" title="An always-on session that finds new work and starts agents for it">Assistant <span id="assistant-dot" class="assistant-dot" hidden></span></button>
|
|
33
33
|
<button id="spend-btn" title="Results across agents (merge rate, time to PR, cost per merged PR), what they cost, and spending limits">Results <span id="spend-today" class="spend-today"></span></button>
|
|
34
34
|
<button id="standup-btn" title="Today's standup: each agent's news read aloud, and what they need from you">Standup <span id="standup-dot" class="assistant-dot" hidden></span></button>
|
|
35
|
+
<button id="actions-btn" title="Actions: what's asked of you in Slack and in meeting notes, found by the assistant; decide on each one">Actions <span id="actions-count" class="badge ready"></span></button>
|
|
35
36
|
<button id="issues-btn" title="Jira: every issue an agent works on, with its Jira status, pull request and agent, the ones waiting for your review first">Jira <span id="issues-count" class="badge ready"></span></button>
|
|
36
37
|
<button id="designs-btn" title="Designs: every agent's design doc with its summary and links, the ones waiting for your review first">Designs <span id="designs-count" class="badge ready"></span></button>
|
|
37
38
|
<button id="reviews-btn" title="Reviews: pull requests you review. Reviewer agents ask the critical questions and find what blocks approval; you post what you pick">Reviews <span id="reviews-count" class="badge ready"></span></button>
|
|
@@ -380,6 +381,9 @@
|
|
|
380
381
|
</form>
|
|
381
382
|
</dialog>
|
|
382
383
|
|
|
384
|
+
<dialog id="actions-dialog" class="issues-dialog" aria-label="Your action items">
|
|
385
|
+
<div id="actions-body"></div>
|
|
386
|
+
</dialog>
|
|
383
387
|
<dialog id="issues-dialog" class="issues-dialog" aria-label="Jira issues">
|
|
384
388
|
<div id="issues-body"></div>
|
|
385
389
|
</dialog>
|
|
@@ -606,6 +610,7 @@
|
|
|
606
610
|
<label class="check"><input type="checkbox" name="src_ci" /> Failing checks on my open pull requests</label>
|
|
607
611
|
<label class="check"><input type="checkbox" name="src_slack" /> Slack messages to me that ask for work</label>
|
|
608
612
|
<label class="check"><input type="checkbox" name="src_linear" /> Linear issues newly assigned to me</label>
|
|
613
|
+
<label class="check"><input type="checkbox" name="src_actions" /> Things asked of me in Slack and in meeting notes (Notes by Gemini), listed under <b>Actions</b></label>
|
|
609
614
|
<label class="check"><input type="checkbox" name="pickIssues" /> Let me pick: list new Jira and Linear issues under <b>Jira → Not started</b>, and start agents only for the ones I tick</label>
|
|
610
615
|
</fieldset>
|
|
611
616
|
<div class="row three">
|
|
@@ -854,6 +859,14 @@
|
|
|
854
859
|
</div>
|
|
855
860
|
<label class="check"><input type="checkbox" name="containerDefault" /> Run new agents in containers by default</label>
|
|
856
861
|
</fieldset>
|
|
862
|
+
<fieldset id="settings-features">
|
|
863
|
+
<legend>What you use</legend>
|
|
864
|
+
<p class="hint">Turn off what you don't need: its list and button are hidden, and the assistant stops looking there. What's already listed is kept for when you turn it back on.</p>
|
|
865
|
+
<label class="check"><input type="checkbox" name="feat_jira" /> Jira: the issues assigned to you and the agents on them</label>
|
|
866
|
+
<label class="check"><input type="checkbox" name="feat_slack" /> Slack: work and action items from your messages</label>
|
|
867
|
+
<label class="check"><input type="checkbox" name="feat_gemini" /> Meeting notes: action items from Google Meet's Notes by Gemini</label>
|
|
868
|
+
<label>You <span class="hint">your name and work email(s), so the assistant finds what's asked of you; empty: from git config</span><input name="me" placeholder="Jane Doe, jane@company.com" autocomplete="off" /></label>
|
|
869
|
+
</fieldset>
|
|
857
870
|
<fieldset class="local-only">
|
|
858
871
|
<legend>Jira</legend>
|
|
859
872
|
<p class="hint">For an agent created from a Jira link, its description shows the issue's summary. Public issues on Atlassian Cloud need nothing here; for your company's site, add it with your email and an <a href="https://id.atlassian.com/manage-profile/security/api-tokens" target="_blank" rel="noopener">API token</a>. The token is kept on this computer and sent only to that site.</p>
|
package/public/issues.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
// Jira: every issue an agent works on in one table, the ones waiting for your review first: the
|
|
2
2
|
// issue and its Jira status, where the work stands, its plan, design doc and pull request, and a
|
|
3
3
|
// link to the agent. Issues proposed for agents (when you pick) come first, with a box to tick:
|
|
4
|
-
// agents start only for the ticked ones.
|
|
4
|
+
// agents start only for the ticked ones. Each issue has your action on its left (assign, skip, done,
|
|
5
|
+
// remove), kept by the daemon across restarts and updates, and changeable any time.
|
|
5
6
|
|
|
6
7
|
import { listenHtml } from './speak.js';
|
|
8
|
+
import { rowKeys } from './rowkeys.js';
|
|
7
9
|
|
|
8
10
|
const SAVED = 'agentmgr.issuesFilter';
|
|
9
11
|
const FILTERS = [
|
|
@@ -11,7 +13,15 @@ const FILTERS = [
|
|
|
11
13
|
['you', 'Waiting for you'],
|
|
12
14
|
['agent', 'Agents on it'],
|
|
13
15
|
['done', 'Done'],
|
|
16
|
+
['skipped', 'Skipped'],
|
|
14
17
|
['all', 'All'],
|
|
18
|
+
['removed', 'Removed'],
|
|
19
|
+
];
|
|
20
|
+
const ACTIONS = [
|
|
21
|
+
['assign', 'Assign', 'An agent works on it (assigning one not started yet starts its agent)'],
|
|
22
|
+
['skip', 'Skip', 'Not now: under Skipped, and not proposed or started again'],
|
|
23
|
+
['done', 'Done', 'Handled (by you or elsewhere): under Done'],
|
|
24
|
+
['remove', 'Remove', 'Off the list (under Removed, to bring back)'],
|
|
15
25
|
];
|
|
16
26
|
const CHECKS = { passed: ['✓', 'Checks pass'], failed: ['✗', 'Checks failing'], running: ['●', 'Checks running'] };
|
|
17
27
|
|
|
@@ -32,11 +42,11 @@ export function initIssues({ api, $, esc, ago, openAgent, openDoc, toast }) {
|
|
|
32
42
|
|
|
33
43
|
let loadedAt = 0;
|
|
34
44
|
|
|
35
|
-
async function load({ quiet = false } = {}) {
|
|
45
|
+
async function load({ quiet = false, fresh = false } = {}) {
|
|
36
46
|
if (loading) return;
|
|
37
47
|
loading = true;
|
|
38
48
|
try {
|
|
39
|
-
data = await api('GET',
|
|
49
|
+
data = await api('GET', `/issues${fresh ? '?fresh=1' : ''}`);
|
|
40
50
|
loadedAt = Date.now();
|
|
41
51
|
} catch (e) {
|
|
42
52
|
if (!quiet) toast?.(e.message, 5000);
|
|
@@ -58,18 +68,30 @@ export function initIssues({ api, $, esc, ago, openAgent, openDoc, toast }) {
|
|
|
58
68
|
}
|
|
59
69
|
}
|
|
60
70
|
|
|
71
|
+
/** Your action on the issue, left of it: kept across restarts; change it any time. */
|
|
72
|
+
function actionCell(r) {
|
|
73
|
+
const none = r.agent ? '' : `<option value="" ${r.action ? '' : 'selected'}>—</option>`;
|
|
74
|
+
const opts = ACTIONS.map(([v, label, title]) => `<option value="${v}" title="${esc(title)}" ${r.action === v ? 'selected' : ''}>${label}</option>`).join('');
|
|
75
|
+
return `<td class="issue-action"><select data-issue-action="${esc(r.key)}" class="act-${esc(r.action ?? 'none')}" aria-label="Your action on ${esc(r.key)}" title="Your action: kept across restarts and updates">${none}${opts}</select></td>`;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
function aboutIssue(r) {
|
|
79
|
+
return `${r.title ? `<div class="issue-title">${esc(r.title)}</div>` : ''}${r.synopsis ? `<div class="issue-synopsis" title="${esc(r.synopsis)}">${esc(r.synopsis)}</div>` : ''}`;
|
|
80
|
+
}
|
|
81
|
+
|
|
61
82
|
function row(r, boxes) {
|
|
62
83
|
const box = !boxes ? '' : r.group === 'new' ? `<td class="pick"><input type="checkbox" data-issue-pick="${esc(r.key)}" ${ticked.has(r.key) ? 'checked' : ''} aria-label="Start an agent for ${esc(r.key)}" /></td>` : '<td></td>';
|
|
63
|
-
const
|
|
84
|
+
const type = r.type && !/^(story|task|bug|sub-?task)$/i.test(r.type) ? ` <span class="issue-type" title="Jira issue type">${esc(r.type)}</span>` : '';
|
|
85
|
+
const issue = (r.url ? `<a href="${esc(r.url)}" target="_blank" rel="noopener" class="issue-key">${esc(r.key)}</a>` : `<span class="issue-key">${esc(r.key)}</span>`) + type;
|
|
64
86
|
const status = r.jira?.status ? `<span class="jira-status ${esc(r.jira.category ?? '')}">${esc(r.jira.status)}</span>` : '<span class="hint">—</span>';
|
|
65
87
|
const check = r.pr?.checks && CHECKS[r.pr.checks] ? ` <span class="checks ${esc(r.pr.checks)}" title="${CHECKS[r.pr.checks][1]}">${CHECKS[r.pr.checks][0]}</span>` : '';
|
|
66
88
|
const pr = r.pr?.url
|
|
67
89
|
? `<a href="${esc(r.pr.url)}" target="_blank" rel="noopener" title="${esc(r.pr.title ?? '')}">#${esc(r.pr.number ?? '?')}</a>${check}${r.aiReview ? `<div class="hint" title="AI review">AI: ${esc(r.aiReview)}</div>` : ''}<div>${listenHtml(`prvoice:${r.agent.id}`, { title: 'Explain the review aloud: the PR, its checks, the AI review, the riskiest changes and what is left', label: 'Explain' })}</div>`
|
|
68
90
|
: '<span class="hint">—</span>';
|
|
69
91
|
if (!r.agent) {
|
|
70
|
-
const by = r.proposal
|
|
71
|
-
return `<tr class="stage-proposed ${ticked.has(r.key) ? 'ticked' : ''}">${box}
|
|
72
|
-
<td>${issue}${
|
|
92
|
+
const by = !r.proposal ? 'assigned to you' : r.proposal.by === 'assistant' ? 'proposed by the assistant' : r.proposal.by === 'jira' ? 'assigned to you' : 'proposed';
|
|
93
|
+
return `<tr data-row-id="${esc(r.key)}" class="stage-proposed ${ticked.has(r.key) ? 'ticked' : ''} ${r.action ? `action-${esc(r.action)}` : ''}">${box}${actionCell(r)}
|
|
94
|
+
<td>${issue}${aboutIssue(r)}</td>
|
|
73
95
|
<td>${status}</td>
|
|
74
96
|
<td class="issue-note">${esc(r.note)}</td>
|
|
75
97
|
<td class="hint">—</td>
|
|
@@ -91,8 +113,8 @@ export function initIssues({ api, $, esc, ago, openAgent, openDoc, toast }) {
|
|
|
91
113
|
const design = d
|
|
92
114
|
? [d.written ? read('designdoc', 'Read', 'Read the design doc here') : '<span class="hint">not yet</span>', d.page && ext('Page', d.page, 'The design page the agent published'), d.google && ext('Doc', d.google, 'Google Doc')].filter(Boolean).join(' · ')
|
|
93
115
|
: '<span class="hint">—</span>';
|
|
94
|
-
return `<tr class="stage-${esc(r.stage)}">${box}
|
|
95
|
-
<td>${issue}${
|
|
116
|
+
return `<tr data-row-id="${esc(r.key)}" class="stage-${esc(r.stage)} action-${esc(r.action)}">${box}${actionCell(r)}
|
|
117
|
+
<td>${issue}${aboutIssue(r)}</td>
|
|
96
118
|
<td>${status}</td>
|
|
97
119
|
<td class="issue-note">${esc(r.note)}</td>
|
|
98
120
|
<td class="nowrap">${plan}</td>
|
|
@@ -109,8 +131,9 @@ export function initIssues({ api, $, esc, ago, openAgent, openDoc, toast }) {
|
|
|
109
131
|
body.innerHTML = '<p class="hint">Loading…</p>';
|
|
110
132
|
return;
|
|
111
133
|
}
|
|
112
|
-
const
|
|
113
|
-
const
|
|
134
|
+
const inGroup = (r, g) => (g === 'all' ? r.group !== 'removed' : r.group === g);
|
|
135
|
+
const count = (g) => data.rows.filter((r) => inGroup(r, g)).length;
|
|
136
|
+
const rows = data.rows.filter((r) => inGroup(r, filter));
|
|
114
137
|
// Ticks only for issues still on the list.
|
|
115
138
|
const fresh = new Set(data.rows.filter((r) => r.group === 'new').map((r) => r.key));
|
|
116
139
|
for (const k of ticked) if (!fresh.has(k)) ticked.delete(k);
|
|
@@ -123,8 +146,12 @@ export function initIssues({ api, $, esc, ago, openAgent, openDoc, toast }) {
|
|
|
123
146
|
: filter === 'you'
|
|
124
147
|
? 'Nothing is waiting for your review.'
|
|
125
148
|
: filter === 'new'
|
|
126
|
-
? 'No issues waiting to be started. With "Let me pick" on in Assistant, new Jira and Linear issues assigned to you come here instead of getting agents right away (or: agentmgr issues propose).'
|
|
127
|
-
:
|
|
149
|
+
? 'No issues waiting to be started. Open Jira issues assigned to you show here once your Jira site, email and API token are in Settings → Jira. With "Let me pick" on in Assistant, new Jira and Linear issues assigned to you come here instead of getting agents right away (or: agentmgr issues propose).'
|
|
150
|
+
: filter === 'skipped'
|
|
151
|
+
? 'Nothing skipped. Issues you set to Skip wait here, and the assistant leaves them alone.'
|
|
152
|
+
: filter === 'removed'
|
|
153
|
+
? 'Nothing removed. Set an issue back to another action here to bring it back.'
|
|
154
|
+
: 'None here.';
|
|
128
155
|
body.innerHTML = `
|
|
129
156
|
<div class="issues-head">
|
|
130
157
|
<h2>Jira</h2>
|
|
@@ -137,20 +164,54 @@ export function initIssues({ api, $, esc, ago, openAgent, openDoc, toast }) {
|
|
|
137
164
|
${boxes
|
|
138
165
|
? `<div class="issues-pickbar">
|
|
139
166
|
<button class="primary small" data-issues="start" ${n && !starting ? '' : 'disabled'} title="Start an agent for each ticked issue">${starting ? 'Starting…' : `Start ${n || ''} agent${n === 1 ? '' : 's'}`.replace(' ', ' ')}</button>
|
|
140
|
-
<button class="small" data-issues="
|
|
167
|
+
<button class="small" data-issues="skip" ${n && !starting ? '' : 'disabled'} title="Not now: under Skipped, and not proposed again">Skip</button>
|
|
168
|
+
<button class="small" data-issues="dismiss" ${n && !starting ? '' : 'disabled'} title="Take the ticked issues off the list (under Removed, to bring back); they won't be proposed again">Remove</button>
|
|
141
169
|
<span class="hint">Tick the issues to start agents for; the rest stay here.</span>
|
|
142
170
|
</div>`
|
|
143
171
|
: ''}
|
|
144
172
|
${rows.length
|
|
145
173
|
? `<div class="issues-scroll"><table class="issues">
|
|
146
|
-
<thead><tr>${boxes ? `<th class="pick"><input type="checkbox" data-issue-pick-all ${allTicked ? 'checked' : ''} aria-label="Tick all" title="Tick all" /></th>` : ''}<th>Issue</th><th>Jira status</th><th>Where it stands</th><th>Plan</th><th>Design</th><th>Pull request</th><th>Agent</th><th class="col-active">Active</th></tr></thead>
|
|
174
|
+
<thead><tr>${boxes ? `<th class="pick"><input type="checkbox" data-issue-pick-all ${allTicked ? 'checked' : ''} aria-label="Tick all" title="Tick all" /></th>` : ''}<th class="issue-action" title="Your action, kept across restarts and updates">Action</th><th>Issue</th><th>Jira status</th><th>Where it stands</th><th>Plan</th><th>Design</th><th>Pull request</th><th>Agent</th><th class="col-active">Active</th></tr></thead>
|
|
147
175
|
<tbody>${rows.map((r) => row(r, boxes)).join('')}</tbody>
|
|
148
176
|
</table></div>`
|
|
149
177
|
: `<p class="hint issues-empty">${esc(empty)}</p>`}
|
|
150
|
-
${
|
|
178
|
+
${rows.length ? '<p class="hint">Keys: j/k move, a assign, s skip, d done, x remove, o clear, Enter opens the issue, [ ] filters.</p>' : ''}
|
|
179
|
+
${data.jira.signedIn || !data.rows.length ? '' : '<p class="hint">Jira status shows for public issues only, and the issues assigned to you aren\'t listed, until you add your Jira site, email and API token in Settings → Jira.</p>'}`;
|
|
180
|
+
keys.redraw();
|
|
151
181
|
}
|
|
152
182
|
|
|
183
|
+
/** Set your action on issues; assign starts the agents of ones not started yet. */
|
|
184
|
+
async function setAction(keys, action) {
|
|
185
|
+
try {
|
|
186
|
+
const r = await api('POST', '/issues/action', { keys, action: action || null });
|
|
187
|
+
for (const k of r.set) ticked.delete(k);
|
|
188
|
+
const bad = r.failed.map((x) => `${x.key}: ${x.reason}`).join('; ');
|
|
189
|
+
const label = ACTIONS.find(([v]) => v === action)?.[1] ?? 'Cleared';
|
|
190
|
+
const what = r.started.length ? `Started ${r.started.map((x) => `${x.key} (${x.agent.name})`).join(', ')}` : r.set.length ? `${r.set.join(', ')}: ${label}` : 'Nothing changed';
|
|
191
|
+
toast?.(`${what}${bad ? `. Not changed: ${bad}` : ''}`, bad ? 8000 : 3000);
|
|
192
|
+
} catch (err) {
|
|
193
|
+
toast?.(err.message, 6000);
|
|
194
|
+
}
|
|
195
|
+
load();
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
const keys = rowKeys(dialog, {
|
|
199
|
+
rows: () => [...body.querySelectorAll('tbody tr[data-row-id]')],
|
|
200
|
+
filters: () => [...body.querySelectorAll('[data-issues-filter]')],
|
|
201
|
+
keys: {
|
|
202
|
+
a: (r) => setAction([r.dataset.rowId], 'assign'),
|
|
203
|
+
s: (r) => setAction([r.dataset.rowId], 'skip'),
|
|
204
|
+
d: (r) => setAction([r.dataset.rowId], 'done'),
|
|
205
|
+
x: (r) => setAction([r.dataset.rowId], 'remove'),
|
|
206
|
+
o: (r) => setAction([r.dataset.rowId], null),
|
|
207
|
+
Enter: (r) => r.querySelector('a.issue-key')?.click(),
|
|
208
|
+
r: Object.assign(() => load({ fresh: true }), { needsRow: false }),
|
|
209
|
+
},
|
|
210
|
+
});
|
|
211
|
+
|
|
153
212
|
body.addEventListener('change', (e) => {
|
|
213
|
+
const act = e.target.dataset.issueAction;
|
|
214
|
+
if (act) return setAction([act], e.target.value);
|
|
154
215
|
const one = e.target.dataset.issuePick;
|
|
155
216
|
if (one) {
|
|
156
217
|
if (e.target.checked) ticked.add(one);
|
|
@@ -169,7 +230,8 @@ export function initIssues({ api, $, esc, ago, openAgent, openDoc, toast }) {
|
|
|
169
230
|
starting = true;
|
|
170
231
|
render();
|
|
171
232
|
try {
|
|
172
|
-
|
|
233
|
+
// Assign: starts agents for proposals and for issues assigned to you in Jira alike.
|
|
234
|
+
const r = await api('POST', '/issues/action', { keys, action: 'assign' });
|
|
173
235
|
for (const x of r.started) ticked.delete(x.key);
|
|
174
236
|
const bad = r.failed.map((x) => `${x.key}: ${x.reason}`).join('; ');
|
|
175
237
|
toast?.(`${r.started.length ? `Started ${r.started.length} agent${r.started.length === 1 ? '' : 's'}: ${r.started.map((x) => x.key).join(', ')}` : 'No agents started'}${bad ? `. Not started: ${bad}` : ''}`, bad ? 8000 : 4000);
|
|
@@ -202,18 +264,10 @@ export function initIssues({ api, $, esc, ago, openAgent, openDoc, toast }) {
|
|
|
202
264
|
}
|
|
203
265
|
const b = e.target.closest('[data-issues]')?.dataset.issues;
|
|
204
266
|
if (b === 'close') return dialog.close();
|
|
205
|
-
if (b === 'refresh') return load();
|
|
267
|
+
if (b === 'refresh') return load({ fresh: true });
|
|
206
268
|
if (b === 'start') return startTicked();
|
|
207
|
-
if (b === 'dismiss')
|
|
208
|
-
|
|
209
|
-
const r = await api('POST', '/issues/dismiss', { keys: [...ticked] });
|
|
210
|
-
ticked.clear();
|
|
211
|
-
toast?.(`${r.dismissed} dismissed`);
|
|
212
|
-
} catch (err) {
|
|
213
|
-
toast?.(err.message, 6000);
|
|
214
|
-
}
|
|
215
|
-
return load();
|
|
216
|
-
}
|
|
269
|
+
if (b === 'dismiss') return setAction([...ticked], 'remove');
|
|
270
|
+
if (b === 'skip') return setAction([...ticked], 'skip');
|
|
217
271
|
if (b === 'copy') {
|
|
218
272
|
try {
|
|
219
273
|
const { markdown } = await api('GET', `/issues?group=${encodeURIComponent(filter)}&format=markdown`);
|