fix(suggestion): stop generating mid-typing and let a pause bring a suggestion at once
With a 100 ms trigger left in the installed config, generation started in the gaps between keystrokes; the next key ended the session silently, and that session still counted against the 5 s minimum interval, so the moment the user actually paused nothing came (rate-limited). The log showed a generate-then-vanish cycle every 5-6 s. The trigger delay now has a 500 ms floor and settings revision 6 resets a stored value below it to 600 ms. A session ended because the user kept typing no longer blocks the next request by the minimum interval (per-minute and daily caps still apply), and that dismissal is logged.
This commit is contained in:
parent
7e0c20b510
commit
1b8fe445f3
5 changed files with 63 additions and 5 deletions
|
|
@ -18,7 +18,7 @@ import { getLogger } from './LoggerService'
|
|||
const logger = getLogger('ConfigService')
|
||||
|
||||
/** 제안/텔레메트리 튜닝 기본값의 현재 개정판. 기본값을 바꾸면 올린다. */
|
||||
const SUGGESTION_TUNING_REVISION = 5
|
||||
const SUGGESTION_TUNING_REVISION = 6
|
||||
|
||||
const INITIAL_SUGGESTION_TUNING = {
|
||||
suggestionTriggerDelayMs: 300,
|
||||
|
|
@ -59,6 +59,11 @@ function migrateSuggestionTuning(activeStore: ElectronStore<AppConfig>): void {
|
|||
}
|
||||
|
||||
if (current < 5) migrateSuggestionOverlayBindings(activeStore)
|
||||
// 설정 화면에 없는 값인데 설치본에 100ms 가 남아 치는 도중 생성이 시작됐다 — 하한 미만이면 기본값으로.
|
||||
if (current < 6) {
|
||||
const delay = Number(raw.suggestionTriggerDelayMs)
|
||||
if (!Number.isFinite(delay) || delay < 500) activeStore.set('suggestionTriggerDelayMs', 600)
|
||||
}
|
||||
|
||||
activeStore.set('suggestionTuningRevision', SUGGESTION_TUNING_REVISION)
|
||||
logger.info(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue