(t0)
| 144 | |
| 145 | // TODO: Move this to Tool.renderPermissionRequest |
| 146 | export function PermissionRequest(t0) { |
| 147 | const $ = _c(18); |
| 148 | const { |
| 149 | toolUseConfirm, |
| 150 | toolUseContext, |
| 151 | onDone, |
| 152 | onReject, |
| 153 | verbose, |
| 154 | workerBadge, |
| 155 | setStickyFooter |
| 156 | } = t0; |
| 157 | let t1; |
| 158 | if ($[0] !== onDone || $[1] !== onReject || $[2] !== toolUseConfirm) { |
| 159 | t1 = () => { |
| 160 | onDone(); |
| 161 | onReject(); |
| 162 | toolUseConfirm.onReject(); |
| 163 | }; |
| 164 | $[0] = onDone; |
| 165 | $[1] = onReject; |
| 166 | $[2] = toolUseConfirm; |
| 167 | $[3] = t1; |
| 168 | } else { |
| 169 | t1 = $[3]; |
| 170 | } |
| 171 | let t2; |
| 172 | if ($[4] === Symbol.for("react.memo_cache_sentinel")) { |
| 173 | t2 = { |
| 174 | context: "Confirmation" |
| 175 | }; |
| 176 | $[4] = t2; |
| 177 | } else { |
| 178 | t2 = $[4]; |
| 179 | } |
| 180 | useKeybinding("app:interrupt", t1, t2); |
| 181 | let t3; |
| 182 | if ($[5] !== toolUseConfirm) { |
| 183 | t3 = getNotificationMessage(toolUseConfirm); |
| 184 | $[5] = toolUseConfirm; |
| 185 | $[6] = t3; |
| 186 | } else { |
| 187 | t3 = $[6]; |
| 188 | } |
| 189 | const notificationMessage = t3; |
| 190 | useNotifyAfterTimeout(notificationMessage, "permission_prompt"); |
| 191 | let t4; |
| 192 | if ($[7] !== toolUseConfirm.tool) { |
| 193 | t4 = permissionComponentForTool(toolUseConfirm.tool); |
| 194 | $[7] = toolUseConfirm.tool; |
| 195 | $[8] = t4; |
| 196 | } else { |
| 197 | t4 = $[8]; |
| 198 | } |
| 199 | const PermissionComponent = t4; |
| 200 | let t5; |
| 201 | if ($[9] !== PermissionComponent || $[10] !== onDone || $[11] !== onReject || $[12] !== setStickyFooter || $[13] !== toolUseConfirm || $[14] !== toolUseContext || $[15] !== verbose || $[16] !== workerBadge) { |
| 202 | t5 = <PermissionComponent toolUseContext={toolUseContext} toolUseConfirm={toolUseConfirm} onDone={onDone} onReject={onReject} verbose={verbose} workerBadge={workerBadge} setStickyFooter={setStickyFooter} />; |
| 203 | $[9] = PermissionComponent; |
nothing calls this directly
no test coverage detected