Open-source AI teammates in Slack, Teams, Discord, Telegram and Mattermost. Self-host it, with any agent harness and any model.
Python agent-orchestrationaiai-agentschatopsdiscordlangchainmcpmicrosoft-teamsmulti-agentopen-sourceopenaiself-hostedslack
import { ExternalLink, Globe } from 'lucide-react';
import type { BaseModalProps } from '@renderer/lib/modal/modal-provider';
import { Button } from '@renderer/lib/ui/button';
import {
DialogContentArea,
DialogFooter,
DialogHeader,
DialogTitle,
} from '@renderer/lib/ui/dialog';
export type ExternalLinkChoice = 'switch-console-browser' | 'external-browser';
export type ExternalLinkChoiceDialogArgs = {
url: string;
canOpenInSwitchConsoleBrowser: boolean;
};
type Props = BaseModalProps<ExternalLinkChoice> & ExternalLinkChoiceDialogArgs;
export function ExternalLinkChoiceDialog({
url,
canOpenInSwitchConsoleBrowser,
onSuccess,
onClose,
}: Props) {
return (
<>
<DialogHeader showCloseButton={false}>
<DialogTitle>Open link?</DialogTitle>
</DialogHeader>
<DialogContentArea className="space-y-4 pt-0 text-sm leading-relaxed">
<p>Choose where to open this link.</p>
<div className="bg-muted/50 max-h-32 overflow-y-auto rounded-md border border-border px-3 py-2.5 font-mono text-[13px] leading-relaxed break-all text-foreground">
{url}
</div>
</DialogContentArea>
<DialogFooter className="flex-col-reverse sm:flex-col-reverse">
<Button className="w-full" variant="outline" onClick={onClose}>
Cancel
</Button>
<Button
className="w-full"
variant="outline"
disabled={!canOpenInSwitchConsoleBrowser}
onClick={() => onSuccess('switch-console-browser')}
>
<Globe className="size-4" />
Open in Switch Console
</Button>
<Button className="w-full" variant="default" onClick={() => onSuccess('external-browser')}>
<ExternalLink className="size-4" />
Open in Browser
</Button>
</DialogFooter>
</>
);
}