coding-agent: add pi-session- prefix to exported HTML files (#72)

Makes exported session files easier to filter with .gitignore
This commit is contained in:
Mario Zechner 2025-11-27 23:54:10 +01:00
parent 9ebee631be
commit 0397dd44c8
2 changed files with 6 additions and 2 deletions

View file

@ -2,6 +2,10 @@
## [Unreleased]
### Changed
- **HTML Export Prefix**: Exported session files now use `pi-session-` prefix (e.g., `pi-session-2025-11-13T12-27-53-866Z_xxx.html`) for easier `.gitignore` filtering ([#72](https://github.com/badlogic/pi-mono/issues/72))
## [0.10.1] - 2025-11-27
### Added

View file

@ -336,10 +336,10 @@ export function exportSessionToHtml(sessionManager: SessionManager, state: Agent
const sessionFile = sessionManager.getSessionFile();
const timestamp = new Date().toISOString();
// Use session filename + .html if no output path provided
// Use pi-session- prefix + session filename + .html if no output path provided
if (!outputPath) {
const sessionBasename = basename(sessionFile, ".jsonl");
outputPath = `${sessionBasename}.html`;
outputPath = `pi-session-${sessionBasename}.html`;
}
// Read and parse session data