Skip to content

refactor(tool): yield InstanceState context - #25199

Merged
kitlangton merged 2 commits into
devfrom
kit/tool-instance-state-context
May 1, 2026
Merged

kitlangton merged 2 commits into
devfrom
kit/tool-instance-state-context

Conversation

@kitlangton

Copy link
Copy Markdown
Contributor

Summary

  • Replace direct tool-layer Instance.directory / Instance.worktree reads with InstanceState.context.
  • Pass explicit instance context through bash path checks and session plan path resolution used by plan-mode tools.
  • Keep apply_patch validation behavior unchanged by reading context only after patch parsing succeeds.

Testing

  • bun typecheck from packages/opencode
  • bun run test:ci test/tool/lsp.test.ts test/tool/write.test.ts test/tool/bash.test.ts test/tool/edit.test.ts test/tool/apply_patch.test.ts from packages/opencode
  • Push hook: bun turbo typecheck

@kitlangton
kitlangton merged commit 668d77b into dev May 1, 2026
9 checks passed
@kitlangton
kitlangton deleted the kit/tool-instance-state-context branch May 1, 2026 01:01
oleksii-honchar pushed a commit to oleksii-honchar/better-opencode that referenced this pull request May 6, 2026
isaacfinnegan pushed a commit to isaacfinnegan/whispercode that referenced this pull request Jun 9, 2026
AIALRA-0 pushed a commit to AIALRA-0/opencode-turn-engine that referenced this pull request Jun 10, 2026
isaacfinnegan pushed a commit to isaacfinnegan/whispercode that referenced this pull request Jun 15, 2026
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