-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Context Support to Chat Requests #14839
Labels
Comments
planger
added a commit
that referenced
this issue
Feb 4, 2025
This PR introduces support for adding context elements (e.g., files, symbols, or variables) to chat requests, allowing chat agents to leverage additional context without embedding it directly in user input. - Extended the existing *variable* concept with `AIContextVariable`. - Context variables can provide a dedicated `contextValue` that agents can use separately from the chat request text. - Context variables can be included in chat requests in two ways: 1. Providing `AIVariableResolutionRequest` alongside the `ChatRequest`. 2. Mentioning a context variable directly in the chat request text (e.g., `#file:abc.txt`). - Extended the chat input widget to display and manage context variables. - Users can add context variables via: 1. A `+` button, opening a quick pick list of available context variables. 2. Typing a context variable (`#` prefix), with auto-completion support. - Theia’s label provider is used to display context variables in a user-friendly format. - Enhanced support for variable arguments when adding context variables via the UI. - Introduced: - `AIVariableArgPicker` for UI-based argument selection. - `AIVariableArgCompletionProvider` for auto-completion of variable arguments. - Added a new context variable `#file` that accepts a file path as an argument. - Refactored `QuickFileSelectService` for consistent file path selection across argument pickers and completion providers. - `ChatService` now resolves context variables and attaches `ResolvedAIContextVariable` objects to `ChatRequestModel`. - Variables can both: - Replace occurrences in chat text (`ResolvedAIVariable.value`). - Provide a separate `contextValue` for the chat model. Fixes #14839
2 tasks
planger
added a commit
that referenced
this issue
Feb 11, 2025
This PR introduces support for adding context elements (e.g., files, symbols, or variables) to chat requests, allowing chat agents to leverage additional context without embedding it directly in user input. - Extended the existing *variable* concept with `AIContextVariable`. - Context variables can provide a dedicated `contextValue` that agents can use separately from the chat request text. - Context variables can be included in chat requests in two ways: 1. Providing `AIVariableResolutionRequest` alongside the `ChatRequest`. 2. Mentioning a context variable directly in the chat request text (e.g., `#file:abc.txt`). - Extended the chat input widget to display and manage context variables. - Users can add context variables via: 1. A `+` button, opening a quick pick list of available context variables. 2. Typing a context variable (`#` prefix), with auto-completion support. - Theia’s label provider is used to display context variables in a user-friendly format. - Enhanced support for variable arguments when adding context variables via the UI. - Introduced: - `AIVariableArgPicker` for UI-based argument selection. - `AIVariableArgCompletionProvider` for auto-completion of variable arguments. - Added a new context variable `#file` that accepts a file path as an argument. - Refactored `QuickFileSelectService` for consistent file path selection across argument pickers and completion providers. - `ChatService` now resolves context variables and attaches `ResolvedAIContextVariable` objects to `ChatRequestModel`. - Variables can both: - Replace occurrences in chat text (`ResolvedAIVariable.value`). - Provide a separate `contextValue` for the chat model. Fixes #14839
31 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Users need a way to specify additional context, such as files, symbols, or other relevant data, when submitting chat requests without having to add them directly into the user input message. This allows chat agents to incorporate this additional context more flexibly in comparison to having all context as part of the user message and can determine themselves how they process the provided context.
Key Features
+
button (quick pick) or by typing#
(auto-completion).Add a
#file
support as an example and use case driver to allow users attaching file contents to their requests.The text was updated successfully, but these errors were encountered: