mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-16 05:03:26 +00:00
fix(coding-agent): use APP_NAME in export-html and tools-manager
This commit is contained in:
parent
d4d5051940
commit
6cd8bcdeb3
2 changed files with 9 additions and 9 deletions
|
|
@ -3,7 +3,7 @@ import type { AssistantMessage, Message, ToolResultMessage, UserMessage } from "
|
|||
import { existsSync, readFileSync, writeFileSync } from "fs";
|
||||
import { homedir } from "os";
|
||||
import { basename } from "path";
|
||||
import { VERSION } from "./config.js";
|
||||
import { APP_NAME, VERSION } from "./config.js";
|
||||
import type { SessionManager } from "./session-manager.js";
|
||||
|
||||
/**
|
||||
|
|
@ -333,7 +333,7 @@ export function exportSessionToHtml(sessionManager: SessionManager, state: Agent
|
|||
// Use pi-session- prefix + session filename + .html if no output path provided
|
||||
if (!outputPath) {
|
||||
const sessionBasename = basename(sessionFile, ".jsonl");
|
||||
outputPath = `pi-session-${sessionBasename}.html`;
|
||||
outputPath = `${APP_NAME}-session-${sessionBasename}.html`;
|
||||
}
|
||||
|
||||
// Read and parse session data
|
||||
|
|
@ -783,7 +783,7 @@ export function exportSessionToHtml(sessionManager: SessionManager, state: Agent
|
|||
<body>
|
||||
<div class="container">
|
||||
<div class="header">
|
||||
<h1>pi v${VERSION}</h1>
|
||||
<h1>${APP_NAME} v${VERSION}</h1>
|
||||
<div class="header-info">
|
||||
<div class="info-item">
|
||||
<span class="info-label">Session:</span>
|
||||
|
|
@ -894,7 +894,7 @@ export function exportSessionToHtml(sessionManager: SessionManager, state: Agent
|
|||
</div>
|
||||
|
||||
<div class="footer">
|
||||
Generated by pi coding-agent on ${new Date().toLocaleString()}
|
||||
Generated by ${APP_NAME} coding-agent on ${new Date().toLocaleString()}
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
|
@ -1464,7 +1464,7 @@ function generateHtml(data: ParsedSessionData, inputFilename: string): string {
|
|||
<body>
|
||||
<div class="container">
|
||||
<div class="header">
|
||||
<h1>pi v${VERSION}</h1>
|
||||
<h1>${APP_NAME} v${VERSION}</h1>
|
||||
<div class="header-info">
|
||||
<div class="info-item">
|
||||
<span class="info-label">Session:</span>
|
||||
|
|
@ -1569,7 +1569,7 @@ function generateHtml(data: ParsedSessionData, inputFilename: string): string {
|
|||
</div>
|
||||
|
||||
<div class="footer">
|
||||
Generated by pi coding-agent on ${new Date().toLocaleString()}
|
||||
Generated by ${APP_NAME} coding-agent on ${new Date().toLocaleString()}
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
|
@ -1605,7 +1605,7 @@ export function exportFromFile(inputPath: string, outputPath?: string): string {
|
|||
// Generate output path if not provided
|
||||
if (!outputPath) {
|
||||
const inputBasename = basename(inputPath, ".jsonl");
|
||||
outputPath = `pi-session-${inputBasename}.html`;
|
||||
outputPath = `${APP_NAME}-session-${inputBasename}.html`;
|
||||
}
|
||||
|
||||
const html = generateHtml(data, basename(inputPath));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue