Skip to content

feat(opencode): add TUI session list/get API and parent family context usage#21276

Open
s950449 wants to merge 3 commits intoanomalyco:devfrom
s950449:fix/tui-child-context-list-get
Open

feat(opencode): add TUI session list/get API and parent family context usage#21276
s950449 wants to merge 3 commits intoanomalyco:devfrom
s950449:fix/tui-child-context-list-get

Conversation

@s950449
Copy link
Copy Markdown

@s950449 s950449 commented Apr 7, 2026

Issue for this PR

Closes #20644

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

This PR adds state.session.list and state.session.get to the TUI plugin state API so plugins can access sessions directly.
It also updates the TUI sidebar context flow to show family context usage for parent sessions.
Finally, the TUI plugin test fixture is updated to include default list/get methods so typecheck stays green with the new API contract.

How did you verify your code works?

I ran local typecheck in packages/opencode:

  • bun run typecheck
    It passed after updating the fixture.

Screenshots / recordings

Before:
image

After:
image

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

s950449 added 3 commits April 7, 2026 11:52
Keep the fixture aligned with the updated TuiState.session contract by adding list/get defaults.
This resolves the opencode typecheck failure in test/fixture/tui-plugin.ts.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE]: Show parent and child current context usage in the TUI sidebar

1 participant