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
9 changes: 4 additions & 5 deletions packages/coding-agent/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,17 @@
- Custom provider support via `pi.registerProvider()` with `streamSimple` for custom API implementations
- Added `custom-provider.ts` example extension demonstrating custom Anthropic provider with OAuth

### Fixed

- Extension `setWorkingMessage()` calls in `agent_start` handlers now work correctly; previously the message was silently ignored because the loading animation didn't exist yet ([#935](https://github.com/badlogic/pi-mono/issues/935))
- Off-by-one error in bash output "earlier lines" count caused by counting spacing newline as hidden content ([#921](https://github.com/badlogic/pi-mono/issues/921))

### Changed

- HTML export: clicking a sidebar message now navigates to its newest leaf and scrolls to it, instead of truncating the branch ([#853](https://github.com/badlogic/pi-mono/pull/853) by [@mitsuhiko](https://github.com/mitsuhiko))
- HTML export: active path is now visually highlighted with dimmed off-path nodes ([#929](https://github.com/badlogic/pi-mono/pull/929) by [@hewliyang](https://github.com/hewliyang))
- `/reload` now re-renders the entire scrollback so updated extension components are visible immediately
- Skill, prompt template, and theme discovery now use settings and CLI path arrays instead of legacy filters ([#645](https://github.com/badlogic/pi-mono/issues/645))

### Fixed

- Extension `setWorkingMessage()` calls in `agent_start` handlers now work correctly; previously the message was silently ignored because the loading animation didn't exist yet ([#935](https://github.com/badlogic/pi-mono/issues/935))
- Off-by-one error in bash output "earlier lines" count caused by counting spacing newline as hidden content ([#921](https://github.com/badlogic/pi-mono/issues/921))
- User package filters now layer on top of manifest filters instead of replacing them ([#645](https://github.com/badlogic/pi-mono/issues/645))
- Auto-retry now handles "terminated" errors from Codex API mid-stream failures
- Follow-up queue (Alt+Enter) now sends full paste content instead of `[paste #N ...]` markers ([#912](https://github.com/badlogic/pi-mono/issues/912))
Expand Down
9 changes: 9 additions & 0 deletions packages/coding-agent/src/core/export-html/template.css
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,15 @@
}

.tree-node.in-path {
background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.tree-node:not(.in-path) {
opacity: 0.5;
}

.tree-node:not(.in-path):hover {
opacity: 1;
}

.tree-prefix {
Expand Down
10 changes: 6 additions & 4 deletions packages/coding-agent/src/core/export-html/template.js
Original file line number Diff line number Diff line change
Expand Up @@ -665,6 +665,7 @@
// ============================================================

let currentLeafId = leafId;
let currentTargetId = urlTargetId || leafId;
let treeRendered = false;

function renderTree() {
Expand All @@ -681,12 +682,12 @@
for (const flatNode of filtered) {
const entry = flatNode.node.entry;
const isOnPath = activePathIds.has(entry.id);
const isLeaf = entry.id === currentLeafId;
const isTarget = entry.id === currentTargetId;

const div = document.createElement('div');
div.className = 'tree-node';
if (isOnPath) div.classList.add('in-path');
if (isLeaf) div.classList.add('active');
if (isTarget) div.classList.add('active');
div.dataset.id = entry.id;

const prefix = buildTreePrefix(flatNode);
Expand Down Expand Up @@ -721,10 +722,10 @@
for (const node of nodes) {
const id = node.dataset.id;
const isOnPath = activePathIds.has(id);
const isLeaf = id === currentLeafId;
const isTarget = id === currentTargetId;

node.classList.toggle('in-path', isOnPath);
node.classList.toggle('active', isLeaf);
node.classList.toggle('active', isTarget);

const marker = node.querySelector('.tree-marker');
if (marker) {
Expand Down Expand Up @@ -1351,6 +1352,7 @@

function navigateTo(targetId, scrollMode = 'target', scrollToEntryId = null) {
currentLeafId = targetId;
currentTargetId = scrollToEntryId || targetId;
const path = getPath(targetId);

renderTree();
Expand Down
Loading