Files
anomalyco_opencode/packages/opencode
Kit Langton eb4a90eb2a refactor(cli/providers): flatten — drop Effect.promise wraps + dead helpers
Follow-up to #25532. Each handler now runs Effect-native end-to-end:
- Drop the outer Effect.promise(async () => {...}) wraps in all 3 handlers
- Replace each await Effect.runPromise(svc.X()) with yield* svc.X() (with
  Effect.orDie where the service has typed errors)
- Wrap individual prompts.X() / fetch() / handlePluginAuth() awaits with
  yield* Effect.promise(() => ...) instead of one big body wrap
- throw new UI.CancelledError() → yield* Effect.die(new UI.CancelledError())
- Drop unused top-level helpers getModels + refreshModels (handlers now
  yield ModelsDev.Service directly and call .get() / .refresh(true))

Net: 8 → 1 AppRuntime.runPromise call (only the put helper remains, used
by handlePluginAuth which is still a plain Promise function).

Same observable behavior. Just the right shape.
2026-05-02 23:47:52 -04:00
..
2026-05-03 02:10:52 +00:00
2026-02-25 01:48:10 -05:00
2026-03-27 15:00:26 +01:00
2026-02-14 04:19:02 +00:00
2025-05-30 20:48:36 -04:00
2026-02-18 13:54:23 -05: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.