Skip to content

Commit 470cccf

Browse files
refactor(opencode): drop the duplicate import and spell out the first-read handoff
AI-assisted; verified with the tests and tools listed above.
1 parent e806ace commit 470cccf

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

  • packages/provider-opencode/src/server

‎packages/provider-opencode/src/server/status.ts‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import * as DateTime from "effect/DateTime";
1212
import * as Effect from "effect/Effect";
1313
import * as Option from "effect/Option";
1414
import * as Schedule from "effect/Schedule";
15-
import * as Schema from "effect/Schema";
1615

1716
import { createModelCapabilities } from "@t3tools/shared/model";
1817
import { compareSemverVersions } from "@t3tools/shared/semver";
@@ -521,10 +520,11 @@ export const makeOpenCode2ModelLoader = <E>(
521520
return list.pipe(
522521
Effect.retry({ while: isActivatingPlugins, schedule: Schedule.spaced("1 second") }),
523522
Effect.timeoutOption(PLUGIN_ACTIVATION_DEADLINE),
524-
Effect.filterOrElse(
525-
(first) => Option.isNone(first) || settled(first.value),
526-
() => agreeingReads,
527-
),
523+
Effect.flatMap((first) => {
524+
if (Option.isNone(first)) return Effect.succeedNone;
525+
settled(first.value);
526+
return agreeingReads;
527+
}),
528528
Effect.map((loaded) => {
529529
// Fresh progress may still be partial, but a warm cache must not freeze slow catalogs.
530530
if (loaded._tag === "Some") lastLoaded = loaded.value;

0 commit comments

Comments
 (0)