diff --git a/bin/ailog-linux-x86_64.tar.gz b/bin/ailog-linux-x86_64.tar.gz index 0fe3a66..b3abecb 100644 Binary files a/bin/ailog-linux-x86_64.tar.gz and b/bin/ailog-linux-x86_64.tar.gz differ diff --git a/my-blog/static/index.html b/my-blog/static/index.html index d6aef90..dc3a9fe 100644 --- a/my-blog/static/index.html +++ b/my-blog/static/index.html @@ -1,3 +1,3 @@ - - \ No newline at end of file + + \ No newline at end of file diff --git a/my-blog/templates/oauth-assets.html b/my-blog/templates/oauth-assets.html index d6aef90..dc3a9fe 100644 --- a/my-blog/templates/oauth-assets.html +++ b/my-blog/templates/oauth-assets.html @@ -1,3 +1,3 @@ - - \ No newline at end of file + + \ No newline at end of file diff --git a/oauth/src/App.css b/oauth/src/App.css index 95bb533..d3c1954 100644 --- a/oauth/src/App.css +++ b/oauth/src/App.css @@ -499,9 +499,8 @@ } .comments-list { - border: 1px solid #ddd; border-radius: 8px; - padding: 20px; + padding: 0px; } .comments-header { @@ -860,28 +859,6 @@ background: #f6f8fa; } -/* AI Chat History */ -.ai-chat-list { - max-width: 100%; - border: 1px solid #ddd; - border-radius: 8px; - padding: 20px; -} - -.chat-item { - border: 1px solid #d1d9e0; - border-radius: 8px; - padding: 16px; - margin-bottom: 16px; - background: #ffffff; -} - -.chat-header { - display: flex; - justify-content: space-between; - align-items: center; - margin-bottom: 12px; -} .chat-actions { display: flex; diff --git a/oauth/src/App.tsx b/oauth/src/App.tsx index b81c161..256447c 100644 --- a/oauth/src/App.tsx +++ b/oauth/src/App.tsx @@ -259,8 +259,8 @@ function App() { if (appConfig.rkey) { // On post page: show only chats for this specific post filteredRecords = allChatRecords.filter(record => { - const recordPath = record.value.post?.url ? new URL(record.value.post.url).pathname : ''; - return recordPath === window.location.pathname; + const recordRkey = record.value.post?.url ? new URL(record.value.post.url).pathname.split('/').pop()?.replace(/\.html$/, '') : ''; + return recordRkey === appConfig.rkey; }); } else { // On top page: show latest 3 records from all pages @@ -302,13 +302,12 @@ function App() { const langData = await langResponse.json(); const langRecords = langData.records || []; - // Filter by current page path if on post page + // Filter by current page rkey if on post page const filteredLangRecords = appConfig.rkey ? langRecords.filter(record => { - // Compare path only, not full URL to support localhost vs production - const recordPath = record.value.post?.url ? new URL(record.value.post.url).pathname : - record.value.url ? new URL(record.value.url).pathname : ''; - return recordPath === window.location.pathname; + // Compare rkey only (last part of path) + const recordRkey = record.value.post?.url ? new URL(record.value.post.url).pathname.split('/').pop()?.replace(/\.html$/, '') : ''; + return recordRkey === appConfig.rkey; }) : langRecords.slice(0, 3); // Top page: latest 3 @@ -321,13 +320,12 @@ function App() { const commentData = await commentResponse.json(); const commentRecords = commentData.records || []; - // Filter by current page path if on post page + // Filter by current page rkey if on post page const filteredCommentRecords = appConfig.rkey ? commentRecords.filter(record => { - // Compare path only, not full URL to support localhost vs production - const recordPath = record.value.post?.url ? new URL(record.value.post.url).pathname : - record.value.url ? new URL(record.value.url).pathname : ''; - return recordPath === window.location.pathname; + // Compare rkey only (last part of path) + const recordRkey = record.value.post?.url ? new URL(record.value.post.url).pathname.split('/').pop()?.replace(/\.html$/, '') : ''; + return recordRkey === appConfig.rkey; }) : commentRecords.slice(0, 3); // Top page: latest 3 @@ -540,16 +538,14 @@ function App() { // ページpathでフィルタリング(指定された場合) - const filteredComments = pageUrl + const filteredComments = pageUrl && appConfig.rkey ? userComments.filter(record => { try { - // Compare path only, not full URL to support localhost vs production - const recordPath = record.value.url ? new URL(record.value.url).pathname : ''; - const currentPath = new URL(pageUrl).pathname; - return recordPath === currentPath; + // Compare rkey only (last part of path) + const recordRkey = record.value.url ? new URL(record.value.url).pathname.split('/').pop() : ''; + return recordRkey === appConfig.rkey; } catch (err) { - // Fallback to exact match if URL parsing fails - return record.value.url === pageUrl; + return false; } }) : userComments; @@ -1053,6 +1049,8 @@ function App() {