Uh oh!
There was an error while loading. Please reload this page.
feat(workspace): Multi-directory workspace engine support (#215) - #230
Merged
Conversation
…t (opencode#215, draft) - schema: Location.Ref.directories?: AbsolutePath[] (primary + all workspace roots) - core/location-mutation: isLexicallyInternal checks primary + directories; canonical check also allows any workspace dir (no external-directory prompts across workspace) - core/system-context: env block lists all workspace folders with primary mark; single-folder fallback unchanged Remaining for full AC (see #215): instruction discovery (findUp per dir, dedup), server session create ?directories=JSON handling, DB migration (directories TEXT nullable), and amicode extension Workspace sidebar (WorkspaceTreeProvider) + Catalog removal (already #457). Draft — engine core only.
…DB (opencode#215) - project/instance-context: add directories?: string[], containsPath checks all roots - project/instance-store: LoadInput.directories forwarding to InstanceContext - session/instruction: systemPaths runs findUp from each workspace dir (dedup), primary first - core/session/sql: SessionTable.directories JSON + migration 20260820000001 Remaining (tracked): POST /session?directories=JSON handler + extension WorkspaceTree (amicode#457 follow-up extends 215 AC6/7). Engine core now workspace-aware end-to-end.
… primary marker - instruction.ts: remove (ctx as unknown) cast — InstanceContext already has directories - instruction.ts: use directory itself as findUp boundary for secondary dirs (prevents walking past workspace root into unrelated parents) - builtins.ts: always place primary first in workspaceFolders, mark by equality not index - tests: add multi-root instruction discovery + builtins primary-marking tests
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (15)
📝 WalkthroughWalkthroughThe PR adds optional multi-root workspace directories to location and session data. It updates path validation, environment context, project instance propagation, and instruction discovery. It also adds database migration and multi-root test coverage. ChangesMulti-root workspace support
Estimated code review effort: 3 (Moderate) | ~20 minutes Suggested reviewers: Sequence Diagram(s)sequenceDiagram
participant InstanceStore
participant InstanceContext
participant InstructionSystemPaths
InstanceStore->>InstanceContext: copy configured directories during boot
InstructionSystemPaths->>InstanceContext: search configured workspace directories
InstructionSystemPaths->>InstructionSystemPaths: enforce boundaries and instruction precedence
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Multi-root workspace support for the opencode engine.
Changes
Bug fixes
All 30 packages typecheck clean.
Summary by CodeRabbit
New Features
Bug Fixes