Official
settings
Built-in settings UI (JavaScript UI plugin).
The app opens the listing; nothing installs until an agent in your Plugins workspace has read the files and you enable the plugin. In a terminal: dvg install divergence/settings@0.2.6
Permissions in 0.2.6
Files
views/updates.tsx4.2 KB
// The Updates section: the app's own update, the default plugins' build,
// and when they were last checked. Install restarts when it must.
// HTM whitespace is significant; keep these templates out of Prettier's HTML formatter.
import type { EffectViewContext } from "divergence/effect";
import type { SettingsPage } from "../controller.ts";
import { card, notes, section, setting, column, row } from "./layout.tsx";
import { RESTARTING } from "../upkeep.ts";
import { relativeTime } from "../../sdk/ui/time.ts";
const when = (iso: string | null) => relativeTime(iso, "updates");
export function renderUpdates(ctx: EffectViewContext<object>, actions: SettingsPage["Service"]) {
const u = actions.state.updates;
if (!u) return <empty>Loading…</empty>;
if (!u.enabled) {
return section(
"Updates",
null,
card([
setting({
title: `Divergence ${u.appVersion}`,
description:
"This copy runs its plugins from a source tree, so it updates from the repository, not from releases.",
}),
]),
);
}
const busy = !!u.busy;
const app = u.appUpdate;
const plugins = u.pluginUpdate;
const current = u.plugins ? `Build ${u.plugins.build}, from Divergence ${u.plugins.version}.` : "Not from a release.";
// The update row's jobs: one asked for while a chat runs waits for it.
const jobs = actions.upkeep.state.jobs;
const appWaits = jobs["app"]?.state === "waiting";
const appRestarts = u.busy === RESTARTING;
const pluginsWait = jobs["plugins"]?.state === "waiting";
const downloading = !appRestarts && (u.busy === "downloading the update" || jobs["app"]?.state === "updating");
return (
<div {...column} gap="large" padding="small">
{section(
"Updates",
u.error ? `Last check failed: ${u.error}` : u.lastChecked ? `Checked ${when(u.lastChecked)}.` : "Not checked yet.",
card([
setting({
title: app ? `Divergence ${app.version} is available` : `Divergence ${u.appVersion}`,
description: appWaits
? "The app installs the update and restarts when every chat is idle."
: appRestarts
? "The update is downloaded. The app restarts when every chat is idle."
: app
? `You have ${u.appVersion}. The app restarts to finish the update.`
: "This is the newest version.",
// Check now stays beside Install: a newer release may be out.
control: (
<div {...row} gap="small">
<button id="check-updates" label="Check now" icon="rotate-cw" small variant="outline" loading={u.checking} disabled={u.checking || busy} onClick={() => ctx.run(actions.checkNow())} />
{app ? <button id="install-app" label={downloading ? "Downloading…" : "Install and restart"} icon="circle-arrow-up" small variant="primary" loading={downloading} disabled={busy || appWaits} onClick={() => ctx.run(actions.installApp())} /> : null}
</div>
),
}),
app ? notes(app.releaseNotes) : null,
setting({
title: plugins ? `New default plugins (build ${plugins.build})` : "Default plugins",
description: pluginsWait
? "The plugins update when every chat is idle."
: plugins
? "Plugins you have not changed update at once. For the ones you changed, an agent opens in the Plugins workspace and merges the update into your version."
: `${current} Up to date.`,
control: plugins
? <button id="update-plugins" label="Update plugins" icon="circle-arrow-up" small variant={app ? "outline" : "primary"} loading={u.busy === "updating the plugins" || jobs["plugins"]?.state === "updating"} disabled={busy || pluginsWait} onClick={() => ctx.run(actions.applyPlugins())} />
: null,
}),
]),
)}
</div>
);
}Versions
| Version | Published | Plugin API | Size | Permissions | Status |
|---|---|---|---|---|---|
| 0.2.8latest | Nov 21, 2026 | >=5 <6 | 68.5 KB | 7 permissions | Listed |
| 0.2.7 | Nov 18, 2026 | >=5 <6 | 68 KB | 7 permissions | Listed |
| 0.2.6 | Nov 16, 2026 | >=5 <6 | 66.3 KB | 7 permissions | Listed |
| 0.2.5 | Nov 11, 2026 | >=5 <6 | 63.6 KB | 7 permissions | Listed |
| 0.2.4 | Nov 9, 2026 | >=5 <6 | 61.6 KB | 7 permissions | Listed |
| 0.2.3 | Oct 27, 2026 | >=2 <4 | 46.8 KB | 7 permissions | Listed |
No comments yet.