Skip to content

feat: run vibe and Acme Execute in the background - #16

Merged
nooga merged 1 commit into
mainfrom
async-background-jobs
Sep 18, 2026
Merged

nooga merged 1 commit into
mainfrom
async-background-jobs

Conversation

@nooga

@nooga nooga commented Sep 18, 2026

Copy link
Copy Markdown
Owner

Summary

  • I/O for vibe and Acme Execute runs in a let-go future; the editor keeps reading keys while jobs are in flight (term/key-pending? + a short sleep, blocking read-chord when idle).
  • Results apply on the main thread via drain-jobs ({:ok :err} so a thrown future cannot vanish as nil). Goroutines never touch buffers.
  • C-g discards in-flight results (does not kill HTTP/os/sh); the mode line shows vibing... / N jobs after typing has cleared the echo area. :pending-task stays for main-thread paint-then-run work.

Test plan

  • lg test/run.lg (340 tests, 1493 pass)
  • C-c C-v on a (vibe "...") form: echo says vibing, you can still type, splice lands when the model returns
  • F7 / Acme Execute on a slow rc command: same — editor stays interactive, output appends to +Errors
  • C-g while a job is running: result is dropped, no splice / no +Errors append
  • Two overlapping vibes: each uses its own *vibe-context*, no crossed prompts

Made with Cursor

I/O goes in a future; the main thread keeps reading keys and only
applies the result when the promise realizes, so a slow HTTP call or
rc no longer freezes the editor.

Co-authored-by: Cursor <cursoragent@cursor.com>
@nooga
nooga merged commit 32b13fe into main Sep 18, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant