mirror of https://github.com/kortix-ai/suna.git
Merge pull request #1209 from escapade-mckv/composio-1a
import and types fix
This commit is contained in:
commit
c2efe937cc
|
@ -1,6 +1,7 @@
|
|||
'use client';
|
||||
|
||||
import React, { useState, useMemo } from 'react';
|
||||
import Link from 'next/link';
|
||||
import { Card, CardContent, CardHeader } from '@/components/ui/card';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Input } from '@/components/ui/input';
|
||||
|
@ -452,10 +453,10 @@ export const ComposioConnectionsSection: React.FC<ComposioConnectionsSectionProp
|
|||
You haven't connected any Composio applications yet.
|
||||
</p>
|
||||
<Button variant="outline" asChild>
|
||||
<a href="/agents" className="inline-flex items-center gap-2">
|
||||
<Link href="/agents" className="inline-flex items-center gap-2">
|
||||
<ExternalLink className="h-4 w-4" />
|
||||
Connect Apps
|
||||
</a>
|
||||
</Link>
|
||||
</Button>
|
||||
</div>
|
||||
</CardContent>
|
||||
|
|
|
@ -34,7 +34,7 @@ export function CreateCredentialProfileToolView({
|
|||
}: ToolViewProps) {
|
||||
|
||||
const {
|
||||
app_slug,
|
||||
toolkit_slug,
|
||||
profile_name,
|
||||
display_name,
|
||||
message,
|
||||
|
@ -53,8 +53,8 @@ export function CreateCredentialProfileToolView({
|
|||
const toolTitle = getToolTitle(name);
|
||||
|
||||
// Fetch app icon using the logo hook
|
||||
const { data: iconData } = usePipedreamAppIcon(app_slug || '', {
|
||||
enabled: !!app_slug
|
||||
const { data: iconData } = usePipedreamAppIcon(toolkit_slug || '', {
|
||||
enabled: !!toolkit_slug
|
||||
});
|
||||
|
||||
const logoUrl = iconData?.icon_url;
|
||||
|
@ -141,7 +141,7 @@ export function CreateCredentialProfileToolView({
|
|||
{logoUrl ? (
|
||||
<img
|
||||
src={logoUrl}
|
||||
alt={`${profile.app_name} logo`}
|
||||
alt={`${profile.toolkit_name} logo`}
|
||||
className="w-8 h-8 object-cover rounded"
|
||||
onError={(e) => {
|
||||
const target = e.target as HTMLImageElement;
|
||||
|
@ -161,7 +161,7 @@ export function CreateCredentialProfileToolView({
|
|||
{profile.display_name}
|
||||
</h3>
|
||||
<p className="text-sm text-zinc-600 dark:text-zinc-400">
|
||||
{profile.app_name}
|
||||
{profile.toolkit_name}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -192,24 +192,13 @@ export function CreateCredentialProfileToolView({
|
|||
</p>
|
||||
</div>
|
||||
|
||||
{/* App Slug */}
|
||||
<div className="space-y-2">
|
||||
<div className="flex items-center gap-2 text-sm text-zinc-500 dark:text-zinc-400">
|
||||
<Server className="w-4 h-4" />
|
||||
<span>App Slug</span>
|
||||
<Server className="w-4 h-4" />
|
||||
<span>Toolkit Slug</span>
|
||||
</div>
|
||||
<p className="text-sm font-mono text-zinc-700 dark:text-zinc-300 pl-6">
|
||||
{profile.app_slug}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div className="space-y-2">
|
||||
<div className="flex items-center gap-2 text-sm text-zinc-500 dark:text-zinc-400">
|
||||
<Calendar className="w-4 h-4" />
|
||||
<span>Created</span>
|
||||
</div>
|
||||
<p className="text-sm text-zinc-700 dark:text-zinc-300 pl-6">
|
||||
{formatCreatedAt(profile.created_at)}
|
||||
{profile.toolkit_slug}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -242,7 +231,7 @@ export function CreateCredentialProfileToolView({
|
|||
Profile not created
|
||||
</h3>
|
||||
<p className="text-sm text-zinc-500 dark:text-zinc-400">
|
||||
{app_slug ? `Failed to create profile for "${app_slug}"` : 'Credential profile creation failed'}
|
||||
{toolkit_slug ? `Failed to create profile for "${toolkit_slug}"` : 'Credential profile creation failed'}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue