zidane-ui 9.1.13 → 9.1.16

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 (290) hide show
  1. package/dist/adapters/index.d.ts +2 -2
  2. package/dist/adapters/index.js +2 -2
  3. package/dist/adapters/live.d.ts +29 -3
  4. package/dist/adapters/live.js +9 -1
  5. package/dist/adapters/server-composer-host.js +17 -2
  6. package/dist/adapters/server-extensions-host.d.ts +0 -1
  7. package/dist/adapters/server-extensions-host.js +4 -15
  8. package/dist/adapters/server-git-host.js +7 -16
  9. package/dist/adapters/server-host.js +181 -43
  10. package/dist/adapters/server-machines-host.d.ts +2 -0
  11. package/dist/adapters/server-machines-host.js +22 -23
  12. package/dist/adapters/server-onboarding-host.d.ts +1 -1
  13. package/dist/adapters/server-onboarding-host.js +3 -4
  14. package/dist/adapters/server-session-host.js +22 -3
  15. package/dist/adapters/server-settings-accounts.js +2 -2
  16. package/dist/adapters/server-settings-host.js +2 -2
  17. package/dist/adapters/server-settings-performance.js +7 -9
  18. package/dist/adapters/server-settings-sections.js +13 -14
  19. package/dist/adapters/server-sidebar-host.js +2 -2
  20. package/dist/adapters/sse-host.js +68 -3
  21. package/dist/adapters/sse-protocol.d.ts +12 -2
  22. package/dist/adapters/sse-protocol.js +4 -2
  23. package/dist/app/AppHostProvider.js +4 -3
  24. package/dist/app/ModalProvider.d.ts +13 -3
  25. package/dist/app/ModalProvider.js +103 -24
  26. package/dist/app/NoticeStack.d.ts +33 -0
  27. package/dist/app/NoticeStack.js +90 -0
  28. package/dist/app/index.d.ts +3 -2
  29. package/dist/app/index.js +3 -2
  30. package/dist/chat/SessionFilterMenu.d.ts +1 -1
  31. package/dist/chat/SessionFilterMenu.js +2 -1
  32. package/dist/chat/composer/Composer.js +10 -8
  33. package/dist/chat/composer/ModelChainList.js +17 -8
  34. package/dist/chat/composer/ModelChainTooltip.js +5 -2
  35. package/dist/chat/composer/use-draft-target.d.ts +20 -1
  36. package/dist/chat/composer/use-draft-target.js +121 -5
  37. package/dist/chat/composer/use-new-session-defaults.d.ts +5 -1
  38. package/dist/chat/composer/use-new-session-defaults.js +17 -4
  39. package/dist/chat/headless/chip-labels.d.ts +1 -0
  40. package/dist/chat/headless/chip-labels.js +1 -0
  41. package/dist/chat/headless/composer/labels-editor.d.ts +0 -2
  42. package/dist/chat/headless/composer/labels-editor.js +0 -2
  43. package/dist/chat/headless/draft-target.d.ts +21 -1
  44. package/dist/chat/headless/fixture-host.js +17 -2
  45. package/dist/chat/headless/host.d.ts +3 -3
  46. package/dist/chat/headless/index.d.ts +9 -9
  47. package/dist/chat/headless/index.js +2 -2
  48. package/dist/chat/headless/labels.d.ts +13 -6
  49. package/dist/chat/headless/labels.js +10 -9
  50. package/dist/chat/headless/session-list.d.ts +20 -8
  51. package/dist/chat/headless/session-list.js +1 -0
  52. package/dist/chat/headless/sidebar/directory.d.ts +56 -14
  53. package/dist/chat/headless/sidebar/directory.js +149 -70
  54. package/dist/chat/headless/sidebar/index.d.ts +3 -3
  55. package/dist/chat/headless/sidebar/index.js +2 -2
  56. package/dist/chat/headless/sidebar/labels.d.ts +15 -8
  57. package/dist/chat/headless/sidebar/types.d.ts +3 -1
  58. package/dist/chat/headless/sidebar/view.d.ts +13 -5
  59. package/dist/chat/headless/sidebar/view.js +31 -11
  60. package/dist/chat/headless/streams/actions.d.ts +5 -3
  61. package/dist/chat/headless/streams/actions.js +3 -2
  62. package/dist/chat/headless/streams/index.d.ts +3 -3
  63. package/dist/chat/headless/streams/merge.d.ts +6 -10
  64. package/dist/chat/headless/streams/merge.js +7 -21
  65. package/dist/chat/headless/streams/session-streams.d.ts +29 -4
  66. package/dist/chat/headless/streams/session-streams.js +86 -0
  67. package/dist/chat/headless/streams/store.d.ts +162 -16
  68. package/dist/chat/headless/streams/store.js +334 -38
  69. package/dist/chat/headless/streams/types.d.ts +10 -7
  70. package/dist/chat/headless/transcript-labels.d.ts +1 -0
  71. package/dist/chat/interactions/PlanCard.js +10 -3
  72. package/dist/chat/interactions/QuestionForm.js +7 -3
  73. package/dist/chat/interactions/card-ui.d.ts +5 -3
  74. package/dist/chat/interactions/card-ui.js +9 -7
  75. package/dist/chat/rich-composer/RichComposer.js +1 -7
  76. package/dist/chat/rich-composer/composer-extensions.d.ts +0 -2
  77. package/dist/chat/rich-composer/composer-extensions.js +2 -2
  78. package/dist/chat/rich-composer/use-composer-editor.d.ts +0 -2
  79. package/dist/chat/rich-composer/use-composer-editor.js +1 -2
  80. package/dist/chat/sidebar/SessionSidebar.js +5 -5
  81. package/dist/chat/sidebar/SidebarFilterMenu.js +3 -1
  82. package/dist/chat/sidebar/SidebarFrame.d.ts +4 -0
  83. package/dist/chat/sidebar/SidebarFrame.js +27 -9
  84. package/dist/chat/sidebar/SidebarGroupHeader.js +1 -1
  85. package/dist/chat/sidebar/SidebarHostProvider.d.ts +8 -5
  86. package/dist/chat/sidebar/SidebarHostProvider.js +13 -9
  87. package/dist/chat/sidebar/SidebarToggleButton.js +7 -3
  88. package/dist/chat/sidebar/index.d.ts +2 -2
  89. package/dist/chat/sidebar/session-menu.js +4 -4
  90. package/dist/chat/sidebar/useSaveViewAsSpace.js +2 -2
  91. package/dist/chat/testing/contract.js +2 -2
  92. package/dist/chat/transcript/AuthFailureCard.js +11 -8
  93. package/dist/chat/transcript/BadgeMenu.js +13 -2
  94. package/dist/chat/transcript/MermaidDiagram.js +7 -3
  95. package/dist/chat/transcript/fold.d.ts +4 -0
  96. package/dist/chat/transcript/fold.js +53 -22
  97. package/dist/chat/transcript/script-input.d.ts +1 -1
  98. package/dist/chat/transcript/shell-block.js +7 -3
  99. package/dist/chat/transcript/useStickToBottom.js +12 -0
  100. package/dist/components/BrowserSignIn.js +23 -21
  101. package/dist/components/Form.d.ts +6 -4
  102. package/dist/components/Form.js +16 -8
  103. package/dist/components/LoadError.d.ts +4 -2
  104. package/dist/components/LoadError.js +13 -9
  105. package/dist/components/Notice.d.ts +29 -0
  106. package/dist/components/Notice.js +63 -0
  107. package/dist/components/PanelEmpty.d.ts +1 -1
  108. package/dist/components/PanelEmpty.js +4 -2
  109. package/dist/components/Restricted.d.ts +1 -1
  110. package/dist/components/palette/PaletteList.js +8 -1
  111. package/dist/components/palette/PalettePanel.js +14 -6
  112. package/dist/core.css +24 -5
  113. package/dist/dist/{index-Bq87OcGy.d.ts → index-BZM8tu4L.d.ts} +28 -3
  114. package/dist/dist/index.d.ts +2 -2
  115. package/dist/dist/{timeout-B5pO5I5a.d.ts → timeout-Cyx3VGPz.d.ts} +1 -1
  116. package/dist/extensions/ExtensionSettingsPage.js +1 -4
  117. package/dist/extensions/ExtensionSettingsSection.js +4 -3
  118. package/dist/extensions/ExtensionSettingsSidebar.js +2 -6
  119. package/dist/extensions/SettingsWireForm.d.ts +1 -7
  120. package/dist/extensions/SettingsWireForm.js +7 -5
  121. package/dist/extensions/headless/fixture-host.d.ts +1 -5
  122. package/dist/extensions/headless/fixture-host.js +1 -4
  123. package/dist/extensions/headless/host.d.ts +1 -11
  124. package/dist/extensions/headless/index.d.ts +3 -3
  125. package/dist/extensions/headless/index.js +2 -2
  126. package/dist/extensions/headless/select.d.ts +1 -11
  127. package/dist/extensions/headless/select.js +1 -18
  128. package/dist/files/EditorColumn.js +12 -1
  129. package/dist/files/TreeColumn.js +13 -20
  130. package/dist/files/useOpenFiles.js +2 -0
  131. package/dist/git/BranchMenu.js +5 -3
  132. package/dist/git/ImportRepoDialog.js +18 -9
  133. package/dist/git/MoveSessionDialog.js +15 -7
  134. package/dist/git/RemoteFolderPicker.js +34 -16
  135. package/dist/git/SyncChip.js +17 -17
  136. package/dist/git/WherePicker.d.ts +16 -1
  137. package/dist/git/WherePicker.js +80 -36
  138. package/dist/git/headless/environment.d.ts +33 -3
  139. package/dist/git/headless/environment.js +33 -5
  140. package/dist/git/headless/index.d.ts +2 -2
  141. package/dist/git/headless/index.js +2 -2
  142. package/dist/git/headless/labels.d.ts +15 -2
  143. package/dist/git/headless/labels.js +17 -4
  144. package/dist/git/useEnvironmentChoices.d.ts +3 -1
  145. package/dist/git/useEnvironmentChoices.js +6 -3
  146. package/dist/index.d.ts +2 -1
  147. package/dist/index.js +2 -1
  148. package/dist/labels.d.ts +5 -0
  149. package/dist/labels.js +5 -0
  150. package/dist/machines/AddMachineDialog.d.ts +34 -0
  151. package/dist/machines/AddMachineDialog.js +464 -0
  152. package/dist/machines/Banners.d.ts +33 -4
  153. package/dist/machines/Banners.js +64 -3
  154. package/dist/machines/DaemonMenu.js +27 -4
  155. package/dist/machines/HostCapabilities.d.ts +1 -3
  156. package/dist/machines/HostCapabilities.js +24 -45
  157. package/dist/machines/HostSyncPanel.js +123 -129
  158. package/dist/machines/HostsSection.d.ts +4 -1
  159. package/dist/machines/HostsSection.js +30 -7
  160. package/dist/machines/MachinesExplainer.d.ts +17 -0
  161. package/dist/machines/MachinesExplainer.js +71 -0
  162. package/dist/machines/MachinesProvider.d.ts +14 -2
  163. package/dist/machines/MachinesProvider.js +35 -1
  164. package/dist/machines/ServerAddedCard.d.ts +31 -0
  165. package/dist/machines/ServerAddedCard.js +72 -0
  166. package/dist/machines/ServerCard.js +91 -215
  167. package/dist/machines/ServerMachinesPanel.d.ts +2 -2
  168. package/dist/machines/ServerMachinesPanel.js +184 -323
  169. package/dist/machines/ServerUpdatePanel.js +51 -40
  170. package/dist/machines/ShareThisComputerForm.d.ts +19 -0
  171. package/dist/machines/ShareThisComputerForm.js +133 -0
  172. package/dist/machines/TokensPanel.d.ts +5 -3
  173. package/dist/machines/TokensPanel.js +98 -78
  174. package/dist/machines/headless/fixture-host.d.ts +19 -3
  175. package/dist/machines/headless/fixture-host.js +42 -5
  176. package/dist/machines/headless/fixtures.js +4 -6
  177. package/dist/machines/headless/host.d.ts +40 -19
  178. package/dist/machines/headless/index.d.ts +3 -3
  179. package/dist/machines/headless/index.js +2 -2
  180. package/dist/machines/headless/labels.d.ts +63 -20
  181. package/dist/machines/headless/labels.js +88 -25
  182. package/dist/machines/headless/messages.js +8 -0
  183. package/dist/machines/headless/stores.d.ts +9 -2
  184. package/dist/machines/headless/stores.js +28 -1
  185. package/dist/machines/index.d.ts +7 -3
  186. package/dist/machines/index.js +8 -4
  187. package/dist/machines/testing/contract.d.ts +15 -3
  188. package/dist/machines/testing/contract.js +68 -14
  189. package/dist/motion/grow.d.ts +8 -1
  190. package/dist/motion/grow.js +10 -4
  191. package/dist/onboarding/demos/index.js +1 -1
  192. package/dist/onboarding/headless/labels.d.ts +13 -0
  193. package/dist/onboarding/headless/labels.js +8 -0
  194. package/dist/onboarding/index.js +3 -3
  195. package/dist/onboarding/sources/SourceBrowser.js +11 -7
  196. package/dist/onboarding/steps/ConnectorsStep.js +1 -1
  197. package/dist/onboarding/steps/ImportStep.js +4 -1
  198. package/dist/onboarding/steps/ReadyStep.js +9 -2
  199. package/dist/onboarding/steps/SkillsStep.js +1 -1
  200. package/dist/onboarding/steps/connect/KeyForm.js +6 -2
  201. package/dist/onboarding/steps/connect/ProviderPanel.js +6 -2
  202. package/dist/onboarding/steps/connect/ProviderReady.js +25 -20
  203. package/dist/onboarding/steps/tasks.js +17 -14
  204. package/dist/server/sse-handler.js +141 -19
  205. package/dist/session/ArtifactsPanel.js +39 -17
  206. package/dist/session/PlanTracker.js +12 -7
  207. package/dist/session/ProjectHome.js +13 -11
  208. package/dist/session/RemindersPanel.js +34 -16
  209. package/dist/session/RunningWorkDialog.js +6 -2
  210. package/dist/session/SecretsPanel.js +29 -10
  211. package/dist/session/SessionDetailsDialog.d.ts +1 -1
  212. package/dist/session/SessionDetailsDialog.js +18 -10
  213. package/dist/session/SideChat.js +10 -7
  214. package/dist/session/TurnDetailsDialog.js +19 -5
  215. package/dist/session/UsagePanel.js +10 -4
  216. package/dist/session/headless/host.d.ts +2 -0
  217. package/dist/session/headless/labels.d.ts +19 -1
  218. package/dist/session/headless/labels.js +15 -1
  219. package/dist/session/headless/queue.js +2 -1
  220. package/dist/session/headless/reminder-labels.d.ts +4 -0
  221. package/dist/session/headless/reminder-labels.js +4 -0
  222. package/dist/settings/SettingsRestricted.d.ts +1 -1
  223. package/dist/settings/SettingsRestricted.js +4 -4
  224. package/dist/settings/SettingsShell.d.ts +7 -0
  225. package/dist/settings/SettingsShell.js +6 -1
  226. package/dist/settings/headless/fixture-performance.d.ts +1 -1
  227. package/dist/settings/headless/host.d.ts +2 -2
  228. package/dist/settings/headless/labels.d.ts +3 -3
  229. package/dist/settings/headless/labels.js +3 -3
  230. package/dist/settings/headless/performance.d.ts +3 -4
  231. package/dist/settings/headless/search.d.ts +1 -1
  232. package/dist/settings/index.d.ts +2 -1
  233. package/dist/settings/index.js +2 -1
  234. package/dist/settings/sections/editor/EditorSection.js +7 -4
  235. package/dist/settings/sections/editor/labels.d.ts +1 -0
  236. package/dist/settings/sections/editor/labels.js +1 -0
  237. package/dist/settings/sections/environments/EnvironmentsSection.js +19 -12
  238. package/dist/settings/sections/environments/labels.d.ts +1 -0
  239. package/dist/settings/sections/environments/labels.js +2 -1
  240. package/dist/settings/sections/extensions/ExtensionConfigRows.d.ts +1 -3
  241. package/dist/settings/sections/extensions/ExtensionConfigRows.js +20 -19
  242. package/dist/settings/sections/extensions/ExtensionOptionsSection.js +2 -1
  243. package/dist/settings/sections/extensions/options-labels.d.ts +2 -1
  244. package/dist/settings/sections/extensions/options-labels.js +2 -1
  245. package/dist/settings/sections/index.d.ts +2 -1
  246. package/dist/settings/sections/index.js +2 -1
  247. package/dist/settings/sections/logs/LogsSection.d.ts +2 -2
  248. package/dist/settings/sections/logs/LogsSection.js +2 -2
  249. package/dist/settings/sections/mcp/McpSection.d.ts +1 -1
  250. package/dist/settings/sections/mcp/McpSection.js +12 -6
  251. package/dist/settings/sections/mcp/McpServerRow.js +20 -13
  252. package/dist/settings/sections/mcp/labels.d.ts +8 -2
  253. package/dist/settings/sections/mcp/labels.js +8 -2
  254. package/dist/settings/sections/models/ModelRows.js +1 -1
  255. package/dist/settings/sections/models/NewChatPlaceRow.d.ts +26 -0
  256. package/dist/settings/sections/models/NewChatPlaceRow.js +78 -0
  257. package/dist/settings/sections/models/SpacesDefaultsSection.js +15 -3
  258. package/dist/settings/sections/models/labels.d.ts +7 -0
  259. package/dist/settings/sections/models/labels.js +7 -0
  260. package/dist/settings/sections/models/model-test.js +7 -4
  261. package/dist/settings/sections/performance/PerformanceSection.js +16 -6
  262. package/dist/settings/sections/performance/labels.d.ts +1 -1
  263. package/dist/settings/sections/performance/labels.js +1 -1
  264. package/dist/settings/sections/providers/ProvidersSection.d.ts +1 -1
  265. package/dist/settings/sections/providers/ProvidersSection.js +14 -7
  266. package/dist/settings/sections/providers/ServerProvidersSection.d.ts +1 -1
  267. package/dist/settings/sections/providers/ServerProvidersSection.js +11 -5
  268. package/dist/settings/sections/providers/labels.d.ts +2 -2
  269. package/dist/settings/sections/providers/labels.js +2 -2
  270. package/dist/settings/sections/skills/SkillList.js +1 -1
  271. package/dist/settings/sections/skills/SkillsSection.js +1 -1
  272. package/dist/settings/testing/performance.contract.js +8 -12
  273. package/dist/styles.css +32 -3
  274. package/dist/terminal/HostTerminalSurface.js +15 -5
  275. package/dist/terminal/TerminalPanel.js +30 -17
  276. package/dist/terminal/TerminalSurface.js +11 -4
  277. package/dist/terminal/headless/labels.d.ts +5 -0
  278. package/dist/terminal/headless/labels.js +5 -0
  279. package/dist/terminal/headless/store.d.ts +1 -1
  280. package/dist/terminal/headless/store.js +6 -3
  281. package/dist/workspace/LayoutBudget.d.ts +5 -1
  282. package/dist/workspace/LayoutBudget.js +14 -1
  283. package/dist/workspace/PanelContentView.d.ts +1 -1
  284. package/dist/workspace/PanelContentView.js +17 -6
  285. package/dist/workspace/WorkspaceProvider.js +3 -2
  286. package/dist/workspace/headless/labels.d.ts +1 -0
  287. package/dist/workspace/headless/labels.js +1 -0
  288. package/package.json +3 -3
  289. package/src/styles/motion.css +8 -0
  290. package/src/styles/primitives.css +7 -0
@@ -1,6 +1,7 @@
1
1
  import { BrandMark } from "../../../components/BrandMark.js";
2
2
  import { IconButton } from "../../../components/IconButton.js";
3
3
  import { BTN_DANGER, BTN_DANGER_CONFIRM, BTN_PRIMARY, BTN_SECONDARY } from "../../../components/button.js";
4
+ import { Notice } from "../../../components/Notice.js";
4
5
  import { Tray } from "../../../components/Surface.js";
5
6
  import { HostRow, MetaChip, ToggleSwitch } from "../../../components/Form.js";
6
7
  import { mcpBadge } from "../../headless/mcp.js";
@@ -87,9 +88,12 @@ function McpServerRow({ server: mcp, enabled, expanded, probing, enabledTools, r
87
88
  title: mcp.url,
88
89
  children: mcp.url
89
90
  }),
90
- mcp.lastError && !flow && /* @__PURE__ */ jsx("div", {
91
- className: "mt-1 text-zg-meta text-zg-danger break-words",
92
- children: mcp.lastError
91
+ mcp.lastError && !flow && /* @__PURE__ */ jsx(Notice, {
92
+ tone: "error",
93
+ compact: true,
94
+ detail: mcp.lastError,
95
+ className: "mt-1",
96
+ children: l.mcpSectionServerError
93
97
  }),
94
98
  mcp.lastError && !flow && /dynamic client registration/i.test(mcp.lastError) && /* @__PURE__ */ jsx("div", {
95
99
  className: "mt-1 text-zg-meta text-[var(--zg-text-muted)]",
@@ -99,9 +103,12 @@ function McpServerRow({ server: mcp, enabled, expanded, probing, enabledTools, r
99
103
  test: mcp.test,
100
104
  probing,
101
105
  labels: l
102
- }) : /* @__PURE__ */ jsxs(Fragment, { children: [mcp.toolError && /* @__PURE__ */ jsx("div", {
103
- className: "mt-1 text-zg-meta text-zg-danger break-words",
104
- children: mcp.toolError
106
+ }) : /* @__PURE__ */ jsxs(Fragment, { children: [mcp.toolError && /* @__PURE__ */ jsx(Notice, {
107
+ tone: "error",
108
+ compact: true,
109
+ detail: mcp.toolError,
110
+ className: "mt-1",
111
+ children: l.mcpSectionToolsFailed
105
112
  }), mcp.toolsUpdatedAt && !probing && /* @__PURE__ */ jsx("div", {
106
113
  className: "zg-meta mt-1",
107
114
  children: l.mcpSectionToolsListed(ageString(mcp.toolsUpdatedAt))
@@ -175,17 +182,17 @@ function McpServerRow({ server: mcp, enabled, expanded, probing, enabledTools, r
175
182
  ]
176
183
  }), flow && /* @__PURE__ */ jsx("div", {
177
184
  className: "zg-tray mt-3 px-3 py-2.5 rounded-zg-md text-xs",
178
- children: flow.kind === "error" ? /* @__PURE__ */ jsxs("div", {
179
- className: "flex items-center gap-2",
180
- children: [/* @__PURE__ */ jsx("span", {
181
- className: "flex-1 text-zg-danger break-words",
182
- children: flow.message
183
- }), /* @__PURE__ */ jsx("button", {
185
+ children: flow.kind === "error" ? /* @__PURE__ */ jsx(Notice, {
186
+ tone: "error",
187
+ compact: true,
188
+ detail: flow.message,
189
+ action: /* @__PURE__ */ jsx("button", {
184
190
  type: "button",
185
191
  onClick: signIn.cancel,
186
192
  className: BTN_SECONDARY,
187
193
  children: l.mcpSectionDismiss
188
- })]
194
+ }),
195
+ children: l.mcpSectionSignInFailed
189
196
  }) : /* @__PURE__ */ jsxs("div", {
190
197
  className: "flex items-center gap-2",
191
198
  children: [/* @__PURE__ */ jsx("span", {
@@ -3,8 +3,8 @@ import { SettingsError } from "../../headless/host.js";
3
3
  //#region src/settings/sections/mcp/labels.d.ts
4
4
  /** The default English strings of the MCP servers section. */
5
5
  declare const DEFAULT_MCP_SECTION_LABELS: {
6
- /** A failed read or action, worded from the host's error. */
7
- mcpSectionError: (error: SettingsError) => string;
6
+ /** A failed read or action, worded by its kind. What the host said goes under Details. */
7
+ mcpSectionFailed: (error: SettingsError) => "Couldn't reach the host." | "Not allowed: this connection may not do that." | "Something went wrong.";
8
8
  /** Tests every enabled server. */
9
9
  mcpSectionTestAll: string;
10
10
  /** While that runs. */
@@ -71,6 +71,12 @@ declare const DEFAULT_MCP_SECTION_LABELS: {
71
71
  mcpSectionDisable: string;
72
72
  /** Its tooltip when off. */
73
73
  mcpSectionEnable: string;
74
+ /** The server's last error, worded; what it said goes under Details. */
75
+ mcpSectionServerError: string;
76
+ /** Listing its tools failed. */
77
+ mcpSectionToolsFailed: string;
78
+ /** A sign-in failed. */
79
+ mcpSectionSignInFailed: string;
74
80
  /** Drops a failed sign-in. */
75
81
  mcpSectionDismiss: string;
76
82
  /** The sign-in page is open. */
@@ -9,8 +9,8 @@ import { MCP_KEY_REFUSED_HINT, MCP_STATUS_LABEL } from "zidane/chat/pure";
9
9
  */
10
10
  /** The default English strings of the MCP servers section. */
11
11
  const DEFAULT_MCP_SECTION_LABELS = {
12
- /** A failed read or action, worded from the host's error. */
13
- mcpSectionError: (error) => error.detail ?? (error.kind === "unreachable" ? "Couldn't reach the host." : error.kind === "refused" ? "Not allowed: this connection may not do that." : "Something went wrong."),
12
+ /** A failed read or action, worded by its kind. What the host said goes under Details. */
13
+ mcpSectionFailed: (error) => error.kind === "unreachable" ? "Couldn't reach the host." : error.kind === "refused" ? "Not allowed: this connection may not do that." : "Something went wrong.",
14
14
  /** Tests every enabled server. */
15
15
  mcpSectionTestAll: "Test all",
16
16
  /** While that runs. */
@@ -77,6 +77,12 @@ const DEFAULT_MCP_SECTION_LABELS = {
77
77
  mcpSectionDisable: "Disable for this folder",
78
78
  /** Its tooltip when off. */
79
79
  mcpSectionEnable: "Enable for this folder",
80
+ /** The server's last error, worded; what it said goes under Details. */
81
+ mcpSectionServerError: "The server reported an error.",
82
+ /** Listing its tools failed. */
83
+ mcpSectionToolsFailed: "Couldn't list its tools.",
84
+ /** A sign-in failed. */
85
+ mcpSectionSignInFailed: "Sign-in failed.",
80
86
  /** Drops a failed sign-in. */
81
87
  mcpSectionDismiss: "Dismiss",
82
88
  /** The sign-in page is open. */
@@ -6,8 +6,8 @@ import { useSettingsHost } from "../../SettingsProvider.js";
6
6
  import { useComposerModelName, useModelCatalog } from "../../../chat/composer/use-composer-stores.js";
7
7
  import { ModelTestButton, ModelTestLine, useModelRowsLabels, useModelTest } from "./model-test.js";
8
8
  import { ModelListPicker } from "./ModelListPicker.js";
9
- import { useSettingsResource } from "../shared/catalog.js";
10
9
  import { ConversationPresetPreview } from "../../../onboarding/conversation.js";
10
+ import { useSettingsResource } from "../shared/catalog.js";
11
11
  import { SelectRow, ValueChip } from "../../rows.js";
12
12
  import { ModelPickField } from "./ModelPickField.js";
13
13
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -0,0 +1,26 @@
1
+ import { CSSProperties } from "react";
2
+ import { NewChatPlace } from "zidane/chat/pure";
3
+ //#region src/settings/sections/models/NewChatPlaceRow.d.ts
4
+ /** Props for {@link NewChatPlaceRow}. */
5
+ interface NewChatPlaceRowProps {
6
+ /** The place set here; `null` or absent: none. */
7
+ value: NewChatPlace | null | undefined;
8
+ /** What applies while none is set here (a space's row: the global place). Absent: this computer. */
9
+ inherited?: NewChatPlace | null;
10
+ /** A space's row: words it for the space. */
11
+ inSpace?: boolean;
12
+ /** Takes the place back. */
13
+ onClear: () => void;
14
+ /** Extra classes on the row. */
15
+ className?: string;
16
+ /** Inline styles on the row. */
17
+ style?: CSSProperties;
18
+ }
19
+ /**
20
+ * Renders where new chats start, and Clear when a place is set here.
21
+ *
22
+ * @param props - The place, what applies without it, and Clear.
23
+ */
24
+ declare function NewChatPlaceRow({ value, inherited, inSpace, onClear, className, style }: NewChatPlaceRowProps): import("react").JSX.Element;
25
+ //#endregion
26
+ export { NewChatPlaceRow, NewChatPlaceRowProps };
@@ -0,0 +1,78 @@
1
+ import { IconButton } from "../../../components/IconButton.js";
2
+ import { HostRow, MetaChip, RowText } from "../../../components/Form.js";
3
+ import { useModelRowsLabels } from "./model-test.js";
4
+ import { jsx, jsxs } from "react/jsx-runtime";
5
+ import { LOCAL_HOST_KEY } from "zidane/chat/pure";
6
+ //#region src/settings/sections/models/NewChatPlaceRow.tsx
7
+ /** The place as chips: where, on which machine, in which folder, how. */
8
+ function PlaceChips({ place, muted }) {
9
+ const l = useModelRowsLabels();
10
+ const host = !place || place.hostId === LOCAL_HOST_KEY ? l.modelRowsThisComputer : place.hostName ?? place.hostId;
11
+ const tone = muted ? "muted" : "text";
12
+ return /* @__PURE__ */ jsxs("span", {
13
+ className: "flex items-center gap-1 flex-wrap justify-end min-w-0",
14
+ children: [
15
+ /* @__PURE__ */ jsxs(MetaChip, {
16
+ tone,
17
+ children: [/* @__PURE__ */ jsx("span", {
18
+ "aria-hidden": true,
19
+ className: !place || place.hostId === LOCAL_HOST_KEY ? "i-ph-laptop" : "i-ph-hard-drives"
20
+ }), host]
21
+ }),
22
+ place?.machine && /* @__PURE__ */ jsxs(MetaChip, {
23
+ tone,
24
+ children: [/* @__PURE__ */ jsx("span", {
25
+ "aria-hidden": true,
26
+ className: "i-ph-desktop-tower"
27
+ }), place.machine]
28
+ }),
29
+ place?.folder && /* @__PURE__ */ jsx(MetaChip, {
30
+ tone,
31
+ className: "font-mono max-w-[16rem]",
32
+ children: /* @__PURE__ */ jsx("span", {
33
+ className: "truncate",
34
+ children: place.folder
35
+ })
36
+ }),
37
+ place?.isolation && place.isolation !== "local" && /* @__PURE__ */ jsx(MetaChip, {
38
+ tone,
39
+ children: place.isolation
40
+ })
41
+ ]
42
+ });
43
+ }
44
+ /**
45
+ * Renders where new chats start, and Clear when a place is set here.
46
+ *
47
+ * @param props - The place, what applies without it, and Clear.
48
+ */
49
+ function NewChatPlaceRow({ value, inherited, inSpace = false, onClear, className, style }) {
50
+ const l = useModelRowsLabels();
51
+ const label = l.modelRowsNewChatsStart;
52
+ return /* @__PURE__ */ jsxs(HostRow, {
53
+ "data-testid": "new-chat-place-row",
54
+ disabled: true,
55
+ className,
56
+ style,
57
+ children: [
58
+ /* @__PURE__ */ jsx(RowText, {
59
+ label,
60
+ description: l.modelRowsNewChatsStartHint(inSpace),
61
+ truncate: false
62
+ }),
63
+ /* @__PURE__ */ jsx(PlaceChips, {
64
+ place: value ?? inherited,
65
+ muted: !value
66
+ }),
67
+ value && /* @__PURE__ */ jsx(IconButton, {
68
+ icon: "i-ph-x",
69
+ label: l.modelRowsClear(inSpace ? l.modelRowsPlaceResetSpace : l.modelRowsPlaceReset, label),
70
+ title: inSpace ? l.modelRowsPlaceResetSpace : l.modelRowsPlaceReset,
71
+ size: "sm",
72
+ onClick: onClear
73
+ })
74
+ ]
75
+ });
76
+ }
77
+ //#endregion
78
+ export { NewChatPlaceRow };
@@ -1,7 +1,9 @@
1
1
  import { useSettings } from "../../SettingsProvider.js";
2
2
  import { AgentDefaultsRows, agentDefaultsOf } from "./AgentDefaults.js";
3
3
  import { SpacesSection } from "../../../chat/sidebar/SpacesSection.js";
4
- import { jsx } from "react/jsx-runtime";
4
+ import { NewChatPlaceRow } from "./NewChatPlaceRow.js";
5
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
6
+ import { readNewChatPlace } from "zidane/chat/pure";
5
7
  //#region src/settings/sections/models/SpacesDefaultsSection.tsx
6
8
  /**
7
9
  * The Spaces sections of the General page: the switch, then the list with each space's defaults while it is on.
@@ -11,14 +13,24 @@ import { jsx } from "react/jsx-runtime";
11
13
  function SpacesDefaultsSection({ cwd, className, style }) {
12
14
  const { settings } = useSettings();
13
15
  const inherited = agentDefaultsOf(settings);
14
- return /* @__PURE__ */ jsx(SpacesSection, { renderDefaults: (space, update) => /* @__PURE__ */ jsx(AgentDefaultsRows, {
16
+ return /* @__PURE__ */ jsx(SpacesSection, { renderDefaults: (space, update) => /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(AgentDefaultsRows, {
15
17
  value: spaceDefaults(space),
16
18
  onChange: (next) => update((s) => withSpaceDefaults(s, next)),
17
19
  cwd,
18
20
  inherited,
19
21
  className,
20
22
  style
21
- }) });
23
+ }), /* @__PURE__ */ jsx(NewChatPlaceRow, {
24
+ value: space.place,
25
+ inherited: readNewChatPlace(settings.defaultPlace) ?? null,
26
+ inSpace: true,
27
+ onClear: () => update((s) => {
28
+ const { place: _place, ...rest } = s;
29
+ return rest;
30
+ }),
31
+ className,
32
+ style
33
+ })] }) });
22
34
  }
23
35
  /**
24
36
  * A space's defaults for new sessions, as the rows edit them.
@@ -40,6 +40,8 @@ declare const DEFAULT_MODEL_ROWS_LABELS: {
40
40
  modelRowsDuration: (ms: number) => string;
41
41
  /** A failed test: why, and what the provider said. */
42
42
  modelRowsFailed: (reason: string | undefined, message: string | undefined) => string;
43
+ /** A failed test, worded; what the provider said goes under Details. */
44
+ modelRowsTestFailed: (reason: string | undefined) => string;
43
45
  /** A failed test's model on its provider, after the reason. */
44
46
  modelRowsFailedTarget: (target: string) => string;
45
47
  /** The text model row. */
@@ -88,6 +90,11 @@ declare const DEFAULT_MODEL_ROWS_LABELS: {
88
90
  modelRowsStartWith: (where: string) => string;
89
91
  /** The default agent row. */
90
92
  modelRowsDefaultAgent: string;
93
+ modelRowsNewChatsStart: string;
94
+ modelRowsNewChatsStartHint: (inSpace: boolean) => "To change it, pick a place in a new chat of this space, then Use for new chats." | "To change it, pick a place in a new chat, then Use for new chats.";
95
+ modelRowsThisComputer: string;
96
+ modelRowsPlaceReset: string;
97
+ modelRowsPlaceResetSpace: string;
91
98
  /** The agent new sessions start on with none set. */
92
99
  modelRowsBuild: string;
93
100
  /** A saved agent this folder doesn't offer. */
@@ -40,6 +40,8 @@ const DEFAULT_MODEL_ROWS_LABELS = {
40
40
  modelRowsDuration: (ms) => `${ms}ms`,
41
41
  /** A failed test: why, and what the provider said. */
42
42
  modelRowsFailed: (reason, message) => `${reason ?? "error"}: ${message ?? "failed"}`,
43
+ /** A failed test, worded; what the provider said goes under Details. */
44
+ modelRowsTestFailed: (reason) => reason ? `The model didn't answer (${reason}).` : "The model didn't answer.",
43
45
  /** A failed test's model on its provider, after the reason. */
44
46
  modelRowsFailedTarget: (target) => ` (${target})`,
45
47
  /** The text model row. */
@@ -88,6 +90,11 @@ const DEFAULT_MODEL_ROWS_LABELS = {
88
90
  modelRowsStartWith: (where) => `${where} start with them.`,
89
91
  /** The default agent row. */
90
92
  modelRowsDefaultAgent: "Default agent",
93
+ modelRowsNewChatsStart: "Where new chats start",
94
+ modelRowsNewChatsStartHint: (inSpace) => inSpace ? "To change it, pick a place in a new chat of this space, then Use for new chats." : "To change it, pick a place in a new chat, then Use for new chats.",
95
+ modelRowsThisComputer: "This computer",
96
+ modelRowsPlaceReset: "Start new chats on this computer",
97
+ modelRowsPlaceResetSpace: "Use the default place",
91
98
  /** The agent new sessions start on with none set. */
92
99
  modelRowsBuild: "Build",
93
100
  /** A saved agent this folder doesn't offer. */
@@ -1,4 +1,5 @@
1
1
  import { BTN_SECONDARY } from "../../../components/button.js";
2
+ import { Notice } from "../../../components/Notice.js";
2
3
  import { MetaChip } from "../../../components/Form.js";
3
4
  import { toSettingsError } from "../../headless/host.js";
4
5
  import { useComposerModelName, useComposerProviderLabel } from "../../../chat/composer/use-composer-stores.js";
@@ -94,10 +95,12 @@ function ModelTestLine({ result, className }) {
94
95
  ]
95
96
  });
96
97
  const target = model && provider ? l.modelRowsPickLabel(model, provider) : model ?? provider;
97
- return /* @__PURE__ */ jsxs("div", {
98
- role: "alert",
99
- className: `zg-meta px-3 pb-2 !text-zg-danger break-words${className ? ` ${className}` : ""}`,
100
- children: [l.modelRowsFailed(result.reason, result.message), target ? l.modelRowsFailedTarget(target) : ""]
98
+ return /* @__PURE__ */ jsxs(Notice, {
99
+ tone: "error",
100
+ compact: true,
101
+ ...result.message ? { detail: result.message } : {},
102
+ className: `mx-3 mb-2${className ? ` ${className}` : ""}`,
103
+ children: [l.modelRowsTestFailed(result.reason), target ? l.modelRowsFailedTarget(target) : ""]
101
104
  });
102
105
  }
103
106
  //#endregion
@@ -1,8 +1,10 @@
1
1
  import { IconButton } from "../../../components/IconButton.js";
2
2
  import { BTN_PRIMARY, BTN_SECONDARY } from "../../../components/button.js";
3
+ import { Notice } from "../../../components/Notice.js";
3
4
  import { Segmented } from "../../../components/Segmented.js";
4
5
  import { EmptyState, Tray } from "../../../components/Surface.js";
5
6
  import { MetaChip } from "../../../components/Form.js";
7
+ import { errorMessage } from "../../../components/report-error.js";
6
8
  import { CountBadge } from "../../../components/TabPill.js";
7
9
  import { useStaysMounted } from "../../../motion/collapse.js";
8
10
  import { useSettingsHost, useSettingsLabels } from "../../SettingsProvider.js";
@@ -26,8 +28,7 @@ import { memo, useCallback, useMemo, useState } from "react";
26
28
  * summed in its header's badges: Processes (open), Sessions, Threads, Slow
27
29
  * frames and IPC (hosts that keep those counters: the desktop app, not a
28
30
  * server), CPU profile (hosts that record one). A host that can't be
29
- * watched says why (too old, an error); a token without admin sees the page
30
- * restricted ("Admin only") and empty. The process tree opens one level at a time; what
31
+ * watched says why (too old, an error). The process tree opens one level at a time; what
31
32
  * sessions and terminals launched is its own group, collapsed. Sessions lists
32
33
  * what each session runs, one collapsed group per session. Rows are one line:
33
34
  * the pid and command line are the row's tooltip.
@@ -60,7 +61,7 @@ function PerformanceSection({ className, style }) {
60
61
  const l = usePerformanceSectionLabels();
61
62
  const settingsLabels = useSettingsLabels();
62
63
  const latest = samples[samples.length - 1];
63
- const restricted = useSettingsRestricted() && !host || error?.kind === "refused";
64
+ const restricted = useSettingsRestricted() && !host;
64
65
  return /* @__PURE__ */ jsxs(SettingsPanel, {
65
66
  className,
66
67
  style,
@@ -677,7 +678,7 @@ function Profile({ host, reveal }) {
677
678
  ok: false,
678
679
  error: {
679
680
  kind: "failed",
680
- detail: error instanceof Error ? error.message : String(error)
681
+ detail: errorMessage(error)
681
682
  }
682
683
  });
683
684
  } finally {
@@ -732,8 +733,17 @@ function Profile({ host, reveal }) {
732
733
  ]
733
734
  }),
734
735
  outcome && !outcome.ok && /* @__PURE__ */ jsx("div", {
735
- className: "px-2 pb-1.5 text-xs text-zg-danger",
736
- children: outcome.error.kind === "busy" ? l.perfProfileBusy : l.perfProfileFailed(outcome.error.detail)
736
+ className: "px-2 pb-1.5",
737
+ children: outcome.error.kind === "busy" ? /* @__PURE__ */ jsx(Notice, {
738
+ tone: "warning",
739
+ compact: true,
740
+ children: l.perfProfileBusy
741
+ }) : /* @__PURE__ */ jsx(Notice, {
742
+ tone: "error",
743
+ compact: true,
744
+ ...outcome.error.detail ? { detail: outcome.error.detail } : {},
745
+ children: l.perfProfileError
746
+ })
737
747
  }),
738
748
  outcome?.ok && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Heads, { names: [l.perfColShare, l.perfColSelf] }), outcome.profile.top.slice(0, LIST_CAP).map((fn) => /* @__PURE__ */ jsxs("div", {
739
749
  className: ROW,
@@ -70,7 +70,7 @@ declare const DEFAULT_PERFORMANCE_SECTION_LABELS: {
70
70
  perfProfileRecord: string;
71
71
  perfProfileRecording: (s: number) => string;
72
72
  perfProfileBusy: string;
73
- perfProfileFailed: (detail?: string) => string;
73
+ perfProfileError: string;
74
74
  perfHud: string;
75
75
  perfHudClose: string;
76
76
  perfHudOpen: string;
@@ -94,7 +94,7 @@ const DEFAULT_PERFORMANCE_SECTION_LABELS = {
94
94
  perfProfileRecord: "Record",
95
95
  perfProfileRecording: (s) => `Recording ${s} s…`,
96
96
  perfProfileBusy: "Busy. Close DevTools and retry.",
97
- perfProfileFailed: (detail) => detail ? `Failed: ${detail}` : "Failed.",
97
+ perfProfileError: "Couldn't record the profile.",
98
98
  perfHud: "Performance",
99
99
  perfHudClose: "Close the performance overlay",
100
100
  perfHudOpen: "Open Settings › Performance",
@@ -22,7 +22,7 @@ interface ProvidersSectionProps {
22
22
  /**
23
23
  * Renders the providers of the nearest `SettingsProvider`'s host (`providers`). Without it the list is
24
24
  * empty; without an action, its control is hidden; a connection that may not write (`writable`) sees
25
- * the list restricted ("Admin only").
25
+ * the list restricted.
26
26
  *
27
27
  * @param props - The `cwd`, an `intro`, `confirm`, `className` and `style`.
28
28
  */
@@ -1,5 +1,6 @@
1
1
  import { BrandMark } from "../../../components/BrandMark.js";
2
2
  import { BTN_DANGER, BTN_PRIMARY, BTN_SECONDARY } from "../../../components/button.js";
3
+ import { Notice } from "../../../components/Notice.js";
3
4
  import { MetaChip } from "../../../components/Form.js";
4
5
  import { BrowserSignIn } from "../../../components/BrowserSignIn.js";
5
6
  import { toSettingsError } from "../../headless/host.js";
@@ -36,7 +37,7 @@ const NO_PROVIDERS = [];
36
37
  /**
37
38
  * Renders the providers of the nearest `SettingsProvider`'s host (`providers`). Without it the list is
38
39
  * empty; without an action, its control is hidden; a connection that may not write (`writable`) sees
39
- * the list restricted ("Admin only").
40
+ * the list restricted.
40
41
  *
41
42
  * @param props - The `cwd`, an `intro`, `confirm`, `className` and `style`.
42
43
  */
@@ -64,9 +65,12 @@ function ProvidersSection({ cwd, intro, confirm = YES, className, style }) {
64
65
  confirm
65
66
  }, status.key))
66
67
  }) }),
67
- load.error && /* @__PURE__ */ jsx("div", {
68
- className: "mt-3 text-xs text-zg-danger",
69
- children: l.accountsError(load.error)
68
+ load.error && /* @__PURE__ */ jsx(Notice, {
69
+ tone: "error",
70
+ compact: true,
71
+ className: "mt-3",
72
+ ...load.error.detail ? { detail: load.error.detail } : {},
73
+ children: l.accountsFailed(load.error)
70
74
  })
71
75
  ] })
72
76
  });
@@ -351,9 +355,12 @@ function ProviderRow({ status, cwd, host, restricted, labels: l, confirm }) {
351
355
  onError: setRowError,
352
356
  onReauth: canSignIn && !flow ? startSignIn : void 0
353
357
  }),
354
- rowError && /* @__PURE__ */ jsx("div", {
355
- className: "mt-2 text-xs text-zg-danger",
356
- children: l.accountsError(rowError)
358
+ rowError && /* @__PURE__ */ jsx(Notice, {
359
+ tone: "error",
360
+ compact: true,
361
+ className: "mt-2",
362
+ ...rowError.detail ? { detail: rowError.detail } : {},
363
+ children: l.accountsFailed(rowError)
357
364
  })
358
365
  ]
359
366
  })
@@ -14,7 +14,7 @@ interface ServerProvidersSectionProps {
14
14
  /**
15
15
  * Renders the providers of the nearest `SettingsProvider`'s host (`providers`) as a server's cards: Set API
16
16
  * key needs `setApiKey`, Sign in `signIn`, Remove `remove`; a connection that may not write (`writable`)
17
- * sees the cards restricted ("Admin only").
17
+ * sees the cards restricted.
18
18
  *
19
19
  * @param props - The `hostName`, an `intro`, `className` and `style`.
20
20
  */
@@ -1,4 +1,5 @@
1
1
  import { BTN_DANGER, BTN_PRIMARY, BTN_SECONDARY } from "../../../components/button.js";
2
+ import { Notice } from "../../../components/Notice.js";
2
3
  import { ErrorNote, FormCard, FormSection, MetaChip, OpLine, RowText } from "../../../components/Form.js";
3
4
  import { toSettingsError } from "../../headless/host.js";
4
5
  import { useSettingsHost } from "../../SettingsProvider.js";
@@ -25,7 +26,7 @@ const YES = async () => true;
25
26
  /**
26
27
  * Renders the providers of the nearest `SettingsProvider`'s host (`providers`) as a server's cards: Set API
27
28
  * key needs `setApiKey`, Sign in `signIn`, Remove `remove`; a connection that may not write (`writable`)
28
- * sees the cards restricted ("Admin only").
29
+ * sees the cards restricted.
29
30
  *
30
31
  * @param props - The `hostName`, an `intro`, `className` and `style`.
31
32
  */
@@ -41,7 +42,10 @@ function ServerProvidersSection({ hostName, intro, className, style }) {
41
42
  children: /* @__PURE__ */ jsxs(SettingsPanelBody, { children: [intro, /* @__PURE__ */ jsxs("div", {
42
43
  className: "space-y-4",
43
44
  children: [
44
- load.error && /* @__PURE__ */ jsx(ErrorNote, { children: l.accountsServerReadFailed(hostName, l.accountsError(load.error)) }),
45
+ load.error && /* @__PURE__ */ jsx(ErrorNote, {
46
+ ...load.error.detail ? { detail: load.error.detail } : {},
47
+ children: l.accountsServerReadFailed(hostName, l.accountsFailed(load.error))
48
+ }),
45
49
  !list && !load.error && /* @__PURE__ */ jsx(OpLine, {
46
50
  kind: "busy",
47
51
  children: l.accountsServerReading(hostName)
@@ -198,9 +202,11 @@ function ProviderCard({ host, hostName, provider, labels: l }) {
198
202
  }),
199
203
  error && /* @__PURE__ */ jsx("div", {
200
204
  className: "px-3 pb-2.5",
201
- children: /* @__PURE__ */ jsx(OpLine, {
202
- kind: "error",
203
- children: l.accountsError(error)
205
+ children: /* @__PURE__ */ jsx(Notice, {
206
+ tone: "error",
207
+ compact: true,
208
+ ...error.detail ? { detail: error.detail } : {},
209
+ children: l.accountsFailed(error)
204
210
  })
205
211
  })
206
212
  ]
@@ -2,8 +2,8 @@ import { SettingsError } from "../../headless/host.js";
2
2
  //#region src/settings/sections/providers/labels.d.ts
3
3
  /** The default English strings of the Accounts sections. */
4
4
  declare const DEFAULT_ACCOUNTS_SECTION_LABELS: {
5
- /** A failed read or action, worded from the host's error. */
6
- accountsError: (error: SettingsError) => string;
5
+ /** A failed read or action, worded by its kind. What the host said goes under Details. */
6
+ accountsFailed: (error: SettingsError) => "Couldn't reach the host." | "Not allowed: this connection may not do that." | "Something went wrong.";
7
7
  /** The status dot of a provider with a credential. */
8
8
  accountsAuthenticated: string;
9
9
  /** The status dot of a provider without one. */
@@ -9,8 +9,8 @@ import { DEFAULT_OAUTH_ACCOUNT_LABEL } from "zidane/chat/pure";
9
9
  */
10
10
  /** The default English strings of the Accounts sections. */
11
11
  const DEFAULT_ACCOUNTS_SECTION_LABELS = {
12
- /** A failed read or action, worded from the host's error. */
13
- accountsError: (error) => error.detail ?? (error.kind === "unreachable" ? "Couldn't reach the host." : error.kind === "refused" ? "Not allowed: this connection may not do that." : "Something went wrong."),
12
+ /** A failed read or action, worded by its kind. What the host said goes under Details. */
13
+ accountsFailed: (error) => error.kind === "unreachable" ? "Couldn't reach the host." : error.kind === "refused" ? "Not allowed: this connection may not do that." : "Something went wrong.",
14
14
  /** The status dot of a provider with a credential. */
15
15
  accountsAuthenticated: "Authenticated",
16
16
  /** The status dot of a provider without one. */
@@ -5,8 +5,8 @@ import { EmptyState } from "../../../components/Surface.js";
5
5
  import { Checkbox, MetaChip } from "../../../components/Form.js";
6
6
  import { LoadError } from "../../../components/LoadError.js";
7
7
  import { useSettingsHost } from "../../SettingsProvider.js";
8
- import { useSectionLabels } from "../use-section-labels.js";
9
8
  import { useCodeDocument } from "../../../code/editor/useCodeDocument.js";
9
+ import { useSectionLabels } from "../use-section-labels.js";
10
10
  import { SettingsRestricted } from "../../SettingsRestricted.js";
11
11
  import { OpenFileButton, RevealPathButton, useCatalogSharedLabels, useEnabledList, useSettingsResource } from "../shared/catalog.js";
12
12
  import { formatTokens } from "../../../session/headless/usage-format.js";
@@ -3,9 +3,9 @@ import { OpLine } from "../../../components/Form.js";
3
3
  import { toSettingsError } from "../../headless/host.js";
4
4
  import { useSettingsHost } from "../../SettingsProvider.js";
5
5
  import { SettingsPanel, SettingsPanelActions, SettingsPanelBody } from "../../section.js";
6
+ import { SkillSourceBrowser } from "../../../onboarding/skills/SkillSourceBrowser.js";
6
7
  import { ScopePicker, useCatalogSharedLabels, useOpLine, useSettingsResource, useSettingsValues, useWriteSetting } from "../shared/catalog.js";
7
8
  import { SettingsTutorial } from "../../SettingsTutorial.js";
8
- import { SkillSourceBrowser } from "../../../onboarding/skills/SkillSourceBrowser.js";
9
9
  import { SkillActions, SkillList, useSkillsSectionLabels } from "./SkillList.js";
10
10
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
11
11
  import { useCallback, useEffect, useMemo, useRef, useState } from "react";
@@ -99,17 +99,10 @@ function describeSettingsPerformanceContract(name, makeHarness, capabilities, op
99
99
  control.emit(fixturePerfSample(3, 7e3));
100
100
  expect(seen).toEqual([5e3]);
101
101
  });
102
- it.skipIf(!options.watchErrors).each([
103
- { kind: "unavailable" },
104
- {
105
- kind: "refused",
106
- detail: "\"perf.watch\" needs an admin token"
107
- },
108
- {
109
- kind: "failed",
110
- detail: "offline"
111
- }
112
- ])("a refused watch ($kind) reaches onError as its kind, once", async (error) => {
102
+ it.skipIf(!options.watchErrors).each([{ kind: "unavailable" }, {
103
+ kind: "failed",
104
+ detail: "offline"
105
+ }])("a refused watch ($kind) reaches onError as its kind, once", async (error) => {
113
106
  const { host } = await setup({ watchError: error });
114
107
  const errors = [];
115
108
  const seen = [];
@@ -119,7 +112,10 @@ function describeSettingsPerformanceContract(name, makeHarness, capabilities, op
119
112
  expect(seen).toEqual([]);
120
113
  });
121
114
  it.skipIf(!options.watchErrors)("a watch released before its refusal lands hears nothing", async () => {
122
- const { host } = await setup({ watchError: { kind: "refused" } });
115
+ const { host } = await setup({ watchError: {
116
+ kind: "failed",
117
+ detail: "offline"
118
+ } });
123
119
  const errors = [];
124
120
  host.performance.watch(() => void 0, (e) => errors.push(e))();
125
121
  await new Promise((resolve) => setTimeout(resolve, 0));