Skip to content

Commit eb7bbd2

Browse files
committed
feat: Add Mentor screen interface for AI assistance
Implements comprehensive Mentor screen UI with conversation display and input. Features: - Conversation history with distinct styling for user/AI/system messages - User messages: right-aligned, cyan theme - AI responses: left-aligned, lavender theme - System messages: centered, dim theme - Input field with placeholder text and cursor indicator - AI provider status display (Crush/Mods/Claude) - Example prompts when conversation is empty - Scrollable message history for long conversations - Responsive layout for different terminal sizes - Nil-safe: handles empty conversation and nil character gracefully Integration: - Added mentorInputText and mentorConversation to Model - Updated viewMentor() to delegate to screens.RenderMentor - Ready for AI provider integration (Subagents 28-30) Testing: - Comprehensive test suite with >95% coverage - 50+ test cases covering all rendering scenarios - Benchmark tests for performance validation - Tests for text wrapping, time formatting, message rendering Subagent: Screen Development (Mentor) Phase: Development
1 parent aee6415 commit eb7bbd2

3 files changed

Lines changed: 1248 additions & 14 deletions

File tree

internal/ui/app.go

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,10 @@ type Model struct {
6060
questBoardSelectedIndex int // Currently selected quest index
6161
questBoardFilter screens.QuestFilter // Current quest filter
6262

63+
// Mentor screen state
64+
mentorInputText string // Current text in mentor input field
65+
mentorConversation []screens.Message // Conversation history with AI mentor
66+
6367
// Terminal dimensions - Updated on window resize
6468
width int // Terminal width in characters
6569
height int // Terminal height in characters
@@ -101,6 +105,10 @@ func NewModel(storageClient *storage.SkateClient) *Model {
101105
questBoardSelectedIndex: 0,
102106
questBoardFilter: screens.FilterAll,
103107

108+
// Mentor screen state
109+
mentorInputText: "",
110+
mentorConversation: []screens.Message{},
111+
104112
// Dimensions - Will be set on first WindowSizeMsg
105113
width: 80, // Default width
106114
height: 24, // Default height
@@ -480,21 +488,15 @@ func (m Model) viewCharacter() string {
480488
}
481489

482490
// viewMentor renders the mentor/AI assistant screen.
483-
// TODO: Subagent 18 will implement full mentor screen with chat interface.
491+
// Delegates to screens.RenderMentor for full implementation.
484492
func (m Model) viewMentor() string {
485-
title := RenderTitle("AI Mentor", "🧙")
486-
487-
mentorInfo := "AI Mentor is coming soon!\n\n" +
488-
"This screen will provide:\n" +
489-
"- Quest guidance and hints\n" +
490-
"- Coding tips and best practices\n" +
491-
"- Progress insights\n\n"
492-
493-
help := m.keys.RenderMentorHelp()
494-
495-
content := title + "\n\n" + mentorInfo + help
496-
497-
return BoxStyle.Render(content)
493+
return screens.RenderMentor(
494+
m.character,
495+
m.mentorInputText,
496+
m.mentorConversation,
497+
m.width,
498+
m.height,
499+
)
498500
}
499501

500502
// viewSettings renders the settings screen.

0 commit comments

Comments
 (0)