Skip to content

Commit aa98838

Browse files
authored
docs(agent-tars): make showcase public (#988)
1 parent c39deb9 commit aa98838

File tree

4 files changed

+24
-24
lines changed

4 files changed

+24
-24
lines changed

multimodal/websites/docs/docs/en/_meta.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
[
22
{
3-
"text": "guide",
3+
"text": "Guide",
44
"link": "/guide/get-started/introduction",
55
"activeMatch": "/guide/"
66
},
7+
{
8+
"text": "Showcase",
9+
"link": "/showcase",
10+
"activeMatch": "/showcase"
11+
},
712
{
813
"text": "Blog",
914
"link": "/blog/2025-06-25-introducing-agent-tars-beta.html"

multimodal/websites/docs/docs/zh/_meta.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44
"link": "/guide/get-started/introduction",
55
"activeMatch": "/guide/"
66
},
7+
{
8+
"text": "Showcase",
9+
"link": "/showcase",
10+
"activeMatch": "/showcase"
11+
},
712
{
813
"text": "Blog",
914
"link": "/blog/2025-06-25-introducing-agent-tars-beta.html"

multimodal/websites/docs/src/components/Showcase/index.tsx

Lines changed: 9 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const NotFoundPage: React.FC = () => {
1919
// Set meta for 404 page
2020
usePageMeta({
2121
title: generatePageTitle('Page Not Found'),
22-
description: 'The page you\'re looking for doesn\'t exist or has been moved.',
22+
description: "The page you're looking for doesn't exist or has been moved.",
2323
});
2424

2525
return (
@@ -56,10 +56,6 @@ export const Showcase: React.FC = () => {
5656
const pathInfo = extractIdFromPath(location.pathname);
5757
const isDetailPage = !!pathInfo;
5858

59-
// Check access permission for the index page
60-
const searchParams = new URLSearchParams(location.search);
61-
const hasAccess = searchParams.get('enableShowcaseIndex') === '1';
62-
6359
// Always call hooks in the same order - move useShowcaseData before conditional returns
6460
const hookParams = pathInfo
6561
? pathInfo.type === 'sessionId'
@@ -72,20 +68,14 @@ export const Showcase: React.FC = () => {
7268
// Set base meta tags for showcase
7369
usePageMeta({
7470
title: generatePageTitle('Showcase'),
75-
description: 'Explore Agent TARS showcase demos and replays. Discover real-world examples of multimodal AI agent capabilities in action.',
71+
description:
72+
'Explore Agent TARS showcase demos and replays. Discover real-world examples of multimodal AI agent capabilities in action.',
7673
});
7774

7875
if (isInSSR()) {
7976
return null;
8077
}
8178

82-
// Now we can do conditional rendering after all hooks are called
83-
// For detail pages, we don't need access control
84-
// For index page, we need to check access permission
85-
if (!isDetailPage && !hasAccess) {
86-
return <NotFoundPage />;
87-
}
88-
8979
if (isDetailPage) {
9080
return (
9181
<ShowcaseDetailPage
@@ -143,9 +133,9 @@ const ShowcaseListPage: React.FC<ShowcaseListPageProps> = ({
143133
const categoryName = activeCategory.charAt(0).toUpperCase() + activeCategory.slice(1);
144134
const title = generatePageTitle(`${categoryName} Showcase`);
145135
const description = optimizeDescription(
146-
`Explore ${categoryName} demos and examples with Agent TARS. See real-world applications of multimodal AI in ${activeCategory}.`
136+
`Explore ${categoryName} demos and examples with Agent TARS. See real-world applications of multimodal AI in ${activeCategory}.`,
147137
);
148-
138+
149139
if (typeof document !== 'undefined') {
150140
document.title = title;
151141
const metaDesc = document.querySelector('meta[name="description"]');
@@ -283,20 +273,20 @@ const ShowcaseDetailPage: React.FC<ShowcaseDetailPageProps> = ({
283273
const item = items[0];
284274
const title = generatePageTitle(item.title);
285275
const description = optimizeDescription(
286-
`${item.description} - Explore this ${item.category} demonstration showcasing Agent TARS capabilities.`
276+
`${item.description} - Explore this ${item.category} demonstration showcasing Agent TARS capabilities.`,
287277
);
288-
278+
289279
// Update meta tags dynamically
290280
if (typeof document !== 'undefined') {
291281
document.title = title;
292-
282+
293283
const setMetaContent = (selector: string, content: string) => {
294284
const meta = document.querySelector(selector);
295285
if (meta) {
296286
meta.setAttribute('content', content);
297287
}
298288
};
299-
289+
300290
setMetaContent('meta[name="description"]', description);
301291
setMetaContent('meta[property="og:title"]', title);
302292
setMetaContent('meta[property="og:description"]', description);

multimodal/websites/docs/src/services/dataProcessor.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,18 +116,18 @@ function extractTwitterUsername(url: string): string {
116116
*/
117117
function ensureHttps(url: string): string {
118118
if (!url) return url;
119-
119+
120120
if (url.startsWith('http://') || url.startsWith('https://')) {
121121
if (url.startsWith('http://')) {
122122
return url.replace('http://', 'https://');
123123
}
124124
return url;
125125
}
126-
126+
127127
if (url.startsWith('//')) {
128128
return `https:${url}`;
129129
}
130-
130+
131131
return `https://${url}`;
132132
}
133133

@@ -144,7 +144,7 @@ function transformApiItemToShowcase(apiItem: ApiShareItem): ShowcaseItem {
144144

145145
const categoryTag = tags.find((tag) => categories.some((cat) => cat.id === tag.toLowerCase()));
146146
const category = categoryTag ? (categoryTag.toLowerCase() as CategoryType) : DEFAULT_CATEGORY;
147-
const secureUrl = ensureHttps(apiItem.url) + '?logo=agent-tars';
147+
const secureUrl = ensureHttps(apiItem.url) + '?logo=agent-tars&replay=1';
148148

149149
const languages = apiItem.languages
150150
? apiItem.languages

0 commit comments

Comments
 (0)