fix: prevent UI freeze when ⌘I pressed without active editor

pressing ⌘I in chat mode to switch to edit mode when no editor is
focused previously led to an unrecoverable error state in the secondary
sidebar.

this commit ensures that ⌘I action does nothing unless an editor is
focused, preventing the ui from freezing and allowing normal interaction
with the panel.
This commit is contained in:
Keerthana Panyam 2025-07-07 13:45:06 -04:00
parent 922441918a
commit ce2c3bf87e

View file

@ -28,9 +28,11 @@ export function EditToolbar() {
Back to {mode.charAt(0).toUpperCase() + mode.slice(1)}
</span>
<span className="truncate">
Editing{" "}
Editing:{" "}
<span className="italic">
{getEditFilenameAndRangeText(codeToEdit)}
{codeToEdit
? getEditFilenameAndRangeText(codeToEdit)
: "⚠️ No file selected"}
</span>
</span>
</div>