Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

## Unreleased

- 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` (with a `buffer-text-pixel-size` fallback on Emacs < 29) and aligns flush to the right edge in pixels.
- 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.
- Replace the `[copy response]` and `[copy]` chat button labels with a clipboard icon (same click/RET/mouse behavior and tooltips). Customizable via `eca-chat-copy-button-symbol` and `eca-chat-copy-button-symbol-tty` (terminal fallback).
- 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.
Expand Down
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ Chat
- `eca-chat-send-prompt-at-chat` Open chat and send any prompt written there
- `eca-chat-clear-prompt`: Clear written prompt in chat
- `eca-chat-repeat-prompt`: Repeat a previously sent prompt
- `eca-chat-copy-at-point`: Copy the code block or assistant response at point
- `eca-chat-stop-prompt`: Stop a running prompt in chat
- `eca-chat-tool-call-accept-all`: Accept all pending tool calls in chat
- `eca-chat-tool-call-accept-all-and-remember`: Accept all pending tool calls in chat and remember for session
Expand Down Expand Up @@ -155,9 +156,6 @@ Chat
- `eca-chat-mcp-tool-call-success-symbol`: Symbol used for MCP tool calls when they succeed.
- `eca-chat-expand-pending-approval-tools`: Whether to auto-expand tool calls that are pending approval.
- `eca-chat-shrink-called-tools`: Whether to auto-shrink tool calls after they have been executed.
- `eca-chat-show-copy-buttons`: Whether to show copy buttons for chat responses and fenced code blocks (default `t`).
- `eca-chat-copy-button-symbol`: Glyph used for chat copy buttons on graphic frames (default `📋`).
- `eca-chat-copy-button-symbol-tty`: Glyph used for chat copy buttons on terminal (non-graphic) frames.
- `eca-chat-tab-line`: Whether to show a tab line with chat tabs at the top of each chat window (default `t`). Each tab shows the chat status (pending approval, loading) and title.
- `eca-chat-custom-model`: Override the model used for chat (nil = server default).
- `eca-chat-custom-agent`: Override the chat agent (nil = server default).
Expand Down Expand Up @@ -221,6 +219,7 @@ You can access the transient menu with common commands via `M-x eca-transient-me
| Chat: select chat | <kbd>C-c</kbd> <kbd>C-f</kbd> |
| Chat: repeat last prompt | <kbd>C-c</kbd> <kbd>C-p</kbd> |
| Chat: clear prompt | <kbd>C-c</kbd> <kbd>C-d</kbd> |
| Chat: copy at point | <kbd>C-c</kbd> <kbd>C-w</kbd> |
| Chat: timeline | <kbd>C-c</kbd> <kbd>C-h</kbd> |
| Chat: send prompt at chat buffer | <kbd>C-c</kbd> <kbd>C-RET</kbd> |
| Chat: accept all pending tool calls | <kbd>C-c</kbd> <kbd>C-a</kbd> |
Expand Down
Loading
Loading