Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Comments

Close side panel

fix(tui): guard default agent selection#7796

Open
Skyline-23 wants to merge 1 commit intoanomalyco:devanomalyco/opencode:devfrom
Skyline-23:fix/tui-agent-currentSkyline-23/opencode:fix/tui-agent-currentCopy head branch name to clipboard
Open

fix(tui): guard default agent selection#7796
Skyline-23 wants to merge 1 commit intoanomalyco:devanomalyco/opencode:devfrom
Skyline-23:fix/tui-agent-currentSkyline-23/opencode:fix/tui-agent-currentCopy head branch name to clipboard

Conversation

@Skyline-23
Copy link

Summary

  • prevent crash when agent list is empty by deferring current selection
  • ensure current agent resets when list becomes available

@github-actions
Copy link
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions
Copy link
Contributor

The following comment was made by an LLM, it may be inaccurate:

I found several related PRs that address similar issues with agent handling in the TUI:

Potential Related PRs:

  1. fix(tui): handle undefined agent.current() to prevent crash on startup #7748 - fix(tui): handle undefined agent.current() to prevent crash on startup

  2. fix(tui): guard local.agent.current() after oauth redirect (fixes #7727) #7747 - fix(tui): guard local.agent.current() after oauth redirect (fixes #7727)

  3. fix(tui): handle undefined agent.current() to prevent fatal TypeError #7689 - fix(tui): handle undefined agent.current() to prevent fatal TypeError

These PRs appear to be addressing the same or very similar issues around guarding against undefined/empty agent states. You may want to review them to ensure there's no overlap in the fix approach or to coordinate the solutions.

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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.