Skip to content

TUI chat crashes when no model is downloaded #11

@eshork

Description

@eshork

Symptom

Using the chat feature in the TUI with no models downloaded causes a crash. Sending any message (e.g., "Hi Bob") crashes the app instead of showing a graceful error.

Expected Behavior

The chat screen should:

  1. Check if any models are available before allowing chat
  2. If no models are downloaded, show a clear message (e.g., "No models available. Download a model first.")
  3. If a model request fails (404, connection refused, etc.), display the error in the chat area without crashing

Suggested Fix

  1. Add error handling around the Ollama chat API call
  2. Check for available models on chat screen mount — disable input or show a prompt if none exist
  3. Wrap the streaming response handler in try/except to catch connection errors, model-not-found, etc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions