From ffe9ed5531b6e62706ea555c48964ea0e560b780 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Wed, 3 Sep 2025 16:00:26 +0300 Subject: Phase 2: add configurable completion debounce\n\n- App config: completion_debounce_ms (default 200)\n- Server: wait until no input for debounce before LLM calls\n- Applies to chat and provider-native completion paths\n- Tests: add debounce and adjust to verify behavior\n\nAll unit tests pass. --- TODO.md | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'TODO.md') diff --git a/TODO.md b/TODO.md index 20f78c1..51cd5d1 100644 --- a/TODO.md +++ b/TODO.md @@ -17,6 +17,10 @@ Updated tests accordingly. Phase 2: Debounce completion requests: Introduce a configurable delay (e.g., 100–500 ms) before sending a completion request to the LLM. This prevents a flood of calls while typing. +Status: Done — added `completion_debounce_ms` (default 200). Server waits until +no recent input activity for at least this duration before LLM calls (both chat +and provider-native paths). Added unit test `TestCompletionDebounce_WaitsUntilQuiet`. + Phase 3: Throttle on the server side: Beyond debouncing, implement request throttling to cap the maximum rate of LLM calls (e.g., one per 500 ms). This is especially useful when debounce alone isn’t enough under rapid editing 2 . -- cgit v1.2.3