Skip to content

Commit 971596e

Browse files
committed
Merge remote-tracking branch 'upstream/main' into feat/new-local-ollama
2 parents 5fd418d + f8c70c2 commit 971596e

File tree

93 files changed

+3110
-1027
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+3110
-1027
lines changed

.env.example

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ API_I18N_ENABLED=true
1515
API_HOST=localhost
1616
API_PORT=8000
1717

18-
# Supported languages: en_US, en_GB, zh-Hans, zh-Hant
19-
# You can interact with the agent in your preferred language.
18+
# Supported languages: en, zh_CN, zh_TW, ja
19+
# You can interact with the agent in your preferred language.
2020
# This variable is mainly intended for frontend use; setting LANG is not required.
21-
LANG=en-US
21+
LANG=en
2222
TIMEZONE=America/New_York
2323
PYTHONIOENCODING=utf-8
2424

frontend/bun.lock

Lines changed: 26 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,14 @@
5656
"dayjs": "^1.11.19",
5757
"echarts": "^6.0.0",
5858
"framer-motion": "^12.23.26",
59+
"i18next": "^25.7.2",
5960
"isbot": "5.1.31",
60-
"lucide-react": "^0.559.0",
61+
"lucide-react": "^0.561.0",
6162
"mutative": "^1.3.0",
6263
"next-themes": "^0.4.6",
6364
"react": "^19.2.0",
6465
"react-dom": "^19.2.0",
66+
"react-i18next": "^16.5.0",
6567
"react-markdown": "^10.1.0",
6668
"rehype-raw": "^7.0.0",
6769
"remark-gfm": "^4.0.1",
@@ -72,7 +74,7 @@
7274
"zustand": "^5.0.9"
7375
},
7476
"devDependencies": {
75-
"@biomejs/biome": "^2.3.8",
77+
"@biomejs/biome": "^2.3.9",
7678
"@react-router/dev": "^7.10.1",
7779
"@react-router/serve": "^7.10.1",
7880
"@tailwindcss/typography": "^0.5.19",
@@ -86,7 +88,7 @@
8688
"typescript": "^5.9.3",
8789
"vite": "^7.1.12",
8890
"vite-plugin-svg-sprite": "^0.6.3",
89-
"vite-tsconfig-paths": "^5.1.4"
91+
"vite-tsconfig-paths": "^6.0.2"
9092
},
9193
"overrides": {
9294
"vite": "npm:rolldown-vite@latest",

frontend/src-tauri/tauri.conf.json

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "https://schema.tauri.app/config/2",
33
"productName": "ValueCell",
4-
"version": "0.1.18",
4+
"version": "0.1.19",
55
"identifier": "com.valuecell.valuecellapp",
66
"build": {
77
"beforeDevCommand": "bun run dev:tauri",
@@ -10,12 +10,14 @@
1010
"frontendDist": "../build/client"
1111
},
1212
"app": {
13-
"windows": [{
14-
"title": "ValueCell",
15-
"minWidth": 1300,
16-
"minHeight": 780,
17-
"hiddenTitle": true
18-
}],
13+
"windows": [
14+
{
15+
"title": "ValueCell",
16+
"minWidth": 1300,
17+
"minHeight": 780,
18+
"hiddenTitle": true
19+
}
20+
],
1921
"security": {
2022
"csp": null
2123
}

frontend/src/api/agent.ts

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,25 @@ import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
22
import { VALUECELL_AGENT } from "@/constants/agent";
33
import { API_QUERY_KEYS } from "@/constants/api";
44
import { type ApiResponse, apiClient } from "@/lib/api-client";
5+
import { useLanguage } from "@/store/settings-store";
56
import type { AgentInfo } from "@/types/agent";
67

78
export const useGetAgentInfo = (params: { agentName: string }) => {
9+
const language = useLanguage();
10+
811
return useQuery({
9-
queryKey: API_QUERY_KEYS.AGENT.agentInfo(Object.values(params)),
12+
queryKey: API_QUERY_KEYS.AGENT.agentInfo([
13+
...Object.values(params),
14+
language,
15+
]),
1016
queryFn: async () => {
1117
// Return hardcoded data for ValueCellAgent
1218
if (params.agentName === "ValueCellAgent") {
1319
return Promise.resolve({ data: VALUECELL_AGENT });
1420
}
1521
// Fetch from API for other agents
1622
return apiClient.get<ApiResponse<AgentInfo>>(
17-
`/agents/by-name/${params.agentName}`,
23+
`/agents/by-name/${params.agentName}?language=${language}`,
1824
);
1925
},
2026
select: (data) => data.data,
@@ -24,11 +30,16 @@ export const useGetAgentInfo = (params: { agentName: string }) => {
2430
export const useGetAgentList = (
2531
params: { enabled_only: string } = { enabled_only: "false" },
2632
) => {
33+
const language = useLanguage();
34+
2735
return useQuery({
28-
queryKey: API_QUERY_KEYS.AGENT.agentList(Object.values(params)),
36+
queryKey: API_QUERY_KEYS.AGENT.agentList([
37+
...Object.values(params),
38+
language,
39+
]),
2940
queryFn: () =>
3041
apiClient.get<ApiResponse<{ agents: AgentInfo[] }>>(
31-
`/agents/?enabled_only=${params.enabled_only}`,
42+
`/agents/?enabled_only=${params.enabled_only}&language=${language}`,
3243
),
3344
select: (data) => data.data.agents,
3445
});

frontend/src/api/stock.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
2-
import {
3-
API_QUERY_KEYS,
4-
USER_LANGUAGE,
5-
VALUECELL_BACKEND_URL,
6-
} from "@/constants/api";
2+
import { API_QUERY_KEYS, VALUECELL_BACKEND_URL } from "@/constants/api";
73
import { type ApiResponse, apiClient } from "@/lib/api-client";
4+
import { useLanguage } from "@/store/settings-store";
85
import { useSystemStore } from "@/store/system-store";
96
import type {
107
Stock,
@@ -22,17 +19,20 @@ export const useGetWatchlist = () =>
2219
select: (data) => data.data,
2320
});
2421

25-
export const useGetStocksList = (params: { query: string }) =>
26-
useQuery({
27-
queryKey: API_QUERY_KEYS.STOCK.stockSearch(Object.values(params)),
22+
export const useGetStocksList = (params: { query: string }) => {
23+
const language = useLanguage();
24+
25+
return useQuery({
26+
queryKey: API_QUERY_KEYS.STOCK.stockSearch([params.query, language]),
2827
queryFn: ({ signal }) =>
2928
apiClient.get<ApiResponse<{ results: Stock[] }>>(
30-
`watchlist/asset/search?q=${params.query}&language=${USER_LANGUAGE}`,
29+
`watchlist/asset/search?q=${params.query}&language=${language}`,
3130
{ signal },
3231
),
3332
select: (data) => data.data.results,
3433
enabled: !!params.query,
3534
});
35+
};
3636

3737
export const useAddStockToWatchlist = () => {
3838
const queryClient = useQueryClient();

0 commit comments

Comments
 (0)