MCPcopy Create free account
hub / github.com/cortexkit/magic-context / showEmbedDialog

Function showEmbedDialog

packages/plugin/src/tui/index.tsx:540–551  ·  view source on GitHub ↗
(api: TuiPluginApi, targetSessionId = getSessionId(api))

Source from the content-addressed store, hash-verified

538}
539
540async 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
553function showResultDialog(api: TuiPluginApi, title: string, message: string): boolean {
554 api.ui.dialog.replace(() => (

Callers 1

handleNotificationFunction · 0.85

Calls 2

loadEmbedDetailFunction · 0.90
getSessionIdFunction · 0.85

Tested by

no test coverage detected