Skip to content

Conversation

@pull
Copy link

@pull pull bot commented Dec 10, 2025

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

markijbema and others added 13 commits December 9, 2025 13:34
This commit introduces a three-tier debounce delay strategy to improve
the percentage of accepted autocomplete suggestions:

1. MIN_DEBOUNCE_DELAY_MS (150ms): Lower bound for adaptive delay
   - Prevents overly aggressive triggering
   - Ensures minimum time for user to continue typing

2. INITIAL_DEBOUNCE_DELAY_MS (300ms): Conservative starting value
   - Provides stable initial experience
   - Used before enough latency samples are collected

3. MAX_DEBOUNCE_DELAY_MS (1000ms): Upper bound for adaptive delay
   - Prevents frustratingly long waits when LLM is slow
   - Ensures users don't give up waiting for suggestions

The adaptive debounce system:
- Starts at 300ms for stability
- Collects latency samples from actual LLM requests
- Adjusts to average latency after 10 samples
- Clamps between 150ms (fast) and 1000ms (slow)

Benefits:
- Faster response for fast models (down to 150ms)
- Protection against slow models (capped at 1000ms)
- Conservative start prevents jarring initial experience
- Adaptive behavior optimizes for actual system performance

This should increase acceptance rates by:
- Reducing perceived latency for responsive systems
- Preventing user frustration from excessive delays
- Maintaining predictable, stable behavior
- Refactored AutocompleteTelemetry from standalone functions to a class
- Added optional telemetry parameter to GhostInlineCompletionProvider constructor
- Made telemetry nullable to support running without telemetry tracking
- Updated all telemetry call sites to use optional chaining
- Updated tests to work with class-based telemetry
- All 86 tests passing
- Add css-prefix.spec.ts to enforce am- prefix on all agent manager CSS
- Rename unprefixed modifiers (selected, done, error, etc.) to am-selected, am-done, etc.
- Update component references to use new class names
…emetry-to-injectable-class

refactor: convert AutocompleteTelemetry to injectable class
* Add question support to agent manager

* Add changeset, remove clipboard usage, move parsing logic out of view and add more tests
…ounce

Optimize autocomplete debounce timing for better acceptance rates
* Auto-focus textarea in agent manager

* Use autoFocus prop instead of ref/useEffect
* Add agent creation timeout and chancel ui

* Reduce comments and refactor clearPendingTimeouts

* add changeset
it will only register requests but not acceptance, so skew the acceptance rate
@pull pull bot locked and limited conversation to collaborators Dec 10, 2025
@pull pull bot added the ⤵️ pull label Dec 10, 2025
@pull pull bot merged commit ee8fcb2 into jasonkneen:main Dec 10, 2025
3 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants