@nextclaw/ui 0.15.8 → 0.15.10

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 (74) hide show
  1. package/CHANGELOG.md +82 -0
  2. package/dist/assets/{api-kGIZo6kv.js → api-D0U10BcF.js} +3 -3
  3. package/dist/assets/{app-presenter-provider-Ct0DePOC.js → app-presenter-provider-Dffdm_Ek.js} +3 -3
  4. package/dist/assets/{appearance-settings-page-CcA8Kewq.js → appearance-settings-page-sfusZc2d.js} +1 -1
  5. package/dist/assets/{book-open-D4LvR1N9.js → book-open-w3160PZf.js} +1 -1
  6. package/dist/assets/{channels-list-page-CybW_0nu.js → channels-list-page-Dkfe87Zq.js} +1 -1
  7. package/dist/assets/{chat-page-Bs8c1adx.js → chat-page-CeapbQnG.js} +1 -1
  8. package/dist/assets/{config-split-page-BvhZDJGS.js → config-split-page-CnQI8cKT.js} +1 -1
  9. package/dist/assets/{confirm-dialog-Ucx_SQm4.js → confirm-dialog-RZUWA_j9.js} +1 -1
  10. package/dist/assets/desktop-update-config-CbSYQMYz.js +1 -0
  11. package/dist/assets/{dist-CCwmPmQ3.js → dist-DEJlYi0E.js} +1 -1
  12. package/dist/assets/{doc-browser-N9UwkWvd.js → doc-browser-DwXHr-mm.js} +1 -1
  13. package/dist/assets/{doc-browser-context-CIIKT2sE.js → doc-browser-context-CpvHiuQG.js} +1 -1
  14. package/dist/assets/doc-browser-jVTq8iY_2.js +1 -0
  15. package/dist/assets/{download-CSAHAjF9.js → download-BP7ZxrwI.js} +1 -1
  16. package/dist/assets/{external-link-Dno-cJJr.js → external-link-DvHCEe3h.js} +1 -1
  17. package/dist/assets/{eye-BZkraQUn.js → eye-C--6dxv_.js} +1 -1
  18. package/dist/assets/{folder-Bro2sQD3.js → folder-BfeO1zCY.js} +1 -1
  19. package/dist/assets/{form-actions-CC31CR28.js → form-actions-5OsDRt0g.js} +1 -1
  20. package/dist/assets/{index-EO5Gsaff.js → index-DoZR11Nh.js} +2 -2
  21. package/dist/assets/loader-circle-BWdgwVnn.js +1 -0
  22. package/dist/assets/{logo-badge-B___Witw.js → logo-badge-TdPa95AC.js} +1 -1
  23. package/dist/assets/mcp-marketplace-page-XnRWiC8c.js +1 -0
  24. package/dist/assets/{mcp-marketplace-page-Ccy-UG8R.js → mcp-marketplace-page-cm3ifaKu.js} +1 -1
  25. package/dist/assets/{model-config-page-BsMxhVaO.js → model-config-page-CXnqSbSI.js} +1 -1
  26. package/dist/assets/plus-BeApS21t.js +1 -0
  27. package/dist/assets/{popover-CAy9XSdY.js → popover-EulxhA0q.js} +1 -1
  28. package/dist/assets/{provider-scoped-model-input-Cqo78Dx_.js → provider-scoped-model-input-ll_Btc9h.js} +1 -1
  29. package/dist/assets/{providers-config-page-CZSc-ruy.js → providers-config-page-Bcuhqkdl.js} +1 -1
  30. package/dist/assets/react-Bb0EYsLS.js +8 -0
  31. package/dist/assets/{refresh-cw-w9L_vlM-.js → refresh-cw-CexL11m1.js} +1 -1
  32. package/dist/assets/remote-CqKpuOP9.js +1 -0
  33. package/dist/assets/rotate-cw-DHXoiqFB.js +1 -0
  34. package/dist/assets/{runtime-config-page-DM63Nkxm.js → runtime-config-page-D-Aqxizs.js} +1 -1
  35. package/dist/assets/{save-DdL5VkJS.js → save-DtccrZld.js} +1 -1
  36. package/dist/assets/{search-DydusQAS.js → search-BArc_WOX.js} +1 -1
  37. package/dist/assets/{search-config-page-CfwWop50.js → search-config-page-XTKf5rc0.js} +1 -1
  38. package/dist/assets/{secrets-config-page-BPIZUwLW.js → secrets-config-page-Cx-qptcj.js} +1 -1
  39. package/dist/assets/security-config-DWGFM2u9.js +1 -0
  40. package/dist/assets/{select-BEtjsC3L.js → select-C9FB0jlt.js} +1 -1
  41. package/dist/assets/{setting-row-CTA16hhx.js → setting-row-DFvioO2a.js} +1 -1
  42. package/dist/assets/{settings-2-D6BrZlD5.js → settings-2-RMWqf-ey.js} +1 -1
  43. package/dist/assets/{skeleton-DcJKUZCH.js → skeleton-DQ5WhuDG.js} +1 -1
  44. package/dist/assets/{tabs-CrPVCYHg.js → tabs-D_mjyOOf.js} +1 -1
  45. package/dist/assets/{tag-chip-Bvm-V7SR.js → tag-chip-C011rd9q.js} +1 -1
  46. package/dist/assets/{trash-2-5ABWNTB-.js → trash-2-bDhfsO1O.js} +1 -1
  47. package/dist/assets/{use-config-DJaZYyZC.js → use-config-BNrlfEck.js} +1 -1
  48. package/dist/assets/{use-confirm-dialog-QUWL1EuB.js → use-confirm-dialog-CTNA1PC0.js} +1 -1
  49. package/dist/assets/{use-viewport-layout-BWYz8zwd.js → use-viewport-layout-P0q6Nt_N.js} +1 -1
  50. package/dist/assets/x-qvh05iyu.js +1 -0
  51. package/dist/index.html +28 -28
  52. package/package.json +9 -9
  53. package/src/features/system-status/components/__tests__/desktop-update-config.test.tsx +4 -8
  54. package/src/features/system-status/components/desktop-update-config.tsx +2 -42
  55. package/src/features/system-status/managers/runtime-update.manager.ts +2 -21
  56. package/src/features/system-status/stores/runtime-update.store.ts +0 -1
  57. package/src/platforms/desktop/index.ts +0 -1
  58. package/src/platforms/desktop/managers/desktop-update.manager.ts +1 -14
  59. package/src/platforms/desktop/stores/desktop-update.store.ts +0 -1
  60. package/src/platforms/desktop/types/desktop-update.types.ts +0 -5
  61. package/src/shared/components/common/__tests__/brand-header.test.tsx +5 -30
  62. package/src/shared/lib/api/runtime-update.utils.ts +1 -5
  63. package/src/shared/lib/i18n/locales/en-US/desktop-update.json +3 -9
  64. package/src/shared/lib/i18n/locales/zh-CN/desktop-update.json +3 -9
  65. package/dist/assets/desktop-update-config-Ch9m1GRB.js +0 -1
  66. package/dist/assets/doc-browser-Cr7330LU2.js +0 -1
  67. package/dist/assets/loader-circle-DyToFBCM.js +0 -1
  68. package/dist/assets/mcp-marketplace-page-3Q-VOIJ3.js +0 -1
  69. package/dist/assets/plus-wynE6QCr.js +0 -1
  70. package/dist/assets/react-UuyIZ_Oi.js +0 -8
  71. package/dist/assets/remote-D4rv7kb-.js +0 -1
  72. package/dist/assets/rotate-cw-C0VFtLju.js +0 -1
  73. package/dist/assets/security-config-CeBjHoFL.js +0 -1
  74. package/dist/assets/x-gM1Q7cRX.js +0 -1
@@ -5,7 +5,6 @@ import { Button } from '@/shared/components/ui/button';
5
5
  import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/shared/components/ui/card';
6
6
  import { Label } from '@/shared/components/ui/label';
7
7
  import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/shared/components/ui/select';
8
- import { Switch } from '@/shared/components/ui/switch';
9
8
  import { PageHeader, PageLayout } from '@/app/components/layout/page-layout';
10
9
  import { formatDateTime, getLanguage, t } from '@/shared/lib/i18n';
11
10
  import { cn } from '@/shared/lib/utils';
@@ -66,30 +65,6 @@ function DownloadProgress({ snapshot }: { snapshot: UpdateSnapshot }) {
66
65
  );
67
66
  }
68
67
 
69
- function PreferenceToggle({
70
- label,
71
- help,
72
- checked,
73
- disabled,
74
- onCheckedChange,
75
- }: {
76
- label: string;
77
- help: string;
78
- checked: boolean;
79
- disabled: boolean;
80
- onCheckedChange: (checked: boolean) => void;
81
- }) {
82
- return (
83
- <div className="flex items-start justify-between gap-4 rounded-xl border border-gray-200 p-4">
84
- <div className="space-y-1">
85
- <Label>{label}</Label>
86
- <p className="text-sm text-gray-500">{help}</p>
87
- </div>
88
- <Switch checked={checked} disabled={disabled} onCheckedChange={onCheckedChange} />
89
- </div>
90
- );
91
- }
92
-
93
68
  function formatVersion(value: string | null): string {
94
69
  return value?.trim() || '-';
95
70
  }
@@ -235,7 +210,6 @@ export function DesktopUpdateConfig() {
235
210
  const isChecking = busyAction === 'checking';
236
211
  const isDownloading = busyAction === 'downloading';
237
212
  const isApplying = busyAction === 'applying';
238
- const isSavingPreferences = busyAction === 'saving-preferences';
239
213
  const isSwitchingChannel = busyAction === 'switching-channel';
240
214
  const canDownload = snapshot.status === 'update-available' && !isDownloading && !isApplying;
241
215
  const canApply = snapshot.status === 'downloaded' && !isApplying;
@@ -287,8 +261,8 @@ export function DesktopUpdateConfig() {
287
261
  <ReleaseNotesPreview snapshot={snapshot} />
288
262
  <Card>
289
263
  <CardHeader>
290
- <CardTitle>{t('desktopUpdatesPreferencesTitle')}</CardTitle>
291
- <CardDescription>{t('desktopUpdatesPreferencesDescription')}</CardDescription>
264
+ <CardTitle>{t('desktopUpdatesChannelSettingsTitle')}</CardTitle>
265
+ <CardDescription>{t('desktopUpdatesChannelSettingsDescription')}</CardDescription>
292
266
  </CardHeader>
293
267
  <CardContent className="space-y-5">
294
268
  <div className="rounded-xl border border-gray-200 p-4">
@@ -309,20 +283,6 @@ export function DesktopUpdateConfig() {
309
283
  <p className="text-sm text-gray-500">{t('desktopUpdatesReleaseChannelDowngradeHint')}</p>
310
284
  </div>
311
285
  </div>
312
- <PreferenceToggle
313
- label={t('desktopUpdatesAutomaticChecks')}
314
- help={t('desktopUpdatesAutomaticChecksHelp')}
315
- checked={snapshot.preferences.automaticChecks}
316
- disabled={isSavingPreferences || isSwitchingChannel}
317
- onCheckedChange={(checked) => void runtimeUpdateManager.updatePreferences({ automaticChecks: checked })}
318
- />
319
- <PreferenceToggle
320
- label={t('desktopUpdatesAutoDownload')}
321
- help={t('desktopUpdatesAutoDownloadHelp')}
322
- checked={snapshot.preferences.autoDownload}
323
- disabled={isSavingPreferences || isSwitchingChannel}
324
- onCheckedChange={(checked) => void runtimeUpdateManager.updatePreferences({ autoDownload: checked })}
325
- />
326
286
  </CardContent>
327
287
  </Card>
328
288
  <Card>
@@ -1,5 +1,5 @@
1
- import type { UpdatePreferences, UpdateSnapshot } from '@nextclaw/shared';
2
- import { applyRuntimeUpdate, checkRuntimeUpdate, downloadRuntimeUpdate, fetchRuntimeUpdate, updateRuntimeUpdateChannel, updateRuntimeUpdatePreferences } from '@/shared/lib/api';
1
+ import type { UpdateSnapshot } from '@nextclaw/shared';
2
+ import { applyRuntimeUpdate, checkRuntimeUpdate, downloadRuntimeUpdate, fetchRuntimeUpdate, updateRuntimeUpdateChannel } from '@/shared/lib/api';
3
3
  import type { NextClawDesktopBridge } from '@/platforms/desktop';
4
4
  import { t } from '@/shared/lib/i18n';
5
5
  import { toast } from 'sonner';
@@ -10,7 +10,6 @@ interface RuntimeUpdateSourceBase {
10
10
  checkForUpdates: () => Promise<UpdateSnapshot>;
11
11
  downloadUpdate: () => Promise<UpdateSnapshot>;
12
12
  applyDownloadedUpdate: () => Promise<UpdateSnapshot>;
13
- updatePreferences: (preferences: Partial<UpdatePreferences>) => Promise<UpdateSnapshot>;
14
13
  updateChannel: (channel: UpdateSnapshot['channel']) => Promise<UpdateSnapshot>;
15
14
  }
16
15
 
@@ -50,10 +49,6 @@ class DesktopBridgeRuntimeUpdateSource implements DesktopBridgeRuntimeUpdateSour
50
49
  return await this.desktopApi.applyDownloadedUpdate();
51
50
  };
52
51
 
53
- updatePreferences = async (preferences: Partial<UpdatePreferences>): Promise<UpdateSnapshot> => {
54
- return await this.desktopApi.updatePreferences(preferences);
55
- };
56
-
57
52
  updateChannel = async (channel: UpdateSnapshot['channel']): Promise<UpdateSnapshot> => {
58
53
  return await this.desktopApi.updateChannel(channel);
59
54
  };
@@ -78,10 +73,6 @@ class HostRuntimeUpdateSource implements HostRuntimeUpdateSourceContract {
78
73
  return await applyRuntimeUpdate();
79
74
  };
80
75
 
81
- updatePreferences = async (preferences: Partial<UpdatePreferences>): Promise<UpdateSnapshot> => {
82
- return await updateRuntimeUpdatePreferences(preferences);
83
- };
84
-
85
76
  updateChannel = async (channel: UpdateSnapshot['channel']): Promise<UpdateSnapshot> => {
86
77
  return await updateRuntimeUpdateChannel(channel);
87
78
  };
@@ -217,16 +208,6 @@ export class RuntimeUpdateManager {
217
208
  }
218
209
  };
219
210
 
220
- updatePreferences = async (preferences: Partial<UpdatePreferences>) => {
221
- try {
222
- await this.runSnapshotCommand('saving-preferences', t('runtimeUpdatesPreferencesFailed'), async (source) => {
223
- return await source.updatePreferences(preferences);
224
- });
225
- } catch {
226
- return;
227
- }
228
- };
229
-
230
211
  updateChannel = async (channel: UpdateSnapshot['channel']) => {
231
212
  const currentChannel = useRuntimeUpdateStore.getState().snapshot?.channel;
232
213
  if (currentChannel === channel) {
@@ -5,7 +5,6 @@ export type RuntimeUpdateBusyAction =
5
5
  | 'checking'
6
6
  | 'downloading'
7
7
  | 'applying'
8
- | 'saving-preferences'
9
8
  | 'switching-channel'
10
9
  | null;
11
10
 
@@ -20,7 +20,6 @@ export type {
20
20
  DesktopPresenceSnapshot,
21
21
  DesktopReleaseChannel,
22
22
  DesktopRuntimeControlResult,
23
- DesktopUpdatePreferences,
24
23
  DesktopUpdateSnapshot,
25
24
  DesktopUpdateStatus,
26
25
  NextClawDesktopBridge,
@@ -1,6 +1,5 @@
1
1
  import type {
2
2
  DesktopReleaseChannel,
3
- DesktopUpdatePreferences,
4
3
  DesktopUpdateSnapshot,
5
4
  NextClawDesktopBridge
6
5
  } from '@/platforms/desktop/types/desktop-update.types';
@@ -8,7 +7,7 @@ import { useDesktopUpdateStore } from '@/platforms/desktop/stores/desktop-update
8
7
  import { t } from '@/shared/lib/i18n';
9
8
  import { toast } from 'sonner';
10
9
 
11
- type DesktopUpdateBusyAction = 'checking' | 'downloading' | 'applying' | 'saving-preferences' | 'switching-channel';
10
+ type DesktopUpdateBusyAction = 'checking' | 'downloading' | 'applying' | 'switching-channel';
12
11
 
13
12
  export class DesktopUpdateManager {
14
13
  private unsubscribe: (() => void) | null = null;
@@ -120,18 +119,6 @@ export class DesktopUpdateManager {
120
119
  }
121
120
  };
122
121
 
123
- updatePreferences = async (preferences: Partial<DesktopUpdatePreferences>) => {
124
- try {
125
- await this.runSnapshotCommand(
126
- 'saving-preferences',
127
- t('desktopUpdatesPreferencesFailed'),
128
- async (desktopApi) => await desktopApi.updatePreferences(preferences)
129
- );
130
- } catch {
131
- return;
132
- }
133
- };
134
-
135
122
  updateChannel = async (channel: DesktopReleaseChannel) => {
136
123
  const currentChannel = useDesktopUpdateStore.getState().snapshot?.channel;
137
124
  if (currentChannel === channel) {
@@ -5,7 +5,6 @@ type DesktopUpdateBusyAction =
5
5
  | 'checking'
6
6
  | 'downloading'
7
7
  | 'applying'
8
- | 'saving-preferences'
9
8
  | 'switching-channel'
10
9
  | null;
11
10
 
@@ -1,7 +1,6 @@
1
1
  import type {
2
2
  InstallationKind,
3
3
  UpdateBlockReason,
4
- UpdatePreferences,
5
4
  UpdateProgress,
6
5
  UpdateSnapshot,
7
6
  UpdateStatus,
@@ -20,13 +19,10 @@ export type DesktopUpdateBlockReason = UpdateBlockReason;
20
19
 
21
20
  export type DesktopUpdateProgress = UpdateProgress;
22
21
 
23
- export type DesktopUpdatePreferences = UpdatePreferences;
24
-
25
22
  export type DesktopUpdateSnapshot = UpdateSnapshot & {
26
23
  status: DesktopUpdateStatus;
27
24
  channel: DesktopReleaseChannel;
28
25
  launcherVersion: string;
29
- preferences: DesktopUpdatePreferences;
30
26
  };
31
27
 
32
28
  export type DesktopRuntimeControlResult = {
@@ -68,7 +64,6 @@ export type NextClawDesktopBridge = {
68
64
  checkForUpdates: () => Promise<DesktopUpdateSnapshot>;
69
65
  downloadUpdate: () => Promise<DesktopUpdateSnapshot>;
70
66
  applyDownloadedUpdate: () => Promise<DesktopUpdateSnapshot>;
71
- updatePreferences: (preferences: Partial<DesktopUpdatePreferences>) => Promise<DesktopUpdateSnapshot>;
72
67
  updateChannel: (channel: DesktopReleaseChannel) => Promise<DesktopUpdateSnapshot>;
73
68
  restartService: () => Promise<DesktopRuntimeControlResult>;
74
69
  restartApp: () => Promise<DesktopRuntimeControlResult>;
@@ -110,16 +110,11 @@ describe('BrandHeader', () => {
110
110
  totalBytes: 100,
111
111
  percent: 50
112
112
  },
113
- canAutoDownload: true,
114
113
  canApplyInApp: false,
115
114
  requiresRestart: false,
116
115
  blockReason: null,
117
116
  recoveryCommand: null,
118
- errorMessage: null,
119
- preferences: {
120
- automaticChecks: true,
121
- autoDownload: true
122
- }
117
+ errorMessage: null
123
118
  }
124
119
  });
125
120
 
@@ -189,16 +184,11 @@ describe('BrandHeader', () => {
189
184
  releaseNotesUrl: 'https://docs.nextclaw.io/zh/notes/2026-07-15-nextclaw-v0-18-12',
190
185
  lastCheckedAt: null,
191
186
  progress: null,
192
- canAutoDownload: true,
193
187
  canApplyInApp: false,
194
188
  requiresRestart: false,
195
189
  blockReason: null,
196
190
  recoveryCommand: null,
197
- errorMessage: null,
198
- preferences: {
199
- automaticChecks: true,
200
- autoDownload: true
201
- }
191
+ errorMessage: null
202
192
  }
203
193
  });
204
194
 
@@ -240,16 +230,11 @@ describe('BrandHeader', () => {
240
230
  releaseNotesUrl: 'https://docs.nextclaw.io/zh/notes/2026-07-15-nextclaw-v0-18-12',
241
231
  lastCheckedAt: null,
242
232
  progress: null,
243
- canAutoDownload: true,
244
233
  canApplyInApp: true,
245
234
  requiresRestart: false,
246
235
  blockReason: null,
247
236
  recoveryCommand: null,
248
- errorMessage: null,
249
- preferences: {
250
- automaticChecks: true,
251
- autoDownload: true
252
- }
237
+ errorMessage: null
253
238
  }
254
239
  });
255
240
 
@@ -287,16 +272,11 @@ describe('BrandHeader', () => {
287
272
  releaseNotesUrl: null,
288
273
  lastCheckedAt: null,
289
274
  progress: null,
290
- canAutoDownload: true,
291
275
  canApplyInApp: false,
292
276
  requiresRestart: false,
293
277
  blockReason: 'signature-verification-unavailable',
294
278
  recoveryCommand: 'Set NEXTCLAW_UPDATE_BUNDLE_PUBLIC_KEY',
295
- errorMessage: 'Runtime bundle updates require a configured update public key.',
296
- preferences: {
297
- automaticChecks: true,
298
- autoDownload: true
299
- }
279
+ errorMessage: 'Runtime bundle updates require a configured update public key.'
300
280
  }
301
281
  });
302
282
 
@@ -335,18 +315,13 @@ describe('BrandHeader', () => {
335
315
  releaseNotesUrl: null,
336
316
  lastCheckedAt: null,
337
317
  progress: null,
338
- canAutoDownload: true,
339
318
  canApplyInApp: false,
340
319
  requiresRestart: false,
341
320
  blockReason: null,
342
321
  recoveryCommand: null,
343
322
  errorMessage: 'fetch failed: getaddrinfo ENOTFOUND updates.nextclaw.io',
344
323
  failureStage: 'check',
345
- diagnosticCommand: 'nextclaw logs path',
346
- preferences: {
347
- automaticChecks: true,
348
- autoDownload: true
349
- }
324
+ diagnosticCommand: 'nextclaw logs path'
350
325
  }
351
326
  });
352
327
 
@@ -1,4 +1,4 @@
1
- import type { UpdatePreferences, UpdateSnapshot } from '@nextclaw/shared';
1
+ import type { UpdateSnapshot } from '@nextclaw/shared';
2
2
  import { nextclawClient } from './managers/client.manager';
3
3
 
4
4
  export async function fetchRuntimeUpdate(): Promise<UpdateSnapshot> {
@@ -17,10 +17,6 @@ export async function applyRuntimeUpdate(): Promise<UpdateSnapshot> {
17
17
  return await nextclawClient.runtimeUpdate.apply();
18
18
  }
19
19
 
20
- export async function updateRuntimeUpdatePreferences(preferences: Partial<UpdatePreferences>): Promise<UpdateSnapshot> {
21
- return await nextclawClient.runtimeUpdate.updatePreferences(preferences);
22
- }
23
-
24
20
  export async function updateRuntimeUpdateChannel(channel: UpdateSnapshot['channel']): Promise<UpdateSnapshot> {
25
21
  return await nextclawClient.runtimeUpdate.updateChannel(channel);
26
22
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "updates": "Updates",
3
3
  "runtimeUpdatesPageTitle": "Runtime Updates",
4
- "runtimeUpdatesPageDescription": "Check and download new versions automatically, then decide when to switch to the new runtime.",
4
+ "runtimeUpdatesPageDescription": "NextClaw checks every two hours; you choose when to download and apply each update.",
5
5
  "runtimeUpdatesUnavailableTitle": "Updates Are Currently Unavailable",
6
6
  "runtimeUpdatesUnavailableDescription": "This runtime environment does not currently expose an update host.",
7
7
  "runtimeUpdatesUnavailableHint": "The update entry appears automatically once the host supports updates.",
@@ -13,7 +13,6 @@
13
13
  "runtimeUpdatesCheckFailed": "Failed to check for updates",
14
14
  "runtimeUpdatesDownloadFailed": "Failed to download update",
15
15
  "runtimeUpdatesApplyFailed": "Failed to apply update",
16
- "runtimeUpdatesPreferencesFailed": "Failed to save update preferences",
17
16
  "runtimeUpdatesChannelChangeFailed": "Failed to change the release channel",
18
17
  "runtimeUpdatesAlreadyLatest": "You already have the latest version.",
19
18
  "runtimeUpdatesReadyToApply": "The update is ready and can be applied now.",
@@ -64,8 +63,8 @@
64
63
  "desktopUpdatesBlockedRootCause.signature-verification-unavailable": "Root cause: missing update public key; install a configured build or ask the maintainer to set the key.",
65
64
  "desktopUpdatesBlockedRootCause.host-too-old": "Root cause: the host is too old for this runtime bundle; upgrade the NextClaw launcher first.",
66
65
  "desktopUpdatesBlockedRootCause.unsupported-installation": "Root cause: this installation or update source does not support auto-update; use a configured build.",
67
- "desktopUpdatesPreferencesTitle": "Update Preferences",
68
- "desktopUpdatesPreferencesDescription": "Automatic checks stay on by default, while background download remains under your control.",
66
+ "desktopUpdatesChannelSettingsTitle": "Update Channel",
67
+ "desktopUpdatesChannelSettingsDescription": "NextClaw checks every two hours; downloading and applying always require your action.",
69
68
  "desktopUpdatesReleaseChannel": "Release Channel",
70
69
  "desktopUpdatesReleaseChannelHelp": "Stable is for everyday use, while Beta lets you try newer builds earlier with more risk.",
71
70
  "desktopUpdatesReleaseChannelDowngradeHint": "Switching back to Stable does not force an immediate downgrade. Stable updates resume once that channel catches up with or exceeds your current version.",
@@ -73,10 +72,6 @@
73
72
  "desktopUpdatesChannelBeta": "Beta",
74
73
  "desktopUpdatesBetaBadgeTitle": "Following the Beta Channel",
75
74
  "desktopUpdatesBetaBadgeDescription": "You will receive new versions earlier, but you may also encounter more change and regression risk.",
76
- "desktopUpdatesAutomaticChecks": "Automatic Update Checks",
77
- "desktopUpdatesAutomaticChecksHelp": "Check for new versions periodically while the app is running.",
78
- "desktopUpdatesAutoDownload": "Auto Download in Background",
79
- "desktopUpdatesAutoDownloadHelp": "Download new versions automatically after detection, while still letting you decide when to apply them.",
80
75
  "desktopUpdatesActionsTitle": "Update Actions",
81
76
  "desktopUpdatesActionsDescription": "Manually check, manually download, and restart the app when you are ready to finish the update.",
82
77
  "desktopUpdatesCheckNow": "Check for Updates",
@@ -95,7 +90,6 @@
95
90
  "desktopUpdatesCheckFailed": "Failed to check for updates",
96
91
  "desktopUpdatesDownloadFailed": "Failed to download update",
97
92
  "desktopUpdatesApplyFailed": "Failed to apply update",
98
- "desktopUpdatesPreferencesFailed": "Failed to save update preferences",
99
93
  "desktopUpdatesChannelChangeFailed": "Failed to change the release channel",
100
94
  "desktopUpdatesAlreadyLatest": "You already have the latest version.",
101
95
  "desktopUpdatesReadyToApply": "The update is ready. Restart the app whenever you want to apply it.",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "updates": "更新",
3
3
  "runtimeUpdatesPageTitle": "版本更新",
4
- "runtimeUpdatesPageDescription": "自动检查并后台下载新版本,由你决定何时切换到新的运行版本。",
4
+ "runtimeUpdatesPageDescription": "系统每两小时自动检查新版本;发现更新后,由你手动下载并决定何时应用。",
5
5
  "runtimeUpdatesUnavailableTitle": "当前环境暂不支持更新",
6
6
  "runtimeUpdatesUnavailableDescription": "这个运行环境暂时没有可用的更新宿主。",
7
7
  "runtimeUpdatesUnavailableHint": "更新入口会在宿主支持后自动出现,不需要前端单独区分环境。",
@@ -13,7 +13,6 @@
13
13
  "runtimeUpdatesCheckFailed": "检查更新失败",
14
14
  "runtimeUpdatesDownloadFailed": "下载更新失败",
15
15
  "runtimeUpdatesApplyFailed": "应用更新失败",
16
- "runtimeUpdatesPreferencesFailed": "保存更新偏好失败",
17
16
  "runtimeUpdatesChannelChangeFailed": "切换更新通道失败",
18
17
  "runtimeUpdatesAlreadyLatest": "当前已经是最新版本。",
19
18
  "runtimeUpdatesReadyToApply": "更新已下载完成,已经可以切换到新版本。",
@@ -64,8 +63,8 @@
64
63
  "desktopUpdatesBlockedRootCause.signature-verification-unavailable": "根因:缺少更新签名公钥,无法验证更新包来源;请安装包含正确更新配置的新版本,或由维护者配置更新公钥。",
65
64
  "desktopUpdatesBlockedRootCause.host-too-old": "根因:当前宿主版本太旧,不满足新运行包的最低宿主版本要求;请先升级 NextClaw 启动器。",
66
65
  "desktopUpdatesBlockedRootCause.unsupported-installation": "根因:当前安装形态或更新源配置不支持自动更新;请安装支持自动更新的版本,或由维护者补齐更新源配置。",
67
- "desktopUpdatesPreferencesTitle": "更新偏好",
68
- "desktopUpdatesPreferencesDescription": "默认自动检查更新,但是否后台下载由你决定。",
66
+ "desktopUpdatesChannelSettingsTitle": "更新通道",
67
+ "desktopUpdatesChannelSettingsDescription": "系统每两小时自动检查更新,下载和应用都由你手动确认。",
69
68
  "desktopUpdatesReleaseChannel": "更新通道",
70
69
  "desktopUpdatesReleaseChannelHelp": "Stable 面向日常主力使用;Beta 用于提前体验新版本,但可能更不稳定。",
71
70
  "desktopUpdatesReleaseChannelDowngradeHint": "切回 Stable 后不会立刻强制降级;只有当 Stable 追平或超过当前版本时,才会继续提供 Stable 更新。",
@@ -73,10 +72,6 @@
73
72
  "desktopUpdatesChannelBeta": "Beta",
74
73
  "desktopUpdatesBetaBadgeTitle": "当前正在跟随 Beta 通道",
75
74
  "desktopUpdatesBetaBadgeDescription": "你会更早收到新版本,但也可能遇到更多变动和回归。",
76
- "desktopUpdatesAutomaticChecks": "自动检查更新",
77
- "desktopUpdatesAutomaticChecksHelp": "应用运行期间定期检查是否有新版本。",
78
- "desktopUpdatesAutoDownload": "发现更新后自动后台下载",
79
- "desktopUpdatesAutoDownloadHelp": "检查到更新后自动把新版本下载到本地,但仍由你决定何时应用。",
80
75
  "desktopUpdatesActionsTitle": "更新操作",
81
76
  "desktopUpdatesActionsDescription": "支持手动检查、手动下载,以及在你准备好之后重启应用完成更新。",
82
77
  "desktopUpdatesCheckNow": "检查更新",
@@ -95,7 +90,6 @@
95
90
  "desktopUpdatesCheckFailed": "检查更新失败",
96
91
  "desktopUpdatesDownloadFailed": "下载更新失败",
97
92
  "desktopUpdatesApplyFailed": "应用更新失败",
98
- "desktopUpdatesPreferencesFailed": "保存更新偏好失败",
99
93
  "desktopUpdatesChannelChangeFailed": "切换更新通道失败",
100
94
  "desktopUpdatesAlreadyLatest": "当前已经是最新版本。",
101
95
  "desktopUpdatesReadyToApply": "更新已下载完成,可以在方便的时候重启应用。",
@@ -1 +0,0 @@
1
- import{a as e,n as t,p as n,r,u as i}from"./react-UuyIZ_Oi.js";import{Et as a,Gt as o,Jt as s,Kt as c,Ot as l,Qt as u,St as d,Tt as f,Xt as p,Yt as m,Zt as h,en as g,kt as _,on as v,qt as y,wt as b}from"./api-kGIZo6kv.js";import{a as x,i as S,n as C,r as w,t as T}from"./select-BEtjsC3L.js";import{t as E}from"./download-CSAHAjF9.js";import{t as D}from"./external-link-Dno-cJJr.js";import{t as O}from"./refresh-cw-w9L_vlM-.js";import{t as k}from"./rotate-cw-C0VFtLju.js";import{t as A}from"./host-capabilities-CFbAfrrA.js";var j=n(),M={checking:`desktopUpdatesStatusChecking`,"update-available":`desktopUpdatesStatusAvailable`,downloading:`desktopUpdatesStatusDownloading`,downloaded:`desktopUpdatesStatusDownloaded`,"up-to-date":`desktopUpdatesStatusUpToDate`,blocked:`desktopUpdatesStatusBlocked`,failed:`desktopUpdatesStatusFailed`},N={feature:`desktopUpdatesReleaseNotesFeature`,enhancement:`desktopUpdatesReleaseNotesEnhancement`,fix:`desktopUpdatesReleaseNotesFix`,compatibility:`desktopUpdatesReleaseNotesCompatibility`};function P({snapshot:e}){return(0,j.jsx)(`span`,{className:i(`inline-flex rounded-full px-3 py-1 text-xs font-medium ring-1`,W(e.status)),children:U(e)})}function F({label:e,value:t}){return(0,j.jsxs)(`div`,{className:`rounded-xl border border-gray-200 bg-gray-50/60 p-4`,children:[(0,j.jsx)(`p`,{className:`text-xs font-medium uppercase tracking-[0.08em] text-gray-500`,children:e}),(0,j.jsx)(`p`,{className:`mt-2 text-base font-semibold text-gray-900`,children:t})]})}function I({snapshot:e}){if(e.status!==`downloading`)return null;let t=e.progress?.percent,n=t==null?r(`desktopUpdatesDownloadProgressUnknown`):r(`desktopUpdatesDownloadProgressPercent`).replace(`{percent}`,String(t)),i=B(e.progress?.downloadedBytes??0,e.progress?.totalBytes??null);return(0,j.jsxs)(`div`,{className:`rounded-2xl border border-amber-200 bg-amber-50/70 p-4`,children:[(0,j.jsxs)(`div`,{className:`flex items-center justify-between gap-4`,children:[(0,j.jsx)(`p`,{className:`text-sm font-semibold text-amber-800`,children:n}),(0,j.jsx)(`p`,{className:`text-xs font-medium text-amber-700`,children:i})]}),(0,j.jsx)(`div`,{className:`mt-3 h-2 overflow-hidden rounded-full bg-amber-100`,children:(0,j.jsx)(`div`,{className:`h-full rounded-full bg-amber-500 transition-[width]`,style:{width:`${t??0}%`}})})]})}function L({label:e,help:t,checked:n,disabled:r,onCheckedChange:i}){return(0,j.jsxs)(`div`,{className:`flex items-start justify-between gap-4 rounded-xl border border-gray-200 p-4`,children:[(0,j.jsxs)(`div`,{className:`space-y-1`,children:[(0,j.jsx)(u,{children:e}),(0,j.jsx)(`p`,{className:`text-sm text-gray-500`,children:t})]}),(0,j.jsx)(d,{checked:n,disabled:r,onCheckedChange:i})]})}function R(e){return e?.trim()||`-`}function z(e){return e?t(e):`-`}function B(e,t){let n=V(e);return t&&t>0?`${n} / ${V(t)}`:n}function V(e){if(!Number.isFinite(e)||e<=0)return`0 B`;let t=[`B`,`KB`,`MB`,`GB`],n=e,r=0;for(;n>=1024&&r<t.length-1;)n/=1024,r+=1;return`${n>=10||r===0?n.toFixed(0):n.toFixed(1)} ${t[r]}`}function H(e){return r(e===`beta`?`desktopUpdatesChannelBeta`:`desktopUpdatesChannelStable`)}function U(e){return e.status===`failed`&&e.failureStage?r(`desktopUpdatesFailureStage.${e.failureStage}`):r(M[e.status]??`desktopUpdatesStatusIdle`)}function W(e){return e===`downloaded`?`bg-emerald-50 text-emerald-700 ring-emerald-100`:e===`update-available`||e===`downloading`||e===`checking`?`bg-amber-50 text-amber-700 ring-amber-100`:e===`failed`||e===`blocked`?`bg-red-50 text-red-700 ring-red-100`:`bg-gray-100 text-gray-700 ring-gray-200`}function G(){return e()===`zh`?`zh-CN`:`en-US`}function K(e,t){return f(e.title,t)??r(N[e.kind]??`desktopUpdatesReleaseNotesEnhancement`)}function q({snapshot:e}){let t=a(e),n=G(),i=v({queryKey:[`runtime-release-notes`,t],queryFn:async()=>await b(t??``),enabled:!!t,retry:!1,staleTime:300*1e3}),l=i.data,u=f(l?.title,n)??r(`desktopUpdatesReleaseNotesPreviewTitle`),d=f(l?.summary,n)??r(`desktopUpdatesReleaseNotesPreviewDescription`);return e.releaseNotesUrl?(0,j.jsxs)(o,{children:[(0,j.jsx)(s,{children:(0,j.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-3`,children:[(0,j.jsxs)(`div`,{className:`space-y-1`,children:[(0,j.jsx)(m,{children:u}),(0,j.jsx)(y,{children:d})]}),(0,j.jsxs)(g,{variant:`ghost`,onClick:()=>void A.openExternalUrl(e.releaseNotesUrl??``),children:[(0,j.jsx)(D,{className:`mr-2 h-4 w-4`}),r(`desktopUpdatesReleaseNotes`)]})]})}),(0,j.jsxs)(c,{className:`space-y-4`,children:[i.isLoading?(0,j.jsx)(`p`,{className:`text-sm text-gray-500`,children:r(`desktopUpdatesReleaseNotesPreviewLoading`)}):null,!t||i.isError?(0,j.jsx)(`p`,{className:`text-sm text-gray-500`,children:r(`desktopUpdatesReleaseNotesPreviewUnavailable`)}):null,l?(0,j.jsx)(`div`,{className:`grid gap-4 md:grid-cols-2`,children:l.sections.map(e=>(0,j.jsxs)(`div`,{className:`rounded-xl border border-gray-200 bg-gray-50/60 p-4`,children:[(0,j.jsx)(`p`,{className:`text-sm font-semibold text-gray-900`,children:K(e,n)}),(0,j.jsx)(`ul`,{className:`mt-3 space-y-3`,children:e.items.map((t,r)=>{let i=f(t.title,n),a=f(t.body,n);return(0,j.jsxs)(`li`,{className:`space-y-1`,children:[i?(0,j.jsx)(`p`,{className:`text-sm font-medium text-gray-800`,children:i}):null,a?(0,j.jsx)(`p`,{className:`text-sm leading-5 text-gray-600`,children:a}):null]},`${i??e.kind}-${r}`)})})]},e.kind))}):null]})]}):null}function J(){return(0,j.jsxs)(h,{className:`space-y-6`,children:[(0,j.jsx)(p,{title:r(`runtimeUpdatesPageTitle`),description:r(`runtimeUpdatesPageDescription`)}),(0,j.jsxs)(o,{children:[(0,j.jsxs)(s,{children:[(0,j.jsx)(m,{children:r(`runtimeUpdatesUnavailableTitle`)}),(0,j.jsx)(y,{children:r(`runtimeUpdatesUnavailableDescription`)})]}),(0,j.jsx)(c,{children:(0,j.jsx)(`p`,{className:`text-sm text-gray-500`,children:r(`runtimeUpdatesUnavailableHint`)})})]})]})}function Y(){let{supported:e,initialized:t,busyAction:n,snapshot:a}=_();if(!t)return(0,j.jsx)(`div`,{className:`p-8 text-gray-400`,children:r(`loading`)});if(!e||!a)return(0,j.jsx)(J,{});let d=n===`checking`,f=n===`downloading`,v=n===`applying`,b=n===`saving-preferences`,D=n===`switching-channel`,A=a.status===`update-available`&&!f&&!v,M=a.status===`downloaded`&&!v,N=[[r(`runtimeUpdatesHostVersion`),R(a.hostVersion)],[r(`desktopUpdatesCurrentBundleVersion`),R(a.currentVersion)],[r(`desktopUpdatesAvailableVersion`),R(a.availableVersion)],[r(`desktopUpdatesLastCheckedAt`),z(a.lastCheckedAt)],[r(`desktopUpdatesCurrentChannel`),H(a.channel)]];return(0,j.jsxs)(h,{className:`space-y-6`,children:[(0,j.jsx)(p,{title:r(`runtimeUpdatesPageTitle`),description:r(`runtimeUpdatesPageDescription`),actions:(0,j.jsxs)(g,{variant:`outline`,onClick:()=>void l.checkForUpdates(),disabled:d||f||v,children:[(0,j.jsx)(O,{className:i(`mr-2 h-4 w-4`,d&&`animate-spin`)}),r(`desktopUpdatesCheckNow`)]})}),(0,j.jsxs)(o,{children:[(0,j.jsxs)(s,{children:[(0,j.jsx)(m,{children:r(`desktopUpdatesOverviewTitle`)}),(0,j.jsx)(y,{children:r(`desktopUpdatesOverviewDescription`)})]}),(0,j.jsxs)(c,{className:`space-y-5`,children:[(0,j.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[(0,j.jsx)(`span`,{className:`text-sm font-medium text-gray-700`,children:r(`desktopUpdatesStatusLabel`)}),(0,j.jsx)(P,{snapshot:a})]}),(0,j.jsx)(`div`,{className:`grid gap-4 md:grid-cols-2 xl:grid-cols-5`,children:N.map(([e,t])=>(0,j.jsx)(F,{label:e,value:t},e))}),a.channel===`beta`?(0,j.jsxs)(`div`,{className:`rounded-2xl border border-amber-200 bg-amber-50/70 p-4`,children:[(0,j.jsx)(`p`,{className:`text-sm font-semibold text-amber-800`,children:r(`desktopUpdatesBetaBadgeTitle`)}),(0,j.jsx)(`p`,{className:`mt-1 text-sm text-amber-700`,children:r(`desktopUpdatesBetaBadgeDescription`)})]}):null,a.downloadedVersion?(0,j.jsxs)(`div`,{className:`rounded-2xl border border-emerald-200 bg-emerald-50/70 p-4`,children:[(0,j.jsx)(`p`,{className:`text-sm font-semibold text-emerald-800`,children:r(`desktopUpdatesDownloadedBannerTitle`)}),(0,j.jsx)(`p`,{className:`mt-1 text-sm text-emerald-700`,children:r(`runtimeUpdatesDownloadedBannerDescription`).replace(`{version}`,a.downloadedVersion)})]}):null,(0,j.jsx)(I,{snapshot:a}),a.status===`blocked`?(0,j.jsxs)(`div`,{className:`rounded-2xl border border-red-200 bg-red-50/70 p-4`,children:[(0,j.jsx)(`p`,{className:`text-sm font-semibold text-red-800`,children:r(`desktopUpdatesBlockedTitle`)}),(0,j.jsx)(`p`,{className:`mt-1 text-sm text-red-700`,children:a.errorMessage??r(`desktopUpdatesBlockedDescription`)}),a.recoveryCommand?(0,j.jsx)(`code`,{className:`mt-3 block rounded-lg bg-white/70 px-3 py-2 text-xs text-red-800`,children:a.recoveryCommand}):null]}):null,a.errorMessage&&a.status!==`blocked`?(0,j.jsx)(`div`,{className:`rounded-2xl border border-red-200 bg-red-50/70 p-4 text-sm text-red-700`,children:a.errorMessage}):null]})]}),(0,j.jsx)(q,{snapshot:a}),(0,j.jsxs)(o,{children:[(0,j.jsxs)(s,{children:[(0,j.jsx)(m,{children:r(`desktopUpdatesPreferencesTitle`)}),(0,j.jsx)(y,{children:r(`desktopUpdatesPreferencesDescription`)})]}),(0,j.jsxs)(c,{className:`space-y-5`,children:[(0,j.jsx)(`div`,{className:`rounded-xl border border-gray-200 p-4`,children:(0,j.jsxs)(`div`,{className:`space-y-3`,children:[(0,j.jsxs)(`div`,{className:`space-y-1`,children:[(0,j.jsx)(u,{children:r(`desktopUpdatesReleaseChannel`)}),(0,j.jsx)(`p`,{className:`text-sm text-gray-500`,children:r(`desktopUpdatesReleaseChannelHelp`)})]}),(0,j.jsxs)(T,{value:a.channel,disabled:D||d||f||v,onValueChange:e=>void l.updateChannel(e),children:[(0,j.jsx)(S,{className:`w-full max-w-sm`,children:(0,j.jsx)(x,{placeholder:r(`desktopUpdatesReleaseChannel`)})}),(0,j.jsxs)(C,{children:[(0,j.jsx)(w,{value:`stable`,children:r(`desktopUpdatesChannelStable`)}),(0,j.jsx)(w,{value:`beta`,children:r(`desktopUpdatesChannelBeta`)})]})]}),(0,j.jsx)(`p`,{className:`text-sm text-gray-500`,children:r(`desktopUpdatesReleaseChannelDowngradeHint`)})]})}),(0,j.jsx)(L,{label:r(`desktopUpdatesAutomaticChecks`),help:r(`desktopUpdatesAutomaticChecksHelp`),checked:a.preferences.automaticChecks,disabled:b||D,onCheckedChange:e=>void l.updatePreferences({automaticChecks:e})}),(0,j.jsx)(L,{label:r(`desktopUpdatesAutoDownload`),help:r(`desktopUpdatesAutoDownloadHelp`),checked:a.preferences.autoDownload,disabled:b||D,onCheckedChange:e=>void l.updatePreferences({autoDownload:e})})]})]}),(0,j.jsxs)(o,{children:[(0,j.jsxs)(s,{children:[(0,j.jsx)(m,{children:r(`desktopUpdatesActionsTitle`)}),(0,j.jsx)(y,{children:r(`runtimeUpdatesActionsDescription`)})]}),(0,j.jsxs)(c,{className:`flex flex-wrap items-center gap-3`,children:[(0,j.jsxs)(g,{variant:`outline`,onClick:()=>void l.checkForUpdates(),disabled:d||f||v,children:[(0,j.jsx)(O,{className:i(`mr-2 h-4 w-4`,d&&`animate-spin`)}),r(`desktopUpdatesCheckNow`)]}),(0,j.jsxs)(g,{onClick:()=>void l.downloadUpdate(),disabled:!A,children:[(0,j.jsx)(E,{className:i(`mr-2 h-4 w-4`,f&&`animate-bounce`)}),r(`desktopUpdatesDownloadNow`)]}),(0,j.jsxs)(g,{variant:`secondary`,onClick:()=>void l.applyDownloadedUpdate(),disabled:!M,children:[(0,j.jsx)(k,{className:i(`mr-2 h-4 w-4`,v&&`animate-spin`)}),r(`runtimeUpdatesApplyNow`)]})]})]})]})}export{Y as DesktopUpdateConfig};
@@ -1 +0,0 @@
1
- import{t as e}from"./doc-browser-N9UwkWvd.js";export{e as DocBrowser};
@@ -1 +0,0 @@
1
- import{c as e}from"./dist-CCwmPmQ3.js";var t=e(`LoaderCircle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]);export{t};
@@ -1 +0,0 @@
1
- import{t as e}from"./mcp-marketplace-page-Ccy-UG8R.js";export{e as McpMarketplacePage};
@@ -1 +0,0 @@
1
- import{c as e}from"./dist-CCwmPmQ3.js";var t=e(`Plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]);export{t};