MCPcopy
hub / github.com/ChatGPTNextWeb/NextChat / clientUpdate

Function clientUpdate

app/utils.ts:449–470  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

447}
448
449export function clientUpdate() {
450 // this a wild for updating client app
451 return window.__TAURI__?.updater
452 .checkUpdate()
453 .then((updateResult) => {
454 if (updateResult.shouldUpdate) {
455 window.__TAURI__?.updater
456 .installUpdate()
457 .then((result) => {
458 showToast(Locale.Settings.Update.Success);
459 })
460 .catch((e) => {
461 console.error("[Install Update Error]", e);
462 showToast(Locale.Settings.Update.Failed);
463 });
464 }
465 })
466 .catch((e) => {
467 console.error("[Check Update Error]", e);
468 showToast(Locale.Settings.Update.Failed);
469 });
470}
471
472// https://gist.github.com/iwill/a83038623ba4fef6abb9efca87ae9ccb
473export function semverCompare(a: string, b: string) {

Callers 2

SettingsFunction · 0.90
getLatestVersionFunction · 0.90

Calls 2

showToastFunction · 0.90
errorMethod · 0.80

Tested by

no test coverage detected