fix(tui): add null safety for local.agent.current().name (#8858)#8882
fix(tui): add null safety for local.agent.current().name (#8858)#8882shoaibansari5398 wants to merge 1 commit intoanomalyco:devfrom
Conversation
|
The following comment was made by an LLM, it may be inaccurate: Based on my search, I found several related PRs that address similar issues with Potentially Related PRs:
Most likely duplicate: PR #8745 appears to be the closest match as it directly addresses null checks for |
00637c0 to
71e0ba2
Compare
f1ae801 to
08fa7f7
Compare
What does this PR do?
Fixes #8858 - Prevents crash when local.agent.current() returns undefined.
Problem: The TUI crashed with:
TypeError: undefined is not an object (evaluating 'local.agent.current().name')
This happens when the agent state hasn't been initialized yet (e.g., during startup or when no agents are available).
How did you verify your code works?
Changes
?.) tolocal.agent.current().?? "build") to provide a fallback name ("build") when the agent is undefined.Verification
local.agent.current().namenow have null safety.Checklist
Fixes #8858)