Add slash commands (tasks) for pre-defined tasks
Add support for slash commands to Gitlab Duo Chat:
- allows defining one or more slash commands for chain tools
- when user sends a command starting with
/
(e.g./refactor
), then we skip zero shot agent and the tool the command belongs to is called directly. Additional context about selected code os passed to the tool. - slash commands should also accept addition user's text (e.g.
/refactor use Rails framework
) which should be then added into command's intruction too
POC: !135578 (diffs)
Depending if one tool can be reused for multiple commands, we can have either one command per tool or multiple commands per tool (related discussion: &11734 (comment 1621754639)
Related to https://gitlab.com/gitlab-org/gitlab/-/issues/419278/
For MVC, /explain
, /refactor
and /write_tests
commands are planned:
Edited by Jan Provaznik