mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-15 20:03:05 +00:00
Add the codex bridge prompt in the html export
This commit is contained in:
parent
a236e62025
commit
6a5f04ce1f
8 changed files with 103 additions and 10 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue