(api: TuiPluginApi, targetSessionId = getSessionId(api))
| 538 | } |
| 539 | |
| 540 | async function showEmbedDialog(api: TuiPluginApi, targetSessionId = getSessionId(api)): Promise<boolean> { |
| 541 | const sessionId = targetSessionId |
| 542 | if (!sessionId) { |
| 543 | api.ui.toast({ message: "No active session", variant: "warning" }) |
| 544 | return false |
| 545 | } |
| 546 | const directory = api.state.path.directory ?? "" |
| 547 | const detail = await loadEmbedDetail(sessionId, directory) |
| 548 | if (getSessionId(api) !== sessionId) return false |
| 549 | api.ui.dialog.replace(() => <EmbedDialog api={api} detail={detail} />) |
| 550 | return true |
| 551 | } |
| 552 | |
| 553 | function showResultDialog(api: TuiPluginApi, title: string, message: string): boolean { |
| 554 | api.ui.dialog.replace(() => ( |
no test coverage detected