summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--packages/opencode/src/cli/upgrade.ts3
-rw-r--r--packages/opencode/src/config/config.ts7
-rw-r--r--packages/sdk/js/src/gen/types.gen.ts4
-rw-r--r--packages/web/src/content/docs/config.mdx2
4 files changed, 13 insertions, 3 deletions
diff --git a/packages/opencode/src/cli/upgrade.ts b/packages/opencode/src/cli/upgrade.ts
index ca5cba27c..2bea760b3 100644
--- a/packages/opencode/src/cli/upgrade.ts
+++ b/packages/opencode/src/cli/upgrade.ts
@@ -10,6 +10,9 @@ export async function upgrade() {
if (Installation.VERSION === latest) return
if (config.autoupdate === false || Flag.OPENCODE_DISABLE_AUTOUPDATE) {
+ return
+ }
+ if (config.autoupdate === "notify") {
await Bus.publish(Installation.Event.UpdateAvailable, { version: latest })
return
}
diff --git a/packages/opencode/src/config/config.ts b/packages/opencode/src/config/config.ts
index 837899be5..79f969eea 100644
--- a/packages/opencode/src/config/config.ts
+++ b/packages/opencode/src/config/config.ts
@@ -479,7 +479,12 @@ export namespace Config {
.boolean()
.optional()
.describe("@deprecated Use 'share' field instead. Share newly created sessions automatically"),
- autoupdate: z.boolean().optional().describe("Automatically update to the latest version"),
+ autoupdate: z
+ .union([z.boolean(), z.literal("notify")])
+ .optional()
+ .describe(
+ "Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications",
+ ),
disabled_providers: z.array(z.string()).optional().describe("Disable providers that are loaded automatically"),
enabled_providers: z
.array(z.string())
diff --git a/packages/sdk/js/src/gen/types.gen.ts b/packages/sdk/js/src/gen/types.gen.ts
index e2e611db1..3ba41cc23 100644
--- a/packages/sdk/js/src/gen/types.gen.ts
+++ b/packages/sdk/js/src/gen/types.gen.ts
@@ -1021,9 +1021,9 @@ export type Config = {
*/
autoshare?: boolean
/**
- * Automatically update to the latest version
+ * Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications
*/
- autoupdate?: boolean
+ autoupdate?: boolean | "notify"
/**
* Disable providers that are loaded automatically
*/
diff --git a/packages/web/src/content/docs/config.mdx b/packages/web/src/content/docs/config.mdx
index 68f75b7a6..46d0d8268 100644
--- a/packages/web/src/content/docs/config.mdx
+++ b/packages/web/src/content/docs/config.mdx
@@ -267,6 +267,8 @@ OpenCode will automatically download any new updates when it starts up. You can
}
```
+If you don't want updates but want to be notified when a new version is available, set `autoupdate` to `"notify"`.
+
---
### Formatters