Skip to content

refactor(session): convert SystemPrompt facade calls to effectful versions#21992

Open
kitlangton wants to merge 4 commits intodevfrom
worktree-agent-a5489f0a
Open

refactor(session): convert SystemPrompt facade calls to effectful versions#21992
kitlangton wants to merge 4 commits intodevfrom
worktree-agent-a5489f0a

Conversation

@kitlangton
Copy link
Copy Markdown
Contributor

Summary

  • Replaced Effect.promise(() => SystemPrompt.skills(...)) and Effect.promise(() => SystemPrompt.environment(...)) in prompt.ts with direct effectful calls, removing unnecessary Promise indirection.
  • SystemPrompt.environment is now a plain sync function (the Ripgrep.tree call was dead code behind && false, so the function was never actually async). Also removed the empty <directories> block.
  • SystemPrompt.skills is now an Effect.fn that takes the Skill service shape as a parameter and calls skill.available(agent) directly instead of going through the Skill.available Promise facade.
  • Added Skill.Service to the SessionPrompt layer requirements since it's now needed at construction time.

Test plan

  • bun run test test/session/system.test.ts passes (1/1)
  • bun run test test/session/prompt-effect.test.ts passes (34/34)
  • bun run test test/session/snapshot-tool-race.test.ts passes (1/1)
  • bun run typecheck passes with no new errors

…sions

Replace `Effect.promise(() => SystemPrompt.skills(...))` and
`Effect.promise(() => SystemPrompt.environment(...))` with direct
effectful calls. `environment` is now a plain sync function (the async
Ripgrep.tree call was dead code behind `&& false`). `skills` is now an
`Effect.fn` that takes the Skill service as a parameter.
…sions

Replace `Effect.promise(() => SystemPrompt.skills(...))` and
`Effect.promise(() => SystemPrompt.environment(...))` with direct
effectful calls. `environment` is now a plain sync function (the async
Ripgrep.tree call was dead code behind `&& false`). `skills` is now an
`Effect.fn` that takes the Skill service as a parameter.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant