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:
parent
922441918a
commit
ce2c3bf87e
1 changed files with 4 additions and 2 deletions
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue