kopia lustrzana https://github.com/transitive-bullshit/chatgpt-api
pull/718/head
rodzic
a7e8294315
commit
4faadbf166
|
@ -8,6 +8,7 @@ import { useRouter, useSearchParams } from 'next/navigation'
|
|||
import plur from 'plur'
|
||||
import { useCallback, useEffect, useMemo, useRef, useState } from 'react'
|
||||
|
||||
import { ActiveLink } from '@/components/active-link'
|
||||
import { useAgentic } from '@/components/agentic-provider'
|
||||
import { ExampleUsage } from '@/components/example-usage'
|
||||
import { HeroButton } from '@/components/hero-button'
|
||||
|
@ -195,7 +196,7 @@ export function MarketplacePublicProjectDetail({
|
|||
<p>Project "{projectIdentifier}" not found</p>
|
||||
) : (
|
||||
<div className='flex flex-col gap-4 w-full'>
|
||||
<ProjectHeader project={project} />
|
||||
<ProjectHeader project={project} tab={inferredTab} />
|
||||
|
||||
<Tabs
|
||||
value={inferredTab}
|
||||
|
@ -446,7 +447,13 @@ export function MarketplacePublicProjectDetail({
|
|||
)
|
||||
}
|
||||
|
||||
function ProjectHeader({ project }: { project: Project }) {
|
||||
function ProjectHeader({
|
||||
project,
|
||||
tab
|
||||
}: {
|
||||
project: Project
|
||||
tab?: MarketplacePublicProjectDetailTab
|
||||
}) {
|
||||
return (
|
||||
<div className='flex flex-col gap-2'>
|
||||
<div className='w-full flex flex-row gap-2.5 items-center'>
|
||||
|
@ -464,10 +471,16 @@ function ProjectHeader({ project }: { project: Project }) {
|
|||
{project.name}
|
||||
</h1>
|
||||
|
||||
<HeroButton heroVariant='orange' className='justify-self-end'>
|
||||
<Link href={`/marketplace/projects/${project.identifier}/pricing`}>
|
||||
<HeroButton
|
||||
heroVariant='orange'
|
||||
className='justify-self-end'
|
||||
disabled={tab === 'pricing'}
|
||||
>
|
||||
<ActiveLink
|
||||
href={`/marketplace/projects/${project.identifier}/pricing`}
|
||||
>
|
||||
Subscribe to {project.identifier}
|
||||
</Link>
|
||||
</ActiveLink>
|
||||
</HeroButton>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -18,7 +18,10 @@ export async function highlight({
|
|||
theme?: string
|
||||
className?: string
|
||||
}): 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, {
|
||||
lang,
|
||||
|
|
|
@ -324,9 +324,9 @@ const searchTool = await AgenticToolClient.fromIdentifier('${identifier}')
|
|||
|
||||
const exampleAgent = new Agent({
|
||||
name: 'Example Agent',
|
||||
model: openai('gpt-4o-mini') as any,
|
||||
instructions: '${systemPrompt}',
|
||||
tools: createMastraTools(searchTool)
|
||||
model: openai('gpt-4o-mini'),
|
||||
tools: createMastraTools(searchTool),
|
||||
instructions: '${systemPrompt}'
|
||||
})
|
||||
|
||||
const res = await exampleAgent.generate(
|
||||
|
|
Ładowanie…
Reference in New Issue