From xonsh/xonsh#6044 :
def ai_handler(app):
def get_from_ai(cmd):
return f' continue {cmd!r}'
cmd = app.current_buffer.text
app.current_buffer.suggestion = @.imp.prompt_toolkit.auto_suggest.Suggestion(get_from_ai(cmd))
__xonsh__.shell.shell.prompter.app.before_render.add_handler(ai_handler)
For community
⬇️ Please click the 👍 reaction instead of leaving a +1 or 👍 comment