Enhance "Create issue to resolve thread" with AI-generated descriptions
<!--IssueSummary start-->
<details>
<summary>
Everyone can contribute. [Help move this issue forward](https://handbook.gitlab.com/handbook/marketing/developer-relations/contributor-success/community-contributors-workflows/#contributor-links) while earning points, leveling up and collecting rewards.
</summary>
- [Close this issue](https://contributors.gitlab.com/manage-issue?action=close&projectId=278964&issueIid=572554)
</details>
<!--IssueSummary end-->
## Summary
The "Create issue to resolve thread" button on merge request pages currently creates issues with minimal context. This feature request proposes enhancing this functionality by using AI to automatically generate comprehensive, pre-filled issue descriptions based on the discussion thread content.

**Current Experience**: The created issue has a generic title and minimal description
Title: Follow-up from "Remove old AI usage models"
Description:
> The following discussion from !205516 should be addressed:
>
> - [ ] @bwill started a [discussion](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/205516#note_2781703147): (+1 comment)
>
> > This change appears to have broken master. Fixing in https://gitlab.com/gitlab-org/gitlab/-/merge_requests/206561.
**Potential Experience**: If I ask Duo agenic chat to create an issue based on the thread, here is what it outputs: https://gitlab.com/gitlab-org/gitlab/-/issues/572556+
We should have the button do this out-of-the-box if the project can use Duo.
## Problem
Currently, when users click "Create issue to resolve thread" on a merge request discussion:
- Users must manually add context about the discussion, code changes, and requirements
- Important details from the thread conversation may be lost or overlooked
- This creates friction and reduces the likelihood of comprehensive issue documentation
## Proposed Solution
Enhance the "Create issue to resolve thread" functionality to leverage AI (GitLab Duo) for generating intelligent, pre-filled issue descriptions that include:
### AI-Generated Content
- **Context Summary**: Automatically extract and summarize the key points from the discussion thread
- **Code Analysis**: Analyze referenced code changes and provide technical context
- **Action Items**: Identify specific tasks or requirements mentioned in the discussion
- **Priority Assessment**: Suggest priority level based on discussion tone and content
- **Related Files**: List files mentioned or affected in the discussion
Example:
### User Experience
- Pre-filled issue form with AI-generated content that users can review and edit
- Option to regenerate or modify the AI suggestions before creating the issue
- Maintain the current quick-create workflow while adding intelligent defaults
## Benefits
1. **Improved Issue Quality**: Issues created from threads will have comprehensive, contextual descriptions
2. **Time Savings**: Reduces manual effort required to document thread context
3. **Better Tracking**: Ensures important discussion points are preserved in the issue
4. **Enhanced Collaboration**: Team members can better understand the issue context without reading the original thread
5. **Consistency**: Standardized issue format across thread-generated issues
## Implementation Considerations
- Integrate with existing GitLab Duo AI capabilities
- Ensure user privacy and data handling compliance
- Provide fallback to current behavior if AI generation fails
- Allow users to opt-out of AI generation if preferred
- Consider rate limiting for AI generation requests
## Acceptance Criteria
- [ ] "Create issue to resolve thread" button triggers AI analysis of the discussion thread
- [ ] AI generates a comprehensive issue description including context, action items, and technical details
- [ ] Users can review, edit, and approve the AI-generated content before issue creation
- [ ] Fallback mechanism exists for cases where AI generation is unavailable
- [ ] Feature works across all discussion thread types (code comments, general discussions, etc.)
- [ ] Performance impact is minimal and doesn't significantly slow down issue creation
## Related Features
This enhancement aligns with GitLab's AI-first approach and complements existing GitLab Duo features like:
- Code suggestions
- Chat assistance
- Issue description generation
- Merge request summaries
## Labels
~"type::feature" ~"group::optimize" ~"section::dev" ~"devops::plan" ~"GitLab Duo" ~"AI/ML"
issue