summaryrefslogtreecommitdiffhomepage
path: root/packages
diff options
context:
space:
mode:
authoradamelmore <[email protected]>2026-01-26 07:25:25 -0600
committeradamelmore <[email protected]>2026-01-26 15:36:59 -0600
commit53ac394c685780985d776c4f861c283714615999 (patch)
tree63889d3427c41263028948239500fa3049800977 /packages
parent8b6484ac1a4ff3cfc2c98c38eaeb6e5bf0b4fab4 (diff)
downloadopencode-53ac394c685780985d776c4f861c283714615999.tar.gz
opencode-53ac394c685780985d776c4f861c283714615999.zip
wip: highlights
Diffstat (limited to 'packages')
-rw-r--r--packages/app/src/context/highlights.tsx7
1 files changed, 6 insertions, 1 deletions
diff --git a/packages/app/src/context/highlights.tsx b/packages/app/src/context/highlights.tsx
index 4c2e8c838..2d20660d7 100644
--- a/packages/app/src/context/highlights.tsx
+++ b/packages/app/src/context/highlights.tsx
@@ -6,7 +6,7 @@ import { usePlatform } from "@/context/platform"
import { persisted } from "@/utils/persist"
import { DialogReleaseNotes, type Highlight } from "@/components/dialog-release-notes"
-const CHANGELOG_URL = "https://opencode.ai/changelog.json"
+const CHANGELOG_URL = "https://dev.opencode.ai/changelog.json"
type Store = {
version?: string
@@ -81,6 +81,10 @@ function parseRelease(value: unknown): ParsedRelease | undefined {
}
function parseChangelog(value: unknown): ParsedRelease[] | undefined {
+ if (Array.isArray(value)) {
+ return value.map(parseRelease).filter((release): release is ParsedRelease => release !== undefined)
+ }
+
if (!isRecord(value)) return
if (!Array.isArray(value.releases)) return
@@ -163,6 +167,7 @@ export const { use: useHighlights, provider: HighlightsProvider } = createSimple
if (!json) return
const releases = parseChangelog(json)
if (!releases) return
+ if (releases.length === 0) return
const highlights = sliceHighlights({
releases,
current: platform.version,