From 90c696caf38019431e8a7ed3646a43bc5e2cf81f Mon Sep 17 00:00:00 2001 From: Till-JS <101404291+Till-JS@users.noreply.github.com> Date: Sat, 29 Nov 2025 15:20:24 +0100 Subject: [PATCH] fix(chat): add PATCH to CORS and use Gemini for title generation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add PATCH method to CORS allowed methods - Change title generation to use Gemini 2.5 Flash instead of GPT-5 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- apps/chat/apps/backend/src/main.ts | 2 +- .../chat/apps/web/src/lib/services/conversation.ts | 2 +- .../shared-ui/src/navigation/PillDropdown.svelte | 14 +++++++++++++- .../shared-ui/src/navigation/PillNavigation.svelte | 3 +++ packages/shared-ui/src/navigation/types.ts | 4 +++- 5 files changed, 21 insertions(+), 4 deletions(-) diff --git a/apps/chat/apps/backend/src/main.ts b/apps/chat/apps/backend/src/main.ts index 59972aaad..62f8919d1 100644 --- a/apps/chat/apps/backend/src/main.ts +++ b/apps/chat/apps/backend/src/main.ts @@ -16,7 +16,7 @@ async function bootstrap() { 'exp://localhost:8081', 'http://localhost:3001', // Mana Core Auth ], - methods: ['GET', 'POST', 'PUT', 'DELETE', 'OPTIONS'], + methods: ['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'OPTIONS'], credentials: true, }); diff --git a/apps/chat/apps/web/src/lib/services/conversation.ts b/apps/chat/apps/web/src/lib/services/conversation.ts index 842a282df..977089377 100644 --- a/apps/chat/apps/web/src/lib/services/conversation.ts +++ b/apps/chat/apps/web/src/lib/services/conversation.ts @@ -164,7 +164,7 @@ export const conversationService = { const response = await chatApi.createCompletion({ messages: [{ role: 'user', content: titlePrompt }], - modelId: '550e8400-e29b-41d4-a716-446655440004', // GPT-4o-Mini + modelId: '550e8400-e29b-41d4-a716-446655440101', // Gemini 2.5 Flash (default) temperature: 0.3, maxTokens: 50, }); diff --git a/packages/shared-ui/src/navigation/PillDropdown.svelte b/packages/shared-ui/src/navigation/PillDropdown.svelte index 59453726a..1bd8d1670 100644 --- a/packages/shared-ui/src/navigation/PillDropdown.svelte +++ b/packages/shared-ui/src/navigation/PillDropdown.svelte @@ -80,6 +80,8 @@ 'M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z', logout: 'M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1', + // App icons + grid: 'M4 5a1 1 0 011-1h4a1 1 0 011 1v4a1 1 0 01-1 1H5a1 1 0 01-1-1V5zM14 5a1 1 0 011-1h4a1 1 0 011 1v4a1 1 0 01-1 1h-4a1 1 0 01-1-1V5zM4 15a1 1 0 011-1h4a1 1 0 011 1v4a1 1 0 01-1 1H5a1 1 0 01-1-1v-4zM14 15a1 1 0 011-1h4a1 1 0 011 1v4a1 1 0 01-1 1h-4a1 1 0 01-1-1v-4z', }; function getIcon(iconName: string) { @@ -139,7 +141,9 @@ class:active-pill={item.active} style="animation-delay: {(header ? i + 1 : i) * 15}ms" > - {#if item.icon} + {#if item.imageUrl} + + {:else if item.icon} ({ id: app.id, label: app.name, + // Use image icon if available, otherwise use grid as fallback + imageUrl: app.icon, + icon: app.icon ? undefined : 'grid', onClick: () => { if (app.isCurrent) { // Navigate to home route for current app diff --git a/packages/shared-ui/src/navigation/types.ts b/packages/shared-ui/src/navigation/types.ts index 1afc53102..90fa37b96 100644 --- a/packages/shared-ui/src/navigation/types.ts +++ b/packages/shared-ui/src/navigation/types.ts @@ -27,8 +27,10 @@ export interface PillDropdownItem { id: string; /** Display label */ label: string; - /** Icon name */ + /** Icon name (SVG path) */ icon?: string; + /** Image URL for icon (data URL or regular URL) */ + imageUrl?: string; /** Click handler */ onClick: () => void; /** Whether item is disabled */