refactor(session): convert SystemPrompt facade calls to effectful versions#21992
Open
kitlangton wants to merge 4 commits intodevfrom
Open
refactor(session): convert SystemPrompt facade calls to effectful versions#21992kitlangton wants to merge 4 commits intodevfrom
kitlangton wants to merge 4 commits intodevfrom
Conversation
…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.
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 free
to 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.
Summary
Effect.promise(() => SystemPrompt.skills(...))andEffect.promise(() => SystemPrompt.environment(...))inprompt.tswith direct effectful calls, removing unnecessary Promise indirection.SystemPrompt.environmentis now a plain sync function (theRipgrep.treecall was dead code behind&& false, so the function was never actually async). Also removed the empty<directories>block.SystemPrompt.skillsis now anEffect.fnthat takes theSkillservice shape as a parameter and callsskill.available(agent)directly instead of going through theSkill.availablePromise facade.Skill.Serviceto theSessionPromptlayer requirements since it's now needed at construction time.Test plan
bun run test test/session/system.test.tspasses (1/1)bun run test test/session/prompt-effect.test.tspasses (34/34)bun run test test/session/snapshot-tool-race.test.tspasses (1/1)bun run typecheckpasses with no new errors