MCPcopy Index your code
hub / github.com/codeaashu/claude-code / CopyPicker

Function CopyPicker

src/commands/copy/copy.tsx:120–319  ·  view source on GitHub ↗
(t0)

Source from the content-addressed store, hash-verified

118};
119type PickerSelection = number | 'full' | 'always';
120function CopyPicker(t0) {
121 const $ = _c(33);
122 const {
123 fullText,
124 codeBlocks,
125 messageAge,
126 onDone
127 } = t0;
128 const focusedRef = useRef("full");
129 const t1 = `${fullText.length} chars, ${countCharInString(fullText, "\n") + 1} lines`;
130 let t2;
131 if ($[0] !== t1) {
132 t2 = {
133 label: "Full response",
134 value: "full" as const,
135 description: t1
136 };
137 $[0] = t1;
138 $[1] = t2;
139 } else {
140 t2 = $[1];
141 }
142 let t3;
143 if ($[2] !== codeBlocks || $[3] !== t2) {
144 let t4;
145 if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
146 t4 = {
147 label: "Always copy full response",
148 value: "always" as const,
149 description: "Skip this picker in the future (revert via /config)"
150 };
151 $[5] = t4;
152 } else {
153 t4 = $[5];
154 }
155 t3 = [t2, ...codeBlocks.map(_temp), t4];
156 $[2] = codeBlocks;
157 $[3] = t2;
158 $[4] = t3;
159 } else {
160 t3 = $[4];
161 }
162 const options = t3;
163 let t4;
164 if ($[6] !== codeBlocks || $[7] !== fullText) {
165 t4 = function getSelectionContent(selected) {
166 if (selected === "full" || selected === "always") {
167 return {
168 text: fullText,
169 filename: RESPONSE_FILENAME
170 };
171 }
172 const block_0 = codeBlocks[selected];
173 return {
174 text: block_0.code,
175 filename: `copy${fileExtension(block_0.lang)}`,
176 blockIndex: selected
177 };

Callers

nothing calls this directly

Calls 10

countCharInStringFunction · 0.85
fileExtensionFunction · 0.85
getGlobalConfigFunction · 0.85
saveGlobalConfigFunction · 0.85
logEventFunction · 0.85
copyOrWriteToFileFunction · 0.85
handleWriteFunction · 0.85
preventDefaultMethod · 0.80
onDoneFunction · 0.50
handleSelectFunction · 0.50

Tested by

no test coverage detected