pull/718/head
Travis Fischer 2025-07-01 14:25:44 -05:00
rodzic a7e8294315
commit 4faadbf166
3 zmienionych plików z 25 dodań i 9 usunięć

Wyświetl plik

@ -8,6 +8,7 @@ import { useRouter, useSearchParams } from 'next/navigation'
import plur from 'plur' import plur from 'plur'
import { useCallback, useEffect, useMemo, useRef, useState } from 'react' import { useCallback, useEffect, useMemo, useRef, useState } from 'react'
import { ActiveLink } from '@/components/active-link'
import { useAgentic } from '@/components/agentic-provider' import { useAgentic } from '@/components/agentic-provider'
import { ExampleUsage } from '@/components/example-usage' import { ExampleUsage } from '@/components/example-usage'
import { HeroButton } from '@/components/hero-button' import { HeroButton } from '@/components/hero-button'
@ -195,7 +196,7 @@ export function MarketplacePublicProjectDetail({
<p>Project "{projectIdentifier}" not found</p> <p>Project "{projectIdentifier}" not found</p>
) : ( ) : (
<div className='flex flex-col gap-4 w-full'> <div className='flex flex-col gap-4 w-full'>
<ProjectHeader project={project} /> <ProjectHeader project={project} tab={inferredTab} />
<Tabs <Tabs
value={inferredTab} value={inferredTab}
@ -446,7 +447,13 @@ export function MarketplacePublicProjectDetail({
) )
} }
function ProjectHeader({ project }: { project: Project }) { function ProjectHeader({
project,
tab
}: {
project: Project
tab?: MarketplacePublicProjectDetailTab
}) {
return ( return (
<div className='flex flex-col gap-2'> <div className='flex flex-col gap-2'>
<div className='w-full flex flex-row gap-2.5 items-center'> <div className='w-full flex flex-row gap-2.5 items-center'>
@ -464,10 +471,16 @@ function ProjectHeader({ project }: { project: Project }) {
{project.name} {project.name}
</h1> </h1>
<HeroButton heroVariant='orange' className='justify-self-end'> <HeroButton
<Link href={`/marketplace/projects/${project.identifier}/pricing`}> heroVariant='orange'
className='justify-self-end'
disabled={tab === 'pricing'}
>
<ActiveLink
href={`/marketplace/projects/${project.identifier}/pricing`}
>
Subscribe to {project.identifier} Subscribe to {project.identifier}
</Link> </ActiveLink>
</HeroButton> </HeroButton>
</div> </div>

Wyświetl plik

@ -18,7 +18,10 @@ export async function highlight({
theme?: string theme?: string
className?: string className?: string
}): Promise<JSX.Element> { }): Promise<JSX.Element> {
className = cn('w-full text-wrap p-2 md:p-4 text-sm rounded-sm', className) className = cn(
'w-full text-wrap p-2 md:p-4 text-sm rounded-sm overflow-x-auto',
className
)
const hast = await codeToHast(code, { const hast = await codeToHast(code, {
lang, lang,

Wyświetl plik

@ -324,9 +324,9 @@ const searchTool = await AgenticToolClient.fromIdentifier('${identifier}')
const exampleAgent = new Agent({ const exampleAgent = new Agent({
name: 'Example Agent', name: 'Example Agent',
model: openai('gpt-4o-mini') as any, model: openai('gpt-4o-mini'),
instructions: '${systemPrompt}', tools: createMastraTools(searchTool),
tools: createMastraTools(searchTool) instructions: '${systemPrompt}'
}) })
const res = await exampleAgent.generate( const res = await exampleAgent.generate(