create-pmos 0.669.0 → 0.671.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/package.json +20 -14
- package/payload/KIT-VERSION +1 -1
- package/payload/planning/evals/eval-calibration.md +1 -1
- package/payload/planning/okrs/health-budgets.md +1 -1
- package/payload/state/discoveries.md +1 -1
- package/workspace/changelog.json +19 -0
- package/workspace/guide/agent-capabilities.md +6 -6
- package/workspace/guide/claude-proposes.md +1 -1
- package/workspace/guide/cli.md +2 -2
- package/workspace/guide/cloud.md +2 -2
- package/workspace/guide/home.md +2 -2
- package/workspace/guide/initiatives-and-next-steps.md +12 -2
- package/workspace/guide/layout.md +1 -1
- package/workspace/guide/settings-and-switches.md +19 -14
- package/workspace/lib/driver-run.js +1 -1
- package/workspace/lib/driver.js +4 -1
- package/workspace/lib/routes-boards.js +115 -4
- package/workspace/lib/source-heal.js +1 -1
- package/workspace/lib/tracker-refresh-run.js +162 -0
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/public/pm/cozy-ev.css +18 -4
- package/workspace/public/pm/cozy-evmodel.js +1 -1
- package/workspace/public/pm/cozy-pop-work.js +23 -3
- package/workspace/public/pm/cozy-settings.js +108 -89
- package/workspace/public/pm/next-prompt-ui.js +1 -1
- package/workspace/public/pm/pop-work-model.js +7 -5
- package/workspace/public/pm/set-ds.js +54 -0
- package/workspace/server.js +27 -0
- package/workspace/skills/tracker-refresh.skill +2 -0
- package/workspace/test-lists/direct-plain-actions.json +11 -0
- package/workspace/test-lists/settings-ds-page.json +9 -0
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
/* pm/cozy-settings.js — Settings (initiative premium-uncovered-features, E3; canvas EvSettings). A dialog over the page, its sections on the left
|
|
1
|
+
/* pm/cozy-settings.js — Settings (initiative premium-uncovered-features, E3; canvas EvSettings). A dialog over the page, its sections on the left.
|
|
2
|
+
* Drawn from the PMOS design system's parts since settings-ds-page (board SettingsDS; pm/set-ds.js, scope .pm-ds): the path Settings › section
|
|
3
|
+
* with Close on top, the section tabs at the left, each row a Settings row (pm-set) in a block, a choice as Tabs, an on/off as a switch. The
|
|
4
|
+
* PMOS section is now four: How PMOS decides (a Suggestion from what you kept, the kinds, Always yours, Lessons folded), Checks, Prototype
|
|
5
|
+
* rules and Your account (the Claude login and profile, the API key, Sharpen prompts). Each section below keeps every control it had:
|
|
2
6
|
* General Theme (this device; the place menu's Theme row moved here, feedback batch 16 item 5). No "Viewer opens as": the popup is the one way (popup audit item 9)
|
|
3
7
|
* (this device), Product (which products Home reads: the Products card), Your day (when the end-of-day card shows:
|
|
4
8
|
* time.workEnd, POST /api/settings), Your impact (impact.on, POST /api/settings; canvas GmP1Switch, batch 16 item 7: the one switch
|
|
@@ -45,8 +49,8 @@
|
|
|
45
49
|
* The card at the bottom of General says when an update is ready. While a source needs you (lib/source-heal.js), an amber box at the top of every other section names
|
|
46
50
|
* it with its one action and what Claude tried, and the place menu opens Settings at Connectors. Every write is the PM's press (pmPost carries the launch nonce).
|
|
47
51
|
* PMOS reads the sources and never posts to them.
|
|
48
|
-
* openSettings(section?): general, claude, connectors, workspaces, updates; the old section names
|
|
49
|
-
*
|
|
52
|
+
* openSettings(section?): general, claude (How PMOS decides), checks, rules, connectors, account, workspaces, updates; the old section names
|
|
53
|
+
* still land where their controls are now (adler and jl → General's sub-panel; dress → Adler › Dress for the day; workflows → Workspaces › Workflows).
|
|
50
54
|
* openSettings('workflows', { wf, stage }) picks that workflow there and opens that stage once. */
|
|
51
55
|
import { mountClaudeSetup } from './cozy-claude-setup.js';
|
|
52
56
|
import * as JL from './cozy-jl.js';
|
|
@@ -58,6 +62,7 @@ import * as SW from './cozy-schedwork.js';
|
|
|
58
62
|
import * as AD from './cozy-adler.js';
|
|
59
63
|
import * as SE from './cozy-seasons.js';
|
|
60
64
|
import { weeksOf, lineOf, storiesOf } from './upd-weeks.js';
|
|
65
|
+
import * as SD from './set-ds.js';
|
|
61
66
|
import { relayState, relayLoad, relayHtml, relayClick } from './cozy-relay.js'; // event-relay (D110): Connectors › Listening
|
|
62
67
|
import { extState, extLoad, extHtml, extClick } from './cozy-ext.js'; // meeting-buddy: Connectors › Google Meet, the Chrome extension set up from here
|
|
63
68
|
const RL = relayState();
|
|
@@ -68,10 +73,10 @@ async function pmSend(method, path, body) {
|
|
|
68
73
|
try { const res = await pressFetch(path, { method, ...(body === undefined ? {} : { body: JSON.stringify(body) }) }); const out = await res.json(); if (out && typeof out === 'object' && !res.ok) out.status = res.status; return out; }
|
|
69
74
|
catch (e) { return { ok: false, error: 'could not reach the workspace server — ' + ((e && e.message) || String(e)) }; }
|
|
70
75
|
}
|
|
71
|
-
const SECTIONS =
|
|
76
|
+
const SECTIONS = SD.SECTIONS;
|
|
72
77
|
const SUBS = { adler: 'Adler', jl: 'Jev and Laya', workflows: 'Workflows' }; // General › Extras and Workspaces › Workflows: each opens as a sub-panel of its section (U4, U1)
|
|
73
78
|
const SRC = { calendar: 'Calendar', wispr: 'Wispr Flow', mail: 'Mail', slack: 'Slack', jira: 'Jira', confluence: 'Confluence', github: 'GitHub', drive: 'Google Drive', figma: 'Figma', website: 'Your websites' };
|
|
74
|
-
const T = { el: null, sec: 'general', sub: '', ws: null, st: {}, src: null, con: {}, conn: [], set: null, prods: null, msg: '', busy: false, phase: '', say: '', back: null, fresh: null, reading: '', note: {}, info: false, fold: false, dir: null, q: '', cat: 'all', wait: null, dress: false, more: false, bday: false, dset: {}, wkOpen: new Set(), wkMore: new Set(), arc: false };
|
|
79
|
+
const T = { lsOpen: false, el: null, sec: 'general', sub: '', ws: null, st: {}, src: null, con: {}, conn: [], set: null, prods: null, msg: '', busy: false, phase: '', say: '', back: null, fresh: null, reading: '', note: {}, info: false, fold: false, dir: null, q: '', cat: 'all', wait: null, dress: false, more: false, bday: false, dset: {}, wkOpen: new Set(), wkMore: new Set(), arc: false };
|
|
75
80
|
const cmpVer = (a, b) => { const x = String(a || '0').split('-')[0].split('.').map(Number), y = String(b || '0').split('-')[0].split('.').map(Number); for (let i = 0; i < 3; i++) if ((x[i] || 0) !== (y[i] || 0)) return (x[i] || 0) < (y[i] || 0) ? -1 : 1; return 0; };
|
|
76
81
|
const home = () => (T.ws && T.ws[0] ? T.st[T.ws[0].id] : null);
|
|
77
82
|
const latest = () => { const s = home(); return (s && (s.latest || (s.lastCheck && s.lastCheck.latest))) || null; };
|
|
@@ -90,9 +95,7 @@ function changes() {
|
|
|
90
95
|
for (const e of [...((s.lastCheck && s.lastCheck.changes) || []), ...(s.latestChanges || []), ...(s.changes || [])]) if (e && e.v && !all.has(e.v)) all.set(e.v, e);
|
|
91
96
|
return [...all.values()].sort((a, b) => cmpVer(b.v, a.v));
|
|
92
97
|
}
|
|
93
|
-
const seg =
|
|
94
|
-
const trow = (title, sub, right) => `<div class="ev-trow"><div class="ev-tx"><b>${esc(title)}</b>${sub ? `<p class="ev-small ev-mut">${esc(sub)}</p>` : ''}</div>${right}</div>`;
|
|
95
|
-
const sw = (on, attrs, label) => `<button type="button" class="ev-sw" role="switch" aria-checked="${!!on}" aria-label="${esc(label)}" ${attrs}>${on ? 'On' : 'Off'}</button>`;
|
|
98
|
+
const seg = SD.seg, trow = SD.row, sw = SD.sw; // the system's Tabs, Settings row and switch (pm/set-ds.js)
|
|
96
99
|
|
|
97
100
|
function general() {
|
|
98
101
|
if (T.sub === 'adler') return T.dress ? dressSec() : subHead('adler') + adlerSec();
|
|
@@ -105,20 +108,20 @@ function general() {
|
|
|
105
108
|
const pname = wsRow ? wsRow.name || wsRow.label || pageWs : !P ? 'Reading' : !P.length ? 'No product' : on.length === 1 ? on[0].name : !on.length ? (P.find((x) => x.primary) || P[0]).name : on.length + ' of ' + P.length + ' products';
|
|
106
109
|
const we = T.set && Array.isArray(T.set.settings) ? T.set.settings.find((x) => x.key === 'time.workEnd') : null, end = we ? Number(we.value) : 18;
|
|
107
110
|
const hours = []; for (let h = 13; h <= 23; h++) hours.push(h);
|
|
108
|
-
const upd = ready() ? `<div class="ev-card ev-upd">${adFace('needs-you')}<span class="
|
|
111
|
+
const upd = ready() ? `<div class="ev-card ev-upd">${adFace('needs-you')}<span class="pm-badge blue">Update</span><p><b>PMOS ${esc(latest())} is ready.</b> <span class="ev-mut">${esc(firstLine())}</span></p><button type="button" class="ev-btn sm" data-ev-go="updates">What's new</button><button type="button" class="ev-btn sm dark" data-ev-upd="update">${appBehind() ? 'Restart to update' : 'Update'}</button></div>` : '';
|
|
109
112
|
return trow('Theme', 'Auto follows your computer', seg('Theme', 'theme', theme, [['light', 'Light'], ['dark', 'Dark'], ['auto', 'Auto']]))
|
|
110
113
|
+ trow('Product', 'Which products Today, Work and Goals read', `<button type="button" class="ev-pick" data-ev-products aria-haspopup="menu">${esc(pname)} ${svg(ICON.down, 14)}</button>`)
|
|
111
114
|
+ trow('Your day', 'When the end-of-day card shows', `<label class="ev-vh" for="evDay">Your day ends at</label><select id="evDay" class="ev-inp" data-ev-day>${hours.map((h) => `<option value="${h}"${h === end ? ' selected' : ''}>${pad(h)}:00</option>`).join('')}</select>`)
|
|
112
115
|
+ trow('Your impact', 'Adler’s sprout and your impact log. Only you see it. Nothing leaves PMOS.', sw(impactOn(), 'data-ev-impact', 'Your impact'))
|
|
113
|
-
+ trow('Agents write to Jira', 'Only after you press Commit. Never on their own.', (ready() ? '' : adFace('needs-you', 24)) + '<span class="
|
|
116
|
+
+ trow('Agents write to Jira', 'Only after you press Commit. Never on their own.', (ready() ? '' : adFace('needs-you', 24)) + '<span class="pm-badge">Fixed</span>')
|
|
114
117
|
+ upd
|
|
115
|
-
+ '<h4>Extras</h4>'
|
|
118
|
+
+ '<h4 class="pm-h-sm">Extras</h4>'
|
|
116
119
|
+ trow('Adler', 'How much of PMOS’s face shows, motion, celebrations, quiet hours and Dress for the day', subBtn('adler'))
|
|
117
120
|
+ trow('Jev and Laya', 'The TypeSafe key, Laya on this computer and the repositories it reads', subBtn('jl'));
|
|
118
121
|
}
|
|
119
122
|
/* General › Extras (U4): the row's › opens the sub-panel; its ‹ comes back to General */
|
|
120
|
-
const subBtn = (k) => `<button type="button" class="ev-ib" data-ev-sub="${k}" aria-label="${esc(SUBS[k])}" title="${esc(SUBS[k])}">${svg(CHEV, 18)}</button>`;
|
|
121
|
-
const subHead = (k) => `<div class="ev-dr-hd"><button type="button" class="ev-ib" data-ev-sub="" aria-label="Back to ${esc((SECTIONS.find((x) => x[0] === T.sec) || SECTIONS[0])[1])}" title="Back">${svg(BACK, 18)}</button><h4 class="ev-grow">${esc(SUBS[k])}</h4></div>`;
|
|
123
|
+
const subBtn = (k) => `<button type="button" class="ev-ib pm-btn" data-ev-sub="${k}" aria-label="${esc(SUBS[k])}" title="${esc(SUBS[k])}">${svg(CHEV, 18)}</button>`;
|
|
124
|
+
const subHead = (k) => `<div class="ev-dr-hd"><button type="button" class="ev-ib pm-btn" data-ev-sub="" aria-label="Back to ${esc((SECTIONS.find((x) => x[0] === T.sec) || SECTIONS[0])[1])}" title="Back">${svg(BACK, 18)}</button><h4 class="ev-grow">${esc(SUBS[k])}</h4></div>`;
|
|
122
125
|
/* Your impact (GmP1Switch): on by default; off hides every impact surface and stops Claude's daily read */
|
|
123
126
|
function impactOn() { const x = T.set && Array.isArray(T.set.settings) ? T.set.settings.find((y) => y.key === 'impact.on') : null; return x ? x.value !== false : true; }
|
|
124
127
|
/** One Dress for the day press: POST /api/settings, keep the row, and tell the page (the event adler:dress) so Adler changes at once. */
|
|
@@ -135,12 +138,12 @@ async function saveDress(key, value, said = 'Saved.') {
|
|
|
135
138
|
/* Settings > Adler (AdM5): four choices, each saved for this computer the moment it is pressed */
|
|
136
139
|
function adlerSec() {
|
|
137
140
|
const P = AD.prefs();
|
|
138
|
-
return `<div class="ev-ad-hd">${AD.adler('handled', 48)}<p class="
|
|
141
|
+
return `<div class="ev-ad-hd">${AD.adler('handled', 48)}<p class="pm-meta">Adler is how PMOS shows its mood in PMOS. You choose how much of him you see.</p></div>`
|
|
139
142
|
+ trow('How much Adler', 'Face only keeps his face where PMOS speaks and drops the scenes. Off shows the plain mood dot.', seg('How much Adler', 'adler.amount', P['adler.amount'], [['full', 'Full'], ['face', 'Face only'], ['off', 'Off']]))
|
|
140
143
|
+ trow('Motion', 'Still stops every animation. Reduced motion on your computer always stops it.', seg('Motion', 'adler.motion', P['adler.motion'], [['system', 'Follow my computer'], ['still', 'Still']]))
|
|
141
144
|
+ trow('Celebrations', 'At most once a week, and only for a real event.', seg('Celebrations', 'adler.celebrate', P['adler.celebrate'], [['real', 'Real wins only'], ['never', 'Never']]))
|
|
142
145
|
+ trow('Quiet after', 'After this time, opening PMOS shows Adler asleep and nothing urgent.', seg('Quiet after', 'adler.quiet', P['adler.quiet'], [['22', '22:00'], ['never', 'Never']]))
|
|
143
|
-
+ trow('Dress for the day', dressLine(), `<button type="button" class="ev-ib" data-ev-dress="open" aria-label="Dress for the day" title="Dress for the day">${svg(CHEV, 18)}</button>`);
|
|
146
|
+
+ trow('Dress for the day', dressLine(), `<button type="button" class="ev-ib pm-btn" data-ev-dress="open" aria-label="Dress for the day" title="Dress for the day">${svg(CHEV, 18)}</button>`);
|
|
144
147
|
}
|
|
145
148
|
|
|
146
149
|
/* ── Settings > Adler > Dress for the day (AsSet1): every switch is saved for this computer the moment it is pressed ── */
|
|
@@ -161,10 +164,10 @@ const dsw = (key, on, label) => sw(on, `data-ev-dsw="${key}"`, label);
|
|
|
161
164
|
function dressSec() {
|
|
162
165
|
const P = dp(), place = SE.placeOf(P), on = P['adler.dress.on'] !== false, full = P['adler.amount'] === 'full';
|
|
163
166
|
const now = on && full ? SE.charmToday(Date.now(), P) : null, nx = on && full && !now ? SE.nextCharm(Date.now(), P) : null, c = now || nx;
|
|
164
|
-
const head = `<div class="ev-dr-hd"><button type="button" class="ev-ib" data-ev-dress="back" aria-label="Back to Adler" title="Back">${svg(BACK, 18)}</button><h4 class="ev-grow">Dress for the day</h4>${dsw('adler.dress.on', on, 'Dress for the day')}</div>`;
|
|
165
|
-
if (!on) return head + '<p class="
|
|
166
|
-
const banner = !full ? '<p class="
|
|
167
|
-
: c ? `<div class="ev-dr-now">${AD.adler('handled', 48, { charm: c.key, label: false })}<p><b>${esc(now ? 'Today: ' + now.name : 'Next: ' + nx.name)}</b><span class="
|
|
167
|
+
const head = `<div class="ev-dr-hd"><button type="button" class="ev-ib pm-btn" data-ev-dress="back" aria-label="Back to Adler" title="Back">${svg(BACK, 18)}</button><h4 class="ev-grow">Dress for the day</h4>${dsw('adler.dress.on', on, 'Dress for the day')}</div>`;
|
|
168
|
+
if (!on) return head + '<p class="pm-meta">Adler is plain every day.</p>';
|
|
169
|
+
const banner = !full ? '<p class="pm-meta">How much Adler is not Full, so he does not dress up.</p>'
|
|
170
|
+
: c ? `<div class="ev-dr-now">${AD.adler('handled', 48, { charm: c.key, label: false })}<p><b>${esc(now ? 'Today: ' + now.name : 'Next: ' + nx.name)}</b><span class="pm-meta">${esc(now ? 'He wears it until ' + dmy(now.until) + '.' : 'He wears it from ' + dmy(nx.from) + '.')}</span></p></div>` : '';
|
|
168
171
|
const hol = SE.DAYS.filter((e) => e.group === 'holidays' && (e.where === '*' || e.where.includes(place.country)));
|
|
169
172
|
const quiet = hol.filter((e) => e.kind === 'qt' && e.key !== 'seventh').map((e) => e.name);
|
|
170
173
|
const sea = place.climate === 'tropics' ? (SE.DAYS.find((e) => e.key === 'monsoon').where.includes(place.country) ? 'Monsoon, Dec to early Mar' : 'None in the tropics where you are') : 'Spring, summer, autumn and winter';
|
|
@@ -173,9 +176,9 @@ function dressSec() {
|
|
|
173
176
|
const cols = P['adler.dress.colors'] || ['blue', 'green'];
|
|
174
177
|
const colSel = (i) => `<label class="ev-vh" for="evCol${i}">Colour ${i + 1}</label><select id="evCol${i}" class="ev-inp" data-ev-dcol="${i}">${SE.COLORS.map((k) => `<option value="${k}"${cols[i] === k ? ' selected' : ''}>${COLOR_NAMES[k]}</option>`).join('')}</select>`;
|
|
175
178
|
const b = P['adler.dress.birthday'], bdate = b ? new Date(2000, +b.slice(0, 2) - 1, +b.slice(3)).toLocaleDateString('en-GB', { day: 'numeric', month: 'long' }) : '';
|
|
176
|
-
const bday = b ? `<span class="ev-small">${esc(bdate)}</span><button type="button" class="ev-ib" data-ev-dress="bday-off" aria-label="Remove your birthday" title="Remove your birthday">${svg(CROSS, 16)}</button>`
|
|
179
|
+
const bday = b ? `<span class="ev-small">${esc(bdate)}</span><button type="button" class="ev-ib pm-btn" data-ev-dress="bday-off" aria-label="Remove your birthday" title="Remove your birthday">${svg(CROSS, 16)}</button>`
|
|
177
180
|
: T.bday ? `<label class="ev-vh" for="evBday">Your birthday</label><input id="evBday" type="date" class="ev-inp" data-ev-bday>`
|
|
178
|
-
: `<button type="button" class="ev-ib" data-ev-dress="bday" aria-label="Add your birthday" title="Add your birthday">${svg(PLUS, 18)}</button>`;
|
|
181
|
+
: `<button type="button" class="ev-ib pm-btn" data-ev-dress="bday" aria-label="Add your birthday" title="Add your birthday">${svg(PLUS, 18)}</button>`;
|
|
179
182
|
const w = P['adler.dress.wear'], today = SE.wearNow('movie', Date.now(), P).value.day;
|
|
180
183
|
const wear = (k, n) => { const worn = !!(w && w.key === k && w.day === today); return `<button type="button" class="ev-wear" data-ev-wear="${k}" aria-pressed="${worn}" aria-label="${esc((worn ? 'Take off ' : 'Wear ') + n + ' until midnight')}" title="${esc(n)}">${AD.adler('handled', 40, { charm: k, label: false })}<span class="ev-small">${esc(n)}</span></button>`; };
|
|
181
184
|
const placeOpts = `<option value="">From my computer${place.auto && place.country ? ' (' + esc(SE.PLACES[place.country] || place.country) + ')' : ''}</option>` + Object.entries(SE.PLACES).map(([k, n]) => `<option value="${k}"${P['adler.dress.place'] === k ? ' selected' : ''}>${esc(n)}</option>`).join('');
|
|
@@ -186,35 +189,35 @@ function dressSec() {
|
|
|
186
189
|
+ trow('Seasons', sea, dsw('adler.dress.seasons', P['adler.dress.seasons'], 'Seasons'))
|
|
187
190
|
+ trow('Space and science days', 'Moon landing, Earth Day, Pi Day', dsw('adler.dress.science', P['adler.dress.science'], 'Space and science days'))
|
|
188
191
|
+ trow('School days', place.country === 'SG' ? "Teachers' Day, Children's Day" : "Singapore's Teachers' Day and Children's Day", dsw('adler.dress.school', P['adler.dress.school'], 'School days'))
|
|
189
|
-
+ trow('More festivals and national days', moreSub, `<button type="button" class="ev-ib" data-ev-dress="more" aria-expanded="${T.more}" aria-controls="evMore" aria-label="More festivals and national days" title="More festivals">${svg(T.more ? ICON.down : CHEV, 18)}</button>`)
|
|
192
|
+
+ trow('More festivals and national days', moreSub, `<button type="button" class="ev-ib pm-btn" data-ev-dress="more" aria-expanded="${T.more}" aria-controls="evMore" aria-label="More festivals and national days" title="More festivals">${svg(T.more ? ICON.down : CHEV, 18)}</button>`)
|
|
190
193
|
+ (T.more ? `<div class="ev-dr-more" id="evMore">${more.map((x) => trow(x.name, x.here ? '' : 'Kept elsewhere', sw(x.on, `data-ev-dday="${x.key}"`, x.name))).join('')}</div>` : '')
|
|
191
194
|
+ trow('Big sports', (P['adler.dress.sports'] ? 'On' : 'Off') + ' · a scarf in your colours. No team marks', `<span class="ev-dr-pl">${colSel(0)}${colSel(1)}</span>${dsw('adler.dress.sports', P['adler.dress.sports'], 'Big sports')}`)
|
|
192
195
|
+ trow('Exam season', 'PSLE, O and A levels, late Sep to mid Nov', dsw('adler.dress.exam', P['adler.dress.exam'], 'Exam season'))
|
|
193
196
|
+ trow('Your PMOS day', 'A year since you started', dsw('adler.dress.pmosday', P['adler.dress.pmosday'] !== false, 'Your PMOS day'))
|
|
194
197
|
+ trow('Your birthday', b ? 'First in line on the day' : 'Not added', bday)
|
|
195
|
-
+ `<div class="ev-dr-wear"><div class="ev-trow"><b class="ev-grow">Wear now</b><span class="
|
|
198
|
+
+ `<div class="ev-dr-wear"><div class="ev-trow"><b class="ev-grow">Wear now</b><span class="pm-meta">until midnight</span></div><div class="ev-dr-wbtns">${wear('movie', 'Movie night')}${wear('music', 'Music')}</div></div>`;
|
|
196
199
|
}
|
|
197
200
|
const firstLine = () => { const c = changes().find((e) => e.v === latest()); const p = c && c.prs && c.prs[0]; return p ? (p.t || p.s || '') : ''; };
|
|
198
201
|
/* each source's last read (FmA3Settings): the name, "read 09:41", the amber dot and ↻ on a stale or failed one */
|
|
199
202
|
const RD = 'M20 12a8 8 0 1 1-2.3-5.7M20 4v5h-5';
|
|
200
203
|
const INFO_I = 'M12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18M12 11v5M12 8h.01';
|
|
201
|
-
const readBtn = (id, label, cls = 'ev-ib') => `<button type="button" class="${cls}" data-ev-read="${esc(id)}" aria-label="${esc(label)}" title="${esc(label)}"${T.reading ? ' disabled' : ''}>${svg(RD, 18)}</button>`;
|
|
204
|
+
const readBtn = (id, label, cls = 'ev-ib pm-btn') => `<button type="button" class="${cls}" data-ev-read="${esc(id)}" aria-label="${esc(label)}" title="${esc(label)}"${T.reading ? ' disabled' : ''}>${svg(RD, 18)}</button>`;
|
|
202
205
|
function readsHtml() {
|
|
203
206
|
const s = T.fresh;
|
|
204
|
-
if (!s) return '<p class="
|
|
205
|
-
if (!s.ok) return `<p class="
|
|
207
|
+
if (!s) return '<p class="pm-meta">Reading when each source was last read.</p>';
|
|
208
|
+
if (!s.ok) return `<p class="pm-meta">When each source was last read could not be read${s.error ? ': ' + esc(s.error) : ''}.</p>`;
|
|
206
209
|
const act = (x) => {
|
|
207
210
|
const a = x.act;
|
|
208
211
|
if (!a) return '<span class="ev-ib-sp" aria-hidden="true"></span>';
|
|
209
212
|
if (a.kind === 'read') return readBtn(x.id, a.label);
|
|
210
213
|
const at = a.kind === 'open' ? `href="${esc(a.href)}" target="_blank" rel="noopener"` : `href="#${esc(a.sec)}" data-ev-sec="${esc(a.sec)}"`;
|
|
211
|
-
return `<a class="ev-ib" ${at} aria-label="${esc(a.label)}" title="${esc(a.label)}">${svg(ICON.open, 18)}</a>`;
|
|
214
|
+
return `<a class="ev-ib pm-btn" ${at} aria-label="${esc(a.label)}" title="${esc(a.label)}">${svg(ICON.open, 18)}</a>`;
|
|
212
215
|
};
|
|
213
216
|
// one list, trouble first (CnA): the amber dot, the one reason and the one action on a trouble row; the name and the time on a quiet one
|
|
214
217
|
const rows = connectorRows(s.sources, s.health).map((x) => `<div class="ev-trow ev-fr${x.trouble ? ' ev-fr-t' : ''}" data-src="${esc(x.id)}"><span class="ev-gut">${x.trouble ? '<i class="ev-dot risk" aria-hidden="true"></i>' : ''}</span>`
|
|
215
218
|
+ `<div class="ev-tx ev-grow">${x.trouble ? `<b>${esc(x.name)}</b>` : `<span>${esc(x.name)}</span>`}${x.why ? `<p class="ev-small ev-why ${x.trouble ? 'ev-late' : 'ev-mut'}">${x.trouble ? '<span class="ev-vh">Needs a look: </span>' : ''}${esc(x.why)}</p>` : ''}${T.note[x.id] ? `<p class="ev-small" role="status">${esc(T.note[x.id])}</p>` : ''}</div>`
|
|
216
|
-
+ `${x.when ? `<span class="
|
|
217
|
-
return `<div class="ev-reads">${rows}</div>` + SW.swEntry();
|
|
219
|
+
+ `${x.when ? `<span class="pm-meta">${esc(x.when)}</span>` : ''}${act(x)}${x.job ? `<button type="button" class="ev-ib pm-btn" data-ev-sw="job:${esc(x.job)}" aria-label="${esc('Open ' + x.name + ': how often and when it runs next')}" title="How often and when it runs next">${svg(CHEV, 18)}</button>` : ''}</div>`).join('');
|
|
220
|
+
return `<div class="ev-reads pm-block">${rows}</div>` + SW.swEntry();
|
|
218
221
|
}
|
|
219
222
|
/** The amber box at the top of Settings, only when the PM must act on a source (self-heal, feedback batch 26 item 7). While Claude
|
|
220
223
|
* reads a source again by itself, or after it did, there is no box. The box names the one action and links to the exact place:
|
|
@@ -237,18 +240,18 @@ const CONNECT_URL = 'https://claude.ai/settings/connectors';
|
|
|
237
240
|
const tile = (name) => `<span class="ev-cn-lg" aria-hidden="true">${esc(CD.letter(name))}</span>`;
|
|
238
241
|
const slot = (name) => `<span class="ev-cn-slot" data-ev-listen-slot="${esc(name)}"></span>`; // the event relay's Listening (initiative event-relay)
|
|
239
242
|
const plusBtn = (c) => T.wait && T.wait.id === c.id
|
|
240
|
-
? `<span class="
|
|
243
|
+
? `<span class="pm-badge blue ev-cn-wait" role="status">Waiting for ${esc(c.name)}</span>`
|
|
241
244
|
: `<a class="ev-ib ev-cn-add" href="${esc((T.dir && T.dir.connectUrl) || CONNECT_URL)}" target="_blank" rel="noopener" data-ev-cadd="${esc(c.id)}" aria-label="${esc('Connect ' + c.name + ' in your Claude account')}" title="${esc('Connect ' + c.name + ' in your Claude account')}">${svg(PLUS, 18)}</a>`;
|
|
242
245
|
function propCards() {
|
|
243
246
|
const ps = (T.dir && T.dir.proposals) || [];
|
|
244
|
-
return ps.map((x) => `<div class="ev-cn-rec" data-ev-prop="${esc(x.name)}">${tile(x.label, x.label)}<div class="ev-grow"><b>${esc(x.label)} is connected.</b><p class="
|
|
245
|
-
+ `<button type="button" class="ev-ib" data-ev-pno="${esc(x.name)}" aria-label="${esc('Not now: ' + x.label)}" title="Not now">${svg(CROSS, 18)}</button>`
|
|
247
|
+
return ps.map((x) => `<div class="ev-cn-rec" data-ev-prop="${esc(x.name)}">${tile(x.label, x.label)}<div class="ev-grow"><b>${esc(x.label)} is connected.</b><p class="pm-meta">${svg(SPARK, 14)} PMOS proposes: ${esc(x.reads)}. Nothing reads it until you approve.</p></div>`
|
|
248
|
+
+ `<button type="button" class="ev-ib pm-btn" data-ev-pno="${esc(x.name)}" aria-label="${esc('Not now: ' + x.label)}" title="Not now">${svg(CROSS, 18)}</button>`
|
|
246
249
|
+ `<button type="button" class="ev-ib ev-cn-ok" data-ev-pok="${esc(x.name)}" aria-label="${esc('Approve: ' + x.reads)}" title="Approve">${svg(ICON.check, 18)}</button></div>`).join('');
|
|
247
250
|
}
|
|
248
251
|
function connList() {
|
|
249
252
|
const D = CD.directory({ connected: (T.dir && T.dir.connected) || T.conn, signals: (T.dir && T.dir.signals) || [], q: T.q, cat: T.cat });
|
|
250
253
|
const q = String(T.q || '').trim().toLowerCase(), cOk = (label) => (T.cat === 'all' || CD.catOf(label) === T.cat) && (!q || label.toLowerCase().includes(q));
|
|
251
|
-
const row = (label, key, sub, right, name) => `<div class="ev-trow ev-cn-r">${tile(label, key)}<div class="ev-tx ev-grow"><b>${esc(label)}</b><p class="
|
|
254
|
+
const row = (label, key, sub, right, name) => `<div class="ev-trow ev-cn-r">${tile(label, key)}<div class="ev-tx ev-grow"><b>${esc(label)}</b><p class="pm-meta">${esc(sub)}</p></div>${slot(name || key)}${right}</div>`;
|
|
252
255
|
// a connected connector that backs a brief source carries that source's switch; one that backs none, its own switch (as before)
|
|
253
256
|
const list = (T.dir && T.dir.connected) || T.conn, backed = new Set(list.map((c) => c.source).filter(Boolean));
|
|
254
257
|
const conRows = D.connected.map((c) => { const label = c.label || c.name;
|
|
@@ -260,24 +263,24 @@ function connList() {
|
|
|
260
263
|
const looseRows = loose.map((k) => { const m = CD.matchOf(SRC[k]); return row(SRC[k], SRC[k], T.src[k] ? 'PMOS reads it on its own' : 'PMOS does not read it on its own', (m ? plusBtn(m) : '') + sw(T.src[k], `data-ev-src="${k}"`, SRC[k]), k); });
|
|
261
264
|
const count = D.count;
|
|
262
265
|
const head = `<div class="ev-cn-sec"><b class="ev-lbl ev-grow">Connected · ${count}</b>`
|
|
263
|
-
+ `<button type="button" class="ev-ib" data-ev-fold aria-expanded="${!T.fold}" aria-controls="evConMore" aria-label="${T.fold ? 'Show the connected ones' : 'Hide the connected ones'}" title="${T.fold ? 'Show the connected ones' : 'Hide the connected ones'}">${svg(T.fold ? CHEV : ICON.down, 18)}</button></div><p class="
|
|
264
|
-
const conn = head + (T.fold && !q && T.cat === 'all' ? '' : `<div class="ev-cn-grp" id="evConMore">${conRows.join('') || '<p class="
|
|
266
|
+
+ `<button type="button" class="ev-ib pm-btn" data-ev-fold aria-expanded="${!T.fold}" aria-controls="evConMore" aria-label="${T.fold ? 'Show the connected ones' : 'Hide the connected ones'}" title="${T.fold ? 'Show the connected ones' : 'Hide the connected ones'}">${svg(T.fold ? CHEV : ICON.down, 18)}</button></div><p class="pm-meta ev-cn-note">Your sessions can use all of them. A switch chooses what PMOS reads on its own.</p>`;
|
|
267
|
+
const conn = head + (T.fold && !q && T.cat === 'all' ? '' : `<div class="ev-cn-grp" id="evConMore">${conRows.join('') || '<p class="pm-meta ev-cn-none">None match.</p>'}</div>`)
|
|
265
268
|
+ (looseRows.length ? `<div class="ev-cn-sec"><b class="ev-lbl">More sources</b></div><div class="ev-cn-grp">${looseRows.join('')}</div>` : '');
|
|
266
|
-
const add = (c, sub) => `<div class="ev-trow ev-cn-r">${tile(c.name, c.id)}<div class="ev-tx ev-grow"><b>${esc(c.name)}</b><p class="
|
|
269
|
+
const add = (c, sub) => `<div class="ev-trow ev-cn-r">${tile(c.name, c.id)}<div class="ev-tx ev-grow"><b>${esc(c.name)}</b><p class="pm-meta">${esc(sub)}</p></div>${plusBtn(c)}</div>`;
|
|
267
270
|
D.forYou = D.forYou.filter((c) => !looseIds.has(c.id));
|
|
268
|
-
const fy = D.forYou.length ? `<div class="ev-cn-sec"><b class="ev-lbl">For you</b></div><p class="
|
|
271
|
+
const fy = D.forYou.length ? `<div class="ev-cn-sec"><b class="ev-lbl">For you</b></div><p class="pm-meta ev-cn-note">${svg(SPARK, 14)} PMOS suggests these from what you connected and what your initiatives link</p><div class="ev-cn-grp">${D.forYou.map((c) => add(c, c.why)).join('')}</div>` : '';
|
|
269
272
|
const rest = D.all.filter((c) => !looseIds.has(c.id));
|
|
270
273
|
const all = rest.length ? `<div class="ev-cn-sec"><b class="ev-lbl">All connectors</b></div><div class="ev-cn-grp">${rest.map((c) => add(c, c.what)).join('')}</div>` : '';
|
|
271
274
|
return conn + fy + all;
|
|
272
275
|
}
|
|
273
276
|
function connectors() {
|
|
274
277
|
if (T.sub && T.sub.startsWith('sw:')) return SW.swBody(T.sub);
|
|
275
|
-
const info = T.info ? `<p class="
|
|
276
|
-
if (T.src === null) return info + readsHtml() + '<p class="
|
|
278
|
+
const info = T.info ? `<p class="pm-meta ev-info" id="evConInfo">${esc(INFO)}</p>` : '';
|
|
279
|
+
if (T.src === null) return info + readsHtml() + '<p class="pm-meta">Reading the connectors.</p>';
|
|
277
280
|
const search = `<label class="ev-cn-search"><span class="ev-vh">Search connectors</span>${svg(ICON.search, 16)}<input type="search" class="ev-inp" id="evConQ" placeholder="Search connectors" value="${esc(T.q || '')}" autocomplete="off"></label>`;
|
|
278
281
|
const chips = `<div class="ev-cn-chips" role="group" aria-label="Category">${CD.CATS.map(([k, l]) => `<button type="button" class="ev-chip${T.cat === k ? ' on' : ''}" data-ev-ccat="${k}" aria-pressed="${T.cat === k}">${esc(l)}</button>`).join('')}</div>`;
|
|
279
282
|
return info + readsHtml() + propCards() + `<div class="ev-cn">${search}${chips}<div id="evConList">${connList()}</div>`
|
|
280
|
-
+ `<p class="
|
|
283
|
+
+ `<p class="pm-meta ev-cn-foot">PMOS keeps no passwords or keys. A connector is added in your Claude account: + opens that page, and PMOS notices when it is there.</p></div>`
|
|
281
284
|
+ extHtml(XT) + relayHtml(RL);
|
|
282
285
|
}
|
|
283
286
|
/** The directory's read; after a +, again every 5 s with the probe until the connector shows or 2 minutes pass. */
|
|
@@ -317,25 +320,25 @@ async function decideProp(name, ok) {
|
|
|
317
320
|
}
|
|
318
321
|
function workspaces() {
|
|
319
322
|
if (T.sub === 'workflows') return subHead('workflows') + '<div class="ev-wfh" data-ev-wfhost></div>'; // pm/wf-page.js draws into it (UI grill U1)
|
|
320
|
-
if (T.ws === null) return '<p class="
|
|
321
|
-
return '<p class="
|
|
322
|
-
+ T.ws.filter((x) => !x.linked).map((x) => trow(x.label || x.name || x.id, (x.root || '') + (x.home ? ' · home' : ''), x.home ? '<span class="
|
|
323
|
+
if (T.ws === null) return '<p class="pm-meta">Reading the repositories.</p>';
|
|
324
|
+
return '<p class="pm-meta">A workspace is one repository PMOS works in. Removing one forgets the address only; the folder is not deleted.</p>'
|
|
325
|
+
+ T.ws.filter((x) => !x.linked).map((x) => trow(x.label || x.name || x.id, (x.root || '') + (x.home ? ' · home' : ''), x.home ? '<span class="pm-badge">Home</span>' : `<button type="button" class="ev-btn sm" data-ev-rm="${esc(x.id)}">Remove</button>`)).join('')
|
|
323
326
|
+ '<div class="ev-add"><label class="ev-vh" for="evRoot">Folder path of a repository</label><input id="evRoot" class="ev-inp" placeholder="Folder path of a repository"><button type="button" class="ev-btn pri" data-ev-add>Add</button></div>'
|
|
324
327
|
+ trow('Workflows', 'The stages each kind of initiative goes through', subBtn('workflows'));
|
|
325
328
|
}
|
|
326
329
|
function updates() {
|
|
327
330
|
const s = home();
|
|
328
|
-
if (!s) return '<p class="
|
|
331
|
+
if (!s) return '<p class="pm-meta">Reading the versions.</p>';
|
|
329
332
|
const app = (s.app && s.app.version) || '?', L = latest();
|
|
330
333
|
const mood = T.phase === 'busy' || T.checking ? 'thinking' : ready() ? 'needs-you' : L ? 'handled' : '';
|
|
331
|
-
const head = T.checking && T.phase !== 'busy' ? '<b>Checking for a new kit…</b><p class="
|
|
332
|
-
: ready() ? `<b>PMOS ${esc(L)} is ready</b><p class="
|
|
333
|
-
: L ? `<b>PMOS ${esc(app)} is up to date</b><p class="
|
|
334
|
-
: `<b>PMOS ${esc(app)}</b><p class="
|
|
334
|
+
const head = T.checking && T.phase !== 'busy' ? '<b>Checking for a new kit…</b><p class="pm-meta" role="status" aria-live="polite">Asking for the latest version.</p>' : T.phase === 'busy' ? `<b>Updating to ${esc(L)}</b><p class="pm-meta" role="status" aria-live="polite">${esc(T.say || 'Working.')}</p>`
|
|
335
|
+
: ready() ? `<b>PMOS ${esc(L)} is ready</b><p class="pm-meta">You have ${esc(app)}.${appBehind() ? ' PMOS stops for about a minute while it installs. Open terminals keep running.' : ''}</p>`
|
|
336
|
+
: L ? `<b>PMOS ${esc(app)} is up to date</b><p class="pm-meta">${fromGit() && s.appBehind ? esc(L) + ' is published. This PMOS runs from a checkout: update it with git pull.' : 'The newest published kit is ' + esc(L) + '.'}</p>`
|
|
337
|
+
: `<b>PMOS ${esc(app)}</b><p class="pm-meta">Press Check now to ask for the latest version.</p>`;
|
|
335
338
|
const acts = T.phase === 'busy' ? '' : `<button type="button" class="ev-btn sm" data-ev-upd="check"${T.busy ? ' disabled' : ''}>Check now</button>${ready() ? `<button type="button" class="ev-btn sm dark" data-ev-upd="update">${appBehind() ? 'Restart to update' : 'Update'}</button>` : ''}`;
|
|
336
|
-
const kits = (T.ws || []).filter((w) => !w.linked).map((w) => { const k = T.st[w.id], kit = k && k.kit; return trow(w.label || w.name || w.id, kit && kit.present ? 'kit ' + (kit.version || 'vendored by hand') : 'no kit in this workspace', k && k.kitBehind && L ? `<span class="
|
|
339
|
+
const kits = (T.ws || []).filter((w) => !w.linked).map((w) => { const k = T.st[w.id], kit = k && k.kit; return trow(w.label || w.name || w.id, kit && kit.present ? 'kit ' + (kit.version || 'vendored by hand') : 'no kit in this workspace', k && k.kitBehind && L ? `<span class="pm-badge blue">${esc(L)} ready</span>` : kit && kit.present && (k.lastCheck || k.latest) ? '<span class="pm-badge">Up to date</span>' : ''); }).join('');
|
|
337
340
|
const last = s.lastCheck ? 'Last checked ' + new Date(s.lastCheck.at).toLocaleString() + '. ' : '';
|
|
338
|
-
return `<div class="ev-card ev-upd first">${mood ? adFace(mood) : ''}<div class="ev-tx ev-grow">${head}</div>${acts}</div>${kits}<p class="
|
|
341
|
+
return `<div class="ev-card ev-upd first">${mood ? adFace(mood) : ''}<div class="ev-tx ev-grow">${head}</div>${acts}</div>${kits}<p class="pm-meta">${esc(last)}${s.checkDaily ? 'PMOS checks when you open Updates and once a day while a page is open; Check now asks again.' : 'PMOS checks only when you press Check now.'}</p>${weeks()}`;
|
|
339
342
|
}
|
|
340
343
|
/** Design E (UpE). A story line: a blue dot for New, an amber dot for Fixed, no dot for Improved; Claude's plain title, then the sentence. */
|
|
341
344
|
const SPARK = 'M12 3l1.8 5.2L19 10l-5.2 1.8L12 17l-1.8-5.2L5 10l5.2-1.8z';
|
|
@@ -357,7 +360,7 @@ function weekTop(w) {
|
|
|
357
360
|
const { kit, latest: top, earlier } = storiesOf(w), dots = w.groups.new.length || w.groups.fix.length;
|
|
358
361
|
const legend = dots ? '<div class="ev-leg" aria-hidden="true"><span><i class="ev-dot you"></i>New</span><span><i class="ev-dot risk"></i>Fixed</span><span>no dot: improved</span></div>' : '';
|
|
359
362
|
const kitRow = top.length ? `<div class="ev-rel"><div class="ev-rv"><b>${esc(kit)}</b>${kit === latest() ? '<span class="ev-small">latest</span>' : ''}</div><ul class="ev-sl">${top.map(story).join('')}</ul></div>` : '';
|
|
360
|
-
const more = earlier.length ? `<div class="ev-grp"><div class="ev-gh"><b>Earlier ${w.name === 'This week' ? 'this' : 'that'} week</b><span class="
|
|
363
|
+
const more = earlier.length ? `<div class="ev-grp"><div class="ev-gh"><b>Earlier ${w.name === 'This week' ? 'this' : 'that'} week</b><span class="pm-meta">${earlier.length}</span></div>${storyList(earlier, w.key)}</div>` : '';
|
|
361
364
|
return sumCard(w) + legend + kitRow + more;
|
|
362
365
|
}
|
|
363
366
|
/** An archived week: its newest kit's stories, then the rest with the highlights first. */
|
|
@@ -366,11 +369,11 @@ const archList = (x) => { const o = storiesOf(x); return [...o.latest, ...o.earl
|
|
|
366
369
|
function weeks() {
|
|
367
370
|
const s = home(), mine = s && s.app && !fromGit() ? s.app.version : null;
|
|
368
371
|
const W = weeksOf(changes(), Date.now(), mine);
|
|
369
|
-
if (!W.length) return '<p class="
|
|
372
|
+
if (!W.length) return '<p class="pm-meta">No kit summaries yet. Each kit published from now on carries one, and Check now reads the newest ones.</p>';
|
|
370
373
|
const [w, ...old] = W.slice(0, 13);
|
|
371
|
-
const head = `<div class="ev-wkh"><b>${esc(w.name)}</b><span class="
|
|
372
|
-
const rows = old.map((x) => { const on = T.wkOpen.has(x.key); return `<div class="ev-wkr"><button type="button" class="ev-wkt" data-ev-wk="${esc(x.key)}" aria-expanded="${on}"><b>${esc(x.name)}</b><span class="
|
|
373
|
-
const arc = old.length ? `<div class="ev-arc"><button type="button" class="ev-arcb" data-ev-arc aria-expanded="${T.arc}"><b>Archive</b><span class="
|
|
374
|
+
const head = `<div class="ev-wkh"><b>${esc(w.name)}</b><span class="pm-meta">${esc([w.range, changesOf(w)].filter(Boolean).join(' · '))}</span>${w.newer ? '<span class="pm-badge blue">Ready to install</span>' : ''}</div>`;
|
|
375
|
+
const rows = old.map((x) => { const on = T.wkOpen.has(x.key); return `<div class="ev-wkr"><button type="button" class="ev-wkt" data-ev-wk="${esc(x.key)}" aria-expanded="${on}"><b>${esc(x.name)}</b><span class="pm-meta">${esc(x.range)}</span><span class="pm-meta ev-tl">${esc(changesOf(x))}</span>${svg(ICON.down, 14)}</button>${on ? sumCard(x) + storyList(archList(x), x.key) : ''}</div>`; }).join('');
|
|
376
|
+
const arc = old.length ? `<div class="ev-arc"><button type="button" class="ev-arcb" data-ev-arc aria-expanded="${T.arc}"><b>Archive</b><span class="pm-meta">${old.length} earlier ${old.length === 1 ? 'week' : 'weeks'}</span>${svg(ICON.down, 14)}</button>${T.arc ? rows : ''}</div>` : '';
|
|
374
377
|
return `<div class="ev-wk">${head}${weekTop(w)}${arc}</div>`;
|
|
375
378
|
}
|
|
376
379
|
/* Settings › Claude › How Claude decides (AwG): one row per kind of change Claude made by itself, with what it made and you kept and the way
|
|
@@ -387,17 +390,25 @@ const ALWAYS = [['Start a new request', 'PMOS recommends. You decide.'], ['Say i
|
|
|
387
390
|
['Move what the team reads', 'Stages and dates in Jira or on the Board.'], ['Merge, delete or spend', '']];
|
|
388
391
|
function lessonRow(l) {
|
|
389
392
|
const [wrong, ...rest] = String(l.text || '').split(/\n+/); // a lesson's first line says what went wrong, the rest what changed
|
|
390
|
-
return `<div class="
|
|
393
|
+
return `<div class="pm-li"><span class="txt"><span class="t">${esc(wrong)}</span>${rest.length ? `<span class="w">${esc(rest.join(' '))}</span>` : ''}</span><span class="pm-meta">${esc([dayOf(l.at), l.product].filter(Boolean).join(' · '))}</span></div>`;
|
|
391
394
|
}
|
|
395
|
+
const NO_KEY = 'pmos.settings.no';
|
|
396
|
+
const noSet = () => { try { return new Set(JSON.parse(store.get(NO_KEY) || '[]')); } catch { return new Set(); } };
|
|
392
397
|
function decidesSec() {
|
|
393
398
|
const K = T.ck;
|
|
394
|
-
const kinds = !K ? '<p class="
|
|
395
|
-
: !K.kinds.length ? '<p class="
|
|
396
|
-
: K.kinds.map((k) => trow(k.label, kindSub(k, K.showUntil || 3), seg(k.label, 'claude.way:' + k.kind, k.way, WAY))).join('');
|
|
399
|
+
const kinds = !K ? '<p class="pm-meta">Reading what PMOS did by itself.</p>' : K.ok === false ? `<p class="pm-meta">What PMOS did could not be read: ${esc(K.error || 'the server did not answer')}.</p>`
|
|
400
|
+
: !K.kinds.length ? '<p class="pm-meta">PMOS has not changed anything by itself yet. Each kind of change shows here once it has.</p>'
|
|
401
|
+
: K.kinds.map((k) => trow(k.label, SD.kindMeta(k) + ' · ' + kindSub({ ...k, made: 0 }, K.showUntil || 3), seg(k.label, 'claude.way:' + k.kind, k.way, WAY))).join('');
|
|
397
402
|
const L = T.ls && T.ls.ok ? T.ls.lessons || [] : [];
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
+
|
|
403
|
+
const sug = K && K.ok !== false && K.kinds ? SD.sugHtml(SD.sugOf(K.kinds, noSet())) : '';
|
|
404
|
+
const lessons = L.length ? `<section class="pm-block list" aria-label="Lessons"><div class="head"><h3 class="pm-h-sm">Lessons</h3><span class="pm-meta">${L.length > 8 ? 8 : L.length}</span></div>`
|
|
405
|
+
+ `<p class="pm-meta ev-lead">When you undo or edit what PMOS did, it writes a lesson and uses it next time.</p>`
|
|
406
|
+
+ (T.lsOpen ? `<div class="rows">${L.slice(0, 8).map(lessonRow).join('')}</div>` : '')
|
|
407
|
+
+ `<button type="button" class="pm-fold" data-ev-lsfold aria-expanded="${T.lsOpen}">${T.lsOpen ? 'Hide the lessons' : `See the ${L.length > 8 ? 8 : L.length} ${L.length === 1 ? 'lesson' : 'lessons'}`}</button></section>` : '';
|
|
408
|
+
return sug
|
|
409
|
+
+ `<section class="pm-block" aria-label="Changes PMOS makes"><div class="head"><h3 class="pm-h">Changes PMOS makes by itself</h3></div><p class="pm-meta ev-lead">For each kind, how many PMOS made and how many you kept. Quietly: it does it and you can Undo. Show me: it does it and tells you. Ask first: it waits for your yes. Two Undos on a kind and it asks first for 7 days.</p>${kinds}</section>`
|
|
410
|
+
+ `<section class="pm-block" aria-label="Always yours"><div class="head"><h3 class="pm-h">Always yours</h3></div><p class="pm-meta ev-lead">PMOS never does these alone, whatever you set above.</p>${ALWAYS.map(([b, p]) => trow(b, p, '<span class="pm-badge">Always asks</span>')).join('')}</section>`
|
|
411
|
+
+ lessons;
|
|
401
412
|
}
|
|
402
413
|
/** A press on a kind's way: the PM's way is kept, unless it is the automatic one (then the kind follows the automatic way again). */
|
|
403
414
|
async function saveWay(kind, v) {
|
|
@@ -412,9 +423,9 @@ async function saveWay(kind, v) {
|
|
|
412
423
|
}
|
|
413
424
|
/* Settings > Claude: which Claude profile PMOS starts Claude sessions with, and the API key for Claude's own runs (D101).
|
|
414
425
|
* The key is typed here and goes to this computer only; the page never gets it back, only whether one is set and where from. */
|
|
415
|
-
function
|
|
426
|
+
function accountSec() {
|
|
416
427
|
const C = T.cl;
|
|
417
|
-
if (!C) return '<p class="
|
|
428
|
+
if (!C) return '<p class="pm-meta">Reading the profiles and the key.</p>';
|
|
418
429
|
const ps = C.profiles || [], pref = (C.prefs && C.prefs.claude) || '';
|
|
419
430
|
const opts = `<option value=""${pref ? '' : ' selected'}>No profile</option>` + ps.map((x) => `<option value="${esc(x.id)}"${x.id === pref ? ' selected' : ''}>${esc(x.label || x.id)}${x.account ? ' · ' + esc(x.account) : ''}</option>`).join('');
|
|
420
431
|
const gone = pref && !ps.some((x) => x.id === pref);
|
|
@@ -422,12 +433,10 @@ function claudeSec() {
|
|
|
422
433
|
const k = C.key || {};
|
|
423
434
|
const keySub = k.present ? (k.source === 'environment' ? 'Set in ANTHROPIC_API_KEY. A key saved here is used first.' : 'Saved on this computer only. PMOS never shows it again.') : 'Not set. PMOS\u2019s own runs, such as Grill, use a Claude session instead.';
|
|
424
435
|
const keyRight = `<span class="ev-dr-pl"><label class="ev-vh" for="evKey">Anthropic API key</label><input id="evKey" class="ev-inp" type="password" autocomplete="off" spellcheck="false" placeholder="${k.present ? 'Replace the key' : 'sk-ant-\u2026'}" data-ev-key><button type="button" class="ev-btn sm pri" data-ev-keysave>Save</button>${k.source === 'settings' ? '<button type="button" class="ev-btn sm" data-ev-keyclear>Remove</button>' : ''}</span>`;
|
|
425
|
-
return
|
|
436
|
+
return '<h4 class="pm-h-sm">Claude login and profile</h4><div data-claude-setup></div>'
|
|
426
437
|
+ trow('API key', keySub, keyRight)
|
|
427
|
-
+ (k.present && C.off ? trow('Runs on the API', 'Off: PMOS_GRILL_API is off in the environment.', '<span class="
|
|
428
|
-
+ sharpenRows()
|
|
429
|
-
+ '<h4 id="evChecks">Checks</h4>' + checksSec() // U4: the section Claude’s checks folded in here
|
|
430
|
-
+ '<h4 id="evProtoRules">Prototype rules</h4>' + protoRulesSec();
|
|
438
|
+
+ (k.present && C.off ? trow('Runs on the API', 'Off: PMOS_GRILL_API is off in the environment.', '<span class="pm-badge">Off</span>') : '')
|
|
439
|
+
+ sharpenRows();
|
|
431
440
|
}
|
|
432
441
|
/* Settings › PMOS › Prototype rules (initiative prototype-rules, design "Prototypes right on the first try", board FtB): each correction of
|
|
433
442
|
* the PM's that is true of every prototype, as a check PMOS runs on each version before it opens (lib/prototype-rules.js). Each row is the
|
|
@@ -435,13 +444,13 @@ function claudeSec() {
|
|
|
435
444
|
* with Bring back, and PMOS does not add it again unless the PM says it again. GET and POST /api/lab/rules. */
|
|
436
445
|
function protoRulesSec() {
|
|
437
446
|
const R = T.pru;
|
|
438
|
-
if (!R) return '<p class="
|
|
439
|
-
if (R.ok === false) return `<p class="
|
|
447
|
+
if (!R) return '<p class="pm-meta">Reading your prototype rules.</p>';
|
|
448
|
+
if (R.ok === false) return `<p class="pm-meta">Your prototype rules could not be read: ${esc(R.error || 'the server did not answer')}.</p>`;
|
|
440
449
|
const on = R.rules.filter((r) => r.on), off = R.rules.filter((r) => !r.on);
|
|
441
450
|
const sub = (r) => [r.words ? '“' + r.words + '”' : '', dayOf(r.at)].filter(Boolean).join(' · ');
|
|
442
|
-
return '<p class="
|
|
451
|
+
return '<p class="pm-meta ev-lead">PMOS checks every prototype version against these before you see it, and fixes it once when one fails. Each comes from your own words in the chat.</p>'
|
|
443
452
|
+ (on.length ? on.map((r) => trow(r.title, sub(r), `<button type="button" class="ev-btn sm" data-ev-pru="undo" data-ev-pru-id="${esc(r.id)}" aria-label="${esc('Undo the rule ' + r.title)}">Undo</button>`)).join('')
|
|
444
|
-
: '<p class="
|
|
453
|
+
: '<p class="pm-meta">No rules now. Each correction you make that is true of every prototype shows here.</p>')
|
|
445
454
|
+ off.map((r) => trow(r.title, 'You undid it' + (r.undoneAt ? ' on ' + dayOf(r.undoneAt) : '') + '. PMOS adds it again only when you say it again.', `<button type="button" class="ev-btn sm" data-ev-pru="restore" data-ev-pru-id="${esc(r.id)}" aria-label="${esc('Bring back the rule ' + r.title)}">Bring back</button>`)).join('');
|
|
446
455
|
}
|
|
447
456
|
async function saveProtoRule(op, id) {
|
|
@@ -463,11 +472,11 @@ function sharpenRows() {
|
|
|
463
472
|
const shSub = !on ? (down && down.auth ? 'Off for now: your API key was refused. Replace it under API key above.' : 'Off. No spinner and no Sharper card.')
|
|
464
473
|
: 'When you pause on a rough prompt, PMOS writes a sharper version above the box. It runs in your Claude session and takes a few seconds.';
|
|
465
474
|
const styleSub = style === 'polish' ? 'Clearer and shorter, your meaning kept.' : style === 'own' ? (rules.trim() ? 'Your rules below.' : 'Write your rules below first.') : 'Builds the best prompt for the job.';
|
|
466
|
-
return '<h4>Sharpen prompts</h4>'
|
|
475
|
+
return '<h4 class="pm-h-sm">Sharpen prompts</h4>'
|
|
467
476
|
+ trow('Suggest the next prompt', 'After a reply, up to two prompts above the box. A tap puts one in the box. Nothing sends.', sw(next, 'data-ev-np="prompt.next"', 'Suggest the next prompt'))
|
|
468
477
|
+ trow('Sharpen as I type', shSub, sw(on, 'data-ev-np="prompt.sharpen"', 'Sharpen as I type'))
|
|
469
478
|
+ trow('Sharpen as', styleSub, seg('Sharpen as', 'prompt.style', style, [['polish', 'Polish'], ['engineer', 'Prompt engineer'], ['own', 'Your own']]))
|
|
470
|
-
+ `<div class="ev-trow"><div class="ev-tx"><label for="evRules"><b>Your own rules</b></label><p class="
|
|
479
|
+
+ `<div class="ev-trow"><div class="ev-tx"><label for="evRules"><b>Your own rules</b></label><p class="pm-meta">For Your own. For example: short, always name the initiative, ask for sources.</p>`
|
|
471
480
|
+ `<textarea id="evRules" class="ev-inp ev-rules" rows="3" maxlength="1000" spellcheck="true">${esc(rules)}</textarea></div><button type="button" class="ev-btn sm pri" data-ev-rulesave>Save</button></div>`;
|
|
472
481
|
}
|
|
473
482
|
async function savePrompt(key, value, said) {
|
|
@@ -484,31 +493,32 @@ const CAPS = [5, 10, 20, 50];
|
|
|
484
493
|
const usd = (n) => '$' + (Math.round(Number(n) * 100) % 100 ? Number(n).toFixed(2) : String(Math.round(Number(n))));
|
|
485
494
|
function checksSec() {
|
|
486
495
|
const C = T.gr;
|
|
487
|
-
if (!C) return '<p class="
|
|
488
|
-
if (C.ok === false) return `<p class="
|
|
496
|
+
if (!C) return '<p class="pm-meta">Reading PMOS’s checks.</p>';
|
|
497
|
+
if (C.ok === false) return `<p class="pm-meta">PMOS’s checks could not be read: ${esc(C.error || 'the server did not answer')}.</p>`;
|
|
489
498
|
const caps = [...new Set(CAPS.concat(Number.isFinite(C.cap) ? [C.cap] : []))].sort((a, b) => a - b);
|
|
490
499
|
const modeSub = C.envOff ? 'Off: PMOS_GRILL is off in the environment.' : 'Before an initiative leaves a stage, when a forecast turns, when scope or dates move a lot, and once a month on running work that feels off. Findings wait under ✦.';
|
|
491
500
|
const used = Number.isFinite(C.cap) && C.cap > 0 ? Math.min(100, Math.round((C.spent / C.cap) * 100)) : 0;
|
|
492
|
-
return trow('Grill by itself', modeSub, C.envOff ? '<span class="
|
|
501
|
+
return trow('Grill by itself', modeSub, C.envOff ? '<span class="pm-badge">Off</span>' : seg('Grill by itself', 'grill.mode', C.mode, [['full', 'Full'], ['exits', 'Only at stage exits'], ['off', 'Off']]))
|
|
493
502
|
+ trow('Monthly credit for checks', C.paused ? 'Paused at the limit this month. PMOS starts again next month, or when you raise it.' : 'At the limit PMOS pauses and says so once. It never charges beyond it.', seg('Monthly credit for checks', 'grill.cap', C.cap, caps.map((v) => [v, usd(v)])))
|
|
494
|
-
+ `<div class="ev-trow ev-gcap"><span class="ev-small"><b>${esc(usd(C.spent))}</b> of ${esc(usd(C.cap))} used this month</span><
|
|
503
|
+
+ `<div class="ev-trow ev-gcap"><span class="ev-small"><b>${esc(usd(C.spent))}</b> of ${esc(usd(C.cap))} used this month</span><svg class="ev-gbar" viewBox="0 0 100 6" preserveAspectRatio="none" role="img" aria-label="${used}% of the monthly credit used"><rect class="bg" width="100" height="6" rx="3"/><rect class="fg" width="${used}" height="6" rx="3"/></svg></div>`;
|
|
495
504
|
}
|
|
496
|
-
const BODY = { general, claude:
|
|
505
|
+
const BODY = { general, claude: decidesSec, checks: checksSec, rules: protoRulesSec, connectors, account: accountSec, workspaces, updates };
|
|
497
506
|
// the old section names (deep links, other pages' calls): where their controls are now (U4)
|
|
498
|
-
const MOVED = { scheduled: ['connectors', 'sw:list'],
|
|
507
|
+
const MOVED = { scheduled: ['connectors', 'sw:list'], adler: ['general', 'adler'], jl: ['general', 'jl'], dress: ['general', 'adler'], workflows: ['workspaces', 'workflows'] };
|
|
499
508
|
let disposeClaudeSetup = null;
|
|
500
509
|
function draw() {
|
|
501
510
|
const el = T.el; if (!el || el.hidden) return;
|
|
502
511
|
// a redraw replaces the nodes: keep focus on the same control (by its data-ev-* key), else on the open section, never on the body
|
|
503
512
|
const ae = document.activeElement, had = ae && el.contains(ae), key = had ? [...ae.attributes].find((a) => a.name.startsWith('data-ev-')) : null;
|
|
504
|
-
const n = { workspaces: T.ws ? T.ws.filter((x) => !x.linked).length : '', updates: ready() ?
|
|
513
|
+
const n = { workspaces: T.ws ? T.ws.filter((x) => !x.linked).length : '', updates: ready() ? 1 : '' };
|
|
505
514
|
const stale = T.fresh && T.fresh.ok ? bannerOf(T.fresh.sources) : null;
|
|
506
|
-
|
|
515
|
+
// the section tabs (SettingsDS): the path above says Settings once, so the column has no heading of its own
|
|
516
|
+
el.querySelector('.ev-st-nav').innerHTML = SECTIONS.map(([k, l]) => `<a href="#${k}" class="ev-mi pm-tab" data-ev-sec="${k}"${T.sec === k ? ' aria-current="page"' : ''}>${esc(l)}${k === 'connectors' && stale ? '<i class="ev-dot risk" aria-label="A source needs you" role="img"></i>' : ''}${n[k] !== undefined && n[k] !== '' ? `<span class="ev-k pm-meta">${n[k]}</span>` : ''}</a>`).join('');
|
|
507
517
|
const label = (SECTIONS.find((x) => x[0] === T.sec) || SECTIONS[0])[1];
|
|
508
|
-
const all = T.sec === 'connectors' ? `<button type="button" class="ev-ib" data-ev-info aria-expanded="${!!T.info}" aria-controls="evConInfo" aria-label="What PMOS reads and what it never does" title="What PMOS reads and what it never does">${svg(INFO_I, 18)}</button>`
|
|
509
|
-
+ `<button type="button" class="ev-ib" data-ev-readall aria-label="Read every source again" title="Read all again"${T.reading ? ' disabled' : ''}>${svg(RD, 18)}</button>` : '';
|
|
518
|
+
const all = T.sec === 'connectors' ? `<button type="button" class="ev-ib pm-btn" data-ev-info aria-expanded="${!!T.info}" aria-controls="evConInfo" aria-label="What PMOS reads and what it never does" title="What PMOS reads and what it never does">${svg(INFO_I, 18)}</button>`
|
|
519
|
+
+ `<button type="button" class="ev-ib pm-btn" data-ev-readall aria-label="Read every source again" title="Read all again"${T.reading ? ' disabled' : ''}>${svg(RD, 18)}</button>` : '';
|
|
510
520
|
// the amber box sits on top of the other sections only: on Connectors the trouble row says it (say it once, CnA)
|
|
511
|
-
el.querySelector('.ev-st-main').innerHTML = (T.sec === 'connectors' ? '' : staleHtml()) + `<div class="ev-top"><
|
|
521
|
+
el.querySelector('.ev-st-main').innerHTML = (T.sec === 'connectors' ? '' : staleHtml()) + `<div class="ev-top pm-row"><nav class="pm-path" aria-label="Path"><b>Settings</b><span aria-hidden="true">›</span><b id="evStTitle">${esc(label)}</b></nav><span class="ev-grow"></span>${all}<button type="button" class="pm-btn" data-ev-close aria-label="Close settings" title="Close settings">${svg(ICON.close, 18)}</button></div>`
|
|
512
522
|
+ BODY[T.sec]() + `<p role="status"${T.msg && AD.moodOfText(T.msg) === 'honest' ? ' class="ev-say honest"' : ''}>${T.msg && AD.moodOfText(T.msg) === 'honest' ? AD.adler('honest', 24, { label: false }) : ''}${esc(T.msg)}</p>`;
|
|
513
523
|
cardRows(el.querySelector('.ev-st-main')); el.querySelectorAll('.ev-st-main .sc-w').forEach(cardRows);
|
|
514
524
|
if (disposeClaudeSetup) { disposeClaudeSetup(); disposeClaudeSetup = null; }
|
|
@@ -522,7 +532,7 @@ function draw() {
|
|
|
522
532
|
function cardRows(root) {
|
|
523
533
|
if (!root) return;
|
|
524
534
|
let run = [];
|
|
525
|
-
const flush = () => { if (run.length) { const c = document.createElement('div'); c.className = 'ev-tcard'; run[0].before(c); run.forEach((r) => c.appendChild(r)); run = []; } };
|
|
535
|
+
const flush = () => { if (run.length) { const c = document.createElement('div'); c.className = 'ev-tcard pm-block'; run[0].before(c); run.forEach((r) => c.appendChild(r)); run = []; } };
|
|
526
536
|
[...root.children].forEach((k) => { if (k.classList.contains('ev-trow')) run.push(k); else flush(); });
|
|
527
537
|
flush();
|
|
528
538
|
}
|
|
@@ -546,10 +556,12 @@ function vwFirst() {
|
|
|
546
556
|
function mount() {
|
|
547
557
|
if (T.el && T.el.isConnected) return T.el;
|
|
548
558
|
const d = document.createElement('div');
|
|
549
|
-
d.innerHTML = '<div class="ev-st-scrim" id="evStScrim" hidden></div><div class="ev-st" id="evSettings" role="dialog" aria-modal="true" aria-label="Settings" hidden><nav class="ev-st-nav" aria-label="Settings sections"></nav><div class="ev-st-main"></div></div>';
|
|
559
|
+
d.innerHTML = '<div class="ev-st-scrim" id="evStScrim" hidden></div><div class="ev-st pm-ds" id="evSettings" role="dialog" aria-modal="true" aria-label="Settings" hidden><nav class="ev-st-nav" aria-label="Settings sections"></nav><div class="ev-st-main"></div></div>';
|
|
550
560
|
// first in the body: while Workflows shows, the Viewer's host inside the dialog is the first data-cz-viewer-host (pm/cozy-viewer.js place)
|
|
551
561
|
document.body.prepend(...d.childNodes);
|
|
552
562
|
T.el = document.getElementById('evSettings');
|
|
563
|
+
const K = new URL('./komorebi.css', import.meta.url).href; // the system's parts inside (scope .pm-ds)
|
|
564
|
+
if (!document.querySelector(`link[href="${K}"], link[href$="/komorebi.css"]`)) { const l = document.createElement('link'); l.rel = 'stylesheet'; l.href = K; document.head.appendChild(l); }
|
|
553
565
|
document.getElementById('evStScrim').addEventListener('click', closeSettings);
|
|
554
566
|
T.el.addEventListener('keydown', (e) => {
|
|
555
567
|
if (e.target.closest('.cs-term')) return;
|
|
@@ -591,6 +603,14 @@ async function press(e) {
|
|
|
591
603
|
if (t.dataset.evPok || t.dataset.evPno) { if (T.busy) return; T.busy = true; try { await decideProp(t.dataset.evPok || t.dataset.evPno, !!t.dataset.evPok); } finally { T.busy = false; } return; }
|
|
592
604
|
if (t.dataset.evSec) { e.preventDefault(); const m = MOVED[t.dataset.evSec]; T.sec = m ? m[0] : t.dataset.evSec; T.sub = m ? m[1] : ''; T.msg = ''; T.dress = false; draw(); const f = T.el.querySelector(`[data-ev-sec="${T.sec}"]`); if (f) f.focus(); openCheck(); return; }
|
|
593
605
|
if ('evClose' in t.dataset) { closeSettings(); return; }
|
|
606
|
+
if ('evLsfold' in t.dataset) { T.lsOpen = !T.lsOpen; draw(); return; }
|
|
607
|
+
if (t.dataset.evSug) { // the Suggestion on How PMOS decides: ✓ sets the kind's way, ✕ hides it here, the pencil goes to the kind's own Tabs
|
|
608
|
+
const kind = t.dataset.kind, to = t.dataset.to;
|
|
609
|
+
if (t.dataset.evSug === 'yes') { await saveWay(kind, to); return; }
|
|
610
|
+
if (t.dataset.evSug === 'no') { const no = noSet(); no.add(kind + ':' + to); store.set(NO_KEY, JSON.stringify([...no])); T.msg = 'Not now. PMOS keeps it as it is.'; draw(); return; }
|
|
611
|
+
const f = T.el.querySelector(`[data-ev-seg="claude.way:${CSS.escape(kind)}"][data-v="${CSS.escape(to)}"]`); if (f) { f.scrollIntoView({ block: 'center' }); f.focus(); }
|
|
612
|
+
return;
|
|
613
|
+
}
|
|
594
614
|
if (await relayClick(e, RL, draw, toast)) return;
|
|
595
615
|
if (await extClick(e, XT, draw, toast)) return;
|
|
596
616
|
if (t.dataset.evWk) { const k = t.dataset.evWk; if (T.wkOpen.has(k)) T.wkOpen.delete(k); else T.wkOpen.add(k); draw(); return; }
|
|
@@ -767,7 +787,6 @@ export function openSettings(section, o = {}) {
|
|
|
767
787
|
el.hidden = false; document.getElementById('evStScrim').hidden = false; el.setAttribute('data-esc-layer', '');
|
|
768
788
|
draw();
|
|
769
789
|
const f = el.querySelector('[aria-current="page"]'); if (f) f.focus();
|
|
770
|
-
if (section === 'checks' || section === 'rules') { const h = el.querySelector(section === 'rules' ? '#evProtoRules' : '#evChecks'); if (h && h.scrollIntoView) h.scrollIntoView({ block: 'start' }); }
|
|
771
790
|
load();
|
|
772
791
|
return el;
|
|
773
792
|
}
|
|
@@ -108,7 +108,7 @@ export function nextPromptUi({ el, host, box, redrawFoot }) {
|
|
|
108
108
|
if ('npMenu' in b.dataset) { N.menu = !N.menu; draw(); if (N.menu) { const f = wrap.querySelector('.np-mi'); if (f) f.focus(); } return true; }
|
|
109
109
|
if (b.dataset.npVoice) {
|
|
110
110
|
const k = b.dataset.npVoice;
|
|
111
|
-
if (k === 'own' && !(N.prefs && N.prefs.rules)) { N.menu = false; draw(); import('./cozy-settings.js').then((M) => M.openSettings('
|
|
111
|
+
if (k === 'own' && !(N.prefs && N.prefs.rules)) { N.menu = false; draw(); import('./cozy-settings.js').then((M) => M.openSettings('account')).catch(() => {}); return true; }
|
|
112
112
|
N.menu = false; save('style', k).then(() => { const ta = box(); if (ta && roughText(ta.value)) sharpen(ta.value); });
|
|
113
113
|
return true;
|
|
114
114
|
}
|