AI Input Enhancement (aiti-ai-input)
aiti-ai-input
โ Before you finish typing, it has already guessed half of it. โ
Input enhancement extension for the AI chat input box (long-term keeper, not a temporary experiment).
Autocomplete (L0 local instant โ L1 AI)
Typing pauses 700ms with the cursor at the end โ gray ghost text shows the next sentence (Tab/โ to accept, Esc/keep typing to cancel).
- L0 local layer (zero-model, instant): first checks locally favorited prompts + session history inputs; the server
POST /complete mode=localprefix-matches, and on a hit the gray text appears immediately with a โฆfavorite/โฆhistory badge, without calling the AI - L1 AI layer: only when L0 misses does it make a small same-model request (gray text appears after 0.4โ2s)
- Governance: extman feature management โ
autocomplete.enabledmaster switch ยทautocomplete.localOnly(L0 only, zero network egress) ยทautocomplete.minChars(minimum trigger length, default 3, CJK weighted ร1.5) ยท ctx three-tier context budget
Favorite suggestions (suggest)
Typing a prefix in the input box pops a candidate panel:
- Static sources first: commands โก rank0 + prompts ๐ rank1; when nothing matches,
aiFallbackserves as the fallback - Backend extension point:
POST /providers {id,path,label,rank}registers a suggestion source POST /suggest: aggregates provider results + strict filtering for short input (suggest.looseLendefault 10)- โก one-click run: feature
ai-input.suggestRundefault off (enable in extman)
Voice input (three layers)
โ Dictation detection + repair (default off: voice.fix / voice.indicator)
- Pure browser event-feature detection of voice/high-speed input (
beforeinputinputType + rhythm), zero server dependency - On detection โ a "๐ค checking and fixing transcription errors for you" marker bar above the input box, dismissible with โ
- On send, AI spelling repair for typos/transliterated words/repeated words, giving replacement suggestions only at ambiguous spots
โก ๐ค Real-time ASR (push to talk) (two master switches voice.enabled / toolbar.enabled, default off; enable in extman)
Real-time streaming WS recognition + VAD auto segmentation (~0.7s) + pseudo-real-time sentence segmentation via SenseVoice + on release a 2-pass offline refinement (Qwen3-ASR).
โข Pluggable ASR engines (asr-config.json)
- Self-hosted 8767 (FunASR / Qwen3 / GLM): true streaming + model-level hotwords
- iFlytek: local bridge 8768, true streaming
- Baidu / SiliconFlow / Azure / OpenAI-compatible endpoints
- Switch engines in the panel; keys are masked and only the last 4 characters are returned
Hotwords / usage stats / self-healing
- Hotwords: the session-manager
hotwordsservice auto-extracts per workspace and merges with the user lexicon (user-hotwords.jsonโค500), pushing per-workspace biasing to 8767 recognition (hash key + 10min TTL debounce) - Usage stats: the "Voice traffic statistics" tab in the right panel (
GET /asr/usage) - 8767 self-healing:
/asr/ensurelaunches it via the aiti-cmd runner PTY (circuit breaker 60s / dedup window 120s);/asr/control start|stop|restart