synabun 2.4.4 → 2.4.6

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.
Files changed (129) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/README.md +1 -1
  3. package/docs/browser-extension-bridge.md +5 -4
  4. package/docs/whatsapp.md +19 -3
  5. package/hooks/claude-code/session-start.mjs +21 -18
  6. package/lib/claude-global-config.js +214 -0
  7. package/lib/client-config-repair.js +17 -3
  8. package/mcp-server/dist/index.d.ts.map +1 -1
  9. package/mcp-server/dist/index.js +6 -1
  10. package/mcp-server/dist/index.js.map +1 -1
  11. package/mcp-server/dist/services/neural-interface.d.ts +1 -0
  12. package/mcp-server/dist/services/neural-interface.d.ts.map +1 -1
  13. package/mcp-server/dist/services/neural-interface.js +1 -0
  14. package/mcp-server/dist/services/neural-interface.js.map +1 -1
  15. package/mcp-server/dist/services/tool-catalog.js +1 -1
  16. package/mcp-server/dist/services/tool-catalog.js.map +1 -1
  17. package/mcp-server/dist/tools/agents.d.ts +18 -3
  18. package/mcp-server/dist/tools/agents.d.ts.map +1 -1
  19. package/mcp-server/dist/tools/agents.js +85 -16
  20. package/mcp-server/dist/tools/agents.js.map +1 -1
  21. package/mcp-server/dist/tools/skill-tools.d.ts +24 -5
  22. package/mcp-server/dist/tools/skill-tools.d.ts.map +1 -1
  23. package/mcp-server/dist/tools/skill-tools.js +88 -8
  24. package/mcp-server/dist/tools/skill-tools.js.map +1 -1
  25. package/mcp-server/dist/tools/tool-groups.d.ts.map +1 -1
  26. package/mcp-server/dist/tools/tool-groups.js +19 -4
  27. package/mcp-server/dist/tools/tool-groups.js.map +1 -1
  28. package/mcp-server/package-lock.json +2 -2
  29. package/mcp-server/package.json +1 -1
  30. package/mcp-server/src/index.ts +6 -1
  31. package/mcp-server/src/services/neural-interface.ts +2 -1
  32. package/mcp-server/src/services/tool-catalog.ts +1 -1
  33. package/mcp-server/src/tools/agents.ts +78 -16
  34. package/mcp-server/src/tools/skill-tools.ts +82 -9
  35. package/mcp-server/src/tools/tool-groups.ts +19 -4
  36. package/neural-interface/i18n/en.json +484 -19
  37. package/neural-interface/i18n/pt-BR.json +484 -19
  38. package/neural-interface/lib/agents-studio-api.js +7 -2
  39. package/neural-interface/lib/antigravity/home.js +43 -8
  40. package/neural-interface/lib/antigravity/panel-bridge.js +7 -3
  41. package/neural-interface/lib/antigravity/tool-call.js +14 -0
  42. package/neural-interface/lib/assistant-brains/antigravity.js +4 -2
  43. package/neural-interface/lib/assistant-dispatch.js +15 -1
  44. package/neural-interface/lib/assistant-persona.js +8 -3
  45. package/neural-interface/lib/assistant-route-gate.js +11 -2
  46. package/neural-interface/lib/assistant-runtime.js +95 -13
  47. package/neural-interface/lib/assistant-spilled-output.js +53 -0
  48. package/neural-interface/lib/assistant-user-context.js +7 -3
  49. package/neural-interface/lib/browser-default.js +22 -2
  50. package/neural-interface/lib/browser-extension-bridge.js +50 -3
  51. package/neural-interface/lib/browser-extension-pin.json +7 -7
  52. package/neural-interface/lib/browser-extension-protocol.js +30 -1
  53. package/neural-interface/lib/browser-extension-setup.js +204 -36
  54. package/neural-interface/lib/claude-agent-bridge.js +13 -2
  55. package/neural-interface/lib/codex-thread-history.js +144 -7
  56. package/neural-interface/lib/codex-worker-app-server.js +84 -30
  57. package/neural-interface/lib/db.js +26 -0
  58. package/neural-interface/lib/greeting/sources.js +7 -3
  59. package/neural-interface/lib/jsonl-lines.js +10 -11
  60. package/neural-interface/lib/line-buffer.js +88 -0
  61. package/neural-interface/lib/loop-stall.js +15 -1
  62. package/neural-interface/lib/memory-list-read.js +105 -0
  63. package/neural-interface/lib/memory-timers.js +4 -1
  64. package/neural-interface/lib/native-loop-runtime.js +7 -3
  65. package/neural-interface/lib/provider-panel-api-key-auth.js +33 -6
  66. package/neural-interface/lib/remote-policy.js +24 -7
  67. package/neural-interface/lib/skills/api-v2.js +18 -3
  68. package/neural-interface/lib/skills/bundle.js +2 -2
  69. package/neural-interface/lib/skills/deploy.js +169 -34
  70. package/neural-interface/lib/skills/digest.js +57 -3
  71. package/neural-interface/lib/skills/health.js +55 -1
  72. package/neural-interface/lib/skills/known-bridge-digests.json +12 -0
  73. package/neural-interface/lib/skills/runtime-checks.js +7 -4
  74. package/neural-interface/lib/skills/scan-shell.js +56 -7
  75. package/neural-interface/lib/skills/scan.js +13 -12
  76. package/neural-interface/lib/skills/service.js +7 -2
  77. package/neural-interface/lib/skills/telemetry.js +2 -2
  78. package/neural-interface/lib/teams/README.md +34 -6
  79. package/neural-interface/lib/teams/api.js +94 -10
  80. package/neural-interface/lib/teams/index.js +4 -0
  81. package/neural-interface/lib/teams/landing.js +195 -75
  82. package/neural-interface/lib/teams/recovery.js +68 -0
  83. package/neural-interface/lib/teams/scheduler.js +380 -61
  84. package/neural-interface/lib/teams/worktrees.js +123 -30
  85. package/neural-interface/lib/terminal-token-redaction.js +228 -58
  86. package/neural-interface/lib/terminal-tokens.js +18 -0
  87. package/neural-interface/lib/whatsapp/brain.js +21 -0
  88. package/neural-interface/lib/whatsapp/bridge.js +40 -4
  89. package/neural-interface/package-lock.json +2 -2
  90. package/neural-interface/package.json +1 -1
  91. package/neural-interface/public/extension-setup.html +6 -2
  92. package/neural-interface/public/index.html +117 -37
  93. package/neural-interface/public/shared/agents/studio/ax-api.js +27 -0
  94. package/neural-interface/public/shared/agents/studio/ax-create-view.js +1 -1
  95. package/neural-interface/public/shared/agents/studio/ax-icons.js +1 -0
  96. package/neural-interface/public/shared/agents/studio/ax-library-view.js +3 -2
  97. package/neural-interface/public/shared/agents/studio/ax-main.js +127 -41
  98. package/neural-interface/public/shared/agents/studio/ax-review-view.js +3 -2
  99. package/neural-interface/public/shared/agents/studio/ax-teams-view.js +436 -33
  100. package/neural-interface/public/shared/agents/studio/ax-teams.js +357 -10
  101. package/neural-interface/public/shared/agents/studio/ax-ui.js +31 -0
  102. package/neural-interface/public/shared/agents/studio/ax-views.js +67 -69
  103. package/neural-interface/public/shared/agents/studio/ax-work-answer.js +86 -0
  104. package/neural-interface/public/shared/agents/studio/ax-work-view.js +305 -0
  105. package/neural-interface/public/shared/agents/studio/ax-work.css +74 -0
  106. package/neural-interface/public/shared/agents/studio/ax-work.js +300 -0
  107. package/neural-interface/public/shared/browser-extension-updates.js +3 -1
  108. package/neural-interface/public/shared/cdx/cdx-deferred.js +90 -0
  109. package/neural-interface/public/shared/cdx/cdx-render.js +18 -7
  110. package/neural-interface/public/shared/cdx/cdx-tabs.js +2 -1
  111. package/neural-interface/public/shared/extension-setup/es-page.js +23 -4
  112. package/neural-interface/public/shared/extension-setup/es-view.js +51 -11
  113. package/neural-interface/public/shared/extension-update-view.js +1 -1
  114. package/neural-interface/public/shared/loading-diagnostic-entry.js +16 -1
  115. package/neural-interface/public/shared/settings/settings-ai-browser.js +23 -3
  116. package/neural-interface/public/shared/settings/settings-browser-extension.js +575 -197
  117. package/neural-interface/public/shared/settings/settings-extension-diagrams.js +116 -0
  118. package/neural-interface/public/shared/settings/settings-extension-guide.js +222 -0
  119. package/neural-interface/public/shared/settings/settings-ia.js +2 -2
  120. package/neural-interface/public/shared/settings/settings-shell.js +5 -0
  121. package/neural-interface/public/shared/skills/studio/sx-operations-view.js +5 -0
  122. package/neural-interface/public/shared/skills/studio/sx-plan.js +42 -3
  123. package/neural-interface/public/shared/skills/studio/sx-publish-view.js +20 -4
  124. package/neural-interface/public/shared/styles.css +196 -13
  125. package/neural-interface/public/shared/ui-settings.js +48 -11
  126. package/neural-interface/server.js +336 -253
  127. package/npm-shrinkwrap.json +2 -2
  128. package/package.json +2 -1
  129. package/skills/skill-forge/SKILL.md +7 -3
@@ -16131,11 +16131,11 @@
16131
16131
  form.stg-restore-dialog .tag-delete-modal-actions { margin-top: 14px; }
16132
16132
  /* <<< backup-encryption-ui */
16133
16133
  /* >>> browser-extension-card */
16134
- /* Settings → Browser → "Existing browser via extension" (shared/settings/settings-browser-extension.js), as approved
16135
- in docs/design/browser-extension ("Settings card"). The card is one row of the Browser group, never a label +
16136
- control grid: its parts (status, agent access, tabs, setup, files and limits, connection details, actions) stack
16137
- top to bottom, every row wraps, and nothing is positioned or given a height, so no paragraph can lie over another
16138
- at any width or in any language. Colours are the panel's --stg-* tokens; controls keep Settings' 22 px geometry. */
16134
+ /* Settings → Browser → "My browser · use the extension" (shared/settings/settings-browser-extension.js; the design
16135
+ handoff of 2026-11-27). The card is one row of the Browser group, never a label + control grid: its parts (the
16136
+ product, the installed browser, the staged status with its one action, agent access, tabs, Advanced) stack top to
16137
+ bottom, every row wraps, and nothing is positioned or given a height, so no paragraph can lie over another at any
16138
+ width or in any language. Colours are the panel's --stg-* tokens; controls keep Settings' 22 px geometry. */
16139
16139
  .settings-panel .stg-field.bc-extension { display: block; min-width: 0; }
16140
16140
  .settings-panel #bc-update-progress { width: 100%; accent-color: var(--stg-accent-fill); }
16141
16141
  .settings-panel .bc-extension .bc-ext-label {
@@ -16173,15 +16173,51 @@
16173
16173
  }
16174
16174
  .settings-panel .bc-extension :is(.bc-ext-section, .bc-ext-part) > .stg-subhead { margin: 0; padding: 0; }
16175
16175
  .settings-panel .bc-extension :is(.bc-ext-section, .bc-ext-part) > * + * { margin-top: 8px; }
16176
- .settings-panel .bc-extension .bc-ext-section[data-extension-section="setup"][data-mode="connect"] > .stg-subhead { font-size: 14px; font-weight: 600; }
16177
16176
  .settings-panel .bc-extension .bc-ext-note[data-tone="warn"] { color: var(--stg-warn); }
16178
- /* agent access: the heading and its dropdown on one line when they fit, the dropdown under it otherwise */
16179
- .settings-panel .bc-extension .bc-ext-mode-row {
16177
+ /* the product: the mark, its name and what it is for */
16178
+ .settings-panel .bc-extension .bc-ext-product { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; min-width: 0; padding-bottom: var(--stg-row-y); }
16179
+ .settings-panel .bc-extension .bc-ext-mark {
16180
+ display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; flex: 0 0 auto; width: 32px; aspect-ratio: 1;
16181
+ border: 1px solid var(--stg-line); border-radius: 8px; background: var(--stg-group); color: var(--stg-text);
16182
+ }
16183
+ .settings-panel .bc-extension .bc-ext-mark svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; }
16184
+ .settings-panel .bc-extension .bc-ext-product-text { flex: 1 1 180px; min-width: 0; }
16185
+ .settings-panel .bc-extension .bc-ext-product-text > .stg-subhead { margin: 0; padding: 0; font-size: 14px; font-weight: 600; }
16186
+ /* a row: what it is (label and help) on the left, its control or action on the right; under it when narrow */
16187
+ .settings-panel .bc-extension .bc-ext-row {
16180
16188
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; min-width: 0;
16189
+ padding: var(--stg-row-y) 0; border-top: 1px solid var(--stg-sep);
16190
+ }
16191
+ .settings-panel .bc-extension .bc-ext-row-text { flex: 1 1 220px; min-width: 0; }
16192
+ .settings-panel .bc-extension .bc-ext-row-label { margin: 0; font-size: 13px; line-height: 1.4; color: var(--stg-text); overflow-wrap: anywhere; }
16193
+ .settings-panel .bc-extension .bc-ext-row-text > .stg-help { margin-top: 2px; }
16194
+ .settings-panel .bc-extension .bc-ext-status-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; }
16195
+ .settings-panel .bc-extension .bc-ext-status-line > .bc-ext-label { flex: 0 1 auto; font-weight: 500; }
16196
+ .settings-panel .bc-extension .bc-ext-target { flex: 0 1 auto; min-width: 0; max-width: 100%; }
16197
+ .settings-panel .bc-extension .bc-ext-target .cc-dropdown-value { overflow-wrap: anywhere; }
16198
+ /* a default browser that cannot run the extension: named, never changed */
16199
+ /* (the guide's own notices, a browser that cannot run it and a folder that could not be prepared, are the same box) */
16200
+ .settings-panel :is(.bc-extension, .bc-guide) .bc-ext-notice {
16201
+ margin: 0 0 var(--stg-row-y); padding: 10px 12px; min-width: 0; border: 1px solid var(--stg-line); border-left: 2px solid var(--stg-warn);
16202
+ border-radius: 8px; background: var(--stg-group);
16203
+ }
16204
+ .settings-panel :is(.bc-extension, .bc-guide) .bc-ext-notice-title {
16205
+ display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0; font-weight: 600; color: var(--stg-text); overflow-wrap: anywhere;
16181
16206
  }
16182
- .settings-panel .bc-extension .bc-ext-mode-row > .stg-subhead { flex: 1 1 120px; margin: 0; padding: 0; }
16207
+ .settings-panel :is(.bc-extension, .bc-guide) .bc-ext-notice-title > span { min-width: 0; }
16208
+ .settings-panel :is(.bc-extension, .bc-guide) .bc-ext-notice > * + * { margin-top: 4px; }
16209
+ /* agent access: its label and dropdown on one line when they fit, the dropdown under it otherwise */
16210
+ .settings-panel .bc-extension .bc-ext-mode-row { border-top: 0; padding-bottom: 0; }
16183
16211
  .settings-panel .bc-extension .bc-ext-mode { flex: 0 1 auto; min-width: 0; max-width: 100%; }
16184
16212
  .settings-panel .bc-extension .bc-ext-mode .cc-dropdown-value { overflow-wrap: anywhere; }
16213
+ /* Advanced: manual pairing and file limits are disclosures of their own inside it */
16214
+ .settings-panel .bc-extension .bc-ext-sub { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--stg-sep); }
16215
+ .settings-panel .bc-extension .bc-ext-sub > summary { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; cursor: pointer; font-size: 13px; font-weight: 500; color: var(--stg-text); list-style: none; }
16216
+ .settings-panel .bc-extension .bc-ext-sub > summary::-webkit-details-marker { display: none; }
16217
+ .settings-panel .bc-extension .bc-ext-sub > summary .cc-section-chevron { width: 12px; fill: none; stroke: currentColor; stroke-width: 2; transition: transform var(--duration-fast, 150ms) ease; }
16218
+ .settings-panel .bc-extension .bc-ext-sub[open] > summary .cc-section-chevron { transform: rotate(90deg); }
16219
+ .settings-panel .bc-extension .bc-ext-sub > .bc-ext-part { margin-top: 8px; }
16220
+ .settings-panel .bc-extension .bc-ext-sub > summary:focus-visible { outline: 2px solid var(--stg-focus); outline-offset: 2px; }
16185
16221
  /* the tabs agents hold, grouped by agent */
16186
16222
  .settings-panel .bc-extension .bc-ext-title-row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; min-width: 0; }
16187
16223
  .settings-panel .bc-extension .bc-ext-title-row > .stg-subhead { margin: 0; padding: 0; }
@@ -16236,9 +16272,9 @@
16236
16272
  font-family: var(--stg-mono); font-size: 18px; font-weight: 600; line-height: 1.3; letter-spacing: 0.06em;
16237
16273
  color: var(--stg-text); overflow-wrap: anywhere;
16238
16274
  }
16239
- /* Disconnect and Revoke pairing at the end, and their confirmation next to what asked */
16240
- .settings-panel .bc-extension .bc-ext-footer { margin: var(--stg-row-y) 0 0; padding: var(--stg-row-y) 0 0; border-top: 1px solid var(--stg-sep); }
16241
- .settings-panel .bc-extension .bc-ext-footer > .bc-ext-actions { justify-content: flex-end; }
16275
+ /* the confirmation of Disconnect, Revoke pairing, Repair and the agent access, next to what asked */
16276
+ .settings-panel .bc-extension .bc-ext-status:empty { display: none; }
16277
+ .settings-panel .bc-extension #bc-extension-files-status:empty, .settings-panel .bc-extension #bc-extension-version:empty { display: none; }
16242
16278
  .settings-panel .bc-extension .bc-ext-confirm {
16243
16279
  margin: 8px 0 0; padding: 10px 12px; min-width: 0; border: 1px solid var(--stg-line); border-left: 2px solid var(--stg-warn);
16244
16280
  border-radius: 8px; background: var(--stg-group);
@@ -16249,10 +16285,134 @@
16249
16285
  .settings-panel .bc-extension .bc-ext-confirm .bc-ext-actions { justify-content: flex-end; }
16250
16286
  .settings-panel .bc-extension :is(.bc-ext-confirm, .bc-ext-head) .stg-subhead:focus-visible,
16251
16287
  .settings-panel .bc-extension .bc-ext-advanced > summary:focus-visible { outline: 2px solid var(--stg-focus); outline-offset: 2px; }
16288
+ /* A part the wiring hides stays hidden whatever display its own rule gives it (rows here are flex). */
16289
+ .settings-panel .bc-extension [hidden], .settings-panel .stg-pane .stg-field[hidden] { display: none; }
16290
+ .settings-panel .bc-connection-profile > * + * { margin-top: 4px; }
16291
+ .settings-panel .bc-connection-profile-title { margin: 0; font-weight: 600; color: var(--stg-text); }
16292
+ @container stg (max-width: 390px) {
16293
+ .settings-panel .bc-extension .bc-ext-row { align-items: flex-start; }
16294
+ .settings-panel .bc-extension .bc-ext-row > :is(.bc-ext-target, .bc-ext-actions, .cc-dropdown) { flex: 1 1 100%; }
16295
+ }
16252
16296
  @media (prefers-reduced-motion: reduce) {
16253
16297
  .settings-panel .bc-extension :is(.cli-detect-btn, .cc-section-chevron) { transition: none; }
16254
16298
  }
16255
16299
  /* <<< browser-extension-card */
16300
+ /* >>> browser-extension-guide */
16301
+ /* The extension's six-step setup guide, drawn in the Browser page itself (settings-browser-extension.js
16302
+ guidePageHTML). While it is open the page shows it alone: the page title and every card step aside, and come back
16303
+ as they were when the owner returns. One browser action per page; Back, the progress and the next action keep their
16304
+ places. The drawings take their colours from classes here (settings-extension-diagrams.js), so they follow the
16305
+ panel's tokens and the owner's accent. Nothing is positioned; every flex row wraps. */
16306
+ .settings-panel .stg-page[data-bc-guide="open"] > .stg-page-head,
16307
+ .settings-panel .stg-pane[data-bc-guide="open"] > :not(.bc-guide) { display: none; }
16308
+ .settings-panel .bc-guide { display: flex; flex-direction: column; flex-wrap: wrap; min-width: 0; color: var(--stg-text); }
16309
+ .settings-panel .bc-guide[hidden], .settings-panel .bc-guide [hidden] { display: none; }
16310
+ .settings-panel .bc-guide > * { flex: 0 0 auto; min-width: 0; }
16311
+ .settings-panel .bc-guide-head, .settings-panel .bc-guide-foot {
16312
+ display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; min-width: 0;
16313
+ }
16314
+ .settings-panel .bc-guide-head { padding-bottom: 12px; margin-bottom: 20px; border-bottom: 1px solid var(--stg-line); }
16315
+ .settings-panel .bc-guide-foot { margin-top: 20px; padding-top: 12px; border-top: 1px solid var(--stg-line); }
16316
+ .settings-panel .bc-guide-progress { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; font-size: 12px; color: var(--stg-help); }
16317
+ .settings-panel .bc-guide-bars { display: inline-flex; flex-wrap: wrap; gap: 3px; }
16318
+ .settings-panel .bc-guide-bars > i { display: block; width: 12px; padding-top: 3px; border-radius: 2px; background: var(--stg-control); }
16319
+ .settings-panel .bc-guide-bars > i[data-on="true"] { background: var(--stg-accent-fill); }
16320
+ .settings-panel .bc-guide-crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 6px; font-size: 12px; color: var(--stg-help); }
16321
+ .settings-panel .bc-guide-title { margin: 0; font-size: 20px; line-height: 1.25; font-weight: 600; letter-spacing: -0.015em; color: var(--stg-text); overflow-wrap: anywhere; }
16322
+ /* The title takes the focus only from the guide itself, when a page changes (tabindex="-1": never in the Tab order),
16323
+ so a screen reader reads the new page; it is no control, and a ring around it is a stray box. */
16324
+ .settings-panel #bc-guide-title:is(:focus, :focus-visible) { outline: none; }
16325
+ .settings-panel .bc-guide-help { margin: 6px 0 0; max-width: 72ch; }
16326
+ .settings-panel .bc-guide-main > :is(.bc-guide-group, .bc-guide-figure, .bc-guide-fallback, .bc-ext-notice, .bc-guide-where) { margin-top: 16px; }
16327
+ .settings-panel .bc-guide-main > :is(.bc-guide-actions, .bc-guide-recovery, .bc-guide-waiting) { margin-top: 10px; }
16328
+ .settings-panel .bc-guide-icon { width: 15px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
16329
+ .settings-panel .bc-guide .cli-detect-btn { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; max-width: 100%; }
16330
+ .settings-panel .bc-guide .cli-detect-btn.bc-ext-primary { color: var(--stg-text); background: var(--stg-accent-fill); border-color: transparent; }
16331
+ .settings-panel .bc-guide .cli-detect-btn.bc-ext-primary:hover:not(:disabled) { background: var(--stg-accent-fill-hover); }
16332
+ .settings-panel .bc-guide .cli-detect-btn[data-plain="true"] { border-color: transparent; background: transparent; color: var(--stg-body); padding-inline: 3px; }
16333
+ .settings-panel .bc-guide .cli-detect-btn[data-plain="true"]:hover:not(:disabled) { color: var(--stg-text); background: var(--stg-control); }
16334
+ .settings-panel .bc-guide .cli-detect-btn:disabled { color: var(--stg-off); cursor: default; }
16335
+ .settings-panel .bc-guide-group { padding: 0 var(--stg-row-x); min-width: 0; border: 1px solid var(--stg-line); border-radius: 9px; background: var(--stg-group); }
16336
+ .settings-panel .bc-guide-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; min-width: 0; padding: var(--stg-row-y) 0; }
16337
+ .settings-panel .bc-guide-row + .bc-guide-row { border-top: 1px solid var(--stg-sep); }
16338
+ .settings-panel .bc-guide-row > .bc-ext-row-label { margin: 0; font-size: 13px; color: var(--stg-text); }
16339
+ .settings-panel .bc-guide-target { flex: 0 1 auto; min-width: 0; max-width: 100%; }
16340
+ .settings-panel .bc-guide-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
16341
+ .settings-panel .bc-guide :is(.bc-guide-address, .bc-guide-path) { direction: ltr; unicode-bidi: isolate; user-select: all; font: 12px/1.5 var(--stg-mono); overflow-wrap: anywhere; min-width: 0; color: var(--stg-body); }
16342
+ .settings-panel .bc-guide-address { flex: 1 1 160px; }
16343
+ .settings-panel .bc-guide-path { display: block; margin: 10px 0; padding: 10px 12px; background: var(--stg-field-bg); border: 1px solid var(--stg-field-line); border-radius: 5px; }
16344
+ .settings-panel .bc-guide :is(.bc-guide-address, .bc-guide-path):focus-visible { outline: 2px solid var(--stg-focus); outline-offset: 2px; }
16345
+ .settings-panel .bc-guide-fallback { padding: 4px 12px; border-left: 2px solid var(--stg-line); }
16346
+ .settings-panel .bc-guide-fallback > summary { width: fit-content; cursor: pointer; font-weight: 500; list-style: none; color: var(--stg-text); }
16347
+ .settings-panel .bc-guide-fallback > summary::-webkit-details-marker { display: none; }
16348
+ .settings-panel .bc-guide-fallback > summary::before { content: '›'; display: inline-block; margin-inline-end: 8px; transition: transform var(--duration-fast, 150ms) ease; }
16349
+ .settings-panel .bc-guide-fallback[open] > summary::before { transform: rotate(90deg); }
16350
+ .settings-panel .bc-guide-fallback > summary:focus-visible { outline: 2px solid var(--stg-focus); outline-offset: 2px; }
16351
+ .settings-panel .bc-guide-fallback > p { margin: 4px 0 8px; }
16352
+ .settings-panel .bc-guide-keys { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; color: var(--stg-help); }
16353
+ .settings-panel .bc-guide kbd { padding: 1px 4px; border: 1px solid var(--stg-field-line); border-radius: 4px; background: var(--stg-control); font: 11px/1.4 var(--stg-mono); color: var(--stg-body); }
16354
+ .settings-panel .bc-guide-folder { padding-block: 12px; }
16355
+ .settings-panel .bc-guide-folder > .bc-guide-row { padding: 0; }
16356
+ .settings-panel .bc-guide-folder-title, .settings-panel .bc-guide-verified, .settings-panel .bc-guide-waiting {
16357
+ display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; min-width: 0;
16358
+ }
16359
+ .settings-panel .bc-guide-folder-title { font-weight: 600; }
16360
+ .settings-panel .bc-guide-verified { font-size: 12px; color: var(--stg-ok); }
16361
+ .settings-panel .bc-guide-waiting { font-size: 12px; color: var(--stg-body); }
16362
+ .settings-panel .bc-guide-recovery { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 12px; color: var(--stg-help); }
16363
+ .settings-panel .bc-guide-link { padding: 0 3px; border: 0; background: none; font: inherit; color: var(--stg-text); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
16364
+ .settings-panel .bc-guide-link:focus-visible { outline: 2px solid var(--stg-focus); outline-offset: 2px; border-radius: 3px; }
16365
+ .settings-panel .bc-guide-feedback { margin: 8px 0 0; color: var(--stg-body); }
16366
+ .settings-panel .bc-guide-feedback:empty { display: none; }
16367
+ .settings-panel .bc-guide-checklist { list-style: none; margin: 0; }
16368
+ .settings-panel .bc-guide-checklist > li { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 10px 0; }
16369
+ .settings-panel .bc-guide-checklist > li + li { border-top: 1px solid var(--stg-sep); }
16370
+ .settings-panel .bc-guide-checklist > li > div { flex: 1 1 180px; min-width: 0; }
16371
+ .settings-panel .bc-guide-checklist > li[data-ok="true"] > .bc-guide-icon { color: var(--stg-ok); }
16372
+ .settings-panel .bc-guide-checklist > li[data-ok="false"] > .bc-guide-icon { color: var(--stg-help); }
16373
+ .settings-panel .bc-guide-check-title { margin: 0; font-weight: 600; }
16374
+ .settings-panel .bc-guide-checklist .stg-help { margin: 0; }
16375
+ /* the close-ups: a header naming the browser and the layout, the drawing, its caption */
16376
+ .settings-panel .bc-guide-figure { margin: 0; overflow: hidden; border: 1px solid var(--stg-line); border-radius: 8px; background: var(--stg-field-bg); }
16377
+ .settings-panel .bc-guide-figure-head {
16378
+ display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 6px 12px; border-bottom: 1px solid var(--stg-line);
16379
+ background: var(--stg-group); font-size: 11.5px; color: var(--stg-body);
16380
+ }
16381
+ .settings-panel .bc-guide-figure-head > code { margin-inline-start: auto; font: 11px/1.4 var(--stg-mono); color: var(--stg-help); }
16382
+ .settings-panel .bc-guide-art { display: block; width: 100%; max-width: 560px; margin: 0 auto; }
16383
+ .settings-panel .bc-guide-art text { font-family: var(--stg-font, inherit); }
16384
+ .settings-panel .bc-guide-art .bg-t { fill: var(--stg-text); }
16385
+ .settings-panel .bc-guide-art .bg-muted { fill: var(--stg-help); }
16386
+ .settings-panel .bc-guide-art .bg-strong { font-weight: 600; }
16387
+ .settings-panel .bc-guide-art .bg-call { fill: var(--stg-focus); font-weight: 600; }
16388
+ .settings-panel .bc-guide-art .bg-frame { fill: var(--stg-field-bg); stroke: var(--stg-line); }
16389
+ .settings-panel .bc-guide-art .bg-surface { fill: var(--stg-group); stroke: var(--stg-line); }
16390
+ .settings-panel .bc-guide-art .bg-panel { fill: var(--stg-control); stroke: var(--stg-field-line); }
16391
+ .settings-panel .bc-guide-art .bg-ln { fill: none; stroke: var(--stg-line); }
16392
+ .settings-panel .bc-guide-art .bg-lead { fill: none; stroke: var(--stg-focus); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
16393
+ .settings-panel .bc-guide-art .bg-ring { fill: none; stroke: var(--stg-focus); stroke-width: 2; }
16394
+ .settings-panel .bc-guide-art .bg-halo { fill: none; stroke: var(--stg-focus); stroke-width: 7; opacity: 0.22; }
16395
+ .settings-panel .bc-guide-art .bg-track { fill: var(--stg-accent-fill); stroke: var(--stg-line); }
16396
+ .settings-panel .bc-guide-art .bg-on { fill: var(--stg-focus); }
16397
+ .settings-panel .bc-guide-art .bg-knob { fill: var(--stg-text); }
16398
+ .settings-panel .bc-guide-art .bg-knob-off { fill: var(--stg-field-bg); }
16399
+ .settings-panel .bc-guide-art .bg-mark { fill: none; stroke: var(--stg-text); stroke-width: 3; stroke-linecap: round; }
16400
+ .settings-panel .bc-guide-figure > figcaption { padding: 8px 12px; border-top: 1px solid var(--stg-line); font-size: 12px; line-height: 1.4; color: var(--stg-help); }
16401
+ .settings-panel .bc-guide-where { margin-bottom: 0; }
16402
+ @container stg (max-width: 560px) {
16403
+ .settings-panel .bc-guide-head { margin-bottom: 14px; }
16404
+ .settings-panel .bc-guide-main > .bc-guide-figure { margin-top: 12px; }
16405
+ }
16406
+ @container stg (max-width: 390px) {
16407
+ .settings-panel .bc-guide-bars { display: none; }
16408
+ .settings-panel .bc-guide-foot { align-items: stretch; }
16409
+ .settings-panel .bc-guide-foot > .cli-detect-btn { flex: 1 1 100%; justify-content: center; }
16410
+ .settings-panel .bc-guide-figure-head > code { margin-inline-start: 0; }
16411
+ }
16412
+ @media (prefers-reduced-motion: reduce) {
16413
+ .settings-panel .bc-guide-fallback > summary::before { transition: none; }
16414
+ }
16415
+ /* <<< browser-extension-guide */
16256
16416
  /* >>> settings-about */
16257
16417
  /* Settings → About (shared/settings/settings-about-pane.js): the header (icon, name, version, the two buttons),
16258
16418
  the links, the facts of System and the dependency lists. Text weight and the panel's --stg-* roles; every row
@@ -21044,6 +21204,27 @@
21044
21204
  .ax .ax-feed-time, .ax .ax-feed-from { color: var(--t-secondary); font-size: var(--sx-meta); white-space: nowrap; }
21045
21205
  .ax .ax-feed-kind { font: 500 var(--sx-meta)/1.4 var(--ff-mono, 'JetBrains Mono', monospace); color: var(--t-bright); }
21046
21206
  .ax .ax-feed-text { flex: 1 1 260px; overflow-wrap: anywhere; }
21207
+ /* Open and Finished: two groups of the same rows; the Finished head holds Clear finished. */
21208
+ .ax .ax-team-groups { padding: 12px 16px 16px; max-width: 1040px; display: grid; gap: 18px; align-content: start; }
21209
+ .ax .ax-team-group { display: grid; gap: 8px; min-width: 0; }
21210
+ .ax .ax-team-group .ax-team-list { padding: 0; max-width: none; }
21211
+ .ax .ax-team-group-head { display: flex; align-items: center; gap: 8px; min-height: 26px; }
21212
+ .ax .ax-team-group-count { min-width: 20px; padding: 2px 6px; border: 1px solid var(--b-light); border-radius: 9px; background: var(--s-subtle); color: var(--t-secondary); font: 500 var(--sx-meta)/1.2 var(--ff-mono); text-align: center; }
21213
+ .ax .ax-team-left { color: var(--sx-warn); }
21214
+ /* A finished team: what is still on disk and in git, and the one step that fits. */
21215
+ .ax .ax-team-disk { border-left: 2px solid var(--b-visible); }
21216
+ .ax .ax-left-list { padding-left: 0; list-style: none; display: grid; gap: 6px; max-height: 220px; overflow: auto; }
21217
+ .ax .ax-left-list > li { display: grid; gap: 2px; min-width: 0; }
21218
+ .ax .ax-left-list > li + li { margin-top: 0; }
21219
+ .ax .ax-left-path { color: var(--t-bright); overflow-wrap: anywhere; }
21220
+ /* A card of the list: the team (the button that opens it) and, beside it, its one quick action (a button of its own). */
21221
+ .ax .ax-team-item { display: flex; align-items: stretch; min-width: 0; border: 1px solid var(--b-light); border-radius: 8px; background: var(--s-subtle); transition: border-color 0.15s ease, background 0.15s ease; }
21222
+ .ax .ax-team-item:hover, .ax .ax-team-item:focus-within { border-color: var(--b-hover); background: var(--s-light); }
21223
+ .ax .ax-team-item > .ax-team-row, .ax .ax-team-item > .ax-team-row:hover { flex: 1 1 auto; min-width: 0; border: 0; background: transparent; }
21224
+ .ax .ax-team-quick { flex: none; display: flex; align-items: center; padding: 8px 12px 8px 0; }
21225
+ /* Already on <branch>: the side card of Worktrees and branches, its edge the tone of the status chip. */
21226
+ .ax .ax-team-ontarget { border-left: 2px solid var(--sx-ok); }
21227
+ .ax .ax-team-ontarget.is-blocked { border-left-color: var(--sx-warn); }
21047
21228
 
21048
21229
  /* ── Questions asked in the window ── */
21049
21230
  .ax .ax-dlg .ss-dlg-body { max-height: min(60vh, 520px); overflow: auto; }
@@ -21076,12 +21257,14 @@
21076
21257
  .ax .ax-lib .ax-col-scope { display: none; }
21077
21258
  .ax .ax-lib td.ax-col-state { display: block; }
21078
21259
  .ax .ax-create, .ax .ax-team { padding: 12px; }
21260
+ .ax .ax-team-item { flex-direction: column; }
21261
+ .ax .ax-team-quick { padding: 0 14px 10px; }
21079
21262
  .ax .ax-actions { justify-content: flex-start; }
21080
21263
  .ax .ax-priv-row { grid-template-columns: minmax(0, 1fr); gap: 2px; }
21081
21264
  }
21082
21265
  @media (prefers-reduced-motion: reduce) {
21083
21266
  .ax .ax-spinner { animation-duration: 2.4s; }
21084
- .ax .ax-card, .ax .ax-start, .ax .ax-template, .ax .ax-pick, .ax .ax-team-row { transition: none; }
21267
+ .ax .ax-card, .ax .ax-start, .ax .ax-template, .ax .ax-pick, .ax .ax-team-row, .ax .ax-team-item { transition: none; }
21085
21268
  }
21086
21269
  /* ══ end of AGENTS STUDIO ══ */
21087
21270
 
@@ -1,4 +1,4 @@
1
- import { extensionSettingsHTML, wireExtensionSettings } from './settings/settings-browser-extension.js';
1
+ import { extensionGuideHTML, extensionSettingsHTML, wireExtensionSettings } from './settings/settings-browser-extension.js';
2
2
  import { fetchToolCatalog } from './agent-runtime-options.js';
3
3
  import { reloadAfterRestore } from './server-back.js';
4
4
  import { configureToolPickerTranslation, toolPickerHTML, readToolPicker, toolWord, toolServersNote } from './tool-list-picker.js';
@@ -28,7 +28,7 @@ import { cliInstallText, setCliInstallTranslator } from './cli-install-view.js';
28
28
  import { dropdownHTML, wireDropdowns, setDropdownItems, setDropdownValue } from './cc-dropdown.js';
29
29
  import { PROXY_TYPES, isLocalProfile, proxySummary, defaultCreateWhere, isPlanLimit, formOfProfile, readLocalProfileForm, proxyOfForm, createAction, whereOptions, passwordNeededAgain } from './settings/settings-local-profiles.js';
30
30
  import { startLimitNotes, closedOutsideNotes } from './settings/settings-morelogin-cooldown.js';
31
- import { AI_BROWSER_EVENT, LOCAL_CONNECT_OPTIONS, LOCAL_DEFAULT_MODE, aiBrowserOf, aiBrowserOfStatus, localConnectModeOf, browserSaveFields, switchRequest, pickRequest, aiBrowserLine, profileOf, aiBrowserDetail } from './settings/settings-ai-browser.js';
31
+ import { AI_BROWSER_EVENT, CONNECT_MENU_OPTIONS, LOCAL_CONNECT_OPTIONS, LOCAL_DEFAULT_MODE, connectionParts, aiBrowserOf, aiBrowserOfStatus, localConnectModeOf, browserSaveFields, switchRequest, pickRequest, aiBrowserLine, profileOf, aiBrowserDetail } from './settings/settings-ai-browser.js';
32
32
  import { IFACE_DEFAULTS, loadIfaceConfig, saveIfaceConfig, applyIfaceConfig, restoreInterfaceConfig, loadSkinStylesheet, removeSkinStylesheet, restoreSkin, setSkinsTabRefresher } from './iface-config.js';
33
33
  // The interface config and the skin, for the modules that import them from here.
34
34
  export { loadIfaceConfig, saveIfaceConfig, applyIfaceConfig, restoreInterfaceConfig, restoreSkin };
@@ -649,18 +649,29 @@ function buildBrowserTab(ownerAccess = null) {
649
649
 
650
650
  return `
651
651
  <div class="stg-pane" data-stg-pane="browser">
652
+ ${extensionGuideHTML()}
652
653
 
653
654
  ${kit.card({
654
655
  id: 'setup-browser', section: 'browser.browser_choice',
655
656
  body: `
657
+ ${/* Connection mode first (the design handoff of 2026-11-27): what follows depends on it. The third choice
658
+ only points to Connected tools; it never turns a profile on (settings-ai-browser.js connectionParts). */''}
659
+ ${kit.field('BRW011', `${dd('BRW011', 'bc-connectMode', 'connect', CONNECT_MENU_OPTIONS)}
660
+ <div class="stg-help" id="bc-connectMode-ai-note" style="display:none">${b('aiBrowser.connectionNote')}</div>`)}
656
661
  <div class="stg-field" id="bc-ai-browser-row" style="display:none">
657
662
  <div class="stg-action-row" style="align-items:center;flex-wrap:wrap;gap:8px">
658
663
  <span class="stg-inline-status" id="bc-ai-browser-text" role="status" aria-live="polite"></span>
659
664
  <button type="button" class="stg-action-btn compact" id="bc-ai-browser-open">${b('aiBrowser.open')}</button>
660
665
  </div>
661
666
  </div>
662
- ${kit.field('BRW003', `<div class="bc-inline-group">${dd('BRW003', 'bc-browser', 'browser', ['auto', 'chrome', 'msedge', 'chromium', 'custom'], { attrs: 'id="bc-browser-dropdown"' })}<input type="hidden" id="bc-channel" value=""></div>`)}
663
- <div class="stg-field bc-card-row" id="bcg-executable" ${kit.inv('BRW001')}>
667
+ <div class="stg-field bc-connection-profile" id="bc-connection-profile" hidden>
668
+ <p class="bc-connection-profile-title">${b('connection.profileTitle')}</p>
669
+ <p class="stg-help">${b('connection.profileHelp')}</p>
670
+ <div class="stg-action-row"><button type="button" class="stg-action-btn compact" id="bc-connection-profile-open">${b('connection.open')}</button></div>
671
+ </div>
672
+ ${extensionSettingsHTML(kit)}
673
+ ${kit.field('BRW003', `<div class="bc-inline-group">${dd('BRW003', 'bc-browser', 'browser', ['auto', 'chrome', 'msedge', 'chromium', 'custom'], { attrs: 'id="bc-browser-dropdown"' })}<input type="hidden" id="bc-channel" value=""></div>`, { attrs: 'id="bcg-browser-row" data-local-only="true"' })}
674
+ <div class="stg-field bc-card-row" id="bcg-executable" data-local-only="true" ${kit.inv('BRW001')}>
664
675
  <label for="bc-executablePath">${kit.L('BRW001')}</label>
665
676
  <div class="browser-cfg-input-row">
666
677
  ${text('bc-executablePath', { ph: b('ph.autoDetect') })}
@@ -687,9 +698,6 @@ function buildBrowserTab(ownerAccess = null) {
687
698
  id: 'bcg-profiles', section: 'browser.browser_profiles',
688
699
  body: `
689
700
  <input type="hidden" id="bc-userDataDir" value="">
690
- ${kit.field('BRW011', `${dd('BRW011', 'bc-connectMode', 'connect', LOCAL_CONNECT_OPTIONS)}
691
- <div class="stg-help" id="bc-connectMode-ai-note" style="display:none">${b('aiBrowser.connectionNote')}</div>`)}
692
- ${extensionSettingsHTML(kit)}
693
701
  ${kit.field('BRW012', dd('BRW012', 'bc-attachSeed', 'seed', ['real', 'fresh']), { attrs: 'id="bc-attachSeed-row" style="display:none"' })}
694
702
  <div class="stg-field bc-card-row" ${kit.inv('BRW083')}>
695
703
  <label id="bc-profile-list-label">${kit.L('BRW083')}</label>
@@ -6676,13 +6684,36 @@ async function openSettingsModalNow(options = {}) {
6676
6684
  if (row) row.style.display = on ? '' : 'none';
6677
6685
  const text = overlay.querySelector('#bc-ai-browser-text');
6678
6686
  if (text) text.textContent = on ? kit.tx(`settings.redesign.browser.aiBrowser.${line.key}`, line.params) : '';
6679
- // The Connection field is the local browser's mode: not in use while a profile is the AI browser.
6687
+ // The Connection field shows the profile, disabled, while a profile is the AI browser; the local mode the form
6688
+ // held comes back when it is turned off (in Connected tools: never from here).
6680
6689
  const mode = overlay.querySelector('#bc-connectMode');
6681
- if (mode) mode.disabled = on;
6690
+ if (mode) {
6691
+ if (on && mode.value !== 'morelogin') { _localMode = mode.value || _localMode; mode.value = 'morelogin'; }
6692
+ else if (!on && mode.value === 'morelogin' && mode.disabled) mode.value = _localMode;
6693
+ mode.disabled = on;
6694
+ }
6682
6695
  const note = overlay.querySelector('#bc-connectMode-ai-note');
6683
6696
  if (note) note.style.display = on ? '' : 'none';
6684
6697
  syncBcDropdowns();
6698
+ refreshConnectionParts();
6699
+ }
6700
+ // The local mode as the form last held it (a read of the config, or the owner's pick): what a save keeps while the
6701
+ // menu only shows the profile choice.
6702
+ let _localMode = LOCAL_DEFAULT_MODE;
6703
+ /** Connection mode first: the extension card, the local executable rows and the profile notice follow it. */
6704
+ function refreshConnectionParts() {
6705
+ const input = overlay.querySelector('#bc-connectMode');
6706
+ if (!input) return;
6707
+ if (['attach', 'extension', LOCAL_DEFAULT_MODE].includes(input.value)) _localMode = input.value;
6708
+ const parts = connectionParts(input.value, _aiBrowser);
6709
+ overlay.querySelectorAll('[data-local-only="true"]').forEach(row => { row.hidden = !parts.local; });
6710
+ const profile = overlay.querySelector('#bc-connection-profile');
6711
+ if (profile) profile.hidden = !parts.profile;
6685
6712
  }
6713
+ overlay.querySelector('#bc-connection-profile-open')?.addEventListener('click', (e) => {
6714
+ e.preventDefault();
6715
+ applySettingsOpenOptions(overlay, { tab: 'connected-tools', expand: 'stg-sec-ml-default', scrollTo: 'stg-sec-ml-default', highlight: 'stg-sec-ml-default' });
6716
+ }, { signal: panelLife.signal });
6686
6717
  /** The AI browser as last heard: the MoreLogin tab's news (with the profile's name), or a read of the config. */
6687
6718
  function noteAiBrowser(detail) {
6688
6719
  if (!detail || typeof detail !== 'object') return;
@@ -6702,6 +6733,7 @@ async function openSettingsModalNow(options = {}) {
6702
6733
  const mode = overlay.querySelector('#bc-connectMode')?.value || 'mirror';
6703
6734
  const seedRow = overlay.querySelector('#bc-attachSeed-row');
6704
6735
  if (seedRow) seedRow.style.display = mode === 'attach' ? '' : 'none';
6736
+ refreshConnectionParts();
6705
6737
  updateChromeRunningWarning();
6706
6738
  }
6707
6739
  const connectModeDd = overlay.querySelector('.bc-dropdown[data-for="bc-connectMode"]');
@@ -6994,13 +7026,16 @@ async function openSettingsModalNow(options = {}) {
6994
7026
  }
6995
7027
 
6996
7028
  // Collect all config from the form
6997
- const refreshExtensionSettings = wireExtensionSettings(overlay, { tx: kit.tx, signal: panelLife.signal });
7029
+ // Not hydrated: the menu holds its first option ("extension") until GET /api/browser/config answers, and the card
7030
+ // must not show, poll or restore a setup guide for an owner who uses another mode (applyBrowserConfig calls it).
7031
+ const refreshExtensionSettings = wireExtensionSettings(overlay, { tx: kit.tx, signal: panelLife.signal, hydrated: false,
7032
+ revealRequested: (el) => settingsRevealRequested(overlay, el) });
6998
7033
 
6999
7034
  function collectBrowserConfig() {
7000
7035
  const val = (id) => (overlay.querySelector(`#${id}`)?.value || '').trim();
7001
7036
  const num = (id, def) => { const v = parseInt(val(id), 10); return isNaN(v) ? def : v; };
7002
7037
  const numF = (id, def) => { const v = parseFloat(val(id)); return isNaN(v) ? def : v; };
7003
- const connection = browserSaveFields(val('bc-connectMode'), _aiBrowser);
7038
+ const connection = browserSaveFields(val('bc-connectMode'), _aiBrowser, _localMode);
7004
7039
 
7005
7040
  // Permissions
7006
7041
  const permissions = [];
@@ -7130,6 +7165,8 @@ async function openSettingsModalNow(options = {}) {
7130
7165
  setVal('bc-browser', cfg.browser && cfg.browser !== 'morelogin' ? cfg.browser : 'auto');
7131
7166
  setVal('bc-channel', cfg.channel || '');
7132
7167
  setVal('bc-connectMode', localConnectModeOf(cfg));
7168
+ _localMode = localConnectModeOf(cfg);
7169
+ refreshConnectionParts();
7133
7170
  refreshExtensionSettings?.();
7134
7171
  setVal('bc-attachSeed', cfg.attachSeed || 'real');
7135
7172
  const _seedRow = overlay.querySelector('#bc-attachSeed-row');