Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
dd79e94
fix(macos): recover live input before first write
Nov 8, 2026
3725b44
fix(macos): retain target after uncertain AX write
Nov 8, 2026
835afa3
test(macos): verify late live-input capture in native editor
Nov 8, 2026
bcc7ad1
fix(capsule): stabilize translation language popup
Nov 8, 2026
593b747
test(ui): await corrections page before geometry checks
Nov 8, 2026
46f9c1d
test(ui): wait for tools navigation to expand
Nov 8, 2026
3f62739
fix(desktop): align mode selector and restore action corners
Nov 8, 2026
81d0d89
feat(desktop): guide accessibility setup and group awareness controls
Nov 8, 2026
9e77e37
feat(core): learn opt-in expression formatting preferences
Nov 8, 2026
5301a6d
test(harmony): update desktop expression IPC audit
Nov 8, 2026
d263501
fix(core): satisfy cross-platform expression checks
Nov 8, 2026
4627b9d
fix(core): exclude factual and sensitive vocabulary edits
Nov 8, 2026
3a900b4
feat(desktop): add retained-history usage view
Nov 8, 2026
6e7106f
feat(ui): show unavailable service usage explicitly
Nov 8, 2026
9a9af07
feat(core): add local service usage ledger foundation
Nov 8, 2026
f6ffc59
feat(core): parse provider-reported token usage
Nov 8, 2026
79b42c1
fix(core): preserve provider cache token semantics
Nov 8, 2026
4a89fc8
Record reported text processing usage
Nov 8, 2026
dafb3dc
Fix combined desktop settings imports
Nov 9, 2026
75bcbad
fix(desktop): restore final insertion and align usage and settings
Nov 9, 2026
f0ed5b8
test(settings): align navigation with awareness and live-input availa…
Nov 9, 2026
4afcac7
refine(usage): bound record scrolling and compact reported metrics
Nov 9, 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
17 changes: 17 additions & 0 deletions docs/awareness-follow-up.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Awareness follow-up

The desktop Awareness page groups cursor context, opt-in correction suggestions, and an initial opt-in expression-learning implementation. The initial implementation learns only a small set of global formatting directions, stores abstract evidence locally, and applies stable directions to future dictation prompts. It does not yet implement application-awareness controls, per-app/category profiles, a user blacklist, or the complete correction system requested by the user.

## Reference and evidence

A local Type4Me source checkout at upstream revision `f21339e214d65e9bd4d191ff5136513902e7473b` was reviewed. The installed app identifies itself as 3.2.0; equivalence to that checkout has not been established. The checkout is MIT-licensed: retain its copyright and license notice if source or substantial portions are ported. Relevant upstream files are `Sources/Type4Me/Services/IntelliSenseContext.swift`, `UserEditClassifier.swift`, `ExpressionProfileStore.swift`, `BatchCorrectionInference.swift`, and `Sources/Type4MeIntelliSenseCore/IntelliSensePrompt.swift` in https://github.com/joewongjc/type4me.

The reviewed implementation separates app/control context, cursor context, correction detection, and expression learning. It classifies observed edits and rejects sensitive content and changes to facts or negation before treating edits as style evidence. Style profiles hold abstract features and use sample, day-span, consistency and decay thresholds before emitting limited form-only directives. Its batched correction candidates use independent sessions, multiple days and directional confidence. These are observations about that source revision, not claims about an inaccessible server or later app version.

## Required implementation

- Define independently controlled, opt-in learning and capture boundaries; keep secure fields, sensitive apps, uncertain target changes and blacklist entries excluded. Describe when contextual text may be sent to the configured model.
- The initial implementation accepts only uniquely anchored formatting edits, rejects sensitive or content-changing observations, and stores bounded text-free global evidence. Opt-out stops observation and new-session application; users can clear the profile. Mixed edits and richer classification remain unsupported.
- Extend the profile to app/category scopes with explicit precedence and decay, plus a user-maintained exclusion list. Validate reset and opt-out races across all hosts, and ensure form directives cannot override facts, explicit corrections or user instructions.
- Correction suggestions now reject changes to numeric or negation signatures and sensitive contexts, while retaining explicit user confirmation. Add a richer lexical affinity model, conflicting-candidate handling and repeated-session evidence without treating one edit as a stable habit.
- Integrate the controls into the single Awareness page and exercise opt-out, clearing, app exclusion, restart and prompt behavior across supported hosts. Add deterministic classification, persistence, safety, stale-observer and native integration tests before enabling the feature.
11 changes: 11 additions & 0 deletions docs/usage-accounting-follow-up.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Service usage accounting follow-up

The initial desktop page reads retained dictation history, which is capped and can be cleared. It is not a service usage ledger. Provider labels in those records do not represent retries or complete billing data.

An initial bounded, text-free local ledger and background writer now record explicitly reported tokens from desktop OpenAI-compatible text-polisher responses. The desktop page presents those reports separately from history-derived counts and labels them incomplete. Gemini, Codex, SIWC, multimodal, ASR, TTS, retries and all other call paths are not yet fully covered. The writer's error count is process-local; durable loss reporting and an explicit shutdown drain remain required. No historical token values can be recovered from the existing history.

Official OpenAI Chat Completions streaming requests explicitly ask for usage only when using the official endpoint and an observer is attached. An interrupted stream may not return its final usage report. DeepSeek documents its own final-stream usage and cache fields. Do not apply an OpenAI-specific request option to arbitrary compatible endpoints: [OpenAI API reference](https://developers.openai.com/api/reference/resources/chat/subresources/completions/methods/create), [DeepSeek API reference](https://api-docs.deepseek.com/api/create-chat-completion/).

To satisfy complete usage accounting, add a separately persisted, bounded, local ledger at the service-call boundary. Record a unique attempt identifier, timestamp, operation (including dictation post-processing, translation, selection, QA and other call sites), provider and model, outcome, and provider-reported quantities. Preserve unknown quantities as unknown, not zero; never infer token counts or price from characters. Capture ASR audio units and TTS units where the underlying provider reports them. Cover streaming, non-streaming, retries, cancellation, errors, multimodal calls and supported provider protocols, with tests proving one record per actual attempt and no secret or text content in the ledger. Distinguish missing legacy data from a zero-usage interval. Do not silently attach current model prices to historical requests.

Expose aggregated date ranges and paginated, filterable records through the existing host contract, independent of history deletion. Add migration, retention and explicit deletion controls, deterministic aggregation tests, and UI tests for partial data, empty states and failed reads. The current history-derived view must be replaced or clearly separated when the ledger exists.
Loading
Loading