Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
b42de7d
Implement voice memos transcription using local Whisper.
jakkra Mar 6, 2026
bb0454c
feat: Add on-device AI processing for voice memos
jakkra Mar 8, 2026
fee8d8f
Add voice memo AI pipeline, calendar integration, and AI settings screen
jakkra Mar 11, 2026
9ac8943
Add missing shared code between app and desktop benchmarking.
jakkra Mar 11, 2026
47493c9
Update project files.
jakkra Mar 8, 2026
f6791bb
Replace fllama dependency with git submodule fork (ZSWatch/fllama fork)
jakkra Mar 9, 2026
94affab
feat: iOS calendar/reminders permissions, dynamic RAM inference, mode…
jakkra Mar 12, 2026
f716328
Add CorrectionPromptTemplate to chrono_ai_flow, use dynamic maxTokens…
jakkra Mar 12, 2026
e835a9e
Fix iOS background Metal crashes and add CPU/GPU mode toggle
jakkra Mar 12, 2026
8c98cd5
fix: update fllama submodule and gate calendar permission behind AI t…
jakkra Mar 12, 2026
233515b
settings: Voice Memo AI section improvements
jakkra Mar 12, 2026
2883698
fix: conservative memory thresholds to prevent iOS GPU page-fault cra…
jakkra Mar 12, 2026
2384d4c
Make 'Process all unprocessed' button smaller to match 'Re-Transcribe…
jakkra Mar 12, 2026
2f8b34f
Add ai_testbench for LLM model benchmarking
jakkra Mar 12, 2026
28acad9
feat: auto-create calendar events after AI voice memo processing
jakkra Mar 13, 2026
2b11f97
chore: update fllama submodule (enable_thinking flag)
jakkra Mar 13, 2026
1529952
feat: multi-item AI extraction, expanded benchmarks, Qwen3.5 params
jakkra Mar 13, 2026
1a337fa
feat: restructure transcription models by language and add per-langua…
jakkra Mar 13, 2026
edd8738
feat: add phone-recorded AI benchmark flow
jakkra Mar 13, 2026
451b301
feat: default transcription fallback to whisper small english
jakkra Mar 13, 2026
a5b3fcf
Restructure AI prompt for better item splitting and intent classifica…
jakkra Mar 13, 2026
4c7b307
refactor: unify AI debug info with multi-action chrono display
jakkra Mar 14, 2026
51fdf4e
Improve AI extraction prompt and add correction toggle setting
jakkra Mar 14, 2026
1ef5828
Adapt AI prompt to runtime context limits
jakkra Mar 14, 2026
a9e38e2
fix: honor AI correction toggle in benchmark
jakkra Mar 14, 2026
fc162d1
Update fllama submodule for numThreads support
jakkra Mar 14, 2026
72037d3
feat: clarify local AI prompt and memory status
jakkra Mar 14, 2026
2e69842
feat: Android LLM optimizations (foreground service, thread priority,…
jakkra Mar 14, 2026
062effd
refactor: remove whisper GPU patch and update local LLM flow
jakkra Mar 15, 2026
f9a8cb3
fix: repair llm service rebase merge
jakkra Mar 15, 2026
ea22ee1
fix: prevent SIGABRT on hot-restart and ~78s post-inference delay
jakkra Mar 15, 2026
628477d
chore: remove timing instrumentation probes from LlmService
jakkra Mar 15, 2026
30f0e30
Add more info about the created calendar event sent to watch.
jakkra Mar 15, 2026
227a5fc
WIP: Refactor Claude Code.
jakkra Mar 16, 2026
3844db7
fix: initialize analytics services at startup and improve BLE reliabi…
jakkra Mar 17, 2026
c556fce
feat: add coredump detection UI and crash report screen
jakkra Mar 18, 2026
3a3e2a4
feat: auto-enable SMP for firmware updates
jakkra Mar 18, 2026
7892a28
feat: add coredump analysis and crash report history
jakkra Mar 18, 2026
0746ee6
feat: add touchpad remote control and live monitor improvements
jakkra Mar 19, 2026
ad09f75
Polish developer tools and coredump defaults
jakkra Mar 20, 2026
938904c
DFU: add speed chart, fix image counter, smooth speed, SMP error guid…
jakkra Mar 22, 2026
82cfe85
Fix ELF cache lookup for truncated commit SHAs
jakkra Mar 22, 2026
5d9747e
developer: improve live monitor polling reliability
jakkra Mar 22, 2026
1e9f702
developer: add thread monitor data model
jakkra Mar 22, 2026
24d557f
analytics: add connection timeline time range selector
jakkra Mar 22, 2026
778a8ef
deps: update Flutter-nRF-Connect-Device-Manager (add ShellManager)
jakkra Mar 22, 2026
0ae2e12
ci: add PR workflow, refactor plan, and CI/CD spec
jakkra Mar 22, 2026
ff0983a
ci: fetch submodules without checkout auth
jakkra Mar 22, 2026
fd462ea
ci: update Flutter version in PR workflow
jakkra Mar 22, 2026
42db62e
ci: restore recursive checkout for submodules
jakkra Mar 22, 2026
b0cbe06
style: format Flutter app sources
jakkra Mar 22, 2026
f72b990
fix: resolve all flutter analyze issues
jakkra Mar 22, 2026
f53648b
fix: bump Flutter-nRF-Connect-Device-Manager submodule (ShellManagerP…
jakkra Mar 23, 2026
5f93aef
ci: Accept licens Android NDK.
jakkra Mar 23, 2026
f31dccd
fix: bump Flutter-nRF-Connect-Device-Manager for iOS build
jakkra Mar 23, 2026
4eb41e0
fix: write Android SDK/NDK license files directly in CI
jakkra Mar 23, 2026
72cda61
fix: use full sdkmanager path to accept Android licenses in CI
jakkra Mar 23, 2026
f27041c
fix: null intent crash, iOS thread safety, remove unused sync permiss…
jakkra Mar 23, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
48 changes: 48 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,3 +135,51 @@ Providers expose `DfuService`, `FirmwareManager`, and `FilesystemUploadService`
- **Protocol reference**: `gadgetbridge_api.txt` — complete JSON message format for phone↔watch communication
- **Firmware counterpart**: `ZSWatch-Firmware/app/src/ble/gadgetbridge/ble_gadgetbridge.c` — firmware-side protocol implementation
- **Known issues**: `Issues:.md` — current bugs and TODOs at root level

## AI Testbench (`ai_testbench/`)

Standalone Flutter desktop app for benchmarking and evaluating on-device LLM models before shipping them in the companion app. It tests the same prompts and schemas used in production (`chrono_ai_flow` package) against local GGUF models via `fllama`.

### What It Tests

| Benchmark | Service | Purpose |
|-----------|---------|---------|
| **Structured extraction** | `model_benchmark_service.dart` | Validates LLM outputs valid JSON matching `chrono_ai_flow` schema (intent, title, datetime fields) |
| **Time extraction** | `time_extraction_benchmark_service.dart` | End-to-end: transcript → LLM extraction → `chrono_dart` parsing → resolved `DateTime` |
| **Correction** | `correction_benchmark_service.dart` | Verifies LLM can fix common STT errors (homophones, filler, punctuation) |

### Running Benchmarks

```bash
cd ai_testbench
flutter pub get

# Interactive GUI
flutter run -d linux

# Headless (compiled for consistent timing)
flutter build linux --release
./build/linux/x64/release/bundle/ai_testbench --headless --output results.json
./build/linux/x64/release/bundle/ai_testbench --headless-time --model Qwen3.5-2B-Q4_K_M.gguf
./build/linux/x64/release/bundle/ai_testbench --headless-correction --model-dir models/
```

### Key Files

- `lib/main.dart` — Entry point with headless mode dispatch (`--headless`, `--headless-time`, `--headless-correction`)
- `lib/services/llm_service.dart` — `fllama` wrapper (`LlmService`) for inference with configurable parameters
- `lib/prompts/` — Prompt templates (delegates to `chrono_ai_flow` for production prompts)
- `benchmark_results/` — Saved benchmark summaries (Markdown)

### Dependencies

- **fllama** — Flutter llama.cpp bindings for on-device inference
- **chrono_ai_flow** — Shared prompt templates and JSON schema (local package at `../packages/chrono_ai_flow`)
- **chrono_dart** — Natural language time expression parsing

### Notes

- GGUF model files go in `models/` (gitignored — download separately from HuggingFace)
- Native `.so` libraries go in `native_libs/` (gitignored — build from llama.cpp if using the CLI `bin/` runner)
- Test cases are defined inline in the service files — add new cases there
- The testbench shares the same `chrono_ai_flow` package as the main app, so prompt changes are tested against both
11 changes: 7 additions & 4 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:

- uses: subosito/flutter-action@v2
with:
flutter-version: "3.10.1"
flutter-version: "3.38.3"
cache: true

- name: Cache pub dependencies
Expand Down Expand Up @@ -55,7 +55,7 @@ jobs:

- uses: subosito/flutter-action@v2
with:
flutter-version: "3.10.1"
flutter-version: "3.38.3"
cache: true

- name: Cache pub dependencies
Expand Down Expand Up @@ -88,7 +88,7 @@ jobs:

- uses: subosito/flutter-action@v2
with:
flutter-version: "3.10.1"
flutter-version: "3.38.3"
cache: true

- name: Cache pub dependencies
Expand All @@ -107,6 +107,9 @@ jobs:
key: gradle-${{ runner.os }}-${{ hashFiles('zswatch_app/android/**/*.gradle*', 'zswatch_app/android/gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: gradle-${{ runner.os }}-

- name: Accept Android SDK licenses
run: yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses || true

- name: Get dependencies
working-directory: zswatch_app
run: flutter pub get
Expand Down Expand Up @@ -136,7 +139,7 @@ jobs:

- uses: subosito/flutter-action@v2
with:
flutter-version: "3.10.1"
flutter-version: "3.38.3"
cache: true

- name: Cache pub dependencies
Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ gadgetbridge_api.txt
# Development notes
Issues:.md

# Android signing keys (use GitHub Secrets in CI instead)
zswatch_app/android/key.properties
zswatch_app/android/*.keystore
zswatch_app/android/*.jks

# IDE and editor directories
.idea/
.vscode/
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[submodule "Flutter-nRF-Connect-Device-Manager"]
path = Flutter-nRF-Connect-Device-Manager
url = https://github.com/ZSWatch/Flutter-nRF-Connect-Device-Manager.git
[submodule "third_party/fllama"]
path = third_party/fllama
url = https://github.com/ZSWatch/fllama.git
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Changelog

## [1.1.0] - 2026-02-17

### What's New
- The firmware update screen now shows only the firmware compatible with your watch, making updates simpler and safer. A new option for watches with a rotated display is also available.

### Fixes & Improvements
- Fixed an issue on iOS where Bluetooth permission was not requested at the right time, which could prevent the app from connecting to your watch.
- Improved reliability when loading firmware update files from local storage.
- Fixed app icon, splash screen, and launcher icon display on Android and iOS.

## [1.0.0] - 2026-02-12

Initial release.
Loading
Loading