Add eca-chat-compose to compose prompts in a dedicated buffer - #299
Merged
ericdallo merged 2 commits intoAug 24, 2026
Merged
Conversation
New markdown buffer to draft a prompt for the chat under point (or the session's last chat) instead of the inline prompt field, handy for long or multi-line prompts. C-c C-c sends the buffer content to the chat through the same eca-chat--send-prompt path as the inline prompt, C-c C-k discards it. @context/#filepath mentions complete against the server and clipboard images are yanked as @file mentions, mirroring the chat buffer. Wired into the transient menu (i). eca-chat--point-at-new-context-p now returns nil instead of a false positive when there is no context-area overlay, so compose buffers need no special-casing to use the shared completion path. Clipboard image saving is shared between the chat and compose yank handlers via the new eca-chat-media--save-clipboard-image.
ericdallo
approved these changes
Aug 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
eca-chat-compose: a markdown compose buffer for drafting a chat prompt outside the inline prompt field, handy for long or multi-line prompts. This ports themulti-eca-composefeature from mymulti-ecadashboard package to coreeca, wired into the transient menu so it's reachable directly from a chat buffer, not just from that external dashboard.M-x eca-chat-composeopens a dedicated buffer targeting the chat under point (or the session's last chat when called elsewhere).C-c C-c(eca-chat-compose-send) sends the buffer content to the target chat through the sameeca-chat--send-promptpath used by the inline prompt (contexts, history, model/agent/variant/trust are all respected).C-c C-k(eca-chat-compose-cancel) discards it.@context/#filepathmentions complete against the server viaTAB, reusingeca-chat-completion-at-point.@filemention, mirroring the chat buffer's paste behavior.iunder "Chat").Two small supporting changes:
eca-chat--point-at-new-context-pnow returnsnilinstead of a false positive when there's no context-area overlay in the buffer (previouslyline-number-at-pos's nil fallback made this predicate true at any end-of-line). This lets the compose buffer share completion machinery without any advice/hack to suppress false positives.eca-chat-media--save-clipboard-imageout ofeca-chat--yank-image-handlerso the temp-file-writing logic (and its error handling) is shared between the chat and compose clipboard-paste handlers instead of duplicated.Demo
Test plan
test/eca-chat-compose-test.el(buttercup): targeting the current chat vs. the session's last chat, empty-prompt and dead-targetuser-errors, send delivers the prompt text viaeca-chat--send-promptand kills the buffer, cancel discards without sending.eca-chat--point-at-new-context-pand yank-handler refactors.batch-byte-compile) with no new warnings.use-package :vcpointed at this branch.