This file (998B) exceeds the allowed full mode (48 kb) size. The editor full height is disabled, only scrolling is allowed.
If you wish to edit a file, it is recommended to use the scroll mode as some users do not like the full height mode.
import { Injectable, Inject } from '@angular/core';
import { MatDialog } from '@angular/material/dialog';
import { createDialogPopupSettings } from './dialog-popup';
@Injectable({ providedIn: 'root' })
export class AiCheatsheetDialogService {
constructor(@Inject(MatDialog) private dialog: MatDialog) {}
/** Returns the picked prompt (with "ai: " prefix) or undefined if closed without picking. */
async show(): Promise<string | undefined> {
const { AiCheatsheetDialogComponent } = await import(
/* webpackChunkName: "dialog-ai-cheatsheet" */
'./ai-cheatsheet-dialog.component'
);
const dialogRef = this.dialog.open(AiCheatsheetDialogComponent, createDialogPopupSettings({
width: '720px',
maxWidth: '95vw',
maxHeight: '90vh',
}));
return new Promise((resolve) => {
dialogRef.afterClosed().subscribe((picked: string | undefined) => resolve(picked));
});
}
}
| / | Focus search |
| ? | Show this help |
| Esc | Unfocus input |