Add the codex bridge prompt in the html export

This commit is contained in:
Armin Ronacher 2026-01-06 14:21:34 +01:00
parent a236e62025
commit 6a5f04ce1f
8 changed files with 103 additions and 10 deletions

View file

@ -999,7 +999,7 @@ export class InteractiveMode {
return;
}
if (text.startsWith("/export")) {
this.handleExportCommand(text);
await this.handleExportCommand(text);
this.editor.setText("");
return;
}
@ -2402,12 +2402,12 @@ export class InteractiveMode {
// Command handlers
// =========================================================================
private handleExportCommand(text: string): void {
private async handleExportCommand(text: string): Promise<void> {
const parts = text.split(/\s+/);
const outputPath = parts.length > 1 ? parts[1] : undefined;
try {
const filePath = this.session.exportToHtml(outputPath);
const filePath = await this.session.exportToHtml(outputPath);
this.showStatus(`Session exported to: ${filePath}`);
} catch (error: unknown) {
this.showError(`Failed to export session: ${error instanceof Error ? error.message : "Unknown error"}`);
@ -2430,7 +2430,7 @@ export class InteractiveMode {
// Export to a temp file
const tmpFile = path.join(os.tmpdir(), "session.html");
try {
this.session.exportToHtml(tmpFile);
await this.session.exportToHtml(tmpFile);
} catch (error: unknown) {
this.showError(`Failed to export session: ${error instanceof Error ? error.message : "Unknown error"}`);
return;