@galda/cli 0.10.119 → 0.10.120
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/app/index.html +190 -2
- package/package.json +1 -1
package/app/index.html
CHANGED
|
@@ -674,6 +674,18 @@
|
|
|
674
674
|
.peratab.on{color:var(--ink);border-color:var(--ink3);background:rgba(var(--tint),.06)}
|
|
675
675
|
.peraask{display:flex;gap:8px;align-items:center;padding:10px 16px 6px}
|
|
676
676
|
.peraask input{flex:1;background:var(--glass);border:1px solid var(--hair2);border-radius:10px;color:var(--ink);font-size:12.5px;padding:8px 12px;outline:none}
|
|
677
|
+
/* First-run nudge + the npx answer. Deliberately not a painted panel or a
|
|
678
|
+
boxed card: a box reads as "tappable" (DESIGN-RULES §5.6). This is a line
|
|
679
|
+
of text and a stroke pointing into the input it is about. */
|
|
680
|
+
.cnudge{display:none;align-items:center;justify-content:center;gap:10px;margin:14px auto 0;opacity:0;transform:translateY(-3px);
|
|
681
|
+
transition:opacity .28s ease,transform .28s ease}
|
|
682
|
+
.cnudge.show{display:flex;opacity:1;transform:none}
|
|
683
|
+
.cnudge-t{font-size:12.5px;line-height:1.5;color:var(--ink2)}
|
|
684
|
+
.cnudge-a{width:12px;height:20px;flex:0 0 auto;border-left:1.5px solid var(--ink3);border-bottom:1.5px solid var(--ink3);
|
|
685
|
+
border-bottom-left-radius:7px;position:relative;opacity:.85}
|
|
686
|
+
.cnudge-a:after{content:'';position:absolute;right:-1px;bottom:-4px;width:6px;height:6px;
|
|
687
|
+
border-right:1.5px solid var(--ink3);border-bottom:1.5px solid var(--ink3);transform:rotate(-45deg)}
|
|
688
|
+
padding:10px 12px;font-family:var(--mono);font-size:12.5px;color:var(--ink);overflow-x:auto;white-space:nowrap}
|
|
677
689
|
.peraanswer{margin:0 16px 8px;font-size:12.5px;line-height:1.55;color:var(--ink2);white-space:pre-wrap;background:rgba(var(--tint),.03);border:1px solid var(--hair2);border-radius:10px;padding:10px 12px}
|
|
678
690
|
.peraanswer.loading{color:var(--ink3);font-style:italic}
|
|
679
691
|
.peraanswer.error{color:var(--danger)}
|
|
@@ -3283,6 +3295,13 @@
|
|
|
3283
3295
|
<div class="nowdoing" id="fsNowDoing" hidden></div>
|
|
3284
3296
|
<!-- Clawd HERO (§4.5 初期状態): filled by JS (CLAWD generator), shown via #fsRoot.clawdhero -->
|
|
3285
3297
|
<div id="fsClawdHero" aria-hidden="true"></div>
|
|
3298
|
+
<!-- Under the waiting hero, pointing down at the box a new person is meant
|
|
3299
|
+
to use. "CONNECTED / WAITING FOR GOALS" says our state; this says
|
|
3300
|
+
theirs. Shown only while the board has nothing on it. -->
|
|
3301
|
+
<div class="cnudge" id="composerNudge">
|
|
3302
|
+
<span class="cnudge-t">Type what you want done, down there.</span>
|
|
3303
|
+
<span class="cnudge-a" aria-hidden="true"></span>
|
|
3304
|
+
</div>
|
|
3286
3305
|
<!-- H23 mobile empty-state hero (flagship .m-hero) — chips fill the composer (#input) -->
|
|
3287
3306
|
<div class="m-hero"><h2>What should we build?</h2><p>Describe a goal in plain language. Claude Code runs it, checks its own work, and only calls it done with proof.</p><div class="m-chips"><button class="m-chip">Fix the failing test in lib.mjs</button><button class="m-chip">Add a token-usage counter</button><button class="m-chip">Summarize the open PRs</button></div></div>
|
|
3288
3307
|
<div class="fsstream"><div id="fsFeed"></div></div>
|
|
@@ -3474,6 +3493,20 @@
|
|
|
3474
3493
|
<div class="segbtn" id="langSeg"><button data-lang="auto">Auto</button><button data-lang="en">English</button><button data-lang="ja">日本語</button></div></div>
|
|
3475
3494
|
</div>
|
|
3476
3495
|
</div></div>
|
|
3496
|
+
<!-- "What is Galda? / What can it access?" — the orientation panel.
|
|
3497
|
+
WHY IT EXISTS: the first engineer we handed Galda to reached for the gear
|
|
3498
|
+
button before typing anything. He was not lost, he was CHECKING: people
|
|
3499
|
+
want to know what a tool can touch before they hand it a repository. This
|
|
3500
|
+
answers that where they already are, instead of sending them to a website.
|
|
3501
|
+
Rendered from a constant, entirely locally: NO agent run, NO tokens, no
|
|
3502
|
+
network. Spending someone's quota and 40 seconds to produce a text answer
|
|
3503
|
+
they could have read instantly would be a bad trade, and it would teach
|
|
3504
|
+
the wrong idea of what Galda is (it is not a chatbot).
|
|
3505
|
+
Same overlay/modal parts as Settings above — no new component. -->
|
|
3506
|
+
<div class="overlay revfloat" id="aboutOverlay"><div class="modal" style="width:min(560px,94vw)">
|
|
3507
|
+
<div class="perahead" style="border-bottom:1px solid var(--hair)"><div class="peratitle" id="aboutTitle">What is Galda?</div><span style="flex:1"></span><button class="mbtn ghost" id="aboutClose">Close</button></div>
|
|
3508
|
+
<div style="padding:16px;max-height:min(70vh,620px);overflow:auto" id="aboutBody"></div>
|
|
3509
|
+
</div></div>
|
|
3477
3510
|
<!-- Slack-style centered delete confirmation, replacing native confirm() for every goal
|
|
3478
3511
|
delete (restores a lost decision — see docs/confirmed-behaviors.md). Reusable via the
|
|
3479
3512
|
confirmDelete({title,preview}) -> Promise<boolean> helper. -->
|
|
@@ -6782,6 +6815,7 @@ $('gdRevisionInput').addEventListener('keydown', (e) => {
|
|
|
6782
6815
|
});
|
|
6783
6816
|
|
|
6784
6817
|
function render(){
|
|
6818
|
+
renderComposerNudge();
|
|
6785
6819
|
renderProjects(); renderStream(); renderQueue(); renderTasks(); renderActPanel(); wireWfEditButtons();
|
|
6786
6820
|
renderCtxBar(); // the folder above the composer follows the active project
|
|
6787
6821
|
renderFlagship();
|
|
@@ -9127,7 +9161,8 @@ function bootDisconnected(info){
|
|
|
9127
9161
|
background:rgba(4,4,6,.72);-webkit-backdrop-filter:blur(7px);backdrop-filter:blur(7px)}
|
|
9128
9162
|
#connectGate.on{display:flex}
|
|
9129
9163
|
#connectGate .cg-card{position:relative;width:100%;max-width:440px;background:var(--panel,#0d0d0f);border:1px solid var(--hair2,rgba(255,255,255,.12));
|
|
9130
|
-
border-radius:18px;padding:
|
|
9164
|
+
border-radius:18px;padding:28px 26px;text-align:left;box-shadow:0 30px 80px -30px #000;
|
|
9165
|
+
max-height:calc(100vh - 44px);overflow:auto}
|
|
9131
9166
|
#connectGate h2{font:700 20px/1.3 var(--ui,system-ui);letter-spacing:-.02em;margin:0 0 8px;color:var(--ink,#e9e7e2)}
|
|
9132
9167
|
#connectGate p{font-size:13.5px;line-height:1.7;color:var(--ink2,#a3a097);margin:0 0 18px}
|
|
9133
9168
|
#connectGate .cg-cmd{display:flex;align-items:center;justify-content:space-between;gap:12px;background:#0a0a0b;
|
|
@@ -9139,6 +9174,14 @@ function bootDisconnected(info){
|
|
|
9139
9174
|
#connectGate .cg-hint{font-size:12px;line-height:1.6;color:var(--ink3,#6b6862);margin:0 0 16px}
|
|
9140
9175
|
#connectGate .cg-hint a{color:var(--blue,#8fb0ff);text-decoration:none}
|
|
9141
9176
|
#connectGate .cg-hint a:hover{text-decoration:underline}
|
|
9177
|
+
#connectGate .cg-trust{margin:18px 0 0;padding:16px 0 0;border-top:1px solid var(--hair2,rgba(255,255,255,.10))}
|
|
9178
|
+
#connectGate .cg-blanket{font-size:12.5px;line-height:1.6;color:var(--ink,#e9e7e2);font-weight:600;margin:0}
|
|
9179
|
+
#connectGate .cg-acchead{font:500 10px/1 var(--mono,monospace);letter-spacing:.09em;text-transform:uppercase;color:var(--ink3,#6b6862);margin:16px 0 6px}
|
|
9180
|
+
#connectGate .cg-accrow{font-size:12px;line-height:1.45;color:var(--ink2,#a3a097);padding:0 0 0 12px;margin:0 0 6px;position:relative}
|
|
9181
|
+
#connectGate .cg-accrow:before{content:'';position:absolute;left:0;top:7px;width:4px;height:1px;background:var(--ink3,#6b6862);opacity:.7}
|
|
9182
|
+
#connectGate .cg-seclink{margin:14px 0 0;font-size:12px}
|
|
9183
|
+
#connectGate .cg-seclink a{color:var(--blue,#8fb0ff);text-decoration:none}
|
|
9184
|
+
#connectGate .cg-acct{margin:18px 0 0;padding:16px 0 0;border-top:1px solid var(--hair2,rgba(255,255,255,.10))}
|
|
9142
9185
|
#connectGate .cg-who{font-size:12px;color:var(--ink3,#6b6862);margin:0 0 4px}
|
|
9143
9186
|
#connectGate .cg-who b{color:var(--ink2,#a3a097)}
|
|
9144
9187
|
#connectGate .cg-switch{font-size:12px;color:var(--ink3,#6b6862);margin:14px 0 0;transition:color .2s}
|
|
@@ -9153,6 +9196,7 @@ function bootDisconnected(info){
|
|
|
9153
9196
|
#connectGate .cg-switch.escalated{color:var(--danger);font-weight:600}
|
|
9154
9197
|
#connectGate .cg-switch.escalated a{color:var(--danger);text-decoration:underline}
|
|
9155
9198
|
#connectGate .cg-x{position:absolute;top:14px;right:16px;width:28px;height:28px;border:0;background:transparent;color:var(--ink3,#6b6862);font-size:20px;line-height:1;cursor:pointer}
|
|
9199
|
+
#connectGate .cg-waitwrap{display:flex;justify-content:center}
|
|
9156
9200
|
#connectGate .cg-wait{display:inline-flex;align-items:center;gap:7px;font:500 10.5px/1 var(--mono,monospace);letter-spacing:.08em;color:var(--ink3,#6b6862);margin-top:16px}
|
|
9157
9201
|
#connectGate .cg-wait i{width:6px;height:6px;border-radius:50%;background:var(--green,#3DDC97);animation:cgpulse 1.8s ease-in-out infinite}
|
|
9158
9202
|
@keyframes cgpulse{0%,100%{box-shadow:0 0 0 0 color-mix(in srgb,var(--green,#3DDC97) 50%,transparent)}50%{box-shadow:0 0 6px 2px color-mix(in srgb,var(--green,#3DDC97) 35%,transparent)}}
|
|
@@ -9172,9 +9216,21 @@ function bootDisconnected(info){
|
|
|
9172
9216
|
+ '<a href="https://claude.com/claude-code" target="_blank" rel="noreferrer">Claude Code</a> or '
|
|
9173
9217
|
+ '<a href="https://openai.com/codex/" target="_blank" rel="noreferrer">Codex</a>, then run the same command '
|
|
9174
9218
|
+ '— Galda uses whichever agent you have.</p>'
|
|
9219
|
+
// The gate said what to run and never what it would do. "npx? what else is
|
|
9220
|
+
// it going to touch?" is the actual reason people stop here, so the answer
|
|
9221
|
+
// sits with the command. Facts only, in step with docs/SECURITY.md.
|
|
9222
|
+
+ '<div class="cg-trust">'
|
|
9223
|
+
+ '<p class="cg-blanket">No admin access, no background service, nothing that starts on its own. '
|
|
9224
|
+
+ 'Plain JavaScript you can read before you run it, and one folder you can delete.</p>'
|
|
9225
|
+
+ '<div class="cg-acchead">What it can access</div>'
|
|
9226
|
+
+ NPX_ONBOARDING.access.map(function(t){ return '<div class="cg-accrow">' + esc(t) + '</div>'; }).join('')
|
|
9227
|
+
+ '<p class="cg-seclink"><a href="https://galda.app/security" target="_blank" rel="noreferrer">Security and permissions \u2192</a></p>'
|
|
9228
|
+
+ '</div>'
|
|
9229
|
+
+ '<div class="cg-acct">'
|
|
9175
9230
|
+ '<p class="cg-who">Signed in as <b></b></p>'
|
|
9176
9231
|
+ '<p class="cg-switch">Already running Galda under a different account? Run <code>npx @galda/cli --signin</code> and pick this one. Or <a href="/logout">switch Google account →</a></p>'
|
|
9177
|
-
+ '
|
|
9232
|
+
+ '</div>'
|
|
9233
|
+
+ '<div class="cg-waitwrap"><div class="cg-wait"><i></i>WAITING FOR THIS DEVICE</div></div></div>';
|
|
9178
9234
|
document.body.appendChild(ov);
|
|
9179
9235
|
ov.querySelector('.cg-who b').textContent = email || 'your account';
|
|
9180
9236
|
const open = () => ov.classList.add('on');
|
|
@@ -11961,6 +12017,13 @@ $('histBtn').onclick = openHistory;
|
|
|
11961
12017
|
$('setBtn').onclick = openSettings;
|
|
11962
12018
|
$('histClose').onclick = () => $('historyOverlay').classList.remove('show');
|
|
11963
12019
|
$('setClose').onclick = () => $('settingsOverlay').classList.remove('show');
|
|
12020
|
+
// About panel: Close, tapping the backdrop, and Esc all dismiss it (DESIGN-RULES
|
|
12021
|
+
// §設定画面 — a dialog must close when you click somewhere unrelated).
|
|
12022
|
+
$('aboutClose').onclick = () => closeAbout();
|
|
12023
|
+
$('aboutOverlay').onclick = (e) => { if (e.target === $('aboutOverlay')) closeAbout(); };
|
|
12024
|
+
document.addEventListener('keydown', (e) => {
|
|
12025
|
+
if (e.key === 'Escape' && $('aboutOverlay')?.classList.contains('show')) { e.stopPropagation(); closeAbout(); }
|
|
12026
|
+
}, true);
|
|
11964
12027
|
$('historyOverlay').addEventListener('click', (e) => { if (e.target === $('historyOverlay')) $('historyOverlay').classList.remove('show'); });
|
|
11965
12028
|
$('settingsOverlay').addEventListener('click', (e) => { if (e.target === $('settingsOverlay')) $('settingsOverlay').classList.remove('show'); });
|
|
11966
12029
|
for (const b of $('langSeg').querySelectorAll('button')) b.onclick = () => saveLang(b.dataset.lang);
|
|
@@ -12777,11 +12840,133 @@ function gearSetHTML(){
|
|
|
12777
12840
|
<button class="optchip${lang === 'en' ? ' on' : ''}" data-gslang="en">EN</button>
|
|
12778
12841
|
<button class="optchip${lang === 'ja' ? ' on' : ''}" data-gslang="ja">JA</button></div>
|
|
12779
12842
|
${billingRow}
|
|
12843
|
+
<div class="srow"><div class="sl">About Galda<span class="sd">What it is, what the agent can touch, and what leaves this machine</span></div>
|
|
12844
|
+
<button class="optchip" data-gabout="1">Open</button></div>
|
|
12845
|
+
${remoteAccessRow()}
|
|
12780
12846
|
${stability}
|
|
12781
12847
|
${gearRulesHTML()}
|
|
12782
12848
|
${hostReadinessRow()}
|
|
12783
12849
|
<div class="srow dis"><div class="sl">Data folder<span class="sd">Runs are stored in the engine's chat-runs folder on the host</span></div></div>`;
|
|
12784
12850
|
}
|
|
12851
|
+
// The npx moment, moved to where the intent is.
|
|
12852
|
+
//
|
|
12853
|
+
// A person who signed up on the web lands on a board with nothing behind it:
|
|
12854
|
+
// Galda drives the Claude Code / Codex on THEIR machine, and that is not
|
|
12855
|
+
// running yet. Until now the only thing they were told was "Galda is offline —
|
|
12856
|
+
// reconnecting…", which is true and useless: it describes our state, not their
|
|
12857
|
+
// next step. That is the "run npx" dead end.
|
|
12858
|
+
//
|
|
12859
|
+
// So the answer arrives when they reach for the composer, which is the moment
|
|
12860
|
+
// they have decided to do something. And it has to answer the real hesitation,
|
|
12861
|
+
// not just print a command: "npx? what else is it going to do to my machine?"
|
|
12862
|
+
//
|
|
12863
|
+
// Every line below is a fact about the shipped package, kept in step with
|
|
12864
|
+
// docs/SECURITY.md and the same block on galda.app. Do not promise here what
|
|
12865
|
+
// is not true there.
|
|
12866
|
+
const NPX_ONBOARDING = {
|
|
12867
|
+
why: 'This is a command, not a website, because Galda runs the Claude Code or Codex already installed on your machine, on your own subscription. A website cannot reach them.',
|
|
12868
|
+
blanket: 'No admin access, no background service, nothing that starts on its own. Plain JavaScript you can read before you run it, and one folder you can delete.',
|
|
12869
|
+
access: [
|
|
12870
|
+
'Your project files and tests, inside a throwaway copy',
|
|
12871
|
+
'Its git is read-only: no commit, no push, no checkout, no reset',
|
|
12872
|
+
'Never your working tree, your branch, or your uncommitted changes',
|
|
12873
|
+
'A fixed allowlist of commands, not arbitrary shell',
|
|
12874
|
+
'Nothing at all at install time',
|
|
12875
|
+
],
|
|
12876
|
+
};
|
|
12877
|
+
|
|
12878
|
+
// The nudge: with no agent behind the board, point at the composer instead of
|
|
12879
|
+
// leaving a new person to guess. Only while there is nothing to do here — it
|
|
12880
|
+
// disappears the moment an agent connects.
|
|
12881
|
+
function renderComposerNudge(){
|
|
12882
|
+
const n = $('composerNudge');
|
|
12883
|
+
if (!n) return;
|
|
12884
|
+
// Only while there is genuinely nothing here. The moment a first goal exists
|
|
12885
|
+
// the board explains itself and a standing instruction becomes clutter.
|
|
12886
|
+
const empty = !(state.goals || []).length && !(state.tasks || []).length;
|
|
12887
|
+
n.classList.toggle('show', empty);
|
|
12888
|
+
}
|
|
12889
|
+
|
|
12890
|
+
// The orientation panel's content. A constant, not a request: this renders with
|
|
12891
|
+
// zero tokens and no network, because the answer never depends on the project.
|
|
12892
|
+
//
|
|
12893
|
+
// Every line here is a fact about the shipped code, kept in step with
|
|
12894
|
+
// docs/SECURITY.md. Do not add a promise here that is not true there.
|
|
12895
|
+
const ABOUT_GALDA = [
|
|
12896
|
+
{ h: 'What Galda is', p: [
|
|
12897
|
+
'Galda hands your work to Claude Code or Codex and brings back something you can review.',
|
|
12898
|
+
'It has no AI of its own. It starts the agent already installed and signed in on this machine, on your own subscription, so there is no extra API cost — and your code is never uploaded to Galda to be run through a model.',
|
|
12899
|
+
] },
|
|
12900
|
+
{ h: 'What the agent can do', p: [
|
|
12901
|
+
'Read and edit files, and run tests, inside a private copy of your project.',
|
|
12902
|
+
'Run named commands only — language runtimes, package managers, test and lint runners, and read-only shell tools. Not arbitrary shell.',
|
|
12903
|
+
] },
|
|
12904
|
+
{ h: 'What the agent cannot do', p: [
|
|
12905
|
+
'It cannot commit, push, checkout, or reset. Its git access is read-only: status, log, diff, show, branch, blame, ls-files, rev-parse. Nothing else.',
|
|
12906
|
+
'It cannot touch your working tree. Every task runs in a throwaway git worktree, so your branch and your uncommitted changes are left alone.',
|
|
12907
|
+
] },
|
|
12908
|
+
{ h: 'What leaves this machine', p: [
|
|
12909
|
+
'Model traffic goes from Claude Code or Codex straight to Anthropic or OpenAI. Galda is not in that path.',
|
|
12910
|
+
'With remote access on, what this board displays passes through Galda’s relay so you can open it from your phone. It is encrypted in transit but not end to end, so treat Galda’s server as being in the path.',
|
|
12911
|
+
'Turn remote access off in Settings and no outbound connection is opened at all.',
|
|
12912
|
+
] },
|
|
12913
|
+
{ h: 'Removing it', p: [
|
|
12914
|
+
'Galda installs no background services and runs nothing at install time. Deleting ~/.manager-for-ai removes everything it keeps.',
|
|
12915
|
+
] },
|
|
12916
|
+
];
|
|
12917
|
+
function openAbout(){
|
|
12918
|
+
const body = $('aboutBody');
|
|
12919
|
+
if (body) {
|
|
12920
|
+
body.innerHTML = ABOUT_GALDA.map((s) => `
|
|
12921
|
+
<div class="setrow" style="display:block">
|
|
12922
|
+
<div class="setlabel">${esc(s.h)}</div>
|
|
12923
|
+
${s.p.map((t) => `<div class="setsub" style="margin-top:4px">${esc(t)}</div>`).join('')}
|
|
12924
|
+
</div>`).join('');
|
|
12925
|
+
}
|
|
12926
|
+
$('aboutOverlay')?.classList.add('show');
|
|
12927
|
+
}
|
|
12928
|
+
function closeAbout(){ $('aboutOverlay')?.classList.remove('show'); }
|
|
12929
|
+
// Reachable from the first-run composer link too, once that lands.
|
|
12930
|
+
window.openAbout = openAbout;
|
|
12931
|
+
|
|
12932
|
+
// Remote access = the relay. On, you can open this board from your phone; the
|
|
12933
|
+
// price is that what the board shows crosses Galda's relay server (it is a
|
|
12934
|
+
// reverse HTTP tunnel, TLS but not end-to-end encrypted — docs/SECURITY.md).
|
|
12935
|
+
// Off, no outbound socket is opened at all.
|
|
12936
|
+
//
|
|
12937
|
+
// This row exists because that switch already worked and nobody could find it:
|
|
12938
|
+
// it was the env var `RELAY_URL=`. The people who most need it are the ones who
|
|
12939
|
+
// will never read a source comment. Cursor puts Privacy Mode in Settings for
|
|
12940
|
+
// the same reason. Same shape as Language above — a server setting that applies
|
|
12941
|
+
// the moment it is chosen, not part of the visual edit session.
|
|
12942
|
+
//
|
|
12943
|
+
// No row at all when this build has no relay configured (§3 段階開示: never show
|
|
12944
|
+
// a switch that controls nothing).
|
|
12945
|
+
function remoteAccessRow(){
|
|
12946
|
+
const rp = state.relayPref;
|
|
12947
|
+
if (!rp || !rp.configured) return '';
|
|
12948
|
+
const on = rp.enabled === true;
|
|
12949
|
+
const desc = on
|
|
12950
|
+
? 'On — reach this board from your phone. What the board shows passes through Galda’s relay.'
|
|
12951
|
+
: 'Off — nothing leaves this machine. This board is not reachable from your phone.';
|
|
12952
|
+
return `<div class="srow"><div class="sl">Remote access<span class="sd">${esc(desc)}</span></div>
|
|
12953
|
+
<button class="optchip${on ? ' on' : ''}" data-grelay="on">On</button>
|
|
12954
|
+
<button class="optchip${on ? '' : ' on'}" data-grelay="off">Off</button></div>`;
|
|
12955
|
+
}
|
|
12956
|
+
async function loadRelayPref(){
|
|
12957
|
+
try { const r = await fetch(withKey('/api/relay-pref')); state.relayPref = r.ok ? await r.json() : null; }
|
|
12958
|
+
catch { state.relayPref = null; }
|
|
12959
|
+
if ($('gearPop') && custTab === 'settings') buildGearPop();
|
|
12960
|
+
}
|
|
12961
|
+
async function saveRelayPref(enabled){
|
|
12962
|
+
const r = await fetch(withKey('/api/relay-pref'), {
|
|
12963
|
+
method: 'POST', headers: { 'content-type': 'application/json' },
|
|
12964
|
+
body: JSON.stringify({ enabled }),
|
|
12965
|
+
});
|
|
12966
|
+
if (!r.ok) return showErr('Failed to save.');
|
|
12967
|
+
state.relayPref = await r.json();
|
|
12968
|
+
if ($('gearPop').classList.contains('open')) buildGearPop();
|
|
12969
|
+
}
|
|
12785
12970
|
async function loadStability(){
|
|
12786
12971
|
try { const r = await fetch(withKey('/api/stability')); state.stability = r.ok ? await r.json() : null; }
|
|
12787
12972
|
catch { state.stability = null; }
|
|
@@ -12873,6 +13058,8 @@ function buildGearPop(){
|
|
|
12873
13058
|
pop.innerHTML = gearTabsHTML() + gearSetHTML();
|
|
12874
13059
|
wireGearCommon(pop);
|
|
12875
13060
|
for (const b of pop.querySelectorAll('[data-gslang]')) b.onclick = () => saveLang(b.dataset.gslang);
|
|
13061
|
+
for (const b of pop.querySelectorAll('[data-grelay]')) b.onclick = () => saveRelayPref(b.dataset.grelay === 'on');
|
|
13062
|
+
for (const b of pop.querySelectorAll('[data-gabout]')) b.onclick = () => openAbout();
|
|
12876
13063
|
const signBtn = pop.querySelector('[data-gsignin]');
|
|
12877
13064
|
if (signBtn) signBtn.onclick = async () => {
|
|
12878
13065
|
const msg = pop.querySelector('#licKeyMsg');
|
|
@@ -12898,6 +13085,7 @@ function buildGearPop(){
|
|
|
12898
13085
|
if (stabilityBtn) stabilityBtn.onclick = () => { state.stability = null; buildGearPop(); loadStability(); };
|
|
12899
13086
|
loadProjectRules();
|
|
12900
13087
|
if (!state.stability) loadStability();
|
|
13088
|
+
if (!state.relayPref) loadRelayPref();
|
|
12901
13089
|
return;
|
|
12902
13090
|
}
|
|
12903
13091
|
if (custTab === 'mcp') {
|
package/package.json
CHANGED