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