Skip to content

Context provider "@" autocomplete not in v3 #1170

@michaelchia

Description

@michaelchia

Description

The autocomplete feature for context providers (@) in v3 does not yet have feature parity with v2.

Only slash-commands autocompletion was ported. It seems like the autocomplete feature was ported before the introduction of context provider.

Reproduce

Type '@' in chat input

Expected behavior

Not only should it autocomplete with the '@' opener,

  1. it needs to be able to trigger autocomplete when '@' is entered at any point in the input.
  2. it also optionally needs to trigger an autocomplete request to the backend ContextProvider object as the command argument (@cmd:argument) is being entered. For example "@file:dir/" will send the command "file" and the argument "dir/" to the backend where the logic in FileContextProvider.get_arg_options (more generally `BaseCommandContextProvider.get_arg_options) will determine what arg autocompletion options will be sent back. For @file it allows autocompletion of filepaths, for something like @var it would allow for autocompletion of variable names in the kernel.

The v2 logic can be found in https://github.com/jupyterlab/jupyter-ai/blob/v2.28.4/packages/jupyter-ai/src/components/chat-input.tsx.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugBugs reported by users

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions