Skip to content

Latest commit

 

History

History
174 lines (151 loc) · 58.7 KB

CHANGELOG.md

File metadata and controls

174 lines (151 loc) · 58.7 KB

Changelog

Unreleased

  • Bugfix: C-x <left> and C-x <right> didn't switch settings tabs, only clicking them did, as 0.11.0 fixed for chat tabs. Settings buffers also enable the tab-line locally, which binds no keys on Emacs 31 (it emptied tab-line-mode-map) nor on Emacs 28 and 29, so the keys ran previous-buffer/next-buffer, which ignore the tabs: in the settings side window, they only go through the tabs it already showed, doing nothing on a freshly opened panel. Settings tabs now bind them, and C-x C-<left>/C-<right>, to the new eca-settings-previous-tab/eca-settings-next-tab, which wrap around like the chat ones. The global config tab gets them too, though it runs a JSON major mode, without other JSON buffers getting them. With eca-settings-tab-line off, the keys keep their usual bindings.
  • The file name in the label of file change tool calls now tells files outside the workspace apart, like the scratch files models write to /tmp, which are usually not part of the project. They show with the new eca-chat-file-change-label-outside-workspace-face, a dark yellow in italic, while files inside the workspace keep eca-chat-file-change-label-face. Over TRAMP, file names are compared as strings, so telling them apart never touches remote files.
  • Bugfix: eca-chat-tool-call-accept-all and eca-chat-tool-call-accept-all-and-remember only accepted the first pending tool call, like eca-chat-tool-call-accept-next. Worse, the server asks about the tool calls of a batch one by one, so only one of them waits for approval at a time. They now accept the whole pending batch: every tool call waiting for approval, then the other tool calls of the batch as the server asks about them after the first, and then stop, so tool calls of later batches ask as usual. ask_user questions are never accepted this way. The "Accept and remember" button now carries the tool call id, as "Accept" does.
  • eca-restart reopens the chats that were open (editor-code-assistant/eca#670). Restarting the server, e.g. to pick up updated env vars, used to leave them closed, to be resumed one by one. The active chat comes back first, in place of the new chat the restarted session opens as long as nobody used it, then the others in the background, in their tab order, each with its newest messages (eca-chat-history-page-size), model, agent, variant and trust. They reopen once the server synced its models, so that chat/open restores the model of each chat instead of the next model list resetting it to the default. A prompt still running at restart is interrupted, as before. Set the new eca-chat-restore-on-restart to active to reopen only the active chat, or to nil to reopen none. The session also restarts with all its workspace folders instead of the root of the current buffer only, starting with the ones it started with, as they key its chats storage on the server.
  • Bugfix: a compaction summary offered "Rollback chat to before this message" (#136), though it has no message id. The request then sent a null contentId, which older servers took as a rollback to the first message without an id, dropping nearly the whole chat and, with tool changes included, reverting the files changed since (editor-code-assistant/eca#669). Messages without an id no longer offer it, and each gets a block of its own: they all shared the nil id, so expanding one could toggle another.
  • Bugfix: the trust indicator could be missing from the chat mode-line (#341), pushed out of the window with the other right-aligned segments (usage, context bar) whenever the left side didn't leave them enough room, e.g. in the default 40% side window on Windows, where workspace folders outside HOME (%APPDATA% unless set) aren't abbreviated to ~. :align-to never moves back, so the right side then followed the left one past the window edge. The start of the left side (the workspace folders) is now elided with … to keep the right side flush right, and the start of the right side too when it doesn't fit alone, so :trust stays visible. Widths are measured with the mode-line face, and the layout is cached until the texts, window width, font or theme change, so redisplays while a response streams don't measure them again (Emacs 29+).
  • New eca-chat-expandable-block-fontify-max-length option to skip syntax highlighting of expandable blocks, like tool calls, whose content is longer than the given number of characters. Fontifying huge tool call arguments or outputs with gfm/code-block matchers could freeze Emacs. Defaults to 20000; nil always fontifies.
  • Perf: text tagged to skip fontification (eca-no-fontify), like streaming tool call arguments (#234) or blocks over eca-chat-expandable-block-fontify-max-length, was still fontified whenever font-lock reached the text right after it. Font-lock extends the region to whole lines, and markdown-mode (since jrblevin/markdown-mode#950) to the previous blank line, pulling the tagged text back in at full cost: 1.2s per screen across the end of a 20000 chars block. Untagged text next to tagged text is now fontified narrowed to itself, or widened as before when a construct crosses the edge of the tagged text, like a code block fenced on both sides of it, whose match data markdown-mode keeps out of the narrowing.
  • New eca-chat-tool-call-fontify-markdown option: set it to nil to show tool call arguments and outputs as plain text instead of fontifying them as markdown, which costs seconds per screen on long bodies (a 20000 chars markdown-heavy output takes ~3s to fontify, ~1ms as plain text) and can crash markdown-mode's matchers on huge ones. File change diffs and JSON outputs keep their colors: they're colored once with diff-mode / js-mode instead of as markdown code blocks. Subagent conversations are still fontified as markdown. Defaults to t.
  • New eca-chat-tool-call-auto-expansion-max-length option: with eca-chat-expand-pending-approval-tools, tool calls pending approval whose content is longer than it are no longer auto expanded. The approval buttons stay usable on the collapsed label, and the block can still be expanded manually. Defaults to 10000; nil removes the limit.
  • Perf: long markdown tables no longer freeze the chat. markdown-mode treats a table as one paragraph, so fontifying it grew with the square of its size: streaming a 100 rows table took 32s of CPU, and each screen scrolled over it 1.4s. Three things added up. Checking whether a position is in a code span scanned the whole table, once per | and emphasis candidate; the region to fontify was extended to the whole table (markdown-mode's markdown-syntax-propertize-extend-region); and markdown-fontify-tables left point on the next row, so font-lock flagged every row as continuing on the next one, chaining the whole table into each fontification. In chat buffers, advice now keeps all three to the rows being fontified, as a table row can't hold a construct spanning rows: streaming the same table takes 0.6s and a screen 18ms (300 rows: 2.5s and 11ms), with the same faces as before.

0.11.0

  • Show the progress a running tool reports, e.g. an MCP tool's notifications/progress, after its label in the chat and in inline overlays: (3/10 · Indexing files), or just the message when the total is unknown. It is styled with eca-chat-tool-call-progress-face and shows once the server sends progress on toolCallRunning.

  • eca-chat-compose starts with the text already typed in the chat prompt, point after it, and puts it back if the compose buffer is killed without sending. @context and #filepath mentions written there now attach their contexts when sent, as in the chat prompt.

  • Show ECA's logo, the three cubes around a prompt of its icon, above the welcome message of new chats. Graphic frames draw it as an SVG image, redrawn in the new colors on theme changes, and terminals in braille, as eca-cli's welcome screen. It goes away with the welcome message on the first prompt. Hide it with eca-chat-welcome-logo, style it with eca-chat-welcome-logo-face (the cubes) and eca-chat-welcome-logo-prompt-face (the prompt).

  • Show the output tokens per second of the last model response in the chat mode-line, right after the elapsed time: ⏱ 42s · 87 tok/s. It is the new :tps module of eca-chat-mode-line-format, formatted by eca-chat-tps-format, and shows once the server sends messageOutputTps (editor-code-assistant/eca#658).

  • Bugfix: Emacs could crash while a response streamed with emojify-mode on (#335). Emojify calls sit-for from jit-lock, which runs the due timers in the middle of redisplay, and the timer rendering the buffered stream text then inserted it under the display engine, which still referred to the previous buffer contents. The stream flush now waits until redisplay is over when its timer runs inside it, or while text is being changed silently, and the timers updating the progress spinner, the tool call elapsed times and the eca-workspaces/eca-jobs buffers skip or postpone such runs.

  • Bugfix: on Emacs 31, C-x <left> and C-x <right> no longer switched chat tabs, only clicking them did. Emacs 31 emptied tab-line-mode-map and now binds these keys only under global-tab-line-mode, while chat buffers enable the tab-line locally. Chat buffers now bind C-x <left>/<right> (and C-x C-<left>/C-<right>) to the new eca-chat-previous-tab/eca-chat-next-tab, which wrap around and fall back to previous-buffer/next-buffer when eca-chat-tab-line is off.

  • Bugfix: over TRAMP, eca-open-global-config opened the local config file instead of the remote one (#338) whenever the server didn't report its path (globalConfigPath): with servers older than 0.161.0, or when the config got opened while the server was still starting, a buffer then kept for the whole session. The fallback resolved XDG_CONFIG_HOME and the home directory of the local machine; it now reads them on the remote host running the server. Saving the config buffer also creates its missing directory again instead of asking, as on a blank setup: the hook doing it was dropped when the JSON major mode got enabled.

  • Bugfix: while assistant output streamed in, the lines of a multiline prompt below point could slide under the mode line, since streamed text pushes the prompt down and redisplay only keeps point's line visible. The chat now scrolls just enough to keep the end of the prompt fully visible, without moving point, and still does not scroll while reading earlier content.

  • Perf: long thinking blocks no longer make Emacs sluggish while they stream (#337). Each reasonText chunk was concatenated to the whole block content, copying it along with one text property interval per chunk received so far, which made streaming quadratic: a 200k chars thinking block took over 30s of CPU, even collapsed. Chunks are now queued and only joined when the content is needed, e.g. when expanding the block, and the indent is added to the copy inserted in the buffer instead of to every chunk, so a collapsed block costs the same per chunk at any size (32.6s → 78ms for 200k chars). Subagent output and reasoning nested in a collapsed subagent block get the same treatment. Streaming in an expanded block was also slowed down by the read-only protection of the chat history, which ran the buffer change hooks over the whole current turn on each chunk, rescanning it for markdown checkboxes; it is now applied silently, as font-lock does with faces (77s → 5s for 200k chars). Measured with the new reason-stream-{closed,open} rows of benchmarks/eca-chat-bench.el.

  • Bugfix: over TRAMP, Emacs could hang at 100% CPU once ECA ran a tool, leaving the chat stuck on the tool call. The server process shared TRAMP's ssh ControlMaster connection, so a remote command run while the server output wasn't read, like checking the edited file from the process filter, could wait forever for its reply (bug#61350). The server now gets its own ssh connection, as Eglot does for language servers, and file change tool calls no longer check remote files while rendering.

  • Show subscription quota instead of costs in the chat mode-line and providers buffer. The last message cost (:last-message-cost) now shows too.

  • Rolling back a chat, adding a flag and forking stay fast on long chats: rollback only deletes the removed messages, a new flag is inserted in place, and forks (fork button, /fork, /btw) render only the latest page of messages with "Load older messages" for the rest (requires a server supporting them).

  • Bugfix: the eca-workspaces dashboard was impossible to navigate while a chat ran, since the live refresh (once a second) scrolled the view and could throw point to the top. Rendering erases the buffer, which collapses every window start marker, so a window shorter than the content recentered on each refresh; point resting on a line with no entity, the footer, fell back to the buffer start. Each window now keeps its scroll position, and point on the footer stays on it.

  • The stop, Steering: and Queued: lines of a running prompt now show right below its progress status, above the @ context line, instead of splitting that line from the prompt field (#322).

  • Show the @cursor context with eca-chat-context-cursor-unsaved-face (inheriting warning) while its buffer has unsaved changes, since ECA only sees the file on disk (#291).

  • Image mentions show inline as thumbnails: screenshots pasted in the prompt, image files added as context and images mentioned in sent messages. RET toggles them back to text. Customize with eca-chat-image-show-thumbnails and eca-chat-image-thumbnail-size.

  • Bugfix: text typed right after a context chip in the prompt became part of it: it took the chip color, was dropped from the sent message, and backspacing it could break the prompt, moving the > to the context line. Pasted images and contexts added to the prompt are now also spaced from the word before them.

  • Bugfix: questions asked in parallel (several ask_user tool calls) stopped reacting to RET once one was answered, and an option could answer another question. Each question is now answered on its own: point moves on to the next pending one, a typed answer goes to the topmost question accepting one, and stopping cancels them all.

  • Bugfix: eca-open-global-config edited a file the server never reads on Windows when HOME is unset (#321), since Emacs defaults HOME to %APPDATA% while the server uses the user profile directory. The path now comes from the server's initialize response (globalConfigPath), translated through TRAMP for remote sessions; with older servers the local fallback resolves the home directory like the server does.

  • Bugfix: new chat buffers now get the session's first workspace folder as default-directory (#323). It was inherited from whichever buffer was current when the buffer got created, which for a new session is the async initialize response, so (let ((default-directory dir)) (eca)) wrappers ended up with the chat rooted in the previous buffer's directory.

  • User messages in the chat now stand out as a turn marker (#265): eca-chat-user-messages-face is bold on the theme-derived block background instead of font-lock-doc-face, painted over the whole message so markdown spans in it keep the background, and an empty line separates the message from the previous answer.

  • eca-workspaces-new-chat (+) now always asks which workspace to start the chat in, defaulting to the one at point, and no longer requires a match: any other existing directory starts a session there. Typing a path inside a running workspace reuses its session instead of starting a second server.

  • Bugfix: a tool call awaiting approval whose expanded body is taller than the window no longer gets its label and Accept/Reject buttons scrolled above the window (#308). The window is anchored on the tool call with point on its Accept button (RET accepts), and once it resolves the view moves on to the next pending approval or back to the prompt.

  • Bugfix: markdown tables in the chat could stay misaligned (#319): tables after the first one in a turn were skipped once aligning the earlier ones grew the buffer, code spans opened by two or more backticks swallowed the rest of the row and appended empty cells on every pass, and with markdown-mode 2.9 rows containing hidden markup or emoji had their pipes off the header column. Alignment also no longer relies on the caller binding inhibit-read-only.

  • Bugfix: on Doom, killing a workspace (+workspace/kill) replaced the chat shown in the workspace switched to with the fallback *doom* buffer when the chat window was the selected one, since Doom considered chat buffers "unreal". Chat buffers are now Doom real buffers, so they also show up in the workspace buffer list and get attached to the workspace they are displayed in.

  • Add eca-doom-stop-session-on-workspace-kill (default t): on Doom with the :ui workspaces module, killing a workspace also stops the ECA session related to it when no other workspace refers to that session.

  • Bugfix: text typed after the trailing @ of the context line could not be deleted (#306): backspace dinged anywhere on that line, so a typo in @foo could only be discarded by completing something. Deletions on the context line work again, backspace right after the query's @ keeps the prefix instead of dropping the last context, and deletions that would merge the line with the prompt field or the progress area (C-d at its end, an evil dd) are blocked.

  • Bugfix: under evil (e.g. Doom), RET in normal state in chat buffers ran markdown-do from evil-collection's markdown-mode-map bindings, which eca-chat-mode-map inherits. It followed links but inserted a GFM checkbox (* [ ]) anywhere else, e.g. next to a question option. RET in normal state now goes through eca-chat--key-pressed-return.

  • Bugfix: a tool call awaiting approval whose expanded body is taller than the window no longer gets its label and Accept/Reject buttons scrolled above the window (#308). The window is anchored on the tool call with point on its Accept button (RET accepts). Accepting or rejecting from within the block (mouse, RET or C-c C-a) then moves point on to the next pending approval or back to the prompt, so the chat is followed again without M->; before, point stayed in the block whenever the chat window was the selected one.

  • Add eca-chat-tool-call-functions, an abnormal hook run with the session and content when a tool call changes state, e.g. to refresh magit after file edits.

  • Revert buffers visiting files edited by ECA once the edit finishes, so they show the new content without auto-revert-mode (#310). Buffers with unsaved changes are left alone. Disable with eca-chat-auto-revert-changed-files set to nil.

  • Bugfix: a task tool call that requires approval (e.g. a custom agent with tools.byDefault: ask whose allow list lacks eca__task) left the chat stuck on "Waiting for tool call approval" with nothing to accept or reject, since the task tool renders as the task widget instead of a tool call block (editor-code-assistant/eca#584). The approval prompt with the tool arguments is now shown in the task widget, and the widget no longer keeps a stale "Creating tasks..." placeholder when the call fails or is rejected.

  • Show the model variant of a running subagent in the spawn_agent tool call details table when the server sends one.

  • Bugfix: kill commands not covered by the deletion guards (backward-kill-sentence, backward-kill-sexp, kill-line, kill-region, etc.) could cross the prompt/context markup and corrupt the chat prompt area, making RET fail with args-out-of-range (#305). Kills are now clamped to the prompt field (and blocked above it), the transient-area refresh skips instead of signaling on a corrupted block, and eca-chat-clear-prompt (C-c C-d) rebuilds the prompt markup when it is broken.

  • Perf: cache the pending tool call approval status instead of rescanning the whole chat buffer on every mode-line/tab-line/header-line redisplay, which made Emacs sluggish on long chats (#307).

  • Bugfix: loading an older history page no longer resurrects the approve/reject buttons of an already-finished tool call (#307).

  • Bugfix: a subagent now keeps its pending-approval status while any of its tool calls still waits for approval, instead of flipping back to loading when a sibling tool call finishes (#307).

  • Bugfix: TAB on an expandable block label no longer blocks the <tab> -> TAB key translation, extending the fix in #281 to the label's keymap text property, which outranks the mode map. It bound the raw <tab> event and shadowed layered keymaps binding only TAB; it now binds TAB, which also makes the label's own binding reachable in terminal frames, where <tab> is never sent.

  • Bugfix: chat block and table faces now follow theme switches (#301). The refresh was hooked buffer-locally on enable-theme-functions, so it never ran (theme switches run the hook from the user's current buffer, not the chat buffer); it is now a global hook, with enable-theme/disable-theme advice on Emacs < 29 where that hook doesn't exist. Expandable-block line-prefix indentation also baked the resolved background color into the prefix strings; it now stores the face symbol, so already-rendered indentation updates on redisplay too.

  • Show the summaries of tool calls pending approval in the inline prompt overlay status instead of the generic "Waiting for tool call approval" progress text (which overwrote the approval status), so it's clear what is about to run. With multiple pending tools, resolving one now keeps showing the remaining summaries, and approving from another client clears the stale approve/reject hints.

  • Bugfix: a region ending at the beginning of a line (whole-lines selection) no longer includes that extra line in the lines range sent by the eca-chat-add-context-* commands, and ranges/cursor positions computed in narrowed buffers now use absolute file line numbers.

  • Add eca-chat-inline-prompt (transient menu I): ask ECA from any buffer, streaming the answer into a markdown-rendered scrollable overlay at point, backed by the server chat/inlinePrompt method. Picks the backing chat on first use (forking an existing one server-side or starting fresh), sticky per buffer, C-u re-asks; region/file attached as context, r replies, a/d answer tool calls, m opens a menu to change inline model/variant/agent, open the backing chat or toggle overlays visibility (eca-chat-inline-toggle-overlays). Requires eca server with chat/inlinePrompt support.

  • Killing a chat buffer no longer asks about deleting the chat from the server: it just closes the buffer, leaving the chat resumable until the server retention cleanup removes it. Delete explicitly with eca-chat-delete, the workspaces dashboard d, or the new server /delete-chat command.

  • Add eca-chat-compose (transient menu i): compose a prompt in a dedicated markdown buffer instead of the inline chat prompt field, convenient for long or multi-line prompts. C-c C-c sends the buffer content to the chat it was opened from (or the session's last used chat), C-c C-k discards it. @context/#filepath mentions complete against the ECA server, and yanking a clipboard image inserts an @file mention pointing at a saved screenshot, mirroring the chat buffer.

  • Bugfix: Enter now works with transient/overriding keymaps that bind only "RET" (e.g. Embark's action maps) inside chat buffers. eca-chat-mode-map bound the raw <return> event, which blocked the <return> -> RET key translation in GUI frames, so those keymaps' RET binding was never reached and the keypress silently fell through to eca-chat--key-pressed-return instead; only RET is bound now.

  • Restore the rolled-back user message into the prompt field. Rollback chat to before this message (when messages are included) used to discard the clicked message's text together with the rest of the turn; the text now lands in the prompt unsent, ready to edit and resend, and any draft already typed in the prompt is kept below it, separated by a blank line.

  • Fall back to the buffer's xref backend (eglot, etags with a loaded tags table, any custom backend) for editor/getDefinition/editor/getReferences when lsp-mode cannot serve the file, instead of answering no-server. includeDeclaration: false is honored by filtering definition locations out of the references, since LSP-backed xref backends always include the declaration. (editor-code-assistant/eca#351)

  • Support editor/getDefinition and editor/getReferences server requests via lsp-mode, letting the LLM navigate to a symbol definition/references using the editor's LSP. When no server is attached yet for a file of a known lsp project, lsp is started in background and starting is answered so the eca server retries. starting is also answered while an attached workspace is still initializing, since lsp-mode would reject the request with a misleading "does not support method" capability error before the initialize handshake completes. Synchronous lsp-mode errors are answered as error responses, and any server-request handler error now answers an error response instead of escaping into the process filter ("error in process filter" in Messages) and leaving the request pending until the server times it out (30s). Requires eca server with editor navigation support (editor-code-assistant/eca#351).

  • Bugfix: a GitHub outage no longer prevents eca from starting. The release check now has a timeout and retries (eca-server-fetch-timeout, eca-server-fetch-retries) instead of hanging Emacs, failed checks back off for 60s instead of re-blocking every start, and error payloads (e.g. rate limit) are no longer cached as a valid releases list. When an update download fails but a server is already installed, eca warns and starts the installed binary instead of not starting at all (also for errors in the async url-retrieve download, which were previously uncaught).

  • Support adding a region of a non-file buffer (magit, vterm, compilation, the chat itself) as context with the eca-chat-add-context-* commands: the selection becomes a text context with a lines range, its content sliced from the live buffer at prompt time. The commands now signal a user-error instead of silently doing nothing when no context applies. #294

  • Bugfix: eca-chat-remove-workspace-root failed with Workspace folder not found for a dir shown in the mode-line. Workspace dirs are matched with string=, but C-u M-x eca stored them as read-directory-name returned them (~/proj/) while add and remove expanded their argument, and expand-file-name keeps trailing slashes so /x and /x/ never matched either. Dirs are now expanded and stripped of the trailing slash wherever they are stored or compared, which also stops M-x eca opening a second session for a root already held under a different spelling.

  • Bugfix: shell command breakdown no longer stays yellow when the tool call was auto-approved (e.g. trust mode) or already ran; commands now show green once approved, keeping yellow only while approval is pending.

  • Turn eca-workspaces into a live dashboard: rows refresh automatically as chats change state, each chat showing status (⏳ running, 🚧 pending approval, ❓ waiting answer), elapsed time, cost and model, with workspaces sorted alphabetically. Actions on the entry at point, all listed in a transient menu (?): new chat with optional initial prompt (+), delete chat or stop workspace with confirmation (d/DEL), rename (r), fork (f), compact (C), select model/variant (m/v), accept/reject pending tool calls (a/A/x), stop prompt (s) and resume a closed chat (R).

  • Bugfix: quitting the delete-chat prompt (C-g) now really cancels the kill instead of leaving the chat alive but orphaned, without a window, tab or registry entry. Quitting it during eca-chat-reset leaves the session untouched as well, instead of adding a replacement chat next to the one that survived. The answered prompt no longer lingers in the echo area.

0.10.0

  • Bugfix: restore the status colors of the mcps: counts in the chat header-line, lost in #288 which overrode the per-status faces with eca-chat-option-value-face; that face is now merged with lower priority so both apply.

  • Bugfix: cursor context no longer shows as @cursor( :) when no position was tracked yet. Tracking now picks the most recent file buffer inside a workspace (instead of bailing when the newest file buffer is external), the chip shows @cursor(no file) until a position exists, and at prompt send the position is computed as a last resort, dropping the cursor context instead of sending it with empty path/position.

  • Bugfix: stop Emacs stuttering while ECA runs and a buffer of another project is visited. The cursor-tracking idle timer resolved the session via eca-session from whatever buffer was current; for buffers outside any session that resolution is never cached, so every idle tick probed project.el and shelled out git rev-parse --git-common-dir (once for the buffer root plus once per session workspace folder). The timer now matches the last visited file buffer against the sessions' workspace folders in memory, and eca--git-common-dir caches its results (cleared on session create/delete) and runs git via process-file without an intermediate shell. #275

  • Bugfix: server auto-update was permanently disabled when the version file (eca-server-version-file-path) was missing (e.g. after an interrupted update): the nil version made the up-to-date check always pass, and eca-server-check-updates misreported it as not installed. A missing version file now triggers a reinstall on start, the updater only writes the version file on success instead of deleting it upfront, startup uses the installed binary when the release check fails (offline), and eca-uninstall-server removes the version file too.

  • Bugfix: prevent (invalid-function #<symbol json-parse-buffer ...>) on Emacs 31 when fetching releases or parsing server messages. eca-api--json-read-buffer expanded to a shared literal form that the byte-compiler can mutate in place (macroexp--posify-form-1), poisoning later runtime expansions; the macro now conses a fresh form on each expansion. #284

  • Bugfix: don't crash with wrong-type-argument number-or-marker-p nil on chat/statusChanged idle when the chat buffer lost its prompt-block overlays. eca-chat--content-insertion-point and the table align/beautify end bound now fall back to point-max instead of (1- nil), and eca-chat--refresh-progress skips when the progress overlay is missing. #283

  • Bugfix: stop the chat view jumping up and down while the LLM streams small chunks (e.g. preparing tool calls). Chat buffers now set scroll-conservatively/scroll-margin buffer-locally so redisplay scrolls line by line instead of recentering (the jumping depended on the user's global scroll settings). Also reduce streaming redisplay churn: the progress spinner keeps a fixed width, the progress area only re-renders when its text changes, and unchanged tool-call labels skip their delete/re-insert. #268

  • Support adding non-file buffers (compile, comint, etc.) as chat context: @ completion now offers eligible buffer names, sent as text contexts with fresh content captured at prompt time, and the eca-chat-add-context-* commands work from non-file buffers. Customize candidates with eca-chat-context-buffer-predicate and size with eca-chat-context-buffer-max-chars. Requires eca server with text context support. #278

  • Add current-window chat display: set eca-chat-window-side to nil to open a new chat in the selected window without creating a split. This takes precedence over eca-chat-use-side-window and does not replace another chat visible in a different window on the selected frame.

  • Bugfix: auto-scroll the chat so the prompt stays visible after sending a long message. Rendering the sent user message pushed the prompt below the window end, which also made the guarded auto-scroll a no-op (its window-end check runs after the insertion, so it always failed for long messages); the send path now forces the scroll, skipped when prepending older history pages. #279

  • Make the eca-workspaces tree buffer more user-friendly. It now uses a dedicated eca-workspaces-mode (derived from special-mode), so q closes the window and g refreshes. Folding/unfolding a workspace no longer requires hitting the small arrow icon: pressing TAB/RET on its line toggles it, and pressing RET anywhere on a chat line switches to that chat. n/p move to the next/previous workspace entry. When eca-buttons-allow-mouse is enabled, clicking the workspace text folds/unfolds it and clicking a chat switches to it.

  • Add eca-mcp-toggle-server, available as M in the ECA transient menu and C-c C-S-m in chat buffers, to filter configured MCP servers and start, stop, or connect the selected server from aligned, color-coded operational-state candidates.

  • Bugfix: TAB now accepts the selected candidate in completion popups (corfu) in GUI Emacs. eca-chat-mode-map bound the raw <tab> event, which blocked the <tab> -> TAB key translation and shadowed the completion UI's own TAB binding, restarting the completion session instead; only TAB is bound now, so keymap precedence decides while a popup is open. #281

  • Bugfix: a forward deletion of the first prompt character now works instead of dinging. eca-chat--key-pressed-deletion guarded the prompt boundary by rejecting any deletion at the prompt-field start regardless of direction, so C-d and, under evil, the ~ (evil-invert-char), r, x and s operators left the first char in place (~ prepended the inverted char instead of replacing it). At the prompt-field start the guard now blocks only backward-deleting commands (delete-backward-char, backward-kill-word, evil-delete-backward-char, ...); deletions above the prompt (context/progress area) and everywhere else are unchanged.

  • Show the shell/git command breakdown in tool call approvals: raw command plus per-command lines colored by remember state (green saved, yellow not yet), and Accept and remember lists the command keys it would newly save (e.g. git status, rg), hiding when nothing new would be remembered.

  • Support TRAMP / remote hosts: the eca server starts on the remote host, the binary is resolved from the remote PATH, and paths are translated both ways using mappings derived from TRAMP workspace folders (explicit eca-local-to-remote-prefix-map entries win). Auto-install is local only: install eca on the remote or point eca-custom-command at it. #270

  • Improve chat @/# completion: selecting a directory now drills into it (keeps completing its contents) instead of finalizing; candidates are workspace-relative paths with directories ending in /; candidates no longer vanish mid-token depending on the user's completion-styles; TAB in the prompt triggers completion for @/#// tokens; typing a space after a raw @path turns it into a context chip and raw @path tokens still count as contexts when the prompt is sent.

  • Respect eca-chat-window-side (and width/height) even when eca-chat-use-side-window is nil, displaying the chat on that side via display-buffer-in-direction. To avoid overlapping/duplicate windows, placement now reuses the window already showing the chat, otherwise replaces another visible chat window in place (new-tab behavior), and only opens a new window when there is nothing to reuse.

  • Bugfix: eca-chat-add-context-to-user-prompt and eca-chat-add-filepath-to-user-prompt no longer error with window-live-p, nil when the chat buffer is not visible; the chat window is now displayed first. With a prefix arg (C-u) they add the context without selecting the chat window, leaving point where it was. #266

  • Add eca-chat-hide-markdown-markup, an opt-in display control for users seeing fenced code blocks jump in chat buffers. The default preserves the existing hidden-markup rendering; set it to nil to keep markdown fences/backticks visible, which avoids markdown-mode's fenced-code boundary invisibility during typing and streaming.

  • Bugfix: don't move the cursor while the chat is streaming. eca-chat-content-received rendered without a save-excursion, so content streamed above the prompt (e.g. while "thinking") dragged point up to the middle of the buffer; point is now preserved.

  • Bugfix: keep the :usage and :trust mode-line segments visible after adding the context-usage bar. The right-alignment reserved space from (length right), which counts the bar's pixel-width display spaces (and wide glyphs) as ~1 char each, so the segments overflowed off the right edge. It now measures the real rendered width via string-pixel-width and aligns flush to the right edge in pixels (Emacs 29+ only; on Emacs 28 right segments follow left without alignment).

  • Bugfix: closing a chat (kill-buffer, C-c C-k, or the tab close button) now switches the chat window to a sibling chat (the previous tab, or the only one left) instead of falling back to an unrelated buffer like the settings buffer, and drops the dead chat from the session registry. C-c C-k (eca-chat-reset) only starts a fresh chat when the closed chat was the last one.

  • Add eca-chat-copy-at-point, bound to C-c C-w. It copies the fenced code block at point, the assistant response at point, or the latest response as a fallback.

  • Bugfix: guard chat/askQuestion against a non-sequence :options (e.g. a malformed string from a misbehaving server). append was splitting such a string into character integers that rendered as a list of random numbers; non-sequence options are now treated as empty.

  • Add a context-usage bar in the chat mode-line, left of the token usage, showing how full the model context window is, colored by category (system prompt, rules, skills, AGENTS.md, tool definitions, tool calls, conversation, free space), each a distinct color. In graphical frames it renders pixel-width thin segments for high granularity (small percentages stay visible); terminals fall back to block characters. Same footprint either way (eca-chat-context-bar-width). Colors come from the server (canonical color/freeColor) so they are consistent; hover the bar for a legend that maps each category to its server emoji swatch (emoji/freeEmoji, matching the /context command output), or click to run the new /context command. Configurable via eca-chat-context-bar-width and the :context-bar module in eca-chat-mode-line-format. Needs an eca server that sends contextBreakdown in usage content.

  • Auto-dismiss a pending ask_user question when another client (e.g. an SSE/web client in remote mode, see eca 0.139.0) answers it first. The server resolves the ask_user tool out from under us and sends a toolCalled/toolCallRejected for that tool-call id but no longer expects our answer (it cancels our request); we now correlate that id with eca-chat--pending-question and clear the stale answer-mode prompt state instead of staying stuck waiting for input.

  • Paginate long chats instead of replaying the full history on open. With eca-chat-history-page-size non-nil (default 50), eca-chat-resume opens a chat with only the newest page and shows a clickable "Load older messages" control at the top to page through earlier history on demand via the new chat/history request (also bound to C-c C-S-o). Older pages are prepended above the existing content, reusing the streaming renderer (subagent nesting included) and kept read-only like the rest of the history. Set eca-chat-history-page-size to nil to keep the previous full-replay behavior.

  • Bugfix: resuming a previous session after a server restart no longer reopens it as a *Closed session* (mode-line) / This chat is closed buffer that rejects new prompts. eca-chat-exit (run on restart) marks the most-recent chat buffer eca-chat--closed but leaves it in the session registry; eca-chat-opened was treating that live-but-closed buffer as "already known" and replaying the resumed history into it. It now treats a registered buffer marked eca-chat--closed as stale, killing the leftover closed buffer and creating a fresh, writable one in its place.

  • Color the Doom Emacs workspace tabline by ECA session status: orange when a chat waits for approval/question, dim yellow while running. Enabled automatically on Doom (:ui workspaces module), disable with eca-doom-workspace-tabs.

  • Bugfix: keep the Doom workspace tab colors in sync with the real status. The tabline was only recomputed on workspace switch / +workspace/display, so a shown tabline went stale: a tab could stay white after its prompt started, or keep the running color after it finished. Status transitions (chat start/finish, approval/question shown or answered) now refresh the tabline while it is the message on screen, and a chat that is only stopping no longer counts as running.

  • Add eca-chat-go-to-next-attention and eca-chat-go-to-next-attention-in-project commands to jump to the next chat waiting on the user (pending tool call approval or unanswered question), cycling across all sessions or only the current one.

  • Make the chat history/output, the --- separator and the task area read-only so only the progress, @-context and prompt input lines stay editable, preventing accidental edits to previous messages and assistant output. The read-only text property is applied up to the progress area (with stickiness tuned so typing still works) and kept in sync as content streams in and as blocks are expanded. Toggle off via the new eca-chat-read-only-history (default t).

  • Add eca-table-open to view a markdown table at point in a dedicated *eca-table* buffer with truncate-lines, so wide tables can be scrolled horizontally with the header staying aligned and the whole table searched/copied. Press o with point on any table to open it, or click [o] open on a wide table's action bar. The o binding lives in a char-property keymap scoped to the table, so it takes precedence over o only while point is on a table (works under evil) and leaves o untouched elsewhere. The in-chat table rendering is otherwise unchanged.

  • Add eca-chat-delete command to delete the active chat from the server without prompting. Works from any buffer in the project (acts on the session's last visited chat), switches the chat window to another chat first when one exists, and is bound to C-c C-S-k plus a Delete entry in the transient menu.

  • Bugfix: pressing RET on a URL in the chat now opens it even when the URL is wrapped in markdown emphasis like **https://...** or _https://..._. The face at point is a list in that case, so the old eq check missed it; the trailing **/_ markers are also stripped so the right URL opens. Proper [text](url) links still go through markdown-follow-thing-at-point.

  • Bugfix: switching chat tabs via tab-line-switch-to-next-tab/tab-line-switch-to-prev-tab or clicking a tab now switches the chat in place instead of opening it in a new window.

  • Bugfix: trigger @/# chat completion even when a char like ( immediately precedes it.

  • Bugfix: don't crash with (wrong-type-argument stringp nil) when chat/askQuestion sends options as plain strings or option objects without a :label. Options are normalized via eca-chat--normalize-question-option (string or plist) and the label always falls back to a non-nil string.

  • Bugfix: keep the stop button available while a question is pending. A pending question keeps the turn active server-side even when the chat reports idle, so the loading/stop transient segment and eca-chat--stop-prompt now treat a pending question like the loading state, and the transient area is refreshed when a question is shown/answered/cancelled.

  • Bugfix: clear the chat progress text and spinner when chat/contentReceived progress/finished arrives while eca-chat--chat-loading is nil (e.g. after the 10s stopping safety-timer reset the flag, or for server-driven progress not started via eca-chat--send-prompt). The wildcard pcase arm added in 19aa392 to ignore stale duplicate finished events was dropping the visible UI cleanup too; it now still clears progress text, spinner and elapsed timers idempotently while skipping the trailing newline / fontify / queued-prompt dispatch so duplicate finished events remain harmless.

  • Bugfix: eca-chat-resume no longer silently no-ops when the picker is shown from a fresh welcome buffer. Filter out chats the server can't open (id is nil, which happens for legacy DB rows that pre-date the per-chat :id field) so they aren't offered, and surface a user-error when chat/open reports :found? false or no buffer was registered for the chat-id, instead of falling through the when-let*.

  • Add eca-chat-resume command to pick and resume a past chat via completing-read annotated with model, message count and relative update time. A Resume a previous session link in the welcome area triggers it, and e selects it in the transient menu. The originating empty welcome buffer is killed once the resumed chat is in place, so no stray tab is left behind.

  • Bugfix: avoid (wrong-number-of-arguments color-rgb-to-hsl 0) crash on chat startup in a no-window/TTY Emacs. face-background returns the literal sentinel "unspecified-bg" (not nil) on non-graphic frames, which was fed into color-lighten-name / color-darken-name from eca-chat--update-expandable-block-faces and eca-table-update-faces. New eca-safe-face-background helper in eca-util.el normalizes the "unspecified-bg" / "unspecified-fg" sentinels to nil so the when-let* guards short-circuit and the faces remain at their default appearance on TTY. #244

  • Add inline [+ Add MCP server] form and per-row remove button (with two-step inline confirmation) on the MCPs settings tab. Handles the new tool/serverRemoved notification so the UI updates live without a server restart.

  • eca-doctor now emits a ### Self-check section probing whether the loaded code carries the chat-RET expand fix: eca-chat-mode-map RET still points at eca-chat--key-pressed-return, eca-chat--key-pressed-return references the expandable clause before the markdown-link clause, the nearest expandable block label has RET bound in its text-property keymap, and the loaded eca-chat-expandable file's path (with a stale-.elc warning when the on-disk .el is newer). Each failing probe pushes a targeted hint pointing at commit dac33d8 and the appropriate remediation (pull master, restart Emacs, M-x byte-recompile-directory, or start a new chat so blocks get the new label keymap).

  • Bugfix: restore RET expanding/collapsing > blocks in the chat. The recent markdown-link-on-RET clause was intercepting the toggle when the label text was fontified as a link; the expandable check now runs before the link follow, and the label's text-property keymap also binds RET so it works in evil normal state without evil-collection wiring.

  • Add eca-doctor command that prints a markdown-formatted diagnostic report to *eca-doctor* for bug reports: a ## Versions section (same as eca-version) plus a ## Chat section sourced from the active session's auto-detected chat buffer. #242

  • Bugfix: stop the merged worktree fallback in eca-session from auto-adding an unrelated ancestor (typically $HOME) as a second workspace folder. The fallback previously declared two paths to be the "same repo" purely on git rev-parse --git-common-dir equality, which is also true for any subdirectory of a git-tracked HOME (yadm/chezmoi/git init ~); a buffer whose default-directory is ~ (e.g. the doom scratch buffer) would then trigger workspace/didChangeWorkspaceFolders and append ~ to the session created with C-u M-x eca on ~/.config/eca, showing both roots in the chat modeline. The match in eca--session-for-worktree now additionally requires that ROOT and the candidate folder are not in an ancestor/descendant relationship (real worktrees are always sibling directories, never nested), via the new eca--paths-nested-p helper. True sibling worktrees continue to merge as before. #238

  • Generate chatId client-side at chat-buffer creation. #231

  • Scope model/agent/variant selection to the active chat: eca-chat-select-model, eca-chat-select-variant and eca-chat--set-agent now write the local change to the chat buffer the user is interacting with (current buffer when invoked from inside a chat, falling back to the session's last chat) and include :chatId in the resulting chat/selectedModelChanged / chat/selectedAgentChanged notification. eca-chat-config-updated honors the new chatId field on config/updated: when present, per-chat fields (selectModel, selectAgent, selectVariant, selectTrust) apply only to that chat's buffer; when absent, the legacy session-wide path applies to every chat (still used for the initial config/updated after initialize). Fixes a long-standing leak where changing the model in one chat would silently overwrite another chat's display. #231

  • Add eca-process-wrapper-function, an optional function called with the resolved server command and the list of workspace folder paths just before make-process is invoked. It must return a (possibly transformed) command list, letting users run the eca server inside any command-prefix-style sandbox (firejail, bubblewrap, jai, docker, ...) directly from elisp — without a separate launcher script and with the workspace roots dynamically injected into the sandbox's directory whitelist. New "Sandboxing" section in the README documents the recommended pattern with jai and firejail examples.

  • Expand the eca-send-process-id docstring to explicitly cover sandbox tools that hide or remap the host PID (firejail, bubblewrap, jai, containers): in those setups the server's parent-process watchdog would otherwise see an invalid PID and shut down right after startup, so the variable must be set to nil. Cross-references eca-process-wrapper-function.

  • Bugfix: avoid void-function flymake-diagnostic-code errors in eca-editor--flymake-diagnostics (which surfaced as a 30s Timeout waiting for editor diagnostics response on editor/getDiagnostics whenever any flymake diagnostic was processed) by fboundp-guarding the flymake-diagnostic-code accessor; :code is simply omitted when the accessor isn't shipped with the running Emacs's flymake. The existing declare-function is preserved so the byte-compiler stays quiet on Emacsen that do expose it. #228

  • Hide the [-] (remove workspace) mode-line button when only a single workspace folder is active in the session, since removing the last workspace is disallowed anyway; the [+] (add workspace) button is still always shown. The button reappears automatically as soon as a second workspace is added.

  • Stop the CPU peg when watching a long uncollapsed write-tool argument body stream in (#234). The dominant cost was gfm-mode's markdown matchers (markdown-match-italic / markdown-match-bold / markdown-match-code) re-fontifying the whole growing body on every chunk, because toolCallPrepare updates go through eca-chat--update-expandable-content's delete-region + reinsert branch (which marks the entire body as needing fontification and lets jit-lock then run the matchers over it on the next redisplay). Introduce a buffer-local custom font-lock-fontify-region-function (eca-chat--fontify-region) that walks the requested region in eca-no-fontify text-property runs and only delegates the un-tagged sub-ranges to font-lock-default-fontify-region; tagged sub-ranges are skipped entirely, so jit-lock has nothing to do on them. The toolCallPrepare arm now tags the streaming body with eca-no-fontify at the source string, which travels naturally through (propertize content 'line-prefix ...) inside eca-chat--update-expandable-content and through the toggle-open path's eca-chat--insert, so every code path that lands the body in the buffer carries the tag. Cleanup is automatic: when toolCalled arrives it reinserts un-tagged final content via the same delete-region + reinsert path, after-change-functions clear fontified, and jit-lock then refontifies normally on the next redisplay (no manual font-lock-flush needed). Measured via a new tool-prep-stream-{skip,full} benchmark in benchmarks/eca-chat-bench.el (synchronous fontify per chunk to simulate jit-lock under --batch): at body 1000/5000/20000 chars, per-chunk cost drops from ~4.5ms / ~62ms / ~908ms to ~173µs / ~144µs / ~225µs respectively (26× / 432× / 4030×). The post-fix path is FLAT in body size (only the existing buffer churn remains), and the 20000-char run drops from 265 GCs to 0.

  • Make long chats fast again. Replaced linear (overlays-in (point-min) (point-max)) scans in singleton-overlay accessors and the expandable-block id lookup with O(1) buffer-local caches (a per-overlay slot for the chat singletons; a per-buffer hash table for expandable blocks). Region-scoped the per-turn font-lock-ensure and end-of-stream eca-chat--align-tables / eca-chat--beautify-tables to start at eca-chat--last-user-message-pos instead of point-min, so cost is bounded by the current turn rather than the full chat history. Measured on a synthetic 500-turn fixture (benchmarks/eca-chat-bench.el): per-streamed-chunk insert dropped from ~426µs to ~6µs (71×), expandable-id lookup from ~324µs to ~0.4µs (790×), and the end-of-stream finalize block from ~2.6s to ~9ms (274×).

  • Add benchmarks/eca-chat-bench.el, a chat-rendering benchmark harness runnable via M-x eca-chat-bench-run or eask emacs --batch -l benchmarks/eca-chat-bench.el -f eca-chat-bench-run. Builds synthetic chat buffers of varying size and times the streaming hot paths (insertion-point lookup, streamed chunk insert, expandable lookup/update, end-of-stream finalize); prints a markdown table with per-call µs / wall-ms / GC counts so future changes can be validated quantitatively.

  • Bugfix: avoid corrupted redisplay in emacs -nw by using single-cell BMP glyphs (● / ○) for the chat mode-line trust indicator on terminal frames; emoji defaults are preserved on graphic frames. Configurable via eca-chat-trust-on-symbol-tty / eca-chat-trust-off-symbol-tty. #229

  • Expire the cached GitHub releases list used for eca server update detection. Previously eca-process--releases-cache was populated once per Emacs session and never invalidated, so long-running Emacs instances never noticed new eca server releases (and eca-install-server, despite its docstring, was bound by the same stale cache). New eca-server-releases-cache-ttl defcustom (default 3600 seconds; nil disables expiry; 0 always refetches) refreshes the cache on access once expired. New autoloaded interactive command eca-server-check-updates clears the cache and reports whether the installed server is up to date, has an available upgrade, or whether the GitHub check failed. eca-install-server now also clears the cache before fetching the latest version, matching its "Force download the latest eca server." docstring. #230

  • Render assistant-emitted ChatImageContent from chat/contentReceived inline in the chat buffer (e.g. images returned by the OpenAI image_generation tool). Decodes the base64 payload and displays it via an overlay carrying create-image data (overlay rather than display text-property so markdown-mode/gfm-mode font-lock cannot strip it on font-lock-ensure), falling back to a [Image: <mediaType>, <N> bytes] placeholder on TTY frames or when the image type is unavailable in the current Emacs build. Sizing is configurable via eca-chat-image-max-width (default fit-window — scales to the chat window body width, hard-capped by eca-chat-image-window-fit-cap, default 800px) and eca-chat-image-max-height (default nil); a fixed integer or nil (unconstrained) are also accepted for eca-chat-image-max-width. Per-chat zoom: eca-chat-image-zoom-in (C-c C-z + / C-c C-z =), eca-chat-image-zoom-out (C-c C-z -), and eca-chat-image-zoom-reset (C-c C-z 0) mutate the buffer-local eca-chat-image-scale (multiplier on the resolved width cap, default 1.0) by eca-chat-image-scale-step (default 1.2) and re-rasterize already-rendered images via image-flush so existing images snap to the new size without re-fetching. Save inline images to disk via eca-chat-save-image-at-point (C-c C-z s), also reachable via RET or mouse-2 directly on the image overlay (with a tooltip describing media type / byte count), with the destination customizable via eca-chat-save-image-directory (default workspace-root, resolving to <root>/.eca/images/; also accepts a literal path string or nil for default-directory) and eca-chat-save-image-filename-format (default eca-image-<YYYYMMDD-HHMMSS>.<ext>); saved bytes are pulled directly from the existing overlay via image-property :data, so display zoom does not affect the file and no server round-trip is needed.

  • Syntax-highlight the inline eca-complete ghost-text overlay using the buffer's major-mode, with optional foreground dimming for a "ghost" look similar to Cursor / Copilot. Configurable via eca-completion-syntax-highlight (default t) and eca-completion-overlay-dim-ratio (default 0.5, nil disables dimming). eca-completion-overlay-face now composes with APPEND priority on top of font-lock faces instead of overriding them. #227

  • Sync the mode-line trust indicator on chat resume by honoring the new selectTrust field on config/updated: the shield/flame icon now matches the server's persisted trust state for the resumed chat instead of always defaulting to off (eca #426).

  • Defer fontification during chat streaming: replace the per-chunk font-lock-ensure with a debounced idle-timer scheduler plus a single guaranteed font-lock-ensure at end-of-stream, configurable via eca-chat-fontify-debounce-interval (default 0.15s, nil disables intermediate fontify). Cuts font-lock CPU by ~99% on fast-streaming models and ~84% on slow-streaming ones.

  • Improve mode-line trust indicator: 🔥 (fire) when ON, 🛡 (shield) when OFF. Customizable via eca-chat-trust-on-symbol / eca-chat-trust-off-symbol.

  • Add eca-chat-remove-workspace-root command and [-] mode-line button to remove a workspace folder from a running session. Both 'add' and 'remove' is in the transient menu (W a / W r).

  • Add eca-chat-mode-line-format for customizable chat mode line layout. #184

  • Fix top-level (require 'tab-line) causing side effects when eca-chat-tab-line is nil. #195

  • Add support for chat/opened server notification, enabling the /fork command to open forked chats as new tabs.

  • Fix eca--uri-to-path returning wrong path on Windows (leading slash before drive letter). #200

  • Add eca-settings-tab-line option to disable tab-line-mode in settings buffers. #201

  • Replace helpful-heading face dependency with eca-settings-heading defface. #201

  • Fix settings tab re-registration reordering tabs. #201

  • Add support for chat/askQuestion server request, enabling tools to ask users questions with selectable options in the chat buffer. #338

0.6.0

  • Add eca-chat-save-to-file command. #95
  • Fix chat not being closed. #89
  • Fix: check existing eca sessions when opening chat. #88
  • Add rewrite feature.
  • Fix issue with view_ediff displaying empty buffers in ediff. #86
  • Fix user message contexts and file paths not being sent. #112

Started tracking since 03/11/25