MCPcopy Create free account
hub / github.com/anomalyco/opencode / createCommandShimDialog

Function createCommandShimDialog

packages/tui/src/plugin/command-shim.ts:19–41  ·  view source on GitHub ↗
(dialog: CommandShimDialog)

Source from the content-addressed store, hash-verified

17}
18
19function createCommandShimDialog(dialog: CommandShimDialog): LegacyDialog {
20 if (!("stack" in dialog)) return dialog
21 return {
22 replace(render, onClose) {
23 dialog.replace(render, onClose)
24 },
25 clear() {
26 dialog.clear()
27 },
28 setSize(size) {
29 dialog.setSize(size)
30 },
31 get size() {
32 return dialog.size
33 },
34 get depth() {
35 return dialog.stack.length
36 },
37 get open() {
38 return dialog.stack.length > 0
39 },
40 }
41}
42
43function warnOnce(api: string, replacement: string, warn: Warn) {
44 if (warned.has(api)) return

Callers 1

createCommandShimFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected