mirror of
https://github.com/openai/codex.git
synced 2026-04-24 14:45:27 +00:00
Avoid expect in slash popup path
This commit is contained in:
@@ -642,7 +642,9 @@ impl ChatComposer {
|
||||
} => {
|
||||
// Ensure popup filtering/selection reflects the latest composer text
|
||||
// before applying completion.
|
||||
let ctx = ctx_for_tab.as_ref().expect("tab context must exist");
|
||||
let Some(ctx) = ctx_for_tab.as_ref() else {
|
||||
return (InputResult::None, true);
|
||||
};
|
||||
let first_line = ctx.first_line();
|
||||
popup.on_composer_text_change(ctx.prefix().to_string());
|
||||
if let Some(sel) = popup.selected_item() {
|
||||
|
||||
@@ -576,7 +576,9 @@ impl ChatComposer {
|
||||
} => {
|
||||
// Ensure popup filtering/selection reflects the latest composer text
|
||||
// before applying completion.
|
||||
let ctx = ctx_for_tab.as_ref().expect("tab context must exist");
|
||||
let Some(ctx) = ctx_for_tab.as_ref() else {
|
||||
return (InputResult::None, true);
|
||||
};
|
||||
let first_line = ctx.first_line();
|
||||
popup.on_composer_text_change(ctx.prefix().to_string());
|
||||
if let Some(sel) = popup.selected_item() {
|
||||
|
||||
Reference in New Issue
Block a user