From aa4fb9dd51c08333c240ad8defe648611e84cd70 Mon Sep 17 00:00:00 2001 From: LeaderOnePro Date: Tue, 3 Jun 2025 12:21:31 +0800 Subject: [PATCH 01/15] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20Vite=20=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=EF=BC=8C=E4=BF=AE=E6=AD=A3=E8=B7=AF=E5=BE=84=E8=A7=A3?= =?UTF-8?q?=E6=9E=90=E4=BB=A5=E6=94=AF=E6=8C=81=E6=96=87=E4=BB=B6=20URL?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/vite.config.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/vite.config.ts b/frontend/vite.config.ts index b5490299..521bd2aa 100644 --- a/frontend/vite.config.ts +++ b/frontend/vite.config.ts @@ -1,4 +1,5 @@ import path from "node:path"; +import { fileURLToPath } from "node:url"; import { defineConfig } from "vite"; import react from "@vitejs/plugin-react-swc"; import tailwindcss from "@tailwindcss/vite"; @@ -9,7 +10,7 @@ export default defineConfig({ base: "/app/", resolve: { alias: { - "@": path.resolve(new URL(".", import.meta.url).pathname, "./src"), + "@": path.resolve(path.dirname(fileURLToPath(import.meta.url)), "src"), }, }, server: { From e5386031c5ff49dfcf5f8ab1e37c5a91b52d7f8b Mon Sep 17 00:00:00 2001 From: CharlesCNorton <135471798+CharlesCNorton@users.noreply.github.com> Date: Tue, 3 Jun 2025 11:14:13 -0400 Subject: [PATCH 02/15] Update README.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Remove redundant phrasing “development during development” * Add missing auxiliary verb in sentence about updating `apiUrl` * Insert missing preposition in same `apiUrl` sentence (“file to your host”) --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 275a8d8c..f1143da0 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ This project demonstrates a fullstack application using a React frontend and a L - 🌐 Integrated web research via Google Search API. - 🤔 Reflective reasoning to identify knowledge gaps and refine searches. - 📄 Generates answers with citations from gathered sources. -- 🔄 Hot-reloading for both frontend and backend development during development. +- 🔄 Hot-reloading for both frontend and backend during development. ## Project Structure @@ -79,7 +79,7 @@ In production, the backend server serves the optimized static frontend build. La _Note: For the docker-compose.yml example you need a LangSmith API key, you can get one from [LangSmith](https://smith.langchain.com/settings)._ -_Note: If you are not running the docker-compose.yml example or exposing the backend server to the public internet, you update the `apiUrl` in the `frontend/src/App.tsx` file your host. Currently the `apiUrl` is set to `http://localhost:8123` for docker-compose or `http://localhost:2024` for development._ +_Note: If you are not running the docker-compose.yml example or exposing the backend server to the public internet, you should update the `apiUrl` in the `frontend/src/App.tsx` file to your host. Currently the `apiUrl` is set to `http://localhost:8123` for docker-compose or `http://localhost:2024` for development._ **1. Build the Docker Image:** @@ -105,4 +105,4 @@ Open your browser and navigate to `http://localhost:8123/app/` to see the applic ## License -This project is licensed under the Apache License 2.0. See the [LICENSE](LICENSE) file for details. \ No newline at end of file +This project is licensed under the Apache License 2.0. See the [LICENSE](LICENSE) file for details. From c429cb2e0c6d8e0f79fc34199bed129d327103da Mon Sep 17 00:00:00 2001 From: LeaderOnePro Date: Wed, 4 Jun 2025 13:24:29 +0800 Subject: [PATCH 03/15] Update the Vite configuration to correct the path resolution to use __dirname --- frontend/vite.config.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/frontend/vite.config.ts b/frontend/vite.config.ts index 521bd2aa..8abaa377 100644 --- a/frontend/vite.config.ts +++ b/frontend/vite.config.ts @@ -1,5 +1,4 @@ import path from "node:path"; -import { fileURLToPath } from "node:url"; import { defineConfig } from "vite"; import react from "@vitejs/plugin-react-swc"; import tailwindcss from "@tailwindcss/vite"; @@ -10,7 +9,7 @@ export default defineConfig({ base: "/app/", resolve: { alias: { - "@": path.resolve(path.dirname(fileURLToPath(import.meta.url)), "src"), + "@": path.resolve(__dirname, "./src"), }, }, server: { From 418c72991a7d47c6d6007dbacb8c40bf89db619f Mon Sep 17 00:00:00 2001 From: tranminhquang Date: Wed, 4 Jun 2025 14:51:34 +0700 Subject: [PATCH 04/15] Refactor layout and scrolling for chat and welcome screens --- frontend/src/App.tsx | 8 +------- frontend/src/components/ChatMessagesView.tsx | 2 +- frontend/src/components/WelcomeScreen.tsx | 2 +- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 6e68e50b..52d33135 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -154,12 +154,7 @@ export default function App() { return (
-
-
+
{thread.messages.length === 0 ? ( )} -
); diff --git a/frontend/src/components/ChatMessagesView.tsx b/frontend/src/components/ChatMessagesView.tsx index 1792e6f7..8b90a900 100644 --- a/frontend/src/components/ChatMessagesView.tsx +++ b/frontend/src/components/ChatMessagesView.tsx @@ -253,7 +253,7 @@ export function ChatMessagesView({ return (
- +
{messages.map((message, index) => { const isLast = index === messages.length - 1; diff --git a/frontend/src/components/WelcomeScreen.tsx b/frontend/src/components/WelcomeScreen.tsx index 8c0a2fa1..b1015aa8 100644 --- a/frontend/src/components/WelcomeScreen.tsx +++ b/frontend/src/components/WelcomeScreen.tsx @@ -15,7 +15,7 @@ export const WelcomeScreen: React.FC = ({ onCancel, isLoading, }) => ( -
+

Welcome. From b0dd02b92e107267e54034bc65dfb03266da5d31 Mon Sep 17 00:00:00 2001 From: kahirokunn Date: Wed, 4 Jun 2025 18:04:35 +0900 Subject: [PATCH 05/15] fix: improve IME compatibility by changing form submission to Ctrl/Cmd+Enter - Remove automatic form submission on Enter key to prevent conflicts with IME - Add Ctrl+Enter (Windows/Linux) and Cmd+Enter (Mac) as submission shortcuts - Preserve native textarea behavior for line breaks with Shift+Enter - Fix issue where Japanese/Chinese/Korean input confirmation triggered form submission --- frontend/src/components/InputForm.tsx | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/frontend/src/components/InputForm.tsx b/frontend/src/components/InputForm.tsx index 6f3127c3..70c658fd 100644 --- a/frontend/src/components/InputForm.tsx +++ b/frontend/src/components/InputForm.tsx @@ -35,10 +35,9 @@ export const InputForm: React.FC = ({ setInternalInputValue(""); }; - const handleInternalKeyDown = ( - e: React.KeyboardEvent - ) => { - if (e.key === "Enter" && !e.shiftKey) { + const handleKeyDown = (e: React.KeyboardEvent) => { + // Submit with Ctrl+Enter (Windows/Linux) or Cmd+Enter (Mac) + if (e.key === "Enter" && (e.ctrlKey || e.metaKey)) { e.preventDefault(); handleInternalSubmit(); } @@ -59,9 +58,9 @@ export const InputForm: React.FC = ({