Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
19b046f
refactor: replace markdown_widget with mixin_markdown_widget and upda…
boyan01 Apr 17, 2026
e940d9b
update
boyan01 Apr 20, 2026
03b8bd3
feat: enhance AI message handling with role comparison, improved UI, …
boyan01 Apr 20, 2026
20355c4
fix: adjust padding for AI message card layout
boyan01 Apr 20, 2026
2235075
feat(ai): display model name in status badge if available
boyan01 Apr 20, 2026
83d825c
feat: enhance AI provider configuration with multi-model support and …
boyan01 Apr 20, 2026
ce53eb4
feat(ai): enhance AI message handling with caching, warmup, and impro…
boyan01 Apr 20, 2026
c83081d
feat: add streaming support to Markdown rendering
boyan01 Apr 23, 2026
e527fca
feat: update AI mode UI and theme colors
boyan01 Apr 23, 2026
1488982
feat(ai): add cancelation support for AI requests and improve input h…
boyan01 Apr 23, 2026
69b959c
feat: add AI-assisted text generation and inline message actions
boyan01 Apr 24, 2026
1d7363a
refactor: modularize and optimize AI message assist functionality
boyan01 Apr 24, 2026
ad8b366
feat: add AI draft assist panel and inline message AI actions
boyan01 Apr 24, 2026
e9ed85b
fix: ensure AI features respect enabled providers configuration
boyan01 Apr 24, 2026
6cfce8b
refactor: simplify placeholder logic and update markdown theme implem…
boyan01 Apr 27, 2026
7e79345
feat: add support for Gemini AI provider
boyan01 Apr 27, 2026
69ce809
feat: add AI conversation tools and enhance message handling
boyan01 Apr 28, 2026
cafba8b
feat(chat): add support for displaying day/time separators in message…
boyan01 Apr 28, 2026
02bbd78
feat(ai): refactor AI chat controller and introduce modular strategie…
boyan01 Apr 28, 2026
2f803e6
feat: add customizable AI prompt templates with language support
boyan01 Apr 28, 2026
18da0d2
feat: add "Use & Send" action and replace "Append" with "Insert" in A…
boyan01 Apr 28, 2026
99ece41
feat: remove AI message handling and introduce AI Assistant page
boyan01 Apr 28, 2026
815252f
feat(ai-assistant): add new components for AI assistant UI and messag…
boyan01 Apr 28, 2026
e9858cc
feat(ai): enhance metadata handling and tool activity tracking
boyan01 Apr 28, 2026
337bce5
refactor: replace custom AI tool handling with Genkit integration
boyan01 Apr 28, 2026
ac1cc1a
refactor: simplify AI tool handling and improve role mapping
boyan01 Apr 28, 2026
a1d62b1
refactor: extract user and response message cards into separate compo…
boyan01 Apr 28, 2026
91b66be
feat: add model testing functionality in AI provider edit page
boyan01 Apr 28, 2026
2c5f62a
feat: integrate TOON format for tool results and update tool result h…
boyan01 Apr 28, 2026
1b2d288
refactor: simplify data models and enhance search functionality
boyan01 Apr 28, 2026
c15a6cc
feat(ai): add thread-based message handling and metadata enhancements
boyan01 Apr 28, 2026
1672713
feat: add multi-thread support for AI chat with metadata management
boyan01 Apr 28, 2026
b4344e0
feat: enhance AI assistant UI and add response details dialog
boyan01 Apr 28, 2026
61e5b0e
refactor: remove unused imports in AI chat thread tests
boyan01 Apr 28, 2026
1d5e696
refactor(db): simplify migration strategy and remove unused methods
boyan01 Apr 28, 2026
367f924
feat(ai): add support for attaching messages as AI context
boyan01 Apr 29, 2026
25cf53e
fix: set default httpLogLevel to null in createClient
boyan01 Apr 29, 2026
6ca2009
refactor: simplify markdown controller cache and remove warmup logic
boyan01 Apr 29, 2026
242bc8e
feat: add AI-powered unread message summarization feature
boyan01 Apr 29, 2026
f8e03d1
feat(chat): make chat side page width dynamic based on page type
boyan01 Apr 29, 2026
923592c
feat(ai): add support for explicit thread targets and new thread crea…
boyan01 Apr 30, 2026
b2cc073
test: add unit tests for AI conversation context and message search f…
boyan01 Apr 30, 2026
a968609
feat: add support for message_id validation and markdown linking in c…
boyan01 Apr 30, 2026
659d993
feat: add transcript context handling and improve prompt generation
boyan01 Apr 30, 2026
ef73ce7
feat: add OCR support for image messages in AI chat prompts
boyan01 Apr 30, 2026
afae931
feat: add MCP server integration with UI controls and settings
boyan01 May 1, 2026
b452252
feat: add circle management and enhanced MCP server functionalities
boyan01 May 6, 2026
91a9faa
Refine local MCP settings
boyan01 May 7, 2026
0c8803e
chore(deps): update dependencies and Podfile.lock for ogg_opus_player…
boyan01 May 7, 2026
640e045
Refine local MCP tool surface
boyan01 May 7, 2026
5195c78
Use TOON for MCP tool text results
boyan01 May 7, 2026
de3a61f
fix: normalize Anthropic base URL and update related hints and tests
boyan01 May 7, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
161 changes: 161 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
# AGENTS.md

## Project

Mixin Messenger desktop Flutter app.

Tech stack:

- Flutter/Dart app, `environment` in `pubspec.yaml`: Dart `^3.10.0`, Flutter `^3.38.0`.
- Desktop targets: macOS, Linux, Windows. Web/iOS/Android folders exist, but README/release flow focuses on desktop.
- State/UI: Flutter Hooks, Riverpod, Provider, Bloc/Hydrated Bloc.
- Storage: Drift/Moor over SQLite, Hive, Hydrated Bloc storage.
- Networking/runtime: Dio, rhttp, WebSocket, Mixin SDK, Signal protocol implementation.
- Code generation: `build_runner`, `drift_dev`, `json_serializable`, `envied_generator`, `flutter_intl`.

Main directories:

- `lib/main.dart`, `lib/app.dart`: app bootstrap, desktop window setup, localization and root providers.
- `lib/account`: account server, notification and key-value account state.
- `lib/ai`: AI chat controller, models and tools.
- `lib/api`, `lib/blaze`: HTTP/API and Blaze message models.
- `lib/db`: main Drift database, DAOs, converters, FTS database, open helpers.
- `lib/db/moor`: Drift SQL schema and DAO `.drift` files.
- `lib/crypto/signal`: Signal protocol database, DAOs and crypto storage.
- `lib/ui`, `lib/widgets`: screens and reusable UI.
- `lib/utils`, `lib/workers`: platform utilities, background work, transfer and job queues.
- `lib/l10n`: source ARB localization files.
- `lib/generated`: generated localization output; do not edit by hand.
- `assets`, `fonts`: bundled assets and fonts.
- `test`: Flutter/unit tests.
- `third_party/system_tray`: local path dependency.
- `dist`: packaging scripts and platform distribution metadata.

## Commands

Setup:

```sh
flutter pub get
```

Generate code:

```sh
dart run build_runner build --delete-conflicting-outputs
```

Short scripts:

```sh
./generate.sh # dart run build_runner build
./db_generate.sh # dart run build_runner build --delete-conflicting-outputs
```

Format/lint:

```sh
dart format --set-exit-if-changed .
dart analyze --fatal-infos
```

Tests:

```sh
dart run webcrypto:setup
flutter test
flutter test test/path/to/file_test.dart
```

Run:

```sh
flutter run -d macos
flutter run -d linux
flutter run -d windows
```

Build:

```sh
flutter build macos --release
flutter build linux --release
flutter build windows --release
```

Packaging helpers:

```sh
./dist/macos.sh
./dist/win.sh
./dist/linux_deb.sh amd64
./dist/linux_deb.sh arm64
```

Linux desktop build dependencies used by CI:

```sh
sudo apt-get install -y ninja-build libgtk-3-dev libsdl2-dev \
libwebkit2gtk-4.1-dev libopus-dev libogg-dev libcurl4-openssl-dev
```

## Environment

- `lib/constants/env.dart` uses `envied` with `.env`.
- `.env` may contain:

```env
SENTRY_DSN=...
```

- `SENTRY_DSN` is optional for local debug; release builds read it through generated env code and may also pass `--dart-define SENTRY_DSN=$SENTRY_DSN` in CI/release scripts.
- If `.env` changes or `EnviedField` changes, rerun build runner.

## Database

- Main DB: `lib/db/mixin_database.dart`, schema in `lib/db/moor/**`, current `schemaVersion` is `30`.
- FTS DB: `lib/db/fts_database.dart`, schema in `lib/db/moor/fts.drift`.
- Signal DB: `lib/crypto/signal/signal_database.dart`, schema in `lib/crypto/signal/moor/**`.
- Drift generation options are in `build.yaml`; FTS5 is enabled.
- When changing `.drift` schemas or DAOs:
- update `schemaVersion` when persistent schema changes;
- add an `onUpgrade` migration in `MigrationStrategy`;
- prefer idempotent helpers like `_addColumnIfNotExists` for additive migrations;
- keep existing data migration jobs in `lib/workers/job` in mind;
- rerun `dart run build_runner build --delete-conflicting-outputs`;
- add or update focused tests under `test/db` when behavior changes.

## Code Generation

- Do not hand-edit `*.g.dart`, `lib/generated/**`, or other files marked generated.
- Source annotations/models commonly use `part '*.g.dart'` with `json_serializable`, `drift_dev`, or `envied_generator`.
- Reserve `part` and `part of` for code generation only. For manual code organization, split code into separate libraries and connect them with imports.
- Localization source is `lib/l10n/*.arb`; generated class is `Localization` in `lib/generated/l10n.dart`.
- Asset constants in `lib/constants/resources.dart` are generated; update the generator flow instead of manual edits if assets change.

## Coding Conventions

- Follow `analysis_options.yaml` and `very_good_analysis` overrides.
- Prefer relative imports inside `lib`; avoid broad package imports for local files.
- Prefer `final` locals, expression-bodied members where already used, and concise null handling.
- Keep generated, third-party, and platform registrant files untouched unless the task explicitly requires them.
- Keep changes scoped to the requested behavior; do not refactor unrelated areas.
- Reuse existing UI components from `lib/widgets` and patterns from nearby screens.
- For context menus on list items, messages, and other right-click surfaces, use
the native `super_context_menu` flow (`CustomContextMenuWidget`,
`MenuAction`, `MenusWithSeparator`) used elsewhere in the app instead of
custom popup/menu widgets.
- Reuse existing DB access through DAOs and providers instead of bypassing with ad hoc SQL unless Drift APIs cannot express the query.
- For user-facing text, use `Localization` and ARB files rather than hard-coded strings.
- For async work, preserve current error propagation style and do not swallow exceptions without a concrete recovery path.
- Before finalizing non-trivial changes, run the narrowest relevant tests plus `dart analyze --fatal-infos` when feasible.

## Code Style

- Follow the Dart style guide and `analysis_options.yaml` rules.
- Use consistent naming conventions for variables, functions, classes, and files.
- Keep lines within 80 characters where possible for readability.
- Prefer clear and descriptive names over abbreviations.
- Maintain consistent indentation and spacing throughout the codebase.
- Flow effective-dart guidelines, such as using `final` for variables that are not reassigned, and preferring composition over inheritance where appropriate.
- Use comments judiciously to explain complex logic, but avoid redundant comments that do not add value beyond the code itself.
3 changes: 3 additions & 0 deletions devtools_options.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
description: This file stores settings for Dart & Flutter DevTools.
documentation: https://docs.flutter.dev/tools/devtools/extensions#configure-extension-enablement-states
extensions:
Loading
Loading