mirror of
https://github.com/tinyhumansai/openhuman.git
synced 2026-07-30 15:03:57 +00:00
* feat(autocomplete): add persistent accepted-completion history module
Introduces history.rs — a thin persistence layer over the existing local
KV store (MemoryClient::new_local()) that stores every accepted completion
and surfaces them as formatted style examples for in-context learning.
Public API:
- save_accepted_completion(context, suggestion, app_name)
- load_recent_examples(n) → Vec<String>
- list_history(limit) → Vec<AcceptedCompletion>
- clear_history() → usize
Storage: KV namespace "autocomplete", keys "accepted:{ts_ms:018}",
auto-trimmed to 50 entries on each save.
Refs: tinyhumansai/openhuman#71
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat(autocomplete): wire history module into autocomplete mod.rs
Adds `mod history` and re-exports the public types/functions so they
are accessible from sibling modules (core.rs, ops.rs, schemas.rs).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat(autocomplete): save accepted completions and inject as style examples
Three additions to the autocomplete engine:
1. After RPC accept (accept method): fire-and-forget tokio::spawn to
save the accepted completion context + suggestion to KV history.
2. After Tab-key accept (try_accept_via_tab): same fire-and-forget save.
3. Before inline_complete() in refresh(): load the 6 most recent
accepted completions from history, merge with user's static
style_examples (capped at 8 total), and pass as dynamic examples —
giving the model in-context personalisation from prior acceptances.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat(autocomplete): add RPC handlers for history and clear_history
Adds two new async handler functions and their param/result structs:
- autocomplete_history(limit?) → AutocompleteHistoryResult
- autocomplete_clear_history() → AutocompleteClearHistoryResult
Both delegate to the history module and return via RpcOutcome, following
the established pattern of existing autocomplete ops handlers.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat(autocomplete): register history + clear_history controller schemas
Adds ControllerSchema definitions and handler wiring for the two new
RPC methods: openhuman.autocomplete_history and
openhuman.autocomplete_clear_history.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat(app): add TypeScript types and stubs for autocomplete history RPC
Adds AcceptedCompletion, AutocompleteHistoryResult, and
AutocompleteClearHistoryResult interfaces plus two exported async
functions (openhumanAutocompleteHistory, openhumanAutocompleteClearHistory)
following the existing callCoreRpc pattern.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat(app): add Personalization History section to AutocompletePanel
Adds a new UI section between Settings and Test in the autocomplete
settings panel showing accepted completion history:
- Scrollable list of entries with timestamp, app name, context tail,
and accepted suggestion
- Clear History button (red-toned, disabled when empty)
- Summary line with entry count
- Auto-loads on mount alongside existing settings load
Uses local component state only (no Redux) — history is fetched via
the new openhumanAutocompleteHistory RPC stub.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* style: apply prettier + cargo fmt formatting fixes
Auto-formatted by pre-push hooks — import ordering, line wrapping,
and brace style adjustments. No logic changes.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Tauri + React + Typescript
This template should help get you started developing with Tauri, React and Typescript in Vite.