Skip to content

AI retro templates#31

Merged
ellgreen merged 2 commits intomainfrom
ai-retro-templates
Nov 28, 2025
Merged

AI retro templates#31
ellgreen merged 2 commits intomainfrom
ai-retro-templates

Conversation

@ellgreen
Copy link
Copy Markdown
Owner

Add the ability to generate retro columns using AI. Currently supporting OpenAI but should be easy to add further models using langchain.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces AI-powered retrospective template generation using OpenAI via the langchain library. Users with AI enabled can generate creative, theme-based retro column structures by entering a simple prompt (e.g., "star wars"). The feature is conditionally displayed based on the ai_enabled flag returned from the backend, which checks if an OpenAI API key is configured.

Key Changes:

  • Added OpenAI integration through langchain with a custom prompt for generating themed retro columns
  • Created new UI components (Spinner, InputGroup) and an AI template popover interface
  • Extended user authentication to track and sync AI availability status via localStorage and API

Reviewed changes

Copilot reviewed 22 out of 23 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
go.mod / go.sum Added langchain dependency for AI model integration; updated Go version references
cmd/thoughts/config.go Added OpenAIAPIKey configuration field
cmd/thoughts/main.go Integrated AI model resolution into application initialization
cmd/thoughts/routes.go Added /api/ai/retro-template endpoint for AI template generation
cmd/thoughts/resources/user.go Extended User resource to include ai_enabled field based on AI availability
cmd/thoughts/controllers/ai.go New controller handling AI retro template requests with validation
cmd/thoughts/ai/provider.go AI model provider resolution with fallback when no API key configured
cmd/thoughts/ai/models.go OpenAI model initialization using gpt-4o-mini
cmd/thoughts/ai/prompts/retro_template.go Comprehensive system prompt for generating themed retro templates
cmd/thoughts/ai/prompts/json.go JSON parsing utility for AI responses
ui/src/types.ts Added ai_enabled to User interface and AIRetroTemplateResponse interface
ui/src/hooks/use-auth.ts Extended localStorage handling for AI enablement flag
ui/src/components/auth.tsx Added API call to sync user data including AI availability on mount
ui/src/components/retro/creator.tsx Integrated AI template button conditionally based on user's AI enablement
ui/src/components/retro/ai-retro-template.tsx New component providing AI template generation popover with form validation
ui/src/components/ui/spinner.tsx New reusable loading spinner component
ui/src/components/ui/input-group.tsx New compound input component supporting addons and buttons
ui/src/components/ui/input.tsx Removed flex class for better compatibility with input groups
ui/src/components/ui/button.tsx Added icon-sm and icon-lg size variants; removed shadow-xs from default/secondary variants
ui/src/components/retro/note-dialog.tsx Added autoComplete="off" to input field
ui/src/components/error.tsx Added min-w-md class to error cards
README.md Added documentation for AI feature configuration

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread cmd/thoughts/ai/prompts/retro_template.go
Comment thread cmd/thoughts/ai/provider.go
Comment thread ui/src/components/retro/ai-retro-template.tsx
Comment thread ui/src/hooks/use-auth.ts
@ellgreen ellgreen merged commit 0e7962a into main Nov 28, 2025
7 checks passed
@ellgreen ellgreen deleted the ai-retro-templates branch November 28, 2025 11:27
@ellgreen ellgreen changed the title Ai retro templates AI retro templates Nov 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants