Add the codex bridge prompt in the html export
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -431,7 +431,7 @@ export async function runRpcMode(session: AgentSession): Promise<never> {
|
||||
}
|
||||
|
||||
case "export_html": {
|
||||
const path = session.exportToHtml(command.outputPath);
|
||||
const path = await session.exportToHtml(command.outputPath);
|
||||
return success(id, "export_html", { path });
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user