feat(update): integrate managed installs and recoverable in-app updates (#6168)
Add owner-aware Stable and Preview updates with explicit consent, verified release plans, protected process handoff and bounded service recovery. Keep configuration and conversations separate from program rollback. Include the compact About controls, Windows long-path support, native package recovery checks and optional macOS Dock lifecycle integration. Preserve documented guidance for installations owned by other managers. This code integration does not publish packages, enable signing or advance the public update channel. Co-authored-by: chengyongru <61816729+chengyongru@users.noreply.github.com>
This commit is contained in:
1 parent
76da55994b
commit
fbb61a373f
216 files changed
+27948
-1084
No files matched your search
@@ -9,6 +9,7 @@ import { AutomationRunDialogView, type AutomationRunResult } from "@/components/
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogTrigger } from "@/components/ui/dialog";
|
||||
import { DEFAULT_LOCAL_PREFS } from "@/lib/local-preferences";
|
||||
import type { UpdateChannel } from "@/lib/api";
|
||||
import type { AutomationChatsPayload, SessionAutomationJob } from "@/lib/types";
|
||||
import { StatePicker, type ComponentExample } from "./example";
|
||||
import { useGalleryTranslation } from "./i18n";
|
||||
@@ -68,17 +69,25 @@ function ChatBindingPreview() {
|
||||
|
||||
function AboutPreview() {
|
||||
const { t } = useGalleryTranslation();
|
||||
const [mode, setMode] = useState<"ready" | "checking" | "up-to-date" | "update" | "error">("ready");
|
||||
const [selectedLink, setSelectedLink] = useState(false);
|
||||
const [mode, setMode] = useState<"ready" | "checking" | "up-to-date" | "update" | "preview" | "error">("ready");
|
||||
const [notice, setNotice] = useState<"updateRequested" | "selectedLink" | null>(null);
|
||||
const [channel, setChannel] = useState<UpdateChannel>("stable");
|
||||
const result: VersionCheckState = mode === "up-to-date" ? { type: mode }
|
||||
: mode === "update" ? { type: mode, latestVersion: "0.3.6", pypiUrl: "https://pypi.org/project/nanobot-ai/" }
|
||||
: mode === "preview" ? { type: "update", latestVersion: "0.3.7.dev2026101501",
|
||||
releaseUrl: "https://github.com/HKUDS/nanobot/releases" }
|
||||
: mode === "error" ? { type: mode, message: t("controls.about.error") } : null;
|
||||
return <><StatePicker label={t("controls.about.state")} value={mode} options={["ready", "checking", "up-to-date", "update", "error"]} onChange={setMode} />
|
||||
return <><StatePicker label={t("controls.about.state")} value={mode} options={["ready", "checking", "up-to-date", "update", "preview", "error"]} onChange={setMode} />
|
||||
<AboutSettingsView reportIssueUrl="https://github.com/HKUDS/nanobot/issues/new?template=bug_report.yml"
|
||||
versionCheck={<VersionCheckRowView currentVersion="0.3.5" currentCommit="abcdef1234567890" checking={mode === "checking"}
|
||||
result={result} onCheck={() => setMode("update")} />}
|
||||
starLink={<StarLinkView onActivate={() => setSelectedLink(true)} />} />
|
||||
{selectedLink ? <p role="status" className="mt-4 text-xs text-muted-foreground">{t("controls.about.selectedLink")}</p> : null}</>;
|
||||
result={result} onCheck={() => setMode("update")}
|
||||
releaseStatus={{ channel, revision: 0, currentVersion: "0.3.5", state: "current" }}
|
||||
canChangeChannel onChangeChannel={async (value) => {
|
||||
setChannel(value);
|
||||
}}
|
||||
onRequestUpdate={mode === "preview" ? () => setNotice("updateRequested") : undefined} />}
|
||||
starLink={<StarLinkView onActivate={() => setNotice("selectedLink")} />} />
|
||||
{notice ? <p role="status" className="mt-4 text-xs text-muted-foreground">{t(`controls.about.${notice}`)}</p> : null}</>;
|
||||
}
|
||||
|
||||
function AppearancePreview() {
|
||||
|
||||
Reference in new issue
Block a user