mirror of
https://github.com/simstudioai/sim.git
synced 2026-09-22 05:19:54 +08:00
* fix(react-doctor): remove unused export types, useEffect clearTimeout missing, a11y fixes * fix(react-doctor): strip unused export types from contracts, copilot, stores, and components Remove export keyword from type/interface declarations confirmed to have zero importers across lib/api/contracts/tools/aws/, lib/api/contracts/*.ts, lib/copilot/generated/, stores/workflows/workflow/types.ts, ee/access-control, ee/data-retention, lib/logs/types.ts, and app/workspace component files. TypeScript and API validation both pass clean. Reduces unused-types count from 394 → 181 and fully eliminates the ✗ critical dead-code categories (exports, types, files now show as ⚠ warnings not ✗ errors). * docs improvements * fix(react-doctor): delete 50 unused files (dead barrels, unreachable components, stale utilities) Remove confirmed-unused barrel index.ts files across stores/, connectors/, executor/, lib/, and app/workspace/ that had zero importers. Also delete unreachable components (chat-history-skeleton, trace-spans, logs-list, template-profile, enterprise landing sections), stale utilities (buffered-stream, blob-to-data-url, queued-workflow-execution, compute-edit-sequence), and obsolete generated/contract files. TypeScript passes clean. * remove dead code * cleanup * more * fix(blog): restore DiffControlsDemo for v0-5 blog post * fix: restore ContactButton for enterprise blog post, export WIKIPEDIA_PAGE_CONTENT_OUTPUT_PROPERTIES * fix(react-doc): restore stripped exports and remove server-only dependency * chore(deps): update lockfile after removing server-only * added back some exports * docs * more * fix type issues * tc * fix docs search route Co-authored-by: Cursor <cursoragent@cursor.com> * fix(tag-dropdown): add missing isEqual import from es-toolkit --------- Co-authored-by: Cursor <cursoragent@cursor.com>
129 lines
3.1 KiB
TypeScript
129 lines
3.1 KiB
TypeScript
import { serializeJsonLd } from '@/lib/json-ld'
|
|
import { DOCS_BASE_URL } from '@/lib/urls'
|
|
|
|
interface StructuredDataProps {
|
|
title: string
|
|
description: string
|
|
url: string
|
|
lang: string
|
|
dateModified?: string
|
|
breadcrumb?: Array<{ name: string; url: string }>
|
|
}
|
|
|
|
export function StructuredData({
|
|
title,
|
|
description,
|
|
url,
|
|
lang,
|
|
dateModified,
|
|
breadcrumb,
|
|
}: StructuredDataProps) {
|
|
const baseUrl = DOCS_BASE_URL
|
|
|
|
const articleStructuredData = {
|
|
'@context': 'https://schema.org',
|
|
'@type': 'TechArticle',
|
|
headline: title,
|
|
description: description,
|
|
url: url,
|
|
...(dateModified && { datePublished: dateModified }),
|
|
...(dateModified && { dateModified }),
|
|
author: {
|
|
'@type': 'Organization',
|
|
name: 'Sim Team',
|
|
url: baseUrl,
|
|
},
|
|
publisher: {
|
|
'@type': 'Organization',
|
|
name: 'Sim',
|
|
url: baseUrl,
|
|
logo: {
|
|
'@type': 'ImageObject',
|
|
url: `${baseUrl}/static/logo.png`,
|
|
},
|
|
},
|
|
mainEntityOfPage: {
|
|
'@type': 'WebPage',
|
|
'@id': url,
|
|
},
|
|
inLanguage: lang,
|
|
isPartOf: {
|
|
'@type': 'WebSite',
|
|
name: 'Sim Documentation',
|
|
url: baseUrl,
|
|
},
|
|
potentialAction: {
|
|
'@type': 'ReadAction',
|
|
target: url,
|
|
},
|
|
}
|
|
|
|
const breadcrumbStructuredData = breadcrumb && {
|
|
'@context': 'https://schema.org',
|
|
'@type': 'BreadcrumbList',
|
|
itemListElement: breadcrumb.map((item, index) => ({
|
|
'@type': 'ListItem',
|
|
position: index + 1,
|
|
name: item.name,
|
|
item: item.url,
|
|
})),
|
|
}
|
|
|
|
const softwareStructuredData = {
|
|
'@context': 'https://schema.org',
|
|
'@type': 'SoftwareApplication',
|
|
name: 'Sim',
|
|
applicationCategory: 'BusinessApplication',
|
|
applicationSubCategory: 'AI Workspace',
|
|
operatingSystem: 'Any',
|
|
description:
|
|
'Sim is the open-source AI workspace where teams build, deploy, and manage AI agents. Connect 1,000+ integrations and every major LLM to create agents that automate real work.',
|
|
url: baseUrl,
|
|
author: {
|
|
'@type': 'Organization',
|
|
name: 'Sim Team',
|
|
},
|
|
offers: {
|
|
'@type': 'Offer',
|
|
category: 'Developer Tools',
|
|
},
|
|
featureList: [
|
|
'AI workspace for teams',
|
|
'Mothership — natural language agent creation',
|
|
'Visual workflow builder',
|
|
'1,000+ integrations',
|
|
'LLM orchestration (OpenAI, Anthropic, Google, xAI, Mistral, Perplexity)',
|
|
'Knowledge base creation',
|
|
'Table creation',
|
|
'Document creation',
|
|
],
|
|
}
|
|
|
|
return (
|
|
<>
|
|
<script
|
|
type='application/ld+json'
|
|
dangerouslySetInnerHTML={{
|
|
__html: serializeJsonLd(articleStructuredData),
|
|
}}
|
|
/>
|
|
{breadcrumbStructuredData && (
|
|
<script
|
|
type='application/ld+json'
|
|
dangerouslySetInnerHTML={{
|
|
__html: serializeJsonLd(breadcrumbStructuredData),
|
|
}}
|
|
/>
|
|
)}
|
|
{url === baseUrl && (
|
|
<script
|
|
type='application/ld+json'
|
|
dangerouslySetInnerHTML={{
|
|
__html: serializeJsonLd(softwareStructuredData),
|
|
}}
|
|
/>
|
|
)}
|
|
</>
|
|
)
|
|
}
|