Skip to content

[Feat] Request cancel in-flight request when new keystroke fires #53

@PyDevC

Description

@PyDevC

Files: lua/model_cmp/modelapi/request.lua:13-24

Feature Introduction: end_request() and end_all() are defined but never called. Multiple requests can be in-flight simultaneously, wasting server resources and causing stale suggestions to overwrite newer ones.

Feature Description:

  1. When the debounce fires a new request, cancel any in-flight request first
  2. Call job:shutdown() or uv.kill(job.pid) on the active job
  3. Clean up the job entry from M.current_jobs
  4. Then start the new request

Is your feature possible with the current status of repo? Yes. end_request() already exists — just needs to be wired into the debounce pipeline in commands.lua.

Metadata

Metadata

Assignees

No one assigned

    Labels

    AI genIssue was generated by AIenhancementNew feature or requestmaintainer triagedmaintainer has triaged the issue

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions