Skip to content

Commit fbbfe51

Browse files
author
test
committed
fix(public): trim empty llms sections
1 parent c65dfae commit fbbfe51

File tree

2 files changed

+8
-13
lines changed

2 files changed

+8
-13
lines changed

apps/sim/app/llms-full.txt/route.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,15 @@ import { getBaseUrl } from '@/lib/core/utils/urls'
66

77
export async function GET() {
88
const baseUrl = getBaseUrl()
9-
const websiteLink = isPublicLandingPageEnabled ? `- **Website**: ${baseUrl}` : ''
9+
const websiteLink = isPublicLandingPageEnabled ? `- **Website**: ${baseUrl}\n` : ''
1010
const gettingStartedSignUpLine = isPublicLandingPageEnabled
1111
? `1. **Sign Up**: Create a free account at ${baseUrl}`
1212
: '1. **Sign Up**: Create a free account'
1313
const legalLinks = [
1414
...(isPublicLegalPagesEnabled ? [`- **Terms of Service**: ${baseUrl}/terms`] : []),
1515
...(isPublicLegalPagesEnabled ? [`- **Privacy Policy**: ${baseUrl}/privacy`] : []),
1616
].join('\n')
17+
const legalSection = legalLinks ? `${legalLinks}\n` : ''
1718

1819
const llmsFullContent = `# Sim - AI Agent Workflow Builder
1920
@@ -156,8 +157,7 @@ ${gettingStartedSignUpLine}
156157
157158
## Links
158159
159-
${websiteLink}
160-
- **Documentation**: https://docs.sim.ai
160+
${websiteLink}- **Documentation**: https://docs.sim.ai
161161
- **API Reference**: https://docs.sim.ai/api
162162
- **GitHub**: https://github.com/simstudioai/sim
163163
- **Discord**: https://discord.gg/Hr4UWYEcTT
@@ -173,8 +173,7 @@ ${websiteLink}
173173
174174
## Legal
175175
176-
${legalLinks}
177-
- **Security**: ${baseUrl}/.well-known/security.txt
176+
${legalSection}- **Security**: ${baseUrl}/.well-known/security.txt
178177
`
179178

180179
return new Response(llmsFullContent, {

apps/sim/app/llms.txt/route.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,18 +40,16 @@ export async function GET() {
4040
: []),
4141
...(legalLinks ? [legalLinks] : []),
4242
].join('\n')
43+
const corePagesSection = corePages ? `## Core Pages\n\n${corePages}\n\n` : ''
44+
const optionalSection = optionalLinks ? `## Optional\n\n${optionalLinks}\n` : ''
4345

4446
const llmsContent = `# Sim
4547
4648
> Sim is an open-source AI agent workflow builder. 70,000+ developers at startups to Fortune 500 companies deploy agentic workflows on the Sim platform. SOC2 and HIPAA compliant.
4749
4850
Sim provides a visual drag-and-drop interface for building and deploying AI agent workflows. Connect to 100+ integrations and ship production-ready AI automations.
4951
50-
## Core Pages
51-
52-
${corePages}
53-
54-
## Documentation
52+
${corePagesSection}## Documentation
5553
5654
- [Documentation](https://docs.sim.ai): Complete guides and API reference
5755
- [Quickstart](https://docs.sim.ai/quickstart): Get started in 5 minutes
@@ -88,9 +86,7 @@ ${corePages}
8886
- [Discord Community](https://discord.gg/Hr4UWYEcTT): Get help and connect with users
8987
- [X/Twitter](https://x.com/simdotai): Product updates and announcements
9088
91-
## Optional
92-
93-
${optionalLinks}
89+
${optionalSection}
9490
`
9591

9692
return new Response(llmsContent, {

0 commit comments

Comments
 (0)