feat(ui): attach GitLab issues and merge requests to sessions

This commit is contained in:
2026-08-16 16:23:36 +00:00
parent 267db3fb9d
commit 454b3591e5
15 changed files with 1920 additions and 11 deletions
@@ -27,7 +27,7 @@ type ComposerAttachmentControlsProps = {
handlePickLocalFiles: () => void;
openIssuePicker: () => void;
openPrPicker: () => void;
/** Only shows the GitHub issue/PR attach actions when the repo is GitHub. */
/** Shows the GitHub issue/PR or GitLab issue/MR attach actions based on the repo provider. */
gitProvider?: GitProvider | null;
onOpenSettings?: () => void;
onMenuOpenChange?: (open: boolean) => void;
@@ -121,6 +121,25 @@ export const ComposerAttachmentControls = React.memo(function ComposerAttachment
{t('chat.chatInput.actions.linkGithubPr')}
</DropdownMenuItem>
</>
) : gitProvider === 'gitlab' ? (
<>
<DropdownMenuItem
onSelect={() => {
requestAnimationFrame(openIssuePicker);
}}
>
<Icon name="git-branch"/>
{t('chat.chatInput.actions.linkGitlabIssue')}
</DropdownMenuItem>
<DropdownMenuItem
onSelect={() => {
requestAnimationFrame(openPrPicker);
}}
>
<Icon name="git-merge"/>
{t('chat.chatInput.actions.linkGitlabMr')}
</DropdownMenuItem>
</>
) : null}
</DropdownMenuContent>
</DropdownMenu>