From 36c2024cb3de185b3c6f11c3a20089bec3c0c68a Mon Sep 17 00:00:00 2001 From: Sam Hoang Van Date: Fri, 4 Jul 2025 09:43:45 +0700 Subject: [PATCH 01/14] fix: update base URL for Anthropic provider (#5600) --- web-app/package.json | 4 ++-- web-app/src/mock/data.ts | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/web-app/package.json b/web-app/package.json index 171966560..d961c80e6 100644 --- a/web-app/package.json +++ b/web-app/package.json @@ -66,7 +66,7 @@ "remark-math": "^6.0.0", "sonner": "^2.0.3", "tailwindcss": "^4.1.4", - "token.js": "npm:token.js-fork@0.7.12", + "token.js": "npm:token.js-fork@0.7.13", "tw-animate-css": "^1.2.7", "ulidx": "^2.4.1", "unified": "^11.0.5", @@ -94,4 +94,4 @@ "vite-plugin-node-polyfills": "^0.23.0", "vitest": "^3.1.3" } -} +} \ No newline at end of file diff --git a/web-app/src/mock/data.ts b/web-app/src/mock/data.ts index 128ec38da..3610eab97 100644 --- a/web-app/src/mock/data.ts +++ b/web-app/src/mock/data.ts @@ -62,7 +62,7 @@ export const predefinedProviders = [ { active: true, api_key: '', - base_url: 'https://api.anthropic.com/v1', + base_url: 'https://api.anthropic.com', provider: 'anthropic', explore_models_url: 'https://docs.anthropic.com/en/docs/about-claude/models', @@ -87,8 +87,8 @@ export const predefinedProviders = [ 'The base endpoint to use. See the [Anthropic API documentation](https://docs.anthropic.com/en/api/messages) for more information.', controller_type: 'input', controller_props: { - placeholder: 'https://api.anthropic.com/v1', - value: 'https://api.anthropic.com/v1', + placeholder: 'https://api.anthropic.com', + value: 'https://api.anthropic.com', }, }, ], From 1422d94faced3d81113b0511af324c72fa77979c Mon Sep 17 00:00:00 2001 From: Faisal Amir Date: Mon, 7 Jul 2025 11:14:43 +0700 Subject: [PATCH 02/14] =?UTF-8?q?=F0=9F=90=9Bfix:=20make=20three=20dots=20?= =?UTF-8?q?default=20show=203=20dots=20and=20can=20trigger=20with=20right?= =?UTF-8?q?=20click=20=20(#5712)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 🐛fix: default show 3 dots * ✨enhancement: enable resizable left panel (#5713) * ✨enhancement: enable resizable left panel * Update web-app/src/hooks/useLeftPanel.ts Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com> --------- Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com> --------- Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com> --- web-app/package.json | 1 + web-app/src/components/ui/resizable.tsx | 54 +++++++++++ web-app/src/containers/DownloadManegement.tsx | 31 +++++-- web-app/src/containers/LeftPanel.tsx | 27 +++++- web-app/src/containers/ThreadList.tsx | 9 +- web-app/src/hooks/useLeftPanel.ts | 4 + web-app/src/routes/__root.tsx | 93 ++++++++++++++++--- 7 files changed, 191 insertions(+), 28 deletions(-) create mode 100644 web-app/src/components/ui/resizable.tsx diff --git a/web-app/package.json b/web-app/package.json index 4874b310c..b56f09a0d 100644 --- a/web-app/package.json +++ b/web-app/package.json @@ -56,6 +56,7 @@ "react-i18next": "^15.5.1", "react-joyride": "^2.9.3", "react-markdown": "^10.1.0", + "react-resizable-panels": "^3.0.3", "react-syntax-highlighter": "^15.6.1", "react-syntax-highlighter-virtualized-renderer": "^1.1.0", "react-textarea-autosize": "^8.5.9", diff --git a/web-app/src/components/ui/resizable.tsx b/web-app/src/components/ui/resizable.tsx new file mode 100644 index 000000000..a3d586cf1 --- /dev/null +++ b/web-app/src/components/ui/resizable.tsx @@ -0,0 +1,54 @@ +import * as React from 'react' +import { GripVerticalIcon } from 'lucide-react' +import * as ResizablePrimitive from 'react-resizable-panels' + +import { cn } from '@/lib/utils' + +function ResizablePanelGroup({ + className, + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function ResizablePanel({ + ...props +}: React.ComponentProps) { + return +} + +function ResizableHandle({ + withHandle, + className, + ...props +}: React.ComponentProps & { + withHandle?: boolean +}) { + return ( + div]:rotate-90', + className + )} + {...props} + > + {withHandle && ( +
+ +
+ )} +
+ ) +} + +export { ResizablePanelGroup, ResizablePanel, ResizableHandle } diff --git a/web-app/src/containers/DownloadManegement.tsx b/web-app/src/containers/DownloadManegement.tsx index 4659f668d..be9e9e0e9 100644 --- a/web-app/src/containers/DownloadManegement.tsx +++ b/web-app/src/containers/DownloadManegement.tsx @@ -182,7 +182,9 @@ export function DownloadManagement() { getProviders().then(setProviders) toast.success(t('common:toast.downloadComplete.title'), { id: 'download-complete', - description: t('common:toast.downloadComplete.description', { modelId: state.modelId }), + description: t('common:toast.downloadComplete.description', { + modelId: state.modelId, + }), }) }, [removeDownload, removeLocalDownloadingModel, setProviders, t] @@ -237,10 +239,14 @@ export function DownloadManagement() { {isLeftPanelOpen ? (
-
- {downloadCount} +
+ {t('downloads')} + +
+ {downloadCount} +
+
-

{t('downloads')}

@@ -272,7 +278,9 @@ export function DownloadManagement() { >
-

{t('downloading')}

+

+ {t('downloading')} +

{appUpdateState.isDownloading && ( @@ -309,10 +317,15 @@ export function DownloadManagement() { title="Cancel download" onClick={() => { abortDownload(download.name).then(() => { - toast.info(t('common:toast.downloadCancelled.title'), { - id: 'cancel-download', - description: t('common:toast.downloadCancelled.description'), - }) + toast.info( + t('common:toast.downloadCancelled.title'), + { + id: 'cancel-download', + description: t( + 'common:toast.downloadCancelled.description' + ), + } + ) if (downloadProcesses.length === 0) { setIsPopoverOpen(false) } diff --git a/web-app/src/containers/LeftPanel.tsx b/web-app/src/containers/LeftPanel.tsx index 748cb529f..fe07a71e5 100644 --- a/web-app/src/containers/LeftPanel.tsx +++ b/web-app/src/containers/LeftPanel.tsx @@ -79,6 +79,9 @@ const LeftPanel = () => { const searchContainerRef = useRef(null) const searchContainerMacRef = useRef(null) + // Determine if we're in a resizable context (large screen with panel open) + const isResizableContext = !isSmallScreen && open + // Use click outside hook for panel with debugging useClickOutside( () => { @@ -189,9 +192,17 @@ const LeftPanel = () => {