fix config

This commit is contained in:
2026-01-20 20:03:36 +09:00
parent 49f4b71866
commit cc11fb8d3f
7 changed files with 77 additions and 42 deletions

View File

@@ -171,10 +171,11 @@ export function renderChatThread(
botHandle: string,
userProfile?: Profile | null,
botProfile?: Profile | null,
pds?: string
pds?: string,
chatCollection: string = 'ai.syui.log.chat'
): string {
// Find root message
const rootUri = `at://${userDid}/ai.syui.log.chat/${rootRkey}`
const rootUri = `at://${userDid}/${chatCollection}/${rootRkey}`
const rootMsg = messages.find(m => m.uri === rootUri)
if (!rootMsg) {
@@ -222,7 +223,7 @@ export function renderChatThread(
const displayContent = getTranslatedContent(msg)
const content = renderMarkdown(displayContent)
const recordLink = `/@${author.handle}/at/collection/ai.syui.log.chat/${rkey}`
const recordLink = `/@${author.handle}/at/collection/${chatCollection}/${rkey}`
return `
<article class="chat-message">
@@ -268,8 +269,9 @@ export function renderChatThreadPage(
botHandle: string,
userProfile?: Profile | null,
botProfile?: Profile | null,
pds?: string
pds?: string,
chatCollection: string = 'ai.syui.log.chat'
): string {
const thread = renderChatThread(messages, rootRkey, userDid, userHandle, botDid, botHandle, userProfile, botProfile, pds)
const thread = renderChatThread(messages, rootRkey, userDid, userHandle, botDid, botHandle, userProfile, botProfile, pds, chatCollection)
return `<div class="chat-container">${thread}</div>`
}

View File

@@ -1,11 +1,12 @@
export function renderFooter(handle: string): string {
export function renderFooter(handle: string, repoUrl?: string): string {
// Extract username from handle: {username}.{name}.{domain} -> username
const username = handle.split('.')[0] || handle
const repo = repoUrl || '#'
return `
<footer id="footer" class="footer">
<div class="license">
<a href="https://git.syui.ai/ai/log" target="_blank" rel="noopener">
<a href="${repo}" target="_blank" rel="noopener">
<img src="/ai.svg" alt="ai" class="license-icon">
</a>
</div>