mirror of https://github.com/kortix-ai/suna.git
hotfix(billing): integrate BillingModal into ChatSettingsDialog, MessageInput, and InputNode components
This commit is contained in:
parent
4188fae912
commit
929b329948
|
@ -14,6 +14,7 @@ import { Label } from '@/components/ui/label';
|
|||
import { ModelSelector } from './model-selector';
|
||||
import { SubscriptionStatus } from './_use-model-selection';
|
||||
import { cn } from '@/lib/utils';
|
||||
import { BillingModal } from '@/components/billing/billing-modal';
|
||||
|
||||
interface ChatSettingsDialogProps {
|
||||
selectedModel: string;
|
||||
|
@ -91,6 +92,13 @@ export function ChatSettingsDialog({
|
|||
setBillingModalOpen={setBillingModalOpen}
|
||||
/>
|
||||
</div>
|
||||
{/* Billing Modal */}
|
||||
<BillingModal
|
||||
open={billingModalOpen}
|
||||
onOpenChange={setBillingModalOpen}
|
||||
returnUrl={typeof window !== 'undefined' ? window.location.href : '/'}
|
||||
/>
|
||||
|
||||
<p className="text-xs text-muted-foreground">
|
||||
Choose the AI model that best fits your needs. Premium models offer better performance.
|
||||
</p>
|
||||
|
|
|
@ -14,6 +14,7 @@ import { useFeatureFlag } from '@/lib/feature-flags';
|
|||
import { TooltipContent } from '@/components/ui/tooltip';
|
||||
import { Tooltip } from '@/components/ui/tooltip';
|
||||
import { TooltipProvider, TooltipTrigger } from '@radix-ui/react-tooltip';
|
||||
import { BillingModal } from '@/components/billing/billing-modal';
|
||||
|
||||
interface MessageInputProps {
|
||||
value: string;
|
||||
|
@ -200,6 +201,13 @@ export const MessageInput = forwardRef<HTMLTextAreaElement, MessageInputProps>(
|
|||
/>
|
||||
)}
|
||||
|
||||
{/* Billing Modal */}
|
||||
<BillingModal
|
||||
open={billingModalOpen}
|
||||
onOpenChange={setBillingModalOpen}
|
||||
returnUrl={typeof window !== 'undefined' ? window.location.href : '/'}
|
||||
/>
|
||||
|
||||
<VoiceRecorder
|
||||
onTranscription={onTranscription}
|
||||
disabled={loading || (disabled && !isAgentRunning)}
|
||||
|
|
|
@ -763,13 +763,6 @@ export const ModelSelector: React.FC<ModelSelectorProps> = ({
|
|||
mode={dialogMode}
|
||||
/>
|
||||
|
||||
{/* Billing Modal */}
|
||||
<BillingModal
|
||||
open={billingModalOpen}
|
||||
onOpenChange={setBillingModalOpen}
|
||||
returnUrl={typeof window !== 'undefined' ? window.location.href : '/'}
|
||||
/>
|
||||
|
||||
{paywallOpen && (
|
||||
<PaywallDialog
|
||||
open={true}
|
||||
|
|
|
@ -18,6 +18,7 @@ import { ScheduleConfigDialog } from "../scheduling/ScheduleConfigDialog";
|
|||
import { ScheduleConfig } from "../scheduling/types";
|
||||
import { ModelSelector } from "@/components/thread/chat-input/model-selector";
|
||||
import { useModelSelection } from "@/components/thread/chat-input/_use-model-selection";
|
||||
import { BillingModal } from "@/components/billing/billing-modal";
|
||||
|
||||
interface InputNodeData {
|
||||
label?: string;
|
||||
|
@ -233,6 +234,13 @@ const InputNode = memo(({ data, selected, id }: NodeProps) => {
|
|||
</div>
|
||||
</div>
|
||||
|
||||
{/* Billing Modal */}
|
||||
<BillingModal
|
||||
open={billingModalOpen}
|
||||
onOpenChange={setBillingModalOpen}
|
||||
returnUrl={typeof window !== 'undefined' ? window.location.href : '/'}
|
||||
/>
|
||||
|
||||
<div className="space-y-2">
|
||||
<Label className="text-sm font-medium">Trigger Type *</Label>
|
||||
<Select
|
||||
|
|
Loading…
Reference in New Issue