mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-22 01:02:16 +00:00
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:
parent
9ebee631be
commit
0397dd44c8
2 changed files with 6 additions and 2 deletions
|
|
@ -2,6 +2,10 @@
|
||||||
|
|
||||||
## [Unreleased]
|
## [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
|
## [0.10.1] - 2025-11-27
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
|
||||||
|
|
@ -336,10 +336,10 @@ export function exportSessionToHtml(sessionManager: SessionManager, state: Agent
|
||||||
const sessionFile = sessionManager.getSessionFile();
|
const sessionFile = sessionManager.getSessionFile();
|
||||||
const timestamp = new Date().toISOString();
|
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) {
|
if (!outputPath) {
|
||||||
const sessionBasename = basename(sessionFile, ".jsonl");
|
const sessionBasename = basename(sessionFile, ".jsonl");
|
||||||
outputPath = `${sessionBasename}.html`;
|
outputPath = `pi-session-${sessionBasename}.html`;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Read and parse session data
|
// Read and parse session data
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue