MCPcopy Index your code
hub / github.com/Opencode-DCP/opencode-dynamic-context-pruning / openContextModal

Function openContextModal

lib/tui/modals.tsx:26–42  ·  view source on GitHub ↗
(api: TuiApi, config: PluginConfig)

Source from the content-addressed store, hash-verified

24}
25
26export function openContextModal(api: TuiApi, config: PluginConfig) {
27 runModal(api, "Context", async () => {
28 const data = await loadSessionData(api, config)
29 if (!data) {
30 showStatusDialog(api, "Context", "No session", "Open a session first.")
31 return
32 }
33 showDialog(api, () => (
34 <ContextDialog
35 api={api}
36 state={data.state}
37 messages={data.messages}
38 onBack={() => openPanelModal(api, config)}
39 />
40 ))
41 })
42}
43
44export function openStatsModal(api: TuiApi, config: PluginConfig) {
45 runModal(api, "Stats", async () => {

Callers 1

openPanelModalFunction · 0.85

Calls 5

loadSessionDataFunction · 0.90
runModalFunction · 0.85
showStatusDialogFunction · 0.85
showDialogFunction · 0.85
openPanelModalFunction · 0.85

Tested by

no test coverage detected