Skip to content

Conversation

@code-yeongyu
Copy link
Owner

Summary

  • Enables background version checking without blocking OpenCode startup
  • Auto-updates pinned plugin versions in config files (e.g., [email protected][email protected])
  • Adds auto_update config option to disable auto-updating behavior

Related

Resolves the concern raised in #93 - users can now pin versions for fast startup while still receiving automatic updates.

Changes

File Change
src/config/schema.ts Added auto_update boolean option
src/hooks/auto-update-checker/checker.ts Added configPath tracking, updatePinnedVersion() function
src/hooks/auto-update-checker/index.ts Refactored to run background check, auto-update pinned versions
src/hooks/auto-update-checker/types.ts Added autoUpdate option
src/index.ts Pass autoUpdate config to hook

New Behavior

  1. Startup → Shows toast immediately (no blocking network call)
  2. Background → Fetches latest version from npm registry
  3. If update available:
    • Pinned version → Auto-updates config file, shows "Updated!" toast
    • Unpinned version → Invalidates cache, shows "Update available" toast
  4. Disable option: Set "auto_update": false in config for notification-only mode

- Run version check in background (non-blocking startup)
- Auto-update pinned versions in config file
- Add 'auto_update' config option to disable auto-updating
- Show immediate startup toast, then update notification if available
- Preserve JSONC comments when updating config files

🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
@code-yeongyu
Copy link
Owner Author

Closing to re-apply changes on latest master with proper review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants