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

Function showStatusDialog

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

Source from the content-addressed store, hash-verified

506}
507
508async function showStatusDialog(api: TuiPluginApi, targetSessionId = getSessionId(api)): Promise<boolean> {
509 const sessionId = targetSessionId
510 if (!sessionId) {
511 showToast(api, { message: "No active session", variant: "warning" })
512 return false
513 }
514
515 const directory = api.state.path.directory ?? ""
516 const modelKey = getModelKeyFromMessages(api, sessionId)
517 const detail = await loadStatusDetail(sessionId, directory, modelKey)
518 if (getSessionId(api) !== sessionId) return false
519
520 api.ui.dialog.replace(() => <StatusDialog api={api} s={detail} />)
521 return true
522}
523
524const EmbedDialog = (props: { api: TuiPluginApi; detail: EmbedDetail }) => {
525 const theme = createMemo(() => (props.api as any).theme.current)

Callers 3

runFunction · 0.70
onSelectFunction · 0.70
handleNotificationFunction · 0.70

Calls 4

loadStatusDetailFunction · 0.90
getSessionIdFunction · 0.85
getModelKeyFromMessagesFunction · 0.85
showToastFunction · 0.70

Tested by

no test coverage detected