Skip to content

feat(tui): read Zed editor context from state db#24352

Merged
kitlangton merged 5 commits intodevfrom
kit/zed-editor-context
Apr 25, 2026
Merged

feat(tui): read Zed editor context from state db#24352
kitlangton merged 5 commits intodevfrom
kit/zed-editor-context

Conversation

@kitlangton
Copy link
Copy Markdown
Contributor

Summary

  • Adds a Zed SQLite state fallback for the TUI editor context when the websocket editor bridge is unavailable.
  • Reuses the existing editor selection store so current Zed file/line context flows through James's prompt footer and synthetic context path.
  • Converts Zed character offsets to 1-based editor positions and scopes polling to matching Zed workspaces.

Testing

  • bun typecheck from packages/opencode
  • bun run test:ci test/cli/tui/editor-context.test.ts from packages/opencode

@kitlangton kitlangton enabled auto-merge (squash) April 25, 2026 18:04
@kitlangton kitlangton merged commit 625aca4 into dev Apr 25, 2026
10 checks passed
@kitlangton kitlangton deleted the kit/zed-editor-context branch April 25, 2026 18:10
vaur94 pushed a commit to vaur94/opencode that referenced this pull request Apr 25, 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