cloudaxe-opencode/packages/opencode
Developer d2bf8aa630 fix(session): tolerate pre-#24512 model JSON shape in fromRow
Closes #26435.

Sessions created before #24512 (commit a3bc5d35b, 2026-05-02) wrote
the `model` column as { providerID, modelID }. That PR renamed the
shape to { id, providerID, variant } and updated `fromRow` to read
row.model.id, but only updated the Drizzle \$type<>() annotation —
the on-disk JSON of existing rows was not migrated. fromRow now
crashes on those legacy rows with 'Expected string, got undefined',
killing the whole session list (no per-row containment).

Fall back to row.model.modelID when row.model.id is absent. Newly
written rows still use the new shape; this only affects reads of
legacy data.
2026-05-09 16:07:23 -04:00
..
bin fix(cli): forward signals from npm shim (#26259) 2026-05-08 14:00:51 -05:00
migration fix(storage): default workspace time migration (#26556) 2026-05-09 14:18:55 -04:00
script refactor(server): split HttpApi exercise harness (#26385) 2026-05-08 17:58:14 +00:00
specs chore(server): clean up post-Hono-deletion scar tissue (#26542) 2026-05-09 12:30:18 -04:00
src fix(session): tolerate pre-#24512 model JSON shape in fromRow 2026-05-09 16:07:23 -04:00
test fix(session): tolerate pre-#24512 model JSON shape in fromRow 2026-05-09 16:07:23 -04:00
.gitignore refactor(httpapi): fork server startup by flag (#24799) 2026-04-28 11:02:35 -04:00
AGENTS.md Refactor HttpApi workspace routing and proxy boundaries (#25006) 2026-04-29 16:50:54 -04:00
BUN_SHELL_MIGRATION_PLAN.md
bunfig.toml tui plugins (#19347) 2026-03-27 15:00:26 +01:00
Dockerfile
drizzle.config.ts
git feat: interactive update flow for non-patch releases (#18662) 2026-03-22 23:12:40 +00:00
package.json sync release versions for v1.14.44 2026-05-09 19:33:26 +00:00
parsers-config.ts
README.md
sst-env.d.ts
tsconfig.json core: remove @effect/language-service plugin and optimize hot path type performance 2026-04-30 23:21:05 -04:00

js

To install dependencies:

bun install

To run:

bun run index.ts

This project was created using bun init in bun v1.2.12. Bun is a fast all-in-one JavaScript runtime.