Documentation
¶
Index ¶
- func ProcessTextCmd(app *App, input string) tea.Cmd
- func ProcessVoiceCmd(app *App, audioData interface{}) tea.Cmd
- func StartRecordingCmd(app *App) tea.Cmd
- func StopRecordingCmd(app *App) tea.Cmd
- func ValidateAPIKeyCmd(app *App, apiKey string) tea.Cmd
- type APIKeyValidationDoneMsg
- type App
- func (a *App) Cleanup() error
- func (a *App) GenerateExplanationSample() (string, error)
- func (a *App) GenerateVoiceResponse(text string) (string, error)
- func (a *App) GetState() *models.AppState
- func (a *App) HealthCheck() error
- func (a *App) PlayAudio(filename string) error
- func (a *App) PlayAudioSample() error
- func (a *App) ProcessTextInput(input string) (string, error)
- func (a *App) ProcessVoiceInput(audioData *models.AudioData) (string, error)
- func (a *App) Run() error
- func (a *App) SetKnowledgeLevel(level models.KnowledgeLevel)
- func (a *App) SetMode(mode models.CommunicationMode)
- func (a *App) StartRecording() error
- func (a *App) StopAudio() error
- func (a *App) StopRecording() (*models.AudioData, error)
- type AudioPlaybackStartedMsg
- type AudioPlaybackStoppedMsg
- type Model
- type ProcessingCompletedMsg
- type ProcessingStartedMsg
- type RecordingStartedMsg
- type RecordingStoppedMsg
- type UIModel
- type UIState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ProcessTextCmd ¶
ProcessTextCmd returns a command to process text input
func ProcessVoiceCmd ¶
ProcessVoiceCmd returns a command to process voice input
func StartRecordingCmd ¶
StartRecordingCmd returns a command to start recording
func StopRecordingCmd ¶
StopRecordingCmd returns a command to stop recording
Types ¶
type APIKeyValidationDoneMsg ¶
type APIKeyValidationDoneMsg struct {
// contains filtered or unexported fields
}
APIKeyValidationDoneMsg indicates result of API key validation
type App ¶
type App struct {
// contains filtered or unexported fields
}
App represents the main application
func (*App) GenerateExplanationSample ¶
GenerateExplanationSample creates a sample explanation using the current knowledge level.
func (*App) GenerateVoiceResponse ¶
GenerateVoiceResponse converts text response to speech
func (*App) HealthCheck ¶
func (*App) PlayAudioSample ¶
PlayAudioSample generates and plays a sample TTS audio using the current TTS settings.
func (*App) ProcessTextInput ¶
ProcessTextInput processes text input and returns AI response
func (*App) ProcessVoiceInput ¶
ProcessVoiceInput processes voice input and returns appropriate response
func (*App) SetKnowledgeLevel ¶
func (a *App) SetKnowledgeLevel(level models.KnowledgeLevel)
SetKnowledgeLevel changes the knowledge level
func (*App) SetMode ¶
func (a *App) SetMode(mode models.CommunicationMode)
SetMode changes the communication mode
func (*App) StartRecording ¶
StartRecording starts audio recording
type AudioPlaybackStartedMsg ¶
type AudioPlaybackStartedMsg struct{}
AudioPlaybackStartedMsg indicates audio playback has started
type AudioPlaybackStoppedMsg ¶
type AudioPlaybackStoppedMsg struct {
Error error
}
AudioPlaybackStoppedMsg indicates audio playback has stopped
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model represents the Bubbletea model
type ProcessingCompletedMsg ¶
ProcessingCompletedMsg indicates AI processing has completed
type ProcessingStartedMsg ¶
type ProcessingStartedMsg struct{}
ProcessingStartedMsg indicates AI processing has started
type RecordingStartedMsg ¶
type RecordingStartedMsg struct{}
RecordingStartedMsg indicates recording has started
type RecordingStoppedMsg ¶
type RecordingStoppedMsg struct {
AudioData interface{} // Will contain *models.AudioData
Error error
}
RecordingStoppedMsg indicates recording has stopped
type UIModel ¶
type UIModel struct {
// Current UI state
CurrentView string
// Input handling
TextInput string
CursorPos int
// Selection states
SelectedMode int
SelectedLevel int
// Status and messages
StatusMessage string
ErrorMessage string
LastResponse string
// Recording state
IsRecording bool
RecordingTime time.Duration
// Processing state
IsProcessing bool
// Display dimensions
Width int
Height int
// Conversation history for display
ConversationHistory []models.ConversationEntry
}
UIModel represents the UI state and data