forked from anomalyco/opencode
-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Description
Parent: #158
Context
The full fork audit revealed these files have large diffs that are a mix of async-task changes and general fork improvements:
| File | Diff lines | Content |
|---|---|---|
processor.ts |
692 lines (+331/-281) | Stream loop try/catch, BackgroundTasks import, AbortError handling, error typing improvements |
prompt.ts |
387 lines (+111/-61) | Task injection, sanitize helpers, auto-wakeup, reject callback, OTHER-FORK improvements |
Problem
These files change frequently upstream (prompt.ts: 78 commits in 3 months). Every unnecessary line of diff increases conflict risk during sync.
Goal
For each file, separate changes into:
- ASYNC-TASK — must keep (imports, task injection, auto-wakeup hooks)
- FORK-IMPROVEMENT — evaluate: is the improvement worth the maintenance cost?
- UPSTREAM-DRIFT — discard: accept upstream's version for formatting/style changes
prompt.ts breakdown (from analysis)
- ASYNC-TASK: ~55 lines → keep
- OTHER-FORK: ~95 lines → evaluate each
- UPSTREAM-DRIFT: ~35 lines → discard (accept upstream formatting)
- Target: reduce from 387 to ~150 lines
processor.ts breakdown
- Needs investigation — classify each hunk
- Target: minimize to only async-task hooks
Acceptance Criteria
- processor.ts classified hunk-by-hunk
- Non-essential changes reverted to match upstream
- Remaining diff is only async-task code
- Typecheck + tests pass
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels