summaryrefslogtreecommitdiffhomepage
path: root/.rules/changelog/2026-03/28/05.md
blob: e0cdf174d2fa6ef56e27ecd250d1cc735dc6c4c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Changelog — 2026-03-28 / 05

## No-op edit validation and tool error styling

### No-op edit detection (`src/tools.ts`, `src/ollama-client.ts`)

- `executeEditFile` now rejects calls where `old_text === new_text` immediately with an error, preventing unnecessary file operations.
- Added `isNoOpEdit()` helper in `ollama-client.ts` that detects identical `old_text`/`new_text` for both `edit_file` and `batch_edit_file`.
- The agent loop skips the user approval prompt for no-op edits — the tool executes directly and returns the error without interrupting the user.

### Red accents for tool errors (`src/chat-view.ts`, `styles.css`)

- `appendToolCall` now detects when `event.result` starts with `"Error"` and adds the `ai-pulse-tool-call-error` CSS class to the tool call container.
- Added CSS rules for `.ai-pulse-tool-call-error` that change the border-left, header text, and result summary text from the default purple accent to red (`--text-error`).
- Applies universally to all tool errors across every tool type.

### Files changed

- `src/tools.ts` — Added `oldText === newText` guard in `executeEditFile`.
- `src/ollama-client.ts` — Added `isNoOpEdit()` function; updated approval condition in `chatAgentLoop`.
- `src/chat-view.ts` — Added error class detection in `appendToolCall`.
- `styles.css` — Added `.ai-pulse-tool-call-error` styling rules.