Skip to content

Conversation

tomgeorge
Copy link
Member

In a larger refactor of the sidebar, this piece decouples message
production from their handlers. Introduces an observer pattern to
subscribe to notifications. When the server receives a notification it
notifies any subscribers

In a larger refactor of the sidebar, this piece decouples message
production from their handlers. Introduces an observer pattern to
subscribe to notifications. When the server receives a notification it
notifies any subscribers
@tomgeorge tomgeorge changed the title Observer Decouple message processing and handling Aug 28, 2025
ericdallo
ericdallo previously approved these changes Aug 28, 2025
joaopluigi
joaopluigi previously approved these changes Aug 28, 2025
instance._response_start_time = 0
instance._max_response_length = 50000 -- 50KB max response

require("eca.observer").subscribe(id, make_handler(instance))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is make_handlerabstracted to a function? Couldn't that be defined inline?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah let me update

@tomgeorge tomgeorge dismissed stale reviews from joaopluigi and ericdallo via b08329f August 28, 2025 21:28
@tomgeorge tomgeorge merged commit f22df47 into editor-code-assistant:main Aug 28, 2025
3 checks 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.

3 participants