feat: update codex live chat workflow

This commit is contained in:
2026-04-22 20:00:38 +09:00
parent 9e4b70f1f1
commit b0b9980a6c
70 changed files with 5178 additions and 2401 deletions

View File

@@ -76,6 +76,10 @@ self.addEventListener('notificationclick', (event) => {
const notificationCategory = typeof notificationData.category === 'string' ? notificationData.category.trim() : '';
const notificationType = typeof notificationData.type === 'string' ? notificationData.type.trim() : '';
const notificationThreadId = typeof notificationData.threadId === 'string' ? notificationData.threadId.trim() : '';
const isChatNotification =
notificationCategory === 'chat' ||
notificationType.startsWith('chat') ||
notificationThreadId.startsWith('chat:');
event.notification.close();
let targetUrl;
@@ -98,6 +102,17 @@ self.addEventListener('notificationclick', (event) => {
targetUrl.searchParams.set('topMenu', notificationData.category === 'chat' ? 'chat' : 'plans');
}
if (isChatNotification) {
targetUrl.pathname = '/chat/live';
targetUrl.searchParams.set('topMenu', 'chat');
targetUrl.searchParams.delete('chatView');
targetUrl.searchParams.delete('runtimeRequestId');
if (notificationSessionId) {
targetUrl.searchParams.set('sessionId', notificationSessionId);
}
}
if (notificationData.planId && !targetUrl.searchParams.has('planId')) {
targetUrl.searchParams.set('planId', String(notificationData.planId));
}
@@ -109,11 +124,6 @@ self.addEventListener('notificationclick', (event) => {
event.waitUntil(
Promise.all([
self.registration.getNotifications().then((notifications) => {
const isChatNotification =
notificationCategory === 'chat' ||
notificationType.startsWith('chat') ||
notificationThreadId.startsWith('chat:');
if (!notificationSessionId || !isChatNotification) {
return;
}