@humain/humain-code 0.8.1 → 0.8.3

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 (151) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/dist/bundle/chunks/{chunk-E7OBH44W.js → chunk-2XD7TLKB.js} +6 -6
  3. package/dist/bundle/chunks/{chunk-3CGMVKHA.js → chunk-3E37CJCE.js} +1 -1
  4. package/dist/bundle/chunks/{chunk-ROFZVEFN.js → chunk-4GB7A76U.js} +77 -72
  5. package/dist/bundle/chunks/{chunk-P2Y2H7SD.js → chunk-6JTCRCNF.js} +2 -2
  6. package/dist/bundle/chunks/{chunk-6TTMNQXI.js → chunk-7LSTTCSC.js} +145 -120
  7. package/dist/bundle/chunks/{chunk-QRRVZYTG.js → chunk-AW24RHGJ.js} +2 -2
  8. package/dist/bundle/chunks/{chunk-7X6DNT45.js → chunk-B3ZLWVDA.js} +8 -6
  9. package/dist/bundle/chunks/{chunk-APNPBT7Y.js → chunk-BRSLXHED.js} +1 -1
  10. package/dist/bundle/chunks/{chunk-KONLZKPL.js → chunk-E4VUW4RI.js} +1 -1
  11. package/dist/bundle/chunks/{chunk-NICPFMOP.js → chunk-JKX5EGOT.js} +1 -1
  12. package/dist/bundle/chunks/{chunk-D3KYOSQY.js → chunk-JSHKS7VH.js} +1 -1
  13. package/dist/bundle/chunks/{chunk-SXOIQWNX.js → chunk-JX6YIPNK.js} +1 -1
  14. package/dist/bundle/chunks/{chunk-WBSGWISD.js → chunk-M5TVWJ5T.js} +5 -4
  15. package/dist/bundle/chunks/{chunk-XZ7FTBXS.js → chunk-MUN4ZZZP.js} +1189 -1195
  16. package/dist/bundle/chunks/{chunk-CQ2CE3RB.js → chunk-QFDZEUFU.js} +2 -2
  17. package/dist/bundle/chunks/{chunk-DD5UT56Y.js → chunk-R2KD2HFT.js} +67 -66
  18. package/dist/bundle/chunks/chunk-S2US54IU.js +37 -0
  19. package/dist/bundle/chunks/{chunk-IMUFBWEK.js → chunk-T2ZGMEMV.js} +42 -41
  20. package/dist/bundle/chunks/{chunk-FQ4KS5S4.js → chunk-UZOIHLNU.js} +1 -1
  21. package/dist/bundle/chunks/{chunk-6YVORXTX.js → chunk-VSXVZVBE.js} +253 -232
  22. package/dist/bundle/chunks/{chunk-P42E6YY6.js → chunk-ZAHVC5V2.js} +206 -194
  23. package/dist/bundle/chunks/{chunk-DJG2WUNM.js → chunk-ZSWU5KKA.js} +1 -1
  24. package/dist/bundle/chunks/{compat-SRCNS6OQ.js → compat-4ILE5BEC.js} +1 -1
  25. package/dist/bundle/chunks/{dist-TRAK7EXI.js → dist-I6CI3CG5.js} +6 -6
  26. package/dist/bundle/chunks/{dist-4OMLHRJE.js → dist-NXHRL2KY.js} +1 -1
  27. package/dist/bundle/chunks/{easter-egg-3d-VVUF3C3X.js → easter-egg-3d-VZC5WOYV.js} +1 -1
  28. package/dist/bundle/chunks/{entry-SRYLSS5P.js → entry-6XDR2IDE.js} +1 -1
  29. package/dist/bundle/chunks/{execute-I3WGGPWL.js → execute-6MEJJF2T.js} +2 -2
  30. package/dist/bundle/chunks/{flow-implementer-4KO3Q4B5.js → flow-implementer-XOP4MG5X.js} +4 -4
  31. package/dist/bundle/chunks/{inprocess-TOBRVK4C.js → inprocess-MBKFGDM2.js} +4 -4
  32. package/dist/bundle/chunks/{interactive-mode-BJJKPBXD.js → interactive-mode-3322RQEH.js} +2 -2
  33. package/dist/bundle/chunks/{session-picker-4JQEGLDD.js → session-picker-EYKCMFQR.js} +1 -1
  34. package/dist/bundle/chunks/{startup-ui-AKTA4NDP.js → startup-ui-7ODOR34R.js} +2 -2
  35. package/dist/bundle/chunks/{trace-command-7ORDQ3JS.js → trace-command-VM7FBWPE.js} +4 -4
  36. package/dist/bundle/chunks/{virtual-modules-3CT5BMBA.js → virtual-modules-47MGUPYN.js} +8 -8
  37. package/dist/bundle/cli-runtime.js +3 -3
  38. package/dist/bundle/index.js +8 -8
  39. package/dist/bundle/rpc-entry.js +3 -3
  40. package/dist/coordination/adapter/delivery.d.ts +27 -0
  41. package/dist/coordination/adapter/delivery.d.ts.map +1 -1
  42. package/dist/coordination/adapter/delivery.js +164 -4
  43. package/dist/coordination/adapter/delivery.js.map +1 -1
  44. package/dist/coordination/adapter/index.d.ts.map +1 -1
  45. package/dist/coordination/adapter/index.js +31 -5
  46. package/dist/coordination/adapter/index.js.map +1 -1
  47. package/dist/coordination/adapter/presence.d.ts +5 -0
  48. package/dist/coordination/adapter/presence.d.ts.map +1 -1
  49. package/dist/coordination/adapter/presence.js +25 -3
  50. package/dist/coordination/adapter/presence.js.map +1 -1
  51. package/dist/coordination/adapter/question-routing.d.ts +7 -0
  52. package/dist/coordination/adapter/question-routing.d.ts.map +1 -0
  53. package/dist/coordination/adapter/question-routing.js +40 -0
  54. package/dist/coordination/adapter/question-routing.js.map +1 -0
  55. package/dist/coordination/adapter/receipts.d.ts +7 -0
  56. package/dist/coordination/adapter/receipts.d.ts.map +1 -1
  57. package/dist/coordination/adapter/receipts.js +25 -2
  58. package/dist/coordination/adapter/receipts.js.map +1 -1
  59. package/dist/coordination/adapter/tool.d.ts +19 -3
  60. package/dist/coordination/adapter/tool.d.ts.map +1 -1
  61. package/dist/coordination/adapter/tool.js +93 -19
  62. package/dist/coordination/adapter/tool.js.map +1 -1
  63. package/dist/coordination/client/client.d.ts +2 -2
  64. package/dist/coordination/client/client.d.ts.map +1 -1
  65. package/dist/coordination/client/client.js +4 -0
  66. package/dist/coordination/client/client.js.map +1 -1
  67. package/dist/coordination/transport/protocol.d.ts.map +1 -1
  68. package/dist/coordination/transport/protocol.js +23 -0
  69. package/dist/coordination/transport/protocol.js.map +1 -1
  70. package/dist/coordination/transport/types.d.ts +11 -1
  71. package/dist/coordination/transport/types.d.ts.map +1 -1
  72. package/dist/coordination/transport/types.js.map +1 -1
  73. package/dist/core/model-resolver.js +2 -2
  74. package/dist/core/model-resolver.js.map +1 -1
  75. package/dist/core/model-runtime.d.ts.map +1 -1
  76. package/dist/core/model-runtime.js +14 -8
  77. package/dist/core/model-runtime.js.map +1 -1
  78. package/dist/core/oauth-account-pool.d.ts +14 -0
  79. package/dist/core/oauth-account-pool.d.ts.map +1 -1
  80. package/dist/core/oauth-account-pool.js +166 -14
  81. package/dist/core/oauth-account-pool.js.map +1 -1
  82. package/dist/core/run-outcome.d.ts +1 -1
  83. package/dist/core/run-outcome.d.ts.map +1 -1
  84. package/dist/core/run-outcome.js +2 -2
  85. package/dist/core/run-outcome.js.map +1 -1
  86. package/dist/core/run-preflight.d.ts.map +1 -1
  87. package/dist/core/run-preflight.js +15 -8
  88. package/dist/core/run-preflight.js.map +1 -1
  89. package/dist/core/settings-manager.d.ts +4 -0
  90. package/dist/core/settings-manager.d.ts.map +1 -1
  91. package/dist/core/settings-manager.js +17 -0
  92. package/dist/core/settings-manager.js.map +1 -1
  93. package/dist/core/settings-schema.d.ts +2 -0
  94. package/dist/core/settings-schema.d.ts.map +1 -1
  95. package/dist/core/settings-schema.js +10 -0
  96. package/dist/core/settings-schema.js.map +1 -1
  97. package/dist/extensions/usage/index.js +5 -5
  98. package/dist/extensions/usage/index.js.map +1 -1
  99. package/dist/humain/gateway/client.d.ts.map +1 -1
  100. package/dist/humain/gateway/client.js +36 -9
  101. package/dist/humain/gateway/client.js.map +1 -1
  102. package/dist/humain/gateway/http.d.ts.map +1 -1
  103. package/dist/humain/gateway/http.js +26 -6
  104. package/dist/humain/gateway/http.js.map +1 -1
  105. package/dist/humain/gateway/provider.d.ts.map +1 -1
  106. package/dist/humain/gateway/provider.js +9 -2
  107. package/dist/humain/gateway/provider.js.map +1 -1
  108. package/dist/humain/hcode/facade.d.ts +12 -1
  109. package/dist/humain/hcode/facade.d.ts.map +1 -1
  110. package/dist/humain/hcode/facade.js +35 -8
  111. package/dist/humain/hcode/facade.js.map +1 -1
  112. package/dist/humain/hcode/login-copy.d.ts.map +1 -1
  113. package/dist/humain/hcode/login-copy.js +10 -0
  114. package/dist/humain/hcode/login-copy.js.map +1 -1
  115. package/dist/main.d.ts.map +1 -1
  116. package/dist/main.js +2 -0
  117. package/dist/main.js.map +1 -1
  118. package/dist/modes/interactive/components/settings-selector.d.ts +6 -0
  119. package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
  120. package/dist/modes/interactive/components/settings-selector.js +26 -0
  121. package/dist/modes/interactive/components/settings-selector.js.map +1 -1
  122. package/dist/modes/interactive/components/status-indicator.d.ts +35 -1
  123. package/dist/modes/interactive/components/status-indicator.d.ts.map +1 -1
  124. package/dist/modes/interactive/components/status-indicator.js +179 -3
  125. package/dist/modes/interactive/components/status-indicator.js.map +1 -1
  126. package/dist/modes/interactive/components/working-indicator-engine.d.ts +32 -0
  127. package/dist/modes/interactive/components/working-indicator-engine.d.ts.map +1 -0
  128. package/dist/modes/interactive/components/working-indicator-engine.js +112 -0
  129. package/dist/modes/interactive/components/working-indicator-engine.js.map +1 -0
  130. package/dist/modes/interactive/fullscreen.d.ts +13 -0
  131. package/dist/modes/interactive/fullscreen.d.ts.map +1 -0
  132. package/dist/modes/interactive/fullscreen.js +25 -0
  133. package/dist/modes/interactive/fullscreen.js.map +1 -0
  134. package/dist/modes/interactive/interactive-mode.d.ts +4 -1
  135. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  136. package/dist/modes/interactive/interactive-mode.js +117 -19
  137. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  138. package/dist/modes/interactive/theme/humain-dark.json +5 -4
  139. package/dist/modes/interactive/theme/humain-light.json +6 -5
  140. package/docs/cli.md +6 -0
  141. package/docs/coordination.md +16 -4
  142. package/docs/development.md +7 -0
  143. package/docs/environment-variables.md +2 -1
  144. package/docs/providers.md +19 -5
  145. package/docs/settings.md +20 -0
  146. package/docs/usage.md +2 -0
  147. package/npm-shrinkwrap.json +2 -2
  148. package/package.json +1 -1
  149. package/schemas/settings.schema.json +29 -0
  150. package/dist/bundle/chunks/chunk-UEW6TUSP.js +0 -36
  151. package/dist/bundle/chunks/chunk-YPZPCHNV.js +0 -3
@@ -52,6 +52,7 @@ import { renderHumainCodeIcon } from "../../humain/brand-logo.js";
52
52
  import { CAVEMAN_LEVELS, getCavemanDefaultMode, resolveCavemanSessionMode } from "../../humain/caveman/index.js";
53
53
  import { bindFlowAccountsHost, createFlowAccountReporter, FLOW_ACCOUNT_PERSISTENCE_NOTICE, flowUsageTargets, formatFlowAccountAdvanced, listFlowAccountMetadata, nodeLabelContainsStoredKey, readFlowNodeFallbackState, refreshFlowCatalog, updateFlowNodeFallback, } from "../../humain/flow-accounts-host.js";
54
54
  import { HUMAIN_FUSE_PROVIDER } from "../../humain/fuse-provider.js";
55
+ import { HUMAIN_GATEWAY_PROVIDER } from "../../humain/gateway/constants.js";
55
56
  import { HCODE_SESSION_ONLY_NOTICE } from "../../humain/hcode/account.js";
56
57
  import { sameReference } from "../../humain/hcode/account-store.js";
57
58
  import { watchHcodeCatalog } from "../../humain/hcode/catalog-watch.js";
@@ -104,7 +105,7 @@ import { formatAuthSelectorProviderType, OAuthSelectorComponent, } from "./compo
104
105
  import { createLoginMenuSelector } from "./components/radius-login-selector.js";
105
106
  import { ScopedModelsSelectorComponent } from "./components/scoped-models-selector.js";
106
107
  import { SessionSelectorComponent } from "./components/session-selector.js";
107
- import { SettingsSelectorComponent } from "./components/settings-selector.js";
108
+ import { createWorkingIndicatorChoice, SettingsSelectorComponent } from "./components/settings-selector.js";
108
109
  import { SkillInvocationMessageComponent } from "./components/skill-invocation-message.js";
109
110
  import { BranchSummaryStatusIndicator, CompactionStatusIndicator, IdleStatus, RetryStatusIndicator, WorkingStatusIndicator, } from "./components/status-indicator.js";
110
111
  import { ThemedText } from "./components/themed-text.js";
@@ -116,6 +117,7 @@ import { TrustSelectorComponent } from "./components/trust-selector.js";
116
117
  import { UserMessageComponent } from "./components/user-message.js";
117
118
  import { UserMessageSelectorComponent } from "./components/user-message-selector.js";
118
119
  import { editInExternalEditor } from "./external-editor.js";
120
+ import { FULLSCREEN_OVERLAY, fullscreenSurface } from "./fullscreen.js";
119
121
  import { checkWatchedHcodeCatalog, refreshModelCatalogs, refreshStartupModelCatalogs, retryHcodeCatalog, } from "./model-catalog-refresh.js";
120
122
  import { getModelSearchText } from "./model-search.js";
121
123
  import { formatOAuthAccountOption, formatOAuthAccountResetTime, formatOAuthAccountUsage, subscriptionAccountUsage, } from "./oauth-account-format.js";
@@ -212,6 +214,13 @@ export function formatResumeCommand(sessionManager) {
212
214
  function hasDefaultModelProvider(providerId) {
213
215
  return providerId in defaultModelPerProvider;
214
216
  }
217
+ function gatewayCatalogUnavailableNotice(error) {
218
+ // Gateway access warnings can combine safe notices with server-derived catalog text in a plain Error.
219
+ // At this UI boundary, display only the fixed 5xx notice, never the surrounding provider error.
220
+ return error instanceof Error
221
+ ? error.message.match(/HUMAIN Gateway is temporarily unavailable \(5\d{2}\); your saved sign-in is unchanged\. Wait and retry \/model\./)?.[0]
222
+ : undefined;
223
+ }
215
224
  function llamaCppPostLoginGuidance(actionLabel, loadedModelCount) {
216
225
  return loadedModelCount === 0
217
226
  ? `${actionLabel}. No llama.cpp models are loaded. Use /llama to load a model, then /model to select it.`
@@ -335,6 +344,9 @@ export class InteractiveMode {
335
344
  pendingUserInputs = [];
336
345
  activeStatusIndicator = undefined;
337
346
  activeWorkingIndicatorEmbedded = false;
347
+ settingsWorkingPreview;
348
+ settingsPreviewOpen = false;
349
+ resolveWorkingIndicator = createWorkingIndicatorChoice();
338
350
  idleStatus = new IdleStatus();
339
351
  workingMessage = undefined;
340
352
  workingVisible = true;
@@ -2124,10 +2136,15 @@ export class InteractiveMode {
2124
2136
  }
2125
2137
  }
2126
2138
  showWorkingStatusIndicator() {
2139
+ if (this.settingsPreviewOpen)
2140
+ return;
2127
2141
  const colorFn = isEmbeddedStatus(this.editor)
2128
2142
  ? (text) => (this.editor.borderColor ?? theme.getThinkingBorderColor(this.session.thinkingLevel || "off"))(text)
2129
2143
  : undefined;
2130
- this.showStatusIndicator(new WorkingStatusIndicator(this.ui, this.workingMessage ?? this.defaultWorkingMessage, this.workingIndicatorOptions, colorFn));
2144
+ this.showStatusIndicator(new WorkingStatusIndicator(this.ui, this.workingMessage ?? this.defaultWorkingMessage, this.workingIndicatorOptions, colorFn, this.resolveWorkingIndicator(this.settingsManager.getWorkingIndicator()), this.session.model?.reasoning &&
2145
+ this.session.getAvailableThinkingLevels().includes(this.session.thinkingLevel)
2146
+ ? this.session.thinkingLevel
2147
+ : "off", this.settingsManager.getReducedMotion()));
2131
2148
  }
2132
2149
  setWorkingVisible(visible) {
2133
2150
  this.workingVisible = visible;
@@ -2144,7 +2161,7 @@ export class InteractiveMode {
2144
2161
  setWorkingIndicator(options) {
2145
2162
  this.workingIndicatorOptions = options;
2146
2163
  if (this.activeStatusIndicator?.kind === "working") {
2147
- this.activeStatusIndicator.setIndicator(options);
2164
+ this.showWorkingStatusIndicator();
2148
2165
  }
2149
2166
  this.ui.requestRender();
2150
2167
  }
@@ -3314,6 +3331,12 @@ export class InteractiveMode {
3314
3331
  }
3315
3332
  break;
3316
3333
  case "message_update":
3334
+ if (this.activeStatusIndicator instanceof WorkingStatusIndicator) {
3335
+ if (event.assistantMessageEvent.type === "thinking_delta")
3336
+ this.activeStatusIndicator.setPhase("Thinking");
3337
+ if (event.assistantMessageEvent.type === "text_delta")
3338
+ this.activeStatusIndicator.setPhase("Writing");
3339
+ }
3317
3340
  if (this.streamingComponent && event.message.role === "assistant") {
3318
3341
  this.streamingMessage = event.message;
3319
3342
  this.streamingComponent.updateContent(this.streamingMessage, true);
@@ -3397,6 +3420,16 @@ export class InteractiveMode {
3397
3420
  // The bash execution callback handles TUI output rendering.
3398
3421
  break;
3399
3422
  case "tool_execution_start": {
3423
+ if (this.activeStatusIndicator instanceof WorkingStatusIndicator) {
3424
+ const name = event.toolName.toLowerCase();
3425
+ this.activeStatusIndicator.setPhase(name.includes("read")
3426
+ ? "Reading"
3427
+ : /edit|write/.test(name)
3428
+ ? "Editing"
3429
+ : /search|grep|find/.test(name)
3430
+ ? "Searching"
3431
+ : "Running");
3432
+ }
3400
3433
  // Nested calls (from codemode scripts) are shown inside their parent's row.
3401
3434
  if (event.parentToolCallId)
3402
3435
  break;
@@ -4252,6 +4285,9 @@ export class InteractiveMode {
4252
4285
  }
4253
4286
  }
4254
4287
  updateEditorBorderColor() {
4288
+ const level = this.session.model?.reasoning && this.session.getAvailableThinkingLevels().includes(this.session.thinkingLevel)
4289
+ ? this.session.thinkingLevel
4290
+ : "off";
4255
4291
  const accent = this.isBashMode ? undefined : this.extensionEditorAccent;
4256
4292
  if ("setAccentLabel" in this.editor && typeof this.editor.setAccentLabel === "function")
4257
4293
  this.editor.setAccentLabel(accent?.label);
@@ -4263,9 +4299,12 @@ export class InteractiveMode {
4263
4299
  this.editor.borderColor = (s) => theme.fg(color, s);
4264
4300
  }
4265
4301
  else {
4266
- const level = this.session.thinkingLevel || "off";
4267
4302
  this.editor.borderColor = theme.getThinkingBorderColor(level);
4268
4303
  }
4304
+ if (this.activeStatusIndicator instanceof WorkingStatusIndicator)
4305
+ this.activeStatusIndicator.updateLevel(level);
4306
+ this.settingsWorkingPreview?.updateLevel(level);
4307
+ this.settingsWorkingPreview?.invalidate();
4269
4308
  this.activeStatusIndicator?.invalidate();
4270
4309
  this.ui.requestRender();
4271
4310
  }
@@ -4597,13 +4636,15 @@ export class InteractiveMode {
4597
4636
  dispose?.();
4598
4637
  }
4599
4638
  /**
4600
- * Shows a selector component in place of the editor.
4639
+ * Shows a selector in the editor area or an edge-to-edge fullscreen overlay.
4601
4640
  * @param create Factory that receives a `done` callback and returns the component and focus target
4602
4641
  */
4603
- showSelector(create) {
4642
+ showSelector(create, layout = "editor") {
4604
4643
  const token = {};
4605
4644
  let dispose;
4645
+ let hide;
4606
4646
  const done = () => {
4647
+ hide?.();
4607
4648
  dispose?.();
4608
4649
  if (this.activeSelectorToken !== token)
4609
4650
  return;
@@ -4617,10 +4658,20 @@ export class InteractiveMode {
4617
4658
  dispose = created.dispose;
4618
4659
  this.disposeActiveSelector();
4619
4660
  this.activeSelectorToken = token;
4620
- this.activeSelectorDispose = dispose;
4621
- this.editorContainer.clear();
4622
- this.editorContainer.addChild(created.component);
4623
- this.ui.setFocus(created.focus);
4661
+ if (layout === "fullscreen") {
4662
+ const handle = this.ui.showOverlay(fullscreenSurface(created.component, () => this.ui.terminal.rows), FULLSCREEN_OVERLAY.overlayOptions);
4663
+ hide = () => handle.hide();
4664
+ this.activeSelectorDispose = () => {
4665
+ hide?.();
4666
+ dispose?.();
4667
+ };
4668
+ }
4669
+ else {
4670
+ this.activeSelectorDispose = dispose;
4671
+ this.editorContainer.clear();
4672
+ this.editorContainer.addChild(created.component);
4673
+ this.ui.setFocus(created.focus);
4674
+ }
4624
4675
  this.ui.requestRender();
4625
4676
  }
4626
4677
  getModeSettings() {
@@ -4644,6 +4695,21 @@ export class InteractiveMode {
4644
4695
  showSettingsSelector() {
4645
4696
  this.showSelector((done) => {
4646
4697
  let selector;
4698
+ const previewContainer = new Container();
4699
+ let preview;
4700
+ this.settingsPreviewOpen = true;
4701
+ this.clearStatusIndicator("working");
4702
+ const updatePreview = () => {
4703
+ preview?.dispose();
4704
+ preview = new WorkingStatusIndicator(this.ui, "Working", this.workingIndicatorOptions, undefined, this.resolveWorkingIndicator(this.settingsManager.getWorkingIndicator()), this.session.model?.reasoning &&
4705
+ this.session.getAvailableThinkingLevels().includes(this.session.thinkingLevel)
4706
+ ? this.session.thinkingLevel
4707
+ : "off", this.settingsManager.getReducedMotion());
4708
+ this.settingsWorkingPreview = preview;
4709
+ previewContainer.clear();
4710
+ previewContainer.addChild(preview);
4711
+ this.ui.requestRender();
4712
+ };
4647
4713
  const defaultProvider = this.settingsManager.getDefaultProvider();
4648
4714
  const defaultModelId = this.settingsManager.getDefaultModel();
4649
4715
  const defaultModel = defaultProvider && defaultModelId ? `${defaultProvider}/${defaultModelId}` : "not set";
@@ -4671,6 +4737,8 @@ export class InteractiveMode {
4671
4737
  thinkingLevel: this.settingsManager.getDefaultThinkingLevel() ?? DEFAULT_THINKING_LEVEL,
4672
4738
  availableThinkingLevels: [...THINKING_LEVEL_OPTIONS],
4673
4739
  modelThinkingLevels: this.settingsManager.getAllModelThinkingLevels(),
4740
+ workingIndicator: this.settingsManager.getWorkingIndicator(),
4741
+ reducedMotion: this.settingsManager.getReducedMotion(),
4674
4742
  currentTheme: this.themeController.getThemeSelection() || DEFAULT_THEME_NAME,
4675
4743
  terminalTheme: this.themeController.getTerminalTheme(),
4676
4744
  availableThemes: getAvailableThemes(),
@@ -4798,6 +4866,14 @@ export class InteractiveMode {
4798
4866
  this.updateEditorBorderColor();
4799
4867
  }
4800
4868
  },
4869
+ onWorkingIndicatorChange: (value) => {
4870
+ this.settingsManager.setWorkingIndicator(value);
4871
+ updatePreview();
4872
+ },
4873
+ onReducedMotionChange: (value) => {
4874
+ this.settingsManager.setReducedMotion(value);
4875
+ updatePreview();
4876
+ },
4801
4877
  onThemeChange: (themeSetting) => {
4802
4878
  this.settingsManager.setTheme(themeSetting);
4803
4879
  this.themeController.setThemeSetting(themeSetting);
@@ -4911,7 +4987,19 @@ export class InteractiveMode {
4911
4987
  this.ui.requestRender();
4912
4988
  },
4913
4989
  });
4914
- return { component: selector, focus: selector.getSettingsList() };
4990
+ selector.addChild(previewContainer);
4991
+ updatePreview();
4992
+ return {
4993
+ component: selector,
4994
+ focus: selector.getSettingsList(),
4995
+ dispose: () => {
4996
+ preview?.dispose();
4997
+ this.settingsWorkingPreview = undefined;
4998
+ this.settingsPreviewOpen = false;
4999
+ if (this.session.isStreaming && this.workingVisible && !this.activeStatusIndicator)
5000
+ this.showWorkingStatusIndicator();
5001
+ },
5002
+ };
4915
5003
  });
4916
5004
  }
4917
5005
  handleThinkingCommand(searchTerm) {
@@ -5668,7 +5756,7 @@ export class InteractiveMode {
5668
5756
  this.ui.requestRender();
5669
5757
  });
5670
5758
  return { component: selector, focus: selector };
5671
- });
5759
+ }, "fullscreen");
5672
5760
  }
5673
5761
  bindFlowAccountsHostToSession() {
5674
5762
  this.releaseFlowAccountsHost();
@@ -6023,7 +6111,7 @@ export class InteractiveMode {
6023
6111
  ? new ExtensionSelectorComponent(`HUMAIN Code / Accounts — Remove which ${provider.name} account?`, currentOptions, (option) => select(currentOptions.indexOf(option), "choose"), cancel)
6024
6112
  : undefined;
6025
6113
  const selector = logoutSelector ??
6026
- new AccountPickerComponent(`Manage accounts · ${provider.name}`, getRows, () => Math.max(1, (this.ui.terminal?.rows ?? 24) - 5), select, cancel);
6114
+ new AccountPickerComponent(`Manage accounts · ${provider.name}`, getRows, () => Math.max(1, this.ui.terminal?.rows ?? 24), select, cancel);
6027
6115
  const controller = new AbortController();
6028
6116
  let closed = false;
6029
6117
  if (hasSubscriptionUsage) {
@@ -6103,7 +6191,7 @@ export class InteractiveMode {
6103
6191
  controller.abort();
6104
6192
  },
6105
6193
  };
6106
- });
6194
+ }, "fullscreen");
6107
6195
  }
6108
6196
  async showAccountPolicy(provider) {
6109
6197
  try {
@@ -6356,6 +6444,10 @@ export class InteractiveMode {
6356
6444
  return;
6357
6445
  close();
6358
6446
  this.ui.requestRender();
6447
+ if (readiness.kind === "not-configured" || readiness.kind === "http-error") {
6448
+ this.showStatus(hcodeLoginAvailability(readiness).text.replace(/ \[Retry\]$/, ""));
6449
+ return;
6450
+ }
6359
6451
  if (readiness.kind === "unreachable") {
6360
6452
  this.showStatus(`Can't reach ${readiness.host}: check VPN/Zscaler, then try /login again.`);
6361
6453
  return;
@@ -6436,7 +6528,7 @@ export class InteractiveMode {
6436
6528
  ? new ExtensionSelectorComponent(title, options, onSelect, onCancel)
6437
6529
  : createLoginMenuSelector(this.ui, title, options, { label: HUMAIN_LOGIN_LABEL, text: HUMAIN_LOGIN_LABEL, colors: HUMAIN_SHIMMER_COLORS }, onSelect, onCancel);
6438
6530
  return { component: selector, focus: selector, dispose: () => selector.dispose() };
6439
- });
6531
+ }, "fullscreen");
6440
6532
  }
6441
6533
  async checkHcodeLogin(signal) {
6442
6534
  const runtime = this.session.modelRuntime;
@@ -6612,7 +6704,7 @@ export class InteractiveMode {
6612
6704
  clearInterval(spinner);
6613
6705
  },
6614
6706
  };
6615
- });
6707
+ }, "fullscreen");
6616
6708
  }
6617
6709
  async showOAuthSelector(mode) {
6618
6710
  if (mode === "login") {
@@ -6644,7 +6736,7 @@ export class InteractiveMode {
6644
6736
  this.ui.requestRender();
6645
6737
  });
6646
6738
  return { component: selector, focus: selector };
6647
- });
6739
+ }, "fullscreen");
6648
6740
  }
6649
6741
  async completeProviderAuthentication(providerId, providerName, authType, previousModel) {
6650
6742
  if (providerId === HCODE_PROVIDER || providerId === HUMAIN_FUSE_PROVIDER) {
@@ -6742,7 +6834,10 @@ export class InteractiveMode {
6742
6834
  this.showWarning(`${actionLabel}, but its model catalog refresh timed out; using cached models.`);
6743
6835
  }
6744
6836
  else if (result.errors.size > 0) {
6745
- this.showWarning(`${actionLabel}, but its model catalog could not be refreshed; using cached models.`);
6837
+ const gatewayNotice = providerId === HUMAIN_GATEWAY_PROVIDER
6838
+ ? gatewayCatalogUnavailableNotice(result.errors.get(providerId))
6839
+ : undefined;
6840
+ this.showWarning(gatewayNotice ?? `${actionLabel}, but its model catalog could not be refreshed; using cached models.`);
6746
6841
  }
6747
6842
  // Do not replace a model or session selected while the refresh was running.
6748
6843
  if (deferSelection && this.session === session && session.model === previousModel) {
@@ -6753,7 +6848,10 @@ export class InteractiveMode {
6753
6848
  this.ui.requestRender();
6754
6849
  })
6755
6850
  .catch((error) => {
6756
- this.showWarning(`${actionLabel}, but its model catalog could not be refreshed: ${error instanceof Error ? error.message : String(error)}`);
6851
+ this.showWarning(providerId === HUMAIN_GATEWAY_PROVIDER
6852
+ ? (gatewayCatalogUnavailableNotice(error) ??
6853
+ `${actionLabel}, but its model catalog could not be refreshed; using cached models.`)
6854
+ : `${actionLabel}, but its model catalog could not be refreshed: ${error instanceof Error ? error.message : String(error)}`);
6757
6855
  })
6758
6856
  .finally(() => clearTimeout(timeout));
6759
6857
  }