@nextclaw/ui 0.15.7 → 0.15.9

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 (80) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/dist/assets/{api-V8m62-13.js → api-D0U10BcF.js} +3 -3
  3. package/dist/assets/{app-presenter-provider-Bzj9h_ZS.js → app-presenter-provider-Dffdm_Ek.js} +48 -48
  4. package/dist/assets/{appearance-settings-page-DwBwu1AU.js → appearance-settings-page-sfusZc2d.js} +1 -1
  5. package/dist/assets/{book-open-DtVSr5O9.js → book-open-w3160PZf.js} +1 -1
  6. package/dist/assets/{channels-list-page-CYIqMliJ.js → channels-list-page-Dkfe87Zq.js} +1 -1
  7. package/dist/assets/{chat-page-BC0icTtI.js → chat-page-CeapbQnG.js} +1 -1
  8. package/dist/assets/{config-split-page-B88prd8s.js → config-split-page-CnQI8cKT.js} +1 -1
  9. package/dist/assets/{confirm-dialog-BB09IC2u.js → confirm-dialog-RZUWA_j9.js} +1 -1
  10. package/dist/assets/desktop-update-config-CbSYQMYz.js +1 -0
  11. package/dist/assets/{dist-Bytser-a.js → dist-DEJlYi0E.js} +1 -1
  12. package/dist/assets/{doc-browser-B1FXvZm6.js → doc-browser-DwXHr-mm.js} +1 -1
  13. package/dist/assets/{doc-browser-context-D5VLNoj3.js → doc-browser-context-CpvHiuQG.js} +1 -1
  14. package/dist/assets/doc-browser-jVTq8iY_2.js +1 -0
  15. package/dist/assets/{download-CdO6NoHj.js → download-BP7ZxrwI.js} +1 -1
  16. package/dist/assets/{external-link-C5NFoh5I.js → external-link-DvHCEe3h.js} +1 -1
  17. package/dist/assets/{eye-B51oNRRc.js → eye-C--6dxv_.js} +1 -1
  18. package/dist/assets/{folder-DxH7Nef-.js → folder-BfeO1zCY.js} +1 -1
  19. package/dist/assets/{form-actions-C9pUwtYV.js → form-actions-5OsDRt0g.js} +1 -1
  20. package/dist/assets/index-BlKbckX4.css +1 -0
  21. package/dist/assets/{index-UnY4HtVa.js → index-DoZR11Nh.js} +2 -2
  22. package/dist/assets/loader-circle-BWdgwVnn.js +1 -0
  23. package/dist/assets/{logo-badge-D2vORX3a.js → logo-badge-TdPa95AC.js} +1 -1
  24. package/dist/assets/mcp-marketplace-page-XnRWiC8c.js +1 -0
  25. package/dist/assets/{mcp-marketplace-page-CGVu7mfL.js → mcp-marketplace-page-cm3ifaKu.js} +1 -1
  26. package/dist/assets/{model-config-page-DYpchGVE.js → model-config-page-CXnqSbSI.js} +1 -1
  27. package/dist/assets/plus-BeApS21t.js +1 -0
  28. package/dist/assets/{popover-CONujDHf.js → popover-EulxhA0q.js} +1 -1
  29. package/dist/assets/{provider-scoped-model-input-DA3Ua9v8.js → provider-scoped-model-input-ll_Btc9h.js} +1 -1
  30. package/dist/assets/{providers-config-page-DXsoyMrh.js → providers-config-page-Bcuhqkdl.js} +1 -1
  31. package/dist/assets/{react-Io6Pfq8D.js → react-Bb0EYsLS.js} +1 -1
  32. package/dist/assets/{refresh-cw-C6j2tjul.js → refresh-cw-CexL11m1.js} +1 -1
  33. package/dist/assets/remote-CqKpuOP9.js +1 -0
  34. package/dist/assets/rotate-cw-DHXoiqFB.js +1 -0
  35. package/dist/assets/{runtime-config-page-eYrrKBrA.js → runtime-config-page-D-Aqxizs.js} +1 -1
  36. package/dist/assets/{save-CBBZVvZ-.js → save-DtccrZld.js} +1 -1
  37. package/dist/assets/{search-DFF842z2.js → search-BArc_WOX.js} +1 -1
  38. package/dist/assets/{search-config-page-DUyuwD7d.js → search-config-page-XTKf5rc0.js} +1 -1
  39. package/dist/assets/{secrets-config-page-DwzKQJ76.js → secrets-config-page-Cx-qptcj.js} +1 -1
  40. package/dist/assets/security-config-DWGFM2u9.js +1 -0
  41. package/dist/assets/{select-BiOpo2kV.js → select-C9FB0jlt.js} +1 -1
  42. package/dist/assets/{setting-row-C3WQXLtS.js → setting-row-DFvioO2a.js} +1 -1
  43. package/dist/assets/{settings-2-DyOvA_6K.js → settings-2-RMWqf-ey.js} +1 -1
  44. package/dist/assets/{skeleton-CQIAEbA4.js → skeleton-DQ5WhuDG.js} +1 -1
  45. package/dist/assets/{tabs-BTSENlI2.js → tabs-D_mjyOOf.js} +1 -1
  46. package/dist/assets/{tag-chip-BG5JIGwY.js → tag-chip-C011rd9q.js} +1 -1
  47. package/dist/assets/{trash-2-CTIfwpt1.js → trash-2-bDhfsO1O.js} +1 -1
  48. package/dist/assets/{use-config-CY4uF2Ou.js → use-config-BNrlfEck.js} +1 -1
  49. package/dist/assets/{use-confirm-dialog-Bj4u78F9.js → use-confirm-dialog-CTNA1PC0.js} +1 -1
  50. package/dist/assets/{use-viewport-layout-ChJUcSQ6.js → use-viewport-layout-P0q6Nt_N.js} +1 -1
  51. package/dist/assets/x-qvh05iyu.js +1 -0
  52. package/dist/index.html +29 -29
  53. package/package.json +9 -9
  54. package/src/features/chat/features/input/input-surface-plugins/__tests__/context-reference-plugin.test.ts +3 -3
  55. package/src/features/chat/features/input/input-surface-plugins/context-reference-plugin.utils.ts +2 -2
  56. package/src/features/system-status/components/__tests__/desktop-update-config.test.tsx +25 -8
  57. package/src/features/system-status/components/desktop-update-config.tsx +10 -47
  58. package/src/features/system-status/managers/runtime-update.manager.ts +2 -21
  59. package/src/features/system-status/stores/runtime-update.store.ts +0 -1
  60. package/src/platforms/desktop/index.ts +0 -1
  61. package/src/platforms/desktop/managers/desktop-update.manager.ts +1 -14
  62. package/src/platforms/desktop/stores/desktop-update.store.ts +0 -1
  63. package/src/platforms/desktop/types/desktop-update.types.ts +0 -5
  64. package/src/shared/components/common/__tests__/brand-header.test.tsx +43 -46
  65. package/src/shared/components/common/brand-header.tsx +55 -51
  66. package/src/shared/lib/api/runtime-update.utils.ts +1 -5
  67. package/src/shared/lib/i18n/locales/en-US/chat.json +1 -1
  68. package/src/shared/lib/i18n/locales/en-US/desktop-update.json +7 -9
  69. package/src/shared/lib/i18n/locales/zh-CN/chat.json +1 -1
  70. package/src/shared/lib/i18n/locales/zh-CN/desktop-update.json +7 -9
  71. package/dist/assets/desktop-update-config-B-q0OhxO.js +0 -1
  72. package/dist/assets/doc-browser-Bodhf0fj2.js +0 -1
  73. package/dist/assets/index-DtWf7kk9.css +0 -1
  74. package/dist/assets/loader-circle-BRSfaztA.js +0 -1
  75. package/dist/assets/mcp-marketplace-page-DnV0e1JS.js +0 -1
  76. package/dist/assets/plus-BgMBV9HJ.js +0 -1
  77. package/dist/assets/remote-C1y3ARHu.js +0 -1
  78. package/dist/assets/rotate-cw-Bv2B6fAV.js +0 -1
  79. package/dist/assets/security-config-D8me3pXl.js +0 -1
  80. package/dist/assets/x-C6cM8wkT.js +0 -1
@@ -14,7 +14,6 @@ import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@/shar
14
14
  import { hostCapabilityManager } from '@/shared/lib/host-capabilities';
15
15
  import { t } from '@/shared/lib/i18n';
16
16
  import { cn } from '@/shared/lib/utils';
17
- import { ExternalLink } from 'lucide-react';
18
17
 
19
18
  type BrandHeaderProps = {
20
19
  className?: string;
@@ -122,19 +121,14 @@ function RuntimeUpdateInlineStatus({
122
121
  }
123
122
  const releaseNotesLink = resolveUpdateReleaseNotesLink(snapshot);
124
123
  if (snapshot.status === 'downloading') {
125
- return (
126
- <RuntimeUpdateInlineGroup>
127
- <RuntimeUpdateInlineBadge snapshot={snapshot} />
128
- {releaseNotesLink ? <RuntimeUpdateReleaseNotesButton link={releaseNotesLink} tone="amber" /> : null}
129
- </RuntimeUpdateInlineGroup>
130
- );
124
+ return <RuntimeUpdateInlineBadge snapshot={snapshot} releaseNotesLink={releaseNotesLink} />;
131
125
  }
132
126
  if (snapshot.status === 'blocked' || snapshot.status === 'failed') {
133
127
  return <RuntimeUpdateInlineBadge snapshot={snapshot} />;
134
128
  }
135
129
  if (snapshot.status === 'downloaded') {
136
130
  return (
137
- <RuntimeUpdateInlineGroup>
131
+ <RuntimeUpdateReleaseNotesHover link={releaseNotesLink}>
138
132
  <button
139
133
  type="button"
140
134
  className="inline-flex h-5 shrink-0 items-center rounded-full bg-emerald-50 px-2 text-[11px] font-semibold leading-none text-emerald-700 ring-1 ring-emerald-100 transition-colors hover:bg-emerald-100 disabled:opacity-70"
@@ -143,13 +137,12 @@ function RuntimeUpdateInlineStatus({
143
137
  >
144
138
  {busyAction === 'applying' ? t('desktopUpdatesInlineApplying') : t('desktopUpdatesInlineReady')}
145
139
  </button>
146
- {releaseNotesLink ? <RuntimeUpdateReleaseNotesButton link={releaseNotesLink} tone="emerald" /> : null}
147
- </RuntimeUpdateInlineGroup>
140
+ </RuntimeUpdateReleaseNotesHover>
148
141
  );
149
142
  }
150
143
  if (snapshot.status === 'update-available') {
151
144
  return (
152
- <RuntimeUpdateInlineGroup>
145
+ <RuntimeUpdateReleaseNotesHover link={releaseNotesLink}>
153
146
  <button
154
147
  type="button"
155
148
  className="inline-flex h-5 shrink-0 items-center rounded-full bg-amber-50 px-2 text-[11px] font-semibold leading-none text-amber-700 ring-1 ring-amber-100 transition-colors hover:bg-amber-100 disabled:opacity-70"
@@ -158,51 +151,50 @@ function RuntimeUpdateInlineStatus({
158
151
  >
159
152
  {busyAction === 'downloading' ? t('desktopUpdatesInlineDownloading') : t('desktopUpdatesInlineDownload')}
160
153
  </button>
161
- {releaseNotesLink ? <RuntimeUpdateReleaseNotesButton link={releaseNotesLink} tone="amber" /> : null}
162
- </RuntimeUpdateInlineGroup>
154
+ </RuntimeUpdateReleaseNotesHover>
163
155
  );
164
156
  }
165
157
  return null;
166
158
  }
167
159
 
168
- function RuntimeUpdateInlineGroup({ children }: { children: ReactNode }) {
169
- return <span className="inline-flex shrink-0 items-center gap-1">{children}</span>;
170
- }
171
-
172
- function RuntimeUpdateReleaseNotesButton({
160
+ function RuntimeUpdateReleaseNotesHover({
161
+ children,
173
162
  link,
174
- tone,
175
163
  }: {
176
- link: ReleaseNotesLink;
177
- tone: 'amber' | 'emerald';
164
+ children: ReactNode;
165
+ link: ReleaseNotesLink | null;
178
166
  }) {
167
+ if (!link) {
168
+ return children;
169
+ }
179
170
  const label = t('desktopUpdatesUpdateReleaseNotesLabel').replace('{version}', link.versionLabel);
180
- const className = cn(
181
- 'inline-flex h-5 w-5 shrink-0 items-center justify-center rounded-full text-[11px] ring-1 transition-colors focus-visible:outline-none focus-visible:ring-2',
182
- tone === 'emerald'
183
- ? 'bg-emerald-50 text-emerald-700 ring-emerald-100 hover:bg-emerald-100 focus-visible:ring-emerald-300'
184
- : 'bg-amber-50 text-amber-700 ring-amber-100 hover:bg-amber-100 focus-visible:ring-amber-300'
185
- );
186
171
  return (
187
- <TooltipProvider delayDuration={250}>
188
- <Tooltip>
189
- <TooltipTrigger asChild>
190
- <button
191
- type="button"
192
- aria-label={label}
193
- className={className}
194
- onClick={() => void hostCapabilityManager.openExternalUrl(link.url)}
195
- >
196
- <ExternalLink className="h-3 w-3" aria-hidden="true" />
197
- </button>
198
- </TooltipTrigger>
199
- <TooltipContent side="bottom" className="text-xs">{label}</TooltipContent>
200
- </Tooltip>
201
- </TooltipProvider>
172
+ <span className="group/update-release-notes relative inline-flex shrink-0">
173
+ {children}
174
+ <span
175
+ data-update-release-notes-hover="true"
176
+ className="invisible pointer-events-none absolute left-1/2 top-full z-[var(--z-tooltip,10150)] -translate-x-1/2 pt-1 opacity-0 transition-opacity group-hover/update-release-notes:visible group-hover/update-release-notes:pointer-events-auto group-hover/update-release-notes:opacity-100 group-focus-within/update-release-notes:visible group-focus-within/update-release-notes:pointer-events-auto group-focus-within/update-release-notes:opacity-100"
177
+ >
178
+ <button
179
+ type="button"
180
+ aria-label={label}
181
+ className="whitespace-nowrap rounded-md border bg-popover px-3 py-1.5 text-left text-xs font-medium text-popover-foreground shadow-md outline-none transition-colors hover:bg-gray-100 focus-visible:ring-2 focus-visible:ring-gray-300"
182
+ onClick={() => void hostCapabilityManager.openExternalUrl(link.url)}
183
+ >
184
+ {label}
185
+ </button>
186
+ </span>
187
+ </span>
202
188
  );
203
189
  }
204
190
 
205
- function RuntimeUpdateInlineBadge({ snapshot }: { snapshot: UpdateSnapshot }) {
191
+ function RuntimeUpdateInlineBadge({
192
+ snapshot,
193
+ releaseNotesLink,
194
+ }: {
195
+ snapshot: UpdateSnapshot;
196
+ releaseNotesLink?: ReleaseNotesLink | null;
197
+ }) {
206
198
  if (snapshot.status === 'blocked' || snapshot.status === 'failed') {
207
199
  return <RuntimeUpdateIssueIcon snapshot={snapshot} />;
208
200
  }
@@ -211,23 +203,28 @@ function RuntimeUpdateInlineBadge({ snapshot }: { snapshot: UpdateSnapshot }) {
211
203
  return null;
212
204
  }
213
205
  return (
214
- <span
215
- className="inline-flex h-5 shrink-0 items-center rounded-full bg-amber-50 px-2 text-[11px] font-semibold leading-none text-amber-700 ring-1 ring-amber-100 transition-colors hover:bg-amber-100 disabled:opacity-70"
216
- title={t('updates')}
217
- >
218
- {label}
219
- </span>
206
+ <RuntimeUpdateReleaseNotesHover link={releaseNotesLink ?? null}>
207
+ <span
208
+ tabIndex={releaseNotesLink ? 0 : undefined}
209
+ className="inline-flex h-5 shrink-0 items-center rounded-full bg-amber-50 px-2 text-[11px] font-semibold leading-none text-amber-700 ring-1 ring-amber-100 outline-none transition-colors hover:bg-amber-100 focus-visible:ring-2 focus-visible:ring-amber-300"
210
+ >
211
+ {label}
212
+ </span>
213
+ </RuntimeUpdateReleaseNotesHover>
220
214
  );
221
215
  }
222
216
 
223
217
  function RuntimeUpdateIssueIcon({ snapshot }: { snapshot: UpdateSnapshot }) {
224
- const title = snapshot.status === 'failed' ? t('desktopUpdatesStatusFailed') : t('desktopUpdatesStatusBlocked');
218
+ const title = resolveUpdateIssueTitle(snapshot);
225
219
  const recoveryCommand = snapshot.recoveryCommand?.trim() || null;
220
+ const diagnosticCommand = snapshot.diagnosticCommand?.trim()
221
+ ? t('desktopUpdatesDiagnosticCommand').replace('{command}', snapshot.diagnosticCommand.trim())
222
+ : null;
226
223
  const diagnostic = snapshot.errorMessage?.trim() || snapshot.blockReason?.trim() || null;
227
224
  const rootCause = snapshot.status === 'blocked' && snapshot.blockReason
228
225
  ? t(`desktopUpdatesBlockedRootCause.${snapshot.blockReason}`)
229
226
  : null;
230
- const tooltip = [title, rootCause, diagnostic, recoveryCommand].filter(Boolean).join('\n');
227
+ const tooltip = [title, rootCause, diagnostic, recoveryCommand, diagnosticCommand].filter(Boolean).join('\n');
231
228
  return (
232
229
  <TooltipProvider delayDuration={250}>
233
230
  <Tooltip>
@@ -247,6 +244,13 @@ function RuntimeUpdateIssueIcon({ snapshot }: { snapshot: UpdateSnapshot }) {
247
244
  );
248
245
  }
249
246
 
247
+ function resolveUpdateIssueTitle(snapshot: UpdateSnapshot): string {
248
+ if (snapshot.status === 'blocked') {
249
+ return t('desktopUpdatesStatusBlocked');
250
+ }
251
+ return t(snapshot.failureStage ? `desktopUpdatesFailureStage.${snapshot.failureStage}` : 'desktopUpdatesStatusFailed');
252
+ }
253
+
250
254
  function resolveInlineDownloadLabel(snapshot: UpdateSnapshot): string {
251
255
  const percent = snapshot.progress?.percent;
252
256
  return percent === null || percent === undefined
@@ -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
  }
@@ -216,7 +216,7 @@
216
216
  "chatContextReferenceParent": "Up one folder",
217
217
  "chatContextReferenceParentDescription": "Browse the parent folder without closing the reference menu.",
218
218
  "chatContextReferenceParentHint": "Press Enter to open the parent folder.",
219
- "chatContextReferenceCurrentDirectory": "Current folder",
219
+ "chatContextReferenceCurrentDirectory": "Reference current folder",
220
220
  "chatContextReferenceFileDescription": "Use this file as explicit context for the current message.",
221
221
  "chatContextReferenceDirectoryDescription": "Use this folder as a context scope for the current message.",
222
222
  "chatContextReferenceProjectRoot": "Project directory",
@@ -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.",
@@ -37,6 +36,10 @@
37
36
  "desktopUpdatesStatusUpToDate": "Up to Date",
38
37
  "desktopUpdatesStatusBlocked": "Blocked",
39
38
  "desktopUpdatesStatusFailed": "Failed",
39
+ "desktopUpdatesFailureStage.check": "Update Check Failed",
40
+ "desktopUpdatesFailureStage.download": "Update Download Failed",
41
+ "desktopUpdatesFailureStage.apply": "Update Apply Failed",
42
+ "desktopUpdatesDiagnosticCommand": "Full logs: {command}",
40
43
  "desktopUpdatesInlineDownload": "Download",
41
44
  "desktopUpdatesInlineDownloading": "Downloading",
42
45
  "desktopUpdatesInlineDownloadingPercent": "{percent}%",
@@ -60,8 +63,8 @@
60
63
  "desktopUpdatesBlockedRootCause.signature-verification-unavailable": "Root cause: missing update public key; install a configured build or ask the maintainer to set the key.",
61
64
  "desktopUpdatesBlockedRootCause.host-too-old": "Root cause: the host is too old for this runtime bundle; upgrade the NextClaw launcher first.",
62
65
  "desktopUpdatesBlockedRootCause.unsupported-installation": "Root cause: this installation or update source does not support auto-update; use a configured build.",
63
- "desktopUpdatesPreferencesTitle": "Update Preferences",
64
- "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.",
65
68
  "desktopUpdatesReleaseChannel": "Release Channel",
66
69
  "desktopUpdatesReleaseChannelHelp": "Stable is for everyday use, while Beta lets you try newer builds earlier with more risk.",
67
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.",
@@ -69,10 +72,6 @@
69
72
  "desktopUpdatesChannelBeta": "Beta",
70
73
  "desktopUpdatesBetaBadgeTitle": "Following the Beta Channel",
71
74
  "desktopUpdatesBetaBadgeDescription": "You will receive new versions earlier, but you may also encounter more change and regression risk.",
72
- "desktopUpdatesAutomaticChecks": "Automatic Update Checks",
73
- "desktopUpdatesAutomaticChecksHelp": "Check for new versions periodically while the app is running.",
74
- "desktopUpdatesAutoDownload": "Auto Download in Background",
75
- "desktopUpdatesAutoDownloadHelp": "Download new versions automatically after detection, while still letting you decide when to apply them.",
76
75
  "desktopUpdatesActionsTitle": "Update Actions",
77
76
  "desktopUpdatesActionsDescription": "Manually check, manually download, and restart the app when you are ready to finish the update.",
78
77
  "desktopUpdatesCheckNow": "Check for Updates",
@@ -91,7 +90,6 @@
91
90
  "desktopUpdatesCheckFailed": "Failed to check for updates",
92
91
  "desktopUpdatesDownloadFailed": "Failed to download update",
93
92
  "desktopUpdatesApplyFailed": "Failed to apply update",
94
- "desktopUpdatesPreferencesFailed": "Failed to save update preferences",
95
93
  "desktopUpdatesChannelChangeFailed": "Failed to change the release channel",
96
94
  "desktopUpdatesAlreadyLatest": "You already have the latest version.",
97
95
  "desktopUpdatesReadyToApply": "The update is ready. Restart the app whenever you want to apply it.",
@@ -216,7 +216,7 @@
216
216
  "chatContextReferenceParent": "返回上一级",
217
217
  "chatContextReferenceParentDescription": "在不关闭引用菜单的情况下浏览上一级文件夹。",
218
218
  "chatContextReferenceParentHint": "回车打开上一级文件夹。",
219
- "chatContextReferenceCurrentDirectory": "当前文件夹",
219
+ "chatContextReferenceCurrentDirectory": "引用当前文件夹",
220
220
  "chatContextReferenceFileDescription": "把这个文件作为本次消息的显式上下文。",
221
221
  "chatContextReferenceDirectoryDescription": "把这个目录作为本次消息的上下文范围。",
222
222
  "chatContextReferenceProjectRoot": "项目目录",
@@ -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": "更新已下载完成,已经可以切换到新版本。",
@@ -37,6 +36,10 @@
37
36
  "desktopUpdatesStatusUpToDate": "已是最新",
38
37
  "desktopUpdatesStatusBlocked": "更新被阻塞",
39
38
  "desktopUpdatesStatusFailed": "更新失败",
39
+ "desktopUpdatesFailureStage.check": "检查更新失败",
40
+ "desktopUpdatesFailureStage.download": "下载更新失败",
41
+ "desktopUpdatesFailureStage.apply": "应用更新失败",
42
+ "desktopUpdatesDiagnosticCommand": "完整日志:{command}",
40
43
  "desktopUpdatesInlineDownload": "下载",
41
44
  "desktopUpdatesInlineDownloading": "下载中",
42
45
  "desktopUpdatesInlineDownloadingPercent": "下载 {percent}%",
@@ -60,8 +63,8 @@
60
63
  "desktopUpdatesBlockedRootCause.signature-verification-unavailable": "根因:缺少更新签名公钥,无法验证更新包来源;请安装包含正确更新配置的新版本,或由维护者配置更新公钥。",
61
64
  "desktopUpdatesBlockedRootCause.host-too-old": "根因:当前宿主版本太旧,不满足新运行包的最低宿主版本要求;请先升级 NextClaw 启动器。",
62
65
  "desktopUpdatesBlockedRootCause.unsupported-installation": "根因:当前安装形态或更新源配置不支持自动更新;请安装支持自动更新的版本,或由维护者补齐更新源配置。",
63
- "desktopUpdatesPreferencesTitle": "更新偏好",
64
- "desktopUpdatesPreferencesDescription": "默认自动检查更新,但是否后台下载由你决定。",
66
+ "desktopUpdatesChannelSettingsTitle": "更新通道",
67
+ "desktopUpdatesChannelSettingsDescription": "系统每两小时自动检查更新,下载和应用都由你手动确认。",
65
68
  "desktopUpdatesReleaseChannel": "更新通道",
66
69
  "desktopUpdatesReleaseChannelHelp": "Stable 面向日常主力使用;Beta 用于提前体验新版本,但可能更不稳定。",
67
70
  "desktopUpdatesReleaseChannelDowngradeHint": "切回 Stable 后不会立刻强制降级;只有当 Stable 追平或超过当前版本时,才会继续提供 Stable 更新。",
@@ -69,10 +72,6 @@
69
72
  "desktopUpdatesChannelBeta": "Beta",
70
73
  "desktopUpdatesBetaBadgeTitle": "当前正在跟随 Beta 通道",
71
74
  "desktopUpdatesBetaBadgeDescription": "你会更早收到新版本,但也可能遇到更多变动和回归。",
72
- "desktopUpdatesAutomaticChecks": "自动检查更新",
73
- "desktopUpdatesAutomaticChecksHelp": "应用运行期间定期检查是否有新版本。",
74
- "desktopUpdatesAutoDownload": "发现更新后自动后台下载",
75
- "desktopUpdatesAutoDownloadHelp": "检查到更新后自动把新版本下载到本地,但仍由你决定何时应用。",
76
75
  "desktopUpdatesActionsTitle": "更新操作",
77
76
  "desktopUpdatesActionsDescription": "支持手动检查、手动下载,以及在你准备好之后重启应用完成更新。",
78
77
  "desktopUpdatesCheckNow": "检查更新",
@@ -91,7 +90,6 @@
91
90
  "desktopUpdatesCheckFailed": "检查更新失败",
92
91
  "desktopUpdatesDownloadFailed": "下载更新失败",
93
92
  "desktopUpdatesApplyFailed": "应用更新失败",
94
- "desktopUpdatesPreferencesFailed": "保存更新偏好失败",
95
93
  "desktopUpdatesChannelChangeFailed": "切换更新通道失败",
96
94
  "desktopUpdatesAlreadyLatest": "当前已经是最新版本。",
97
95
  "desktopUpdatesReadyToApply": "更新已下载完成,可以在方便的时候重启应用。",
@@ -1 +0,0 @@
1
- import{a as e,n as t,p as n,r,u as i}from"./react-Io6Pfq8D.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-V8m62-13.js";import{a as x,i as S,n as C,r as w,t as T}from"./select-BiOpo2kV.js";import{t as E}from"./download-CdO6NoHj.js";import{t as D}from"./external-link-C5NFoh5I.js";import{t as O}from"./refresh-cw-C6j2tjul.js";import{t as k}from"./rotate-cw-Bv2B6fAV.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({status:e}){return(0,j.jsx)(`span`,{className:i(`inline-flex rounded-full px-3 py-1 text-xs font-medium ring-1`,W(e)),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 r(M[e]??`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,{status:a.status})]}),(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-B1FXvZm6.js";export{e as DocBrowser};