fix(core): relativize instruction description to project root
This commit is contained in:
parent
6380919fda
commit
50a1fe49bc
1 changed files with 4 additions and 3 deletions
|
|
@ -33,8 +33,9 @@ const layer = Layer.effect(
|
|||
const store = yield* SessionStore.Service
|
||||
const location = yield* Location.Service
|
||||
// Resolved once for the Location layer; the synthetic text and dedup ledger keep
|
||||
// absolute paths, but the human-facing description shows paths relative to this root.
|
||||
const root = FSUtil.resolve(location.directory)
|
||||
// absolute paths, but the human-facing description shows paths relative to the project
|
||||
// root so opening a subdirectory still describes paths from the project root.
|
||||
const root = FSUtil.resolve(location.project.directory)
|
||||
// Same-turn parallel reads settle concurrently, so an in-memory claim guards each
|
||||
// Session/path pair before any filesystem work. The durable history check below covers
|
||||
// paths injected in earlier turns after this Location layer was reopened.
|
||||
|
|
@ -100,7 +101,7 @@ function previouslyInjected(store: SessionStore.Interface, sessionID: SessionSch
|
|||
})
|
||||
}
|
||||
|
||||
// Paths are normally discovered under the Location root, so the description shows them
|
||||
// Paths are normally discovered under the project root, so the description shows them
|
||||
// relative to it. A directly-loaded path outside the root falls back to its absolute form
|
||||
// rather than emitting `../..` chains.
|
||||
function describePath(root: string, path: string) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue