Skip to content

Conversation

@ShpetimA
Copy link
Contributor

As described in #5892. Added a context usage component for current session.

Screenshot 2025-12-22 at 7 18 23 PM

For the logic of the session usage reused existing code that shows the information on opencode tui sidebar.

const params = useParams()
const messages = createMemo(() => (params.id ? (sync.data.message[params.id] ?? []) : []))

const cost = createMemo(() => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reused the logic from opencode tui sidebar wasn't sure if to make extract this into shared logic since it reccomended to duplicate.
But it is now in three places. opencode tui : Header,Sidebar and Desktop: Input

Copy link
Contributor

@adamdotdevin adamdotdevin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks!

@adamdotdevin adamdotdevin merged commit 8dfef67 into anomalyco:dev Dec 22, 2025
2 checks passed
anntnzrb pushed a commit to anntnzrb/opencode-1 that referenced this pull request Dec 29, 2025
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.

2 participants