{description}
+ {status ?{APP_VERSION}
+
+ );
+}
+
+function AboutVersionSection() {
+ const queryClient = useQueryClient();
+ const updateStateQuery = useDesktopUpdateState();
+
+ const updateState = updateStateQuery.data ?? null;
+
+ const handleButtonClick = useCallback(async () => {
+ const bridge = window.desktopBridge;
+ if (!bridge) return;
+
+ const action = updateState ? resolveDesktopUpdateButtonAction(updateState) : "none";
+
+ if (action === "download") {
+ void bridge
+ .downloadUpdate()
+ .then((result) => {
+ setDesktopUpdateStateQueryData(queryClient, result.state);
+ })
+ .catch((error: unknown) => {
+ toastManager.add({
+ type: "error",
+ title: "Could not download update",
+ description: error instanceof Error ? error.message : "Download failed.",
+ });
+ });
+ return;
+ }
+
+ if (action === "install") {
+ const api = readNativeApi();
+ const confirmed = await (api ?? ensureNativeApi()).dialogs.confirm(
+ getDesktopUpdateInstallConfirmationMessage(
+ updateState ?? { availableVersion: null, downloadedVersion: null },
+ ),
+ );
+ if (!confirmed) return;
+ void bridge
+ .installUpdate()
+ .then((result) => {
+ setDesktopUpdateStateQueryData(queryClient, result.state);
+ })
+ .catch((error: unknown) => {
+ toastManager.add({
+ type: "error",
+ title: "Could not install update",
+ description: error instanceof Error ? error.message : "Install failed.",
+ });
+ });
+ return;
+ }
+
+ if (typeof bridge.checkForUpdate !== "function") return;
+ void bridge
+ .checkForUpdate()
+ .then((state) => {
+ setDesktopUpdateStateQueryData(queryClient, state);
+ })
+ .catch((error: unknown) => {
+ toastManager.add({
+ type: "error",
+ title: "Could not check for updates",
+ description: error instanceof Error ? error.message : "Update check failed.",
+ });
+ });
+ }, [queryClient, updateState]);
+
+ const action = updateState ? resolveDesktopUpdateButtonAction(updateState) : "none";
+ const buttonTooltip = updateState ? getDesktopUpdateButtonTooltip(updateState) : null;
+ const buttonDisabled =
+ action === "none"
+ ? !canCheckForUpdate(updateState)
+ : isDesktopUpdateButtonDisabled(updateState);
+
+ const actionLabel: Record
+ {providerCard.versionLabel}
+
+ ) : null}
+
+ {providerCard.isDirty ? (
+ + {providerCard.summary.headline} + {providerCard.summary.detail ? ` - ${providerCard.summary.detail}` : null} +
+
+ {model.slug}
+
+ {capLabels.length > 0 ? (
+ {customModelError}
+ ) : null} ++ Archived {formatRelativeTimeLabel(thread.archivedAt ?? thread.createdAt)} + {" \u00b7 Created "} + {formatRelativeTimeLabel(thread.createdAt)} +
+{description}
- {status ?{accentColor}
-
- {presetNameInput === null ? (
-
- ) : (
-
- )}
- {selectedCustomModelError}
- ) : null} - - {totalCustomModels > 0 ? ( -
- {row.slug}
-
-
-
- {logDir}
-
- {hasDesktopBridge ? (
-
- ) : null}
-
- {logContent ? (
-
- ) : (
- "No log content."
- )}
-
-