diff options
| author | adamelmore <[email protected]> | 2026-01-26 07:17:46 -0600 |
|---|---|---|
| committer | adamelmore <[email protected]> | 2026-01-26 15:36:56 -0600 |
| commit | 8b6484ac1a4ff3cfc2c98c38eaeb6e5bf0b4fab4 (patch) | |
| tree | 25f99116f5d56e6c9d512b79253d2cb57ade2dee /packages/app/src/lib/release-notes.ts | |
| parent | c1e840b9b229889c1a85b479b3cd601d6f313c87 (diff) | |
| download | opencode-8b6484ac1a4ff3cfc2c98c38eaeb6e5bf0b4fab4.tar.gz opencode-8b6484ac1a4ff3cfc2c98c38eaeb6e5bf0b4fab4.zip | |
wip: highlights
Diffstat (limited to 'packages/app/src/lib/release-notes.ts')
| -rw-r--r-- | packages/app/src/lib/release-notes.ts | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/packages/app/src/lib/release-notes.ts b/packages/app/src/lib/release-notes.ts deleted file mode 100644 index a28843acd..000000000 --- a/packages/app/src/lib/release-notes.ts +++ /dev/null @@ -1,53 +0,0 @@ -import { CURRENT_RELEASE } from "@/components/dialog-release-notes" - -const STORAGE_KEY = "opencode:last-seen-version" - -// ============================================================================ -// DEV MODE: Set this to true to always show the release notes modal on startup -// Set to false for production behavior (only shows after updates) -// ============================================================================ -const DEV_ALWAYS_SHOW_RELEASE_NOTES = true - -/** - * Check if release notes should be shown - * Returns true if: - * - DEV_ALWAYS_SHOW_RELEASE_NOTES is true (for development) - * - OR the current version is newer than the last seen version - */ -export function shouldShowReleaseNotes(): boolean { - if (DEV_ALWAYS_SHOW_RELEASE_NOTES) { - console.log("[ReleaseNotes] DEV mode: always showing release notes") - return true - } - - const lastSeen = localStorage.getItem(STORAGE_KEY) - if (!lastSeen) { - // First time user - show release notes - return true - } - - // Compare versions - show if current is newer - return CURRENT_RELEASE.version !== lastSeen -} - -/** - * Mark the current release notes as seen - * Call this when the user closes the release notes modal - */ -export function markReleaseNotesSeen(): void { - localStorage.setItem(STORAGE_KEY, CURRENT_RELEASE.version) -} - -/** - * Get the current version - */ -export function getCurrentVersion(): string { - return CURRENT_RELEASE.version -} - -/** - * Reset the seen status (useful for testing) - */ -export function resetReleaseNotesSeen(): void { - localStorage.removeItem(STORAGE_KEY) -} |
