Expand 'glab duo ask' Beyond Git Commands to Support Full Conversational AI Assistant

Problem to solve

As a developer using the GitLab CLI, I want to have broader conversational interactions with GitLab Duo through the terminal (similar to the GitLab Duo chat modal in the web interface), so I can get assistance beyond just Git command generation and maintain context across multiple questions without switching to the web interface.

Currently, glab duo ask is limited to only generating Git commands from natural language queries (e.g., "list last 10 commit titles"). This means users can't:

  1. Ask general questions about GitLab features, best practices, or workflows
  2. Get help with CI/CD configuration, merge requests, or other GitLab functionality
  3. Have flowing conversations with context from previous questions
  4. Engage in broader technical discussions like they can in the web interface's Duo chat modal

Proposal

Extend the glab duo ask command beyond Git command generation to support full conversational capabilities:

  1. Add a new conversation mode flag that disables the Git-only restriction:
glab duo ask -c
# or
glab duo ask --conversation
  1. Support broader topics beyond Git commands:
$ glab duo ask -c
> How do I set up CI/CD for a Python project?
[GitLab Duo response about CI/CD configuration...]

> What testing frameworks should I include?
[GitLab Duo response with context from previous CI/CD discussion...]

> Can you help me write the .gitlab-ci.yml file?
[GitLab Duo provides detailed CI configuration assistance...]
  1. Implement session management commands:
/clear    # Clear conversation context
/history  # Show conversation history
/exit     # Exit conversation mode

Further details

Use Cases:

  1. GitLab Platform Guidance

    • Understanding GitLab features and capabilities
    • Getting help with GitLab configuration and setup
    • Learning best practices for GitLab usage
  2. CI/CD Development

    • Creating and debugging pipeline configurations
    • Understanding GitLab CI/CD features
    • Optimizing deployment workflows
  3. Project Management

    • Setting up project templates
    • Configuring project settings
    • Managing team workflows

Benefits:

  1. Expanded Assistance

    • Access to full GitLab Duo capabilities via CLI
    • Help beyond just Git commands
    • Consistent experience with web interface
  2. Improved Workflow

    • Stay in the terminal for all GitLab-related questions
    • Natural conversation flow for complex topics
    • Contextual assistance for better understanding
  3. Enhanced Learning

    • Interactive learning about GitLab features
    • Step-by-step guidance for complex setups
    • Contextual knowledge building

Links / references