Integrations: connect forms open under the tile that was chosen
1 file+31−110/1 viewed
| 243 | 243 | agent's sandbox holds a token that dies with the run. | |
| 244 | 244 | </p> | |
| 245 | 245 | {!model && owner && <Choices kind="models" slug={slug} adding={adding} />} | |
| 246 | + | {adding && PROVIDERS[adding].kind === "models" && owner && ( | |
| 247 | + | <AddForm | |
| 248 | + | provider={adding} | |
| 249 | + | slug={slug} | |
| 250 | + | repos={repoNames} | |
| 251 | + | busy={busy} | |
| 252 | + | error={actionData && "provider" in actionData ? error : null} | |
| 253 | + | /> | |
| 254 | + | )} | |
| 246 | 255 | </Section> | |
| 247 | 256 | ||
| 248 | 257 | {/* Alerts -------------------------------------------------------------- */} | |
| 255 | 264 | deliveries={deliveries} | |
| 256 | 265 | /> | |
| 257 | 266 | {owner && <Choices kind="alerts" slug={slug} adding={adding} />} | |
| 267 | + | {adding && PROVIDERS[adding].kind === "alerts" && owner && ( | |
| 268 | + | <AddForm | |
| 269 | + | provider={adding} | |
| 270 | + | slug={slug} | |
| 271 | + | repos={repoNames} | |
| 272 | + | busy={busy} | |
| 273 | + | error={actionData && "provider" in actionData ? error : null} | |
| 274 | + | /> | |
| 275 | + | )} | |
| 258 | 276 | </Section> | |
| 259 | 277 | ||
| 260 | 278 | {/* Trackers ------------------------------------------------------------ */} | |
| 267 | 285 | deliveries={deliveries} | |
| 268 | 286 | /> | |
| 269 | 287 | {owner && <Choices kind="tracker" slug={slug} adding={adding} />} | |
| 288 | + | {adding && PROVIDERS[adding].kind === "tracker" && owner && ( | |
| 289 | + | <AddForm | |
| 290 | + | provider={adding} | |
| 291 | + | slug={slug} | |
| 292 | + | repos={repoNames} | |
| 293 | + | busy={busy} | |
| 294 | + | error={actionData && "provider" in actionData ? error : null} | |
| 295 | + | /> | |
| 296 | + | )} | |
| 270 | 297 | </Section> | |
| 271 | 298 | ||
| 272 | − | {adding && owner && ( | |
| 273 | − | <AddForm | |
| 274 | − | provider={adding} | |
| 275 | − | slug={slug} | |
| 276 | − | repos={repoNames} | |
| 277 | − | busy={busy} | |
| 278 | − | error={actionData && "provider" in actionData ? error : null} | |
| 279 | − | /> | |
| 280 | − | )} | |
| 281 | 299 | {!owner && <p className="mt-8 text-sm text-muted">An owner of {slug} can add and remove integrations.</p>} | |
| 282 | 300 | </div> | |
| 283 | 301 | ); | |
| 597 | 615 | ), | |
| 598 | 616 | }; | |
| 599 | 617 | return ( | |
| 600 | − | <section id="add" className="mt-10 rounded-xl border border-line bg-surface p-5"> | |
| 618 | + | <section id="add" className="mt-4 scroll-mt-20 rounded-xl border border-line bg-surface p-5"> | |
| 601 | 619 | <div className="flex items-center gap-3"> | |
| 602 | 620 | <ProviderMark provider={provider} /> | |
| 603 | 621 | <div className="grow"> | |
| 604 | − | <h3 className="font-medium">Connect {PROVIDERS[provider].label}</h3> | |
| 622 | + | <h3 className="font-medium"> | |
| 623 | + | Connect {provider === "anthropic_endpoint" ? "your own endpoint" : PROVIDERS[provider].label} | |
| 624 | + | </h3> | |
| 605 | 625 | <p className="text-xs text-muted">{PROVIDER_BLURB[provider]}</p> | |
| 606 | 626 | </div> | |
| 607 | 627 | <Link to={`/${slug}/-/integrations`} className="rounded-md p-1.5 text-faint hover:bg-raised hover:text-fg" aria-label="Close"> |