Duo Chat GraphQL - Add context field
Extend aiAction mutation with additional context information.
Implementation details
We have a single aiAction mutation that handles all AI-related requests. This mutation can receive different input parameters. The one we need right now is AiChatInput.
To this AiChatInput, we can add a new context parameter. This parameter will accept a list of context snippets, similar to code suggestions. The received context parameter will then be handled and passed to the AI gateway. There is also a MR to add a current_file parameter, which could be useful.
Additionally, we need to trim the context if it exceeds the body size limit.
Edited by Vitali Tatarintev