Skip to content

Fix prompt in define financial terms#410

Open
JP16914 wants to merge 1 commit intomainfrom
phuoctran
Open

Fix prompt in define financial terms#410
JP16914 wants to merge 1 commit intomainfrom
phuoctran

Conversation

@JP16914
Copy link
Collaborator

@JP16914 JP16914 commented Mar 22, 2026

Main fixes included in this branch:

Fixed language detection for short greetings such as “alo” so the chatbot defaults to Vietnamese instead of responding in the wrong language.
Removed the guidance/greeting behavior that interfered with first-message handling, which helps the thread name be created correctly.
Refined the action-detection prompt for stock-price questions versus financial-term definition questions, so the chatbot no longer treats broad definition requests as live price requests.
Updated the financial-term explanation prompt to return a stricter, more useful format with clearer structure, better wording, and more exact output for each situation.
Improved the explanation output so company names, organization names, and stock exchange names can appear as linked, underlined references in the response.
Added a right-side preview panel that opens when users click linked references in chatbot responses, showing related company or source information without leaving the chat.
Updated the preview panel styling so its background matches the overall chat theme and adapts correctly in both light mode and dark mode.
Added supporting layout and theme updates so the new preview panel fits cleanly alongside the existing chat and sidebar layout.
Files Changed

frontend/src/components/ChatPage/ChatComponent.vue
Reason:
Contains the main chatbot behavior changes:
language detection fallback, thread-name flow adjustment, prompt updates for gptDefine, stricter explanation formatting, extraction of preview links, and events for opening the preview panel.

frontend/src/views/Chat/ChatPage.vue
Reason:
Adds the page-level layout for the right-side preview panel and handles preview state, preview caching, and link-click behavior from the chat component.

frontend/src/components/ChatPage/LinkPreviewFlyout.vue
Reason:
New component for the small right-side window that displays linked company or reference information.

frontend/src/components/MessageComponent.vue
Reason:
Captures clicks on links inside bot messages and emits them upward so the preview panel can open instead of always navigating away.

frontend/src/App.vue
Reason:
Adjusts theme transition behavior to keep the UI smoother and avoid heavy repaint effects when theme colors change.

frontend/src/components/Basic/NavBar.vue
Reason:
Updates navbar and dropdown backgrounds to use shared theme variables so the new panel and the rest of the chat UI stay visually consistent in light and dark mode.

@netlify
Copy link

netlify bot commented Mar 22, 2026

Deploy Preview for finbud-ai ready!

Name Link
🔨 Latest commit 817b389
🔍 Latest deploy log https://app.netlify.com/projects/finbud-ai/deploys/69bf4c2fc8367c00085d9bcc
😎 Deploy Preview https://deploy-preview-410--finbud-ai.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant