Merge pull request #510 from mitsuhiko/annotate-bridge-prompt

Annotate bridge prompt
This commit is contained in:
Mario Zechner 2026-01-06 23:47:02 +01:00 committed by GitHub
commit 03e3f0d801
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 116 additions and 13 deletions

View file

@ -1051,7 +1051,7 @@ export class InteractiveMode {
return;
}
if (text.startsWith("/export")) {
this.handleExportCommand(text);
await this.handleExportCommand(text);
this.editor.setText("");
return;
}
@ -2453,12 +2453,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"}`);
@ -2481,7 +2481,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;

View file

@ -443,7 +443,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 });
}