MCPcopy
hub / github.com/codeaashu/claude-code / useSetPromptOverlay

Function useSetPromptOverlay

src/context/promptOverlayContext.tsx:72–95  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

70 * No-op outside the provider (non-fullscreen renders inline instead).
71 */
72export function useSetPromptOverlay(data) {
73 const $ = _c(4);
74 const set = useContext(SetContext);
75 let t0;
76 let t1;
77 if ($[0] !== data || $[1] !== set) {
78 t0 = () => {
79 if (!set) {
80 return;
81 }
82 set(data);
83 return () => set(null);
84 };
85 t1 = [set, data];
86 $[0] = data;
87 $[1] = set;
88 $[2] = t0;
89 $[3] = t1;
90 } else {
91 t0 = $[2];
92 t1 = $[3];
93 }
94 useEffect(t0, t1);
95}
96
97/**
98 * Register a dialog node to float above the prompt. Clears on unmount.

Callers 1

PromptInputFooterFunction · 0.85

Calls 1

setFunction · 0.85

Tested by

no test coverage detected