kopia lustrzana https://github.com/transitive-bullshit/chatgpt-api
feat(web): minor ui fixes
rodzic
33742ba47f
commit
c7df46b0a7
|
@ -30,7 +30,6 @@ import { defaultAgenticApiClient } from '@/lib/default-agentic-api-client'
|
||||||
import { toast, toastError } from '@/lib/notifications'
|
import { toast, toastError } from '@/lib/notifications'
|
||||||
import { useQuery } from '@/lib/query-client'
|
import { useQuery } from '@/lib/query-client'
|
||||||
|
|
||||||
// import { MarketplacePublicProjectDetailNav } from './marketplace-nav'
|
|
||||||
import {
|
import {
|
||||||
type MarketplacePublicProjectDetailTab,
|
type MarketplacePublicProjectDetailTab,
|
||||||
marketplacePublicProjectDetailTabsSet,
|
marketplacePublicProjectDetailTabsSet,
|
||||||
|
@ -98,7 +97,7 @@ export function MarketplacePublicProjectDetail({
|
||||||
if (!ctx.isAuthenticated) {
|
if (!ctx.isAuthenticated) {
|
||||||
return router.push(
|
return router.push(
|
||||||
`/signup?${sanitizeSearchParams({
|
`/signup?${sanitizeSearchParams({
|
||||||
next: `/marketplace/projects/${projectIdentifier}?checkout=true&plan=${pricingPlanSlug}`
|
next: `/marketplace/projects/${projectIdentifier}?tab=pricing&checkout=true&plan=${pricingPlanSlug}`
|
||||||
}).toString()}`
|
}).toString()}`
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -200,6 +199,23 @@ export function MarketplacePublicProjectDetail({
|
||||||
return undefined
|
return undefined
|
||||||
}, [deployment])
|
}, [deployment])
|
||||||
|
|
||||||
|
const tools = useMemo(() => {
|
||||||
|
if (!deployment) return []
|
||||||
|
const toolConfigsMap = new Map(
|
||||||
|
deployment.toolConfigs.map((toolConfig) => [toolConfig.name, toolConfig])
|
||||||
|
)
|
||||||
|
|
||||||
|
return deployment.tools
|
||||||
|
.map((tool) => {
|
||||||
|
const toolConfig = toolConfigsMap.get(tool.name)
|
||||||
|
if (toolConfig?.enabled === false) return null
|
||||||
|
|
||||||
|
// TODO: add to tool if disabled on current pricing plan
|
||||||
|
return tool
|
||||||
|
})
|
||||||
|
.filter(Boolean)
|
||||||
|
}, [deployment])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<PageContainer compact>
|
<PageContainer compact>
|
||||||
<section>
|
<section>
|
||||||
|
@ -298,8 +314,7 @@ export function MarketplacePublicProjectDetail({
|
||||||
</li>
|
</li>
|
||||||
))}
|
))}
|
||||||
|
|
||||||
{deployment.tools.length >
|
{tools.length > MAX_TOOLS_TO_SHOW && (
|
||||||
MAX_TOOLS_TO_SHOW && (
|
|
||||||
<li>
|
<li>
|
||||||
<Button
|
<Button
|
||||||
asChild
|
asChild
|
||||||
|
@ -363,7 +378,7 @@ export function MarketplacePublicProjectDetail({
|
||||||
|
|
||||||
{deployment && (
|
{deployment && (
|
||||||
<ul className='flex flex-col gap-4'>
|
<ul className='flex flex-col gap-4'>
|
||||||
{deployment.tools.map((tool) => (
|
{tools.map((tool) => (
|
||||||
<li
|
<li
|
||||||
key={tool.name}
|
key={tool.name}
|
||||||
className='p-4 border rounded-sm w-full flex flex-col gap-4'
|
className='p-4 border rounded-sm w-full flex flex-col gap-4'
|
||||||
|
|
|
@ -22,5 +22,19 @@ export default defineConfig({
|
||||||
readme:
|
readme:
|
||||||
'https://raw.githubusercontent.com/github/github-mcp-server/refs/heads/main/README.md',
|
'https://raw.githubusercontent.com/github/github-mcp-server/refs/heads/main/README.md',
|
||||||
sourceUrl: 'https://github.com/github/github-mcp-server',
|
sourceUrl: 'https://github.com/github/github-mcp-server',
|
||||||
homepageUrl: 'https://github.com'
|
homepageUrl: 'https://github.com',
|
||||||
|
toolConfigs: [
|
||||||
|
{
|
||||||
|
name: 'get_me',
|
||||||
|
examples: [
|
||||||
|
{
|
||||||
|
featured: true,
|
||||||
|
prompt: 'Get my github user information',
|
||||||
|
args: {
|
||||||
|
reason: 'github hack night!'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
})
|
})
|
||||||
|
|
Ładowanie…
Reference in New Issue