Browse Source

refactor(provider): effectify Provider service (#20160)

Kit Langton 4 tháng trước cách đây
mục cha
commit
3df18dcde1

+ 6 - 8
packages/opencode/specs/effect-migration.md

@@ -210,15 +210,13 @@ Fully migrated (single namespace, InstanceState where needed, flattened facade):
 - [x] `Vcs` — `project/vcs.ts`
 - [x] `Worktree` — `worktree/index.ts`
 
-Still open and likely worth migrating:
-
 - [x] `Session` — `session/index.ts`
-- [ ] `SessionProcessor` — blocked by AI SDK v6 PR (#18433)
-- [ ] `SessionPrompt` — blocked by AI SDK v6 PR (#18433)
-- [ ] `SessionCompaction` — blocked by AI SDK v6 PR (#18433)
-- [ ] `Provider` — blocked by AI SDK v6 PR (#18433)
+- [x] `SessionProcessor` — `session/processor.ts`
+- [x] `SessionPrompt` — `session/prompt.ts`
+- [x] `SessionCompaction` — `session/compaction.ts`
+- [x] `Provider` — `provider/provider.ts`
 
-Other services not yet migrated:
+Still open:
 
 - [ ] `SessionSummary` — `session/summary.ts`
 - [ ] `SessionTodo` — `session/todo.ts`
@@ -235,7 +233,7 @@ Once individual tools are effectified, change `Tool.Info` (`tool/tool.ts`) so `i
 
 1. Migrate each tool to return Effects
 2. Update `Tool.define()` factory to work with Effects
-3. Update `SessionPrompt` to `yield*` tool results instead of `await`ing — blocked by AI SDK v6 PR (#18433)
+3. Update `SessionPrompt` to `yield*` tool results instead of `await`ing
 
 Individual tools, ordered by value:
 

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 575 - 483
packages/opencode/src/provider/provider.ts


Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác