Coder Social home page Coder Social logo

Undo and streaming about org-assistant HOT 4 CLOSED

walseb avatar walseb commented on August 19, 2024
Undo and streaming

from org-assistant.

Comments (4)

tyler-dodge avatar tyler-dodge commented on August 19, 2024 1

That should no longer happen as of 5c1ab21

from org-assistant.

tyler-dodge avatar tyler-dodge commented on August 19, 2024

Unfortunately since it's using deferred for async, we can't rely on macro scope for the boundary since it doesn't rely on inner loops.

Overlays will work better for this since they do not affect undo history.

I'm no longer using the stream id in the header to avoid an extra undo step as well, so that the only insert that happens is when the response is finished.

This should make it so that an entire request is undoable, and that if a request is currently active, undoing will cancel it the next time it receives output from OpenAI.

5c42133

from org-assistant.

walseb avatar walseb commented on August 19, 2024

Wow, that sounds amazing! I will try it out.

from org-assistant.

tyler-dodge avatar tyler-dodge commented on August 19, 2024

There is a bug right now with undoing where it's possible an overlay will be left over in the buffer. I'm working on a fix now, but if you run into it, you can remove the overlay at point with

(--map (delete-overlay it) (overlays-in (point) (point)))

from org-assistant.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.