Skip to content

Surface first-token gate + confidence-suppression counters in Settings/Diagnostics #100

@Jam-Cai

Description

@Jam-Cai

Problem

Both first-token gates emit to Console.app only:

To see "how often does this fire?" a user has to attach Console.app and run `log stream`. That's fine for development; it's a bad feedback loop for users tuning their threshold or for contributors verifying the gates are doing anything.

Proposal

Add a small "Diagnostics" section (or extend the existing autocomplete settings) that displays:

  • Suggestions generated this session
  • Suppressed by deny-list gate
  • Suppressed by confidence gate
  • (Optional) a rolling histogram or last-N display of first-token top-1 probabilities

Counters reset on app launch — no persistence, no PII.

Acceptance

  • A counter type on `LlamaSuggestionEngine` (or coordinator) that increments on the two suppression paths and on successful generations.
  • A simple SwiftUI view exposing those counters live.
  • No new logs; this is purely a UI surface over existing signal.

Out of scope

Cross-session persistence, opt-in upload, anything that turns this into telemetry. That belongs with #27 (opt-in encrypted capture), not here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:runtimellama.cpp wrapper, KV cache, sampling, downloadsarea:uiMenu bar, overlay, settings surfacesenhancementNew feature or requestgood first issueGood for newcomers

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions