diff --git a/oauth/src/components/RecordTabs.jsx b/oauth/src/components/RecordTabs.jsx
index 72e9f9b..fbdb442 100644
--- a/oauth/src/components/RecordTabs.jsx
+++ b/oauth/src/components/RecordTabs.jsx
@@ -6,7 +6,20 @@ import LoadingSkeleton from './LoadingSkeleton.jsx'
import { logger } from '../utils/logger.js'
export default function RecordTabs({ langRecords, commentRecords, userComments, chatRecords, chatHasMore, onLoadMoreChat, userChatRecords, userChatLoading, baseRecords, apiConfig, pageContext, user = null, agent = null, onRecordDeleted = null }) {
- const [activeTab, setActiveTab] = useState('profiles')
+ // Check if current page has matching chat records (AI posts always have chat records)
+ const isAiPost = !pageContext.isTopPage && Array.isArray(chatRecords) && chatRecords.some(chatPair => {
+ const recordUrl = chatPair.question?.value?.post?.url
+ if (!recordUrl) return false
+
+ try {
+ const recordRkey = new URL(recordUrl).pathname.split('/').pop()?.replace(/\.html$/, '')
+ return recordRkey === pageContext.rkey
+ } catch {
+ return false
+ }
+ })
+
+ const [activeTab, setActiveTab] = useState(isAiPost ? 'collection' : 'profiles')
// Monitor activeTab changes
useEffect(() => {
@@ -145,6 +158,7 @@ export default function RecordTabs({ langRecords, commentRecords, userComments,
return (
+ {!isAiPost && (
+ )}
- {activeTab === 'lang' && (
+ {activeTab === 'lang' && !isAiPost && (
!langRecords ? (
) : (
@@ -203,7 +218,7 @@ export default function RecordTabs({ langRecords, commentRecords, userComments,
/>
)
)}
- {activeTab === 'comment' && (
+ {activeTab === 'comment' && !isAiPost && (
!commentRecords ? (
) : (
@@ -233,7 +248,7 @@ export default function RecordTabs({ langRecords, commentRecords, userComments,
/>
)
)}
- {activeTab === 'users' && (
+ {activeTab === 'users' && !isAiPost && (
!userComments ? (
) : (
@@ -248,7 +263,7 @@ export default function RecordTabs({ langRecords, commentRecords, userComments,
/>
)
)}
- {activeTab === 'profiles' && (
+ {activeTab === 'profiles' && !isAiPost && (
!baseRecords ? (
) : (
diff --git a/src/commands/interactive.rs b/src/commands/interactive.rs
index f2f320d..5167ba3 100644
--- a/src/commands/interactive.rs
+++ b/src/commands/interactive.rs
@@ -523,7 +523,8 @@ async fn post_to_atproto(
"slug": "",
"tags": [],
"title": title,
- "language": "ja"
+ "language": "ja",
+ "type": "ai"
},
"text": pair.question,
"type": "question",
@@ -548,7 +549,8 @@ async fn post_to_atproto(
"slug": "",
"tags": [],
"title": title,
- "language": "ja"
+ "language": "ja",
+ "type": "ai"
},
"text": pair.answer,
"type": "answer",