No description
  • Dart 94.2%
  • CMake 3.3%
  • C++ 2.2%
  • C 0.3%
Find a file
2026-08-21 12:47:05 +02:00
android Migrate to Forgejo and rename nai_chat -> novelai_image_chat 2026-06-27 12:21:16 +02:00
lib fix(v5): persist novelAiEngine and pin settings-screen wiring 2026-08-21 10:25:56 +00:00
linux feat: paste image from clipboard (Ctrl/Cmd+V) 2026-07-23 23:26:08 +00:00
packages feat: Diffusion 5 engine with style reference exclusion 2026-08-21 09:16:06 +00:00
test fix(v5): persist novelAiEngine and pin settings-screen wiring 2026-08-21 10:25:56 +00:00
.gitignore v0.2.0: Add AI tools and model selection (Phase 2) 2026-02-10 17:18:06 +01:00
.gitmodules chore: point submodules to TeamAI org 2026-06-27 13:23:55 +02:00
.metadata Initial Flutter project setup 2026-02-10 12:24:14 +01:00
analysis_options.yaml Initial Flutter project setup 2026-02-10 12:24:14 +01:00
CHANGELOG.md feat: Diffusion 5 engine with style reference exclusion 2026-08-21 09:16:06 +00:00
CLAUDE.md Migrate to Forgejo and rename nai_chat -> novelai_image_chat 2026-06-27 12:21:16 +02:00
LICENSE v0.1.0: Initial UI shell with chat, generation panel, and settings 2026-02-10 16:38:35 +01:00
pubspec.lock feat: Diffusion 5 engine with style reference exclusion 2026-08-21 09:16:06 +00:00
pubspec.yaml feat: Diffusion 5 engine with style reference exclusion 2026-08-21 09:16:06 +00:00
README.md feat: Diffusion 5 engine with style reference exclusion 2026-08-21 09:16:06 +00:00

NAI Chat

A chat-based anime image generation app powered by NovelAI.

Users chat with an AI agent that searches, browses, and suggests booru tags, builds structured prompts, and generates images — all through a conversational interface.

Features

  • AI agent loop — chat with an AI that researches booru tags, configures settings, and generates images autonomously
  • 9 agent tools — search/browse/suggest/detail booru tags, edit generation settings, generate images, read/write knowledge base, set chat title
  • Knowledge base — persistent notes the AI reads and writes across chats (How-To guides, user preferences, tag discoveries); pinned entries are included in the system prompt
  • Structured prompt builder — layered tag system with scene-level and per-character categories
  • Generation settings per chat — resolution, aspect ratio, number of images
  • Engine selection — Diffusion 4.5 or Diffusion 5; style reference is a 4.5-only feature (the picker disables itself under V5)
  • Manual generation — trigger image generation directly from the panel without the AI
  • Tool activity UI — collapsible, per-tool summaries showing what the agent did
  • Image viewer — fullscreen viewer with arrow key navigation and save-to-file
  • Vision support — attach images to messages when the selected model supports it
  • Auto chat titles — AI automatically names chats based on conversation content
  • Model selection — browse and search OpenRouter models from settings; vision badge on capable models
  • Global settings — API keys, model, sampler, guidance, steps, style reference, default meta tags
  • Responsive layout — side-by-side on desktop, navigation-based on mobile
  • Dark Material 3 theme

Architecture

  • State management: Riverpod
  • Persistence: JSON files for chats, SharedPreferences for settings
  • Image storage: App-managed directory (safe across platforms)
  • Tag system: Uses booru_tag_db_dart for categorized danbooru tags and novelai_image_gen for the NovelAI API

Getting Started

flutter pub get
flutter run

Requires API keys configured in Settings:

  • OpenRouter API Key — for the AI chat backend
  • NovelAI API Key — for image generation

Project Structure

lib/
  main.dart
  models/          # Data models (chat, messages, settings, tags)
  providers/       # Riverpod state management
  screens/         # Top-level screens
  services/        # Persistence services
  tools/           # AI agent tools (edit settings, generate images)
  theme/           # Material 3 theme
  widgets/         # UI components
    chat_list/     # Chat list sidebar
    chat_view/     # Message bubbles, input, chat area
    generation_panel/  # Tag editor, generation params
    knowledge_base/  # Knowledge base list panel
    settings/      # Settings form widgets

License

MIT — see LICENSE.