Uh oh!
There was an error while loading. Please reload this page.
Fix TUI crashes from undefined values (#8588, #8579, #8580) - #8635
Fix TUI crashes from undefined values (#8588, #8579, #8580)#8635blueemp wants to merge 1 commit into
Conversation
…anomalyco#8580) - Fixanomalyco#8588: Add null check for sync.data.formatter in dialog-status.tsx - Fixanomalyco#8579: Add null checks for local.agent.current() in prompt and agent dialogs - Improve anomalyco#8580: Add helpful message to ECONNRESET error about network/proxy settings These fixes prevent TUI crashes when formatter data or current agent are undefined during startup or initialization. Also improves error messaging for network connection issues.
Hey! Your PR title Please update it to start with one of:
Where See CONTRIBUTING.md for details. |
The following comment was made by an LLM, it may be inaccurate: No duplicate PRs found The search results show several related historical PRs addressing similar |
f1ae801 to
08fa7f7CompareClosing this pull request because it has had no updates for more than 60 days. If you plan to continue working on it, feel free to reopen or open a new PR. |
Summary
Fixes three TUI crash bugs:
#8588 - enabledFormatters undefined
/statussync.data.formatteris undefined during initializationsync.data.formatter?.filter((f) => f.enabled) ?? []#8579 - local.agent.current undefined
local.agent.current()returns undefined during initializationcurrentAgentthat returns "build" as fallback, used throughout component#8580 - ECONNRESET error message
Changes
packages/opencode/src/cli/cmd/tui/component/dialog-status.tsx
sync.data.formatterpackages/opencode/src/cli/cmd/tui/component/prompt/index.tsx
currentAgentmemo with safe fallbacklocal.agent.current().namewithcurrentAgent()packages/opencode/src/cli/cmd/tui/component/dialog-agent.tsx
local.agent.current()?.namepackages/opencode/src/session/message-v2.ts
packages/opencode/test/session/retry.test.ts
Testing