The Completer code for "Tab" complete includes some edge cases where the postModelPromptAccept callback won't be called. This is because the postModelPromptAccept callback is tied to the Jupyterlab completer:select-file command. This command is not the only way an item from the completer list can be selected though. There are two cases where the Completer will bypass this command when accepting an item:
If there is only one item listed when the user clicks Tab, this should almost never happen unless the default completer is manually disabled in user settings.
If the user selects the item by mouse click.
The second case is the more problematic case since it could be commonly used.
The Completer code for "Tab" complete includes some edge cases where the
postModelPromptAccept
callback won't be called. This is because thepostModelPromptAccept
callback is tied to the Jupyterlabcompleter:select-file
command. This command is not the only way an item from the completer list can be selected though. There are two cases where the Completer will bypass this command when accepting an item:Tab
, this should almost never happen unless the default completer is manually disabled in user settings.The second case is the more problematic case since it could be commonly used.
To address this, I created https://github.com/jupyterlab/jupyterlab/pull/16312, which surfaces the completer
accepted
signal to extensions.Once Jupyterlab 4.3 is released, which includes the update, we will want to update the
app.commands.commandExecuted
call inindex.ts