From 67592f3f45ccd863d704bde1b60826a451b6fbd3 Mon Sep 17 00:00:00 2001 From: Faisal Amir Date: Thu, 19 Jun 2025 23:08:45 +0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9Bfix:=20avoid=20render=20html=20titl?= =?UTF-8?q?e=20thread=20(#5375)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 🐛fix: avoid render html title thread * chore: minor bump - tokenjs for manual adding models --------- Co-authored-by: Louis --- web-app/package.json | 2 +- web-app/src/containers/DropdownModelProvider.tsx | 11 +++-------- web-app/src/containers/ThreadList.tsx | 4 +--- web-app/src/hooks/useThreads.ts | 8 +++----- 4 files changed, 8 insertions(+), 17 deletions(-) diff --git a/web-app/package.json b/web-app/package.json index ad82e5688..8b3193817 100644 --- a/web-app/package.json +++ b/web-app/package.json @@ -65,7 +65,7 @@ "remark-math": "^6.0.0", "sonner": "^2.0.3", "tailwindcss": "^4.1.4", - "token.js": "npm:token.js-fork@0.7.5", + "token.js": "npm:token.js-fork@0.7.9", "tw-animate-css": "^1.2.7", "ulidx": "^2.4.1", "unified": "^11.0.5", diff --git a/web-app/src/containers/DropdownModelProvider.tsx b/web-app/src/containers/DropdownModelProvider.tsx index 5b125282a..0747a1ad1 100644 --- a/web-app/src/containers/DropdownModelProvider.tsx +++ b/web-app/src/containers/DropdownModelProvider.tsx @@ -391,14 +391,9 @@ const DropdownModelProvider = ({ )} >
- + + {searchableModel.model.id} +
{!isProd && capabilities.length > 0 && ( diff --git a/web-app/src/containers/ThreadList.tsx b/web-app/src/containers/ThreadList.tsx index 0702c1bf9..9e3df65c1 100644 --- a/web-app/src/containers/ThreadList.tsx +++ b/web-app/src/containers/ThreadList.tsx @@ -101,9 +101,7 @@ const SortableItem = memo(({ thread }: { thread: Thread }) => { )} >
- + {thread.title || 'New Thread'}
currentThreadId?: string @@ -68,12 +68,10 @@ export const useThreads = create()((set, get) => ({ return fzfResults.map( (result: { item: Thread; positions: Set }) => { const thread = result.item // Fzf stores the original item here - // Ensure result.positions is an array, default to empty if undefined - const positions = Array.from(result.positions) || [] - const highlightedTitle = highlightFzfMatch(thread.title, positions) + return { ...thread, - title: highlightedTitle, // Override title with highlighted version + title: thread.title, // Override title with highlighted version } } )