Skip to content

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