Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
fe7e2e6
Support embedded WebView auth via cookie-based JWT and login suppression
harshith-v-fyers Apr 9, 2026
ce3bd77
Sync saas-api cookies to localStorage for improved authentication han…
harshith-v-fyers Apr 9, 2026
7fcac2a
Refactor Root component to conditionally render TopNavBar based on UR…
harshith-v-fyers Apr 10, 2026
c959a69
Enhance user experience by updating navigation logic and improving st…
harshith-v-fyers Apr 10, 2026
51c6abd
Implement theme management via URL parameters and localStorage
harshith-v-fyers Apr 13, 2026
89aa191
Refactor Settings component to remove General tab and set default act…
harshith-v-fyers Apr 15, 2026
94bd6f8
Refactor Settings component to enhance user navigation and focus on c…
harshith-v-fyers Apr 16, 2026
e5825c8
Enhance EC2 Meilisearch setup script for improved usability and confi…
harshith-v-fyers Apr 16, 2026
f0c7074
Add WebViewNavigationListener to RootLayout for enhanced navigation h…
harshith-v-fyers Apr 16, 2026
f55bad9
Update base href in index.html to support research subdirectory
harshith-v-fyers Apr 16, 2026
b56b3b2
Refactor API base URL construction to use dynamic base href
harshith-v-fyers Apr 17, 2026
ef68be3
Update asset paths in index.html and TemplatesView for consistency wi…
harshith-v-fyers Apr 17, 2026
10e69fa
Update asset paths to use '/research' prefix for consistency across c…
harshith-v-fyers Apr 17, 2026
0c16dca
Refactor ChatForm and SendButton styles for consistency and update Ro…
Hiren-fyers Apr 20, 2026
2b438f9
Merge pull request #2 from FyersDev/feat/fdsg_ui
harshith-v-fyers Apr 20, 2026
171d642
Implement dynamic loading spinner based on theme selection
harshith-v-fyers Apr 20, 2026
8e7a348
Update Spinner component to use dynamic base path for asset loading
harshith-v-fyers Apr 20, 2026
c74895b
Refactor loading indicators to use Spinner component across multiple …
harshith-v-fyers Apr 20, 2026
b8f74ed
Enhance file preview functionality in ResourcesRoute
harshith-v-fyers Apr 20, 2026
4405830
Refactor file preview handling in ResourcesRoute
harshith-v-fyers Apr 20, 2026
6e6efc0
Update file URL construction in ResourcesRoute to use dynamic base path
harshith-v-fyers Apr 20, 2026
881ed29
Refactor styles in CSS and ChatForm for improved consistency and clarity
Hiren-fyers Apr 20, 2026
c3bd374
Remove commented-out code in Chat Header component for cleaner codebase
Hiren-fyers Apr 20, 2026
e54daa8
Refactor Chat Header and Nav components for improved structure and cl…
Hiren-fyers Apr 20, 2026
3f373b1
Enhance UI consistency and styling across components
Hiren-fyers Apr 21, 2026
ddda682
Merge branch 'insti-web-view-integration' of github.com:FyersDev/Inst…
Hiren-fyers Apr 21, 2026
a56db03
Refactor UploadButton and ResourcesRoute components for improved styl…
Hiren-fyers Apr 21, 2026
07f6383
Refactor icon styling in ResourcesRoute for improved layout and consi…
Hiren-fyers Apr 21, 2026
ddc0b3d
Refactor TemplatesView component for improved readability and structure
Hiren-fyers Apr 21, 2026
19437cd
Update search input and icon styling in ResourcesRoute for improved UX
Hiren-fyers Apr 21, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
97 changes: 97 additions & 0 deletions FIX_ASSET_PATHS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
# Fix Asset Paths - Remaining Files

## Files Already Fixed ✅
- client/src/components/Templates/TemplatesView.tsx
- client/src/components/Chat/Header.tsx
- client/src/components/Endpoints/FIAIcon.tsx
- client/src/components/Auth/Login.tsx
- client/src/components/Nav/TopNavBar.tsx
- client/index.html

## Files Still Need Fixing

Run this script to fix all remaining files:

```bash
cd /Users/em1064/code/InstiLibreChat/client/src

# Files to update (add import and fix src attributes)
cat > /tmp/fix_assets.sh << 'EOF'
#!/bin/bash

# List of files that need fixing
files=(
"components/Resources/Modals/UploadFileModal.tsx"
"components/Chat/Input/Files/UploadButton.tsx"
"components/Auth/OTP.tsx"
"components/Documents/DocumentUpload.tsx"
"components/Chat/Messages/Feedback.tsx"
"components/Chat/Messages/MessageIcon.tsx"
"components/Nav/NavToggle.tsx"
"components/Input/Generations/Regenerate.tsx"
"components/Templates/SelectedTemplate.tsx"
"components/Web/Sources.tsx"
"components/SidePanel/Agents/FileSearch.tsx"
"components/Conversations/ConvoOptions/SharedLinkButton.tsx"
"components/Chat/Input/TemplateSelector.tsx"
"components/SidePanel/Agents/FileContext.tsx"
"routes/ResourcesRoute.tsx"
"components/Documents/DocumentSelector.tsx"
"components/Chat/Menus/OpenSidebar.tsx"
"components/Chat/Input/ToolsDropdown.tsx"
"components/Artifacts/DownloadArtifact.tsx"
"components/Nav/SettingsTabs/Data/SharedLinks.tsx"
"components/Chat/GeneratePDFButton.tsx"
"components/Chat/Messages/HoverButtons.tsx"
"components/Chat/Input/TemplatePersonaSelector.tsx"
"components/Conversations/ConvoOptions/ConvoOptions.tsx"
)

for file in "${files[@]}"; do
if [ ! -f "$file" ]; then
echo "⚠️ Skipping $file (not found)"
continue
fi

echo "Fixing $file..."

# Check if import already exists
if ! grep -q "import { asset } from '~/utils/assetPath'" "$file"; then
# Add import after the last import line
sed -i.bak '/^import /h; ${x;s/^import .*/&\nimport { asset } from '\''~\/utils\/assetPath'\'';/;x}; /^import /{x;p;x;}' "$file"
fi

# Replace all /assets/ references
sed -i.bak 's|src="/assets/\([^"]*\)"|src={asset('\''\1'\'')}|g' "$file"

echo "✓ Fixed $file"
done

echo "✅ All files fixed!"
EOF

chmod +x /tmp/fix_assets.sh
/tmp/fix_assets.sh
```

## Or Manual Quick Fix

For a quicker solution that doesn't require perfect imports, you can use a global replace:

```bash
cd /Users/em1064/code/InstiLibreChat/client/src

# Replace all /assets/ with /research/assets/
find . -name "*.tsx" -o -name "*.ts" | while read file; do
if grep -q 'src="/assets/' "$file"; then
sed -i.bak 's|src="/assets/|src="/research/assets/|g' "$file"
echo "Fixed: $file"
fi
done
```

This will change all `/assets/` to `/research/assets/` directly without needing the asset utility function.

## Recommended: Use the Quick Fix

The second approach is simpler and faster. Just replace `/assets/` → `/research/assets/` in all files.
43 changes: 38 additions & 5 deletions client/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
<html lang="en-US">
<head>
<meta charset="utf-8" />
<base href="/" />
<base href="/research/" />
<meta name="theme-color" content="#171717" />
<meta name="mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<meta name="description" content="FIA-Fyers Intelligence Assistant - Advanced AI-powered financial intelligence platform" />
<title>FIA - FYERS Intelligent Assistant</title>
<link rel="icon" type="image/svg+xml" href="assets/Logo.svg" />
<link rel="icon" type="image/png" sizes="32x32" href="assets/favicon-32x32.png" />
<link rel="icon" type="image/png" sizes="16x16" href="assets/favicon-16x16.png" />
<link rel="apple-touch-icon" href="assets/apple-touch-icon-180x180.png" />
<link rel="icon" type="image/svg+xml" href="/research/assets/Logo.svg" />
<link rel="icon" type="image/png" sizes="32x32" href="/research/assets/favicon-32x32.png" />
<link rel="icon" type="image/png" sizes="16x16" href="/research/assets/favicon-16x16.png" />
<link rel="apple-touch-icon" href="/research/assets/apple-touch-icon-180x180.png" />
<meta name="viewport" content="width=device-width, initial-scale=1, interactive-widget=resizes-content" />
<style>
html,
Expand All @@ -23,6 +23,18 @@
}
</style>
<script>
(function () {
try {
var p = new URLSearchParams(window.location.search);
var t = (p.get('theme') || '').toLowerCase();
if (t === 'light' || t === 'dark') {
localStorage.setItem('color-theme', t);
var root = document.documentElement;
root.classList.remove('dark', 'light');
root.classList.add(t === 'dark' ? 'dark' : 'light');
}
} catch (e) {}
})();
const theme = localStorage.getItem('color-theme');
const loadingContainerStyle = document.createElement('style');
let backgroundColor;
Expand All @@ -46,8 +58,29 @@
height: 100vh;
background-color: ${backgroundColor};
}
#loading-container::after {
content: '';
width: 120px;
height: 120px;
background-image: url('/research/assets/${theme === 'dark' || (theme === 'system' && window.matchMedia('(prefers-color-scheme: dark)').matches) ? 'loader_dark' : 'loader_light'}.gif');
background-size: contain;
background-repeat: no-repeat;
background-position: center;
}
`;
document.head.appendChild(loadingContainerStyle);

// Sync saas-api cookies to localStorage (set by /auth/embed flow)
(function() {
function getCookie(name) {
var m = document.cookie.match('(?:^|; )' + name + '=([^;]*)');
return m ? decodeURIComponent(m[1]) : null;
}
var at = getCookie('saas_access_token');
var rt = getCookie('saas_refresh_token');
if (at) localStorage.setItem('access_token', at);
if (rt) localStorage.setItem('refresh_token', rt);
})();
</script>
<script>
// Embedded auth: if ?token= is in the URL, call token-exchange to get
Expand Down
Binary file added client/public/assets/loader_dark.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client/public/assets/loader_light.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 11 additions & 5 deletions client/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { ScreenshotProvider, useApiErrorBoundary } from './hooks';
import WakeLockManager from '~/components/System/WakeLockManager';
import ConditionalDevtools from '~/components/System/ConditionalDevtools';
import { getThemeFromEnv } from './utils/getThemeFromEnv';
import { getInitialThemeFromWindowSearch } from './utils/themeFromQuery';
import { initializeFontSize } from '~/store/fontSize';
import { LiveAnnouncer } from '~/a11y';
import { router } from './routes';
Expand All @@ -33,16 +34,21 @@ const App = () => {

// Load theme from environment variables if available
const envTheme = getThemeFromEnv();
const urlTheme = getInitialThemeFromWindowSearch();

const themeProviderProps = {};
if (envTheme) {
themeProviderProps.themeRGB = envTheme;
themeProviderProps.initialTheme = urlTheme ?? 'system';
} else if (urlTheme) {
themeProviderProps.initialTheme = urlTheme;
}

return (
<QueryClientProvider client={queryClient}>
<RecoilRoot>
<LiveAnnouncer>
<ThemeProvider
// Only pass initialTheme and themeRGB if environment theme exists
// This allows localStorage values to persist when no env theme is set
{...(envTheme && { initialTheme: 'system', themeRGB: envTheme })}
>
<ThemeProvider {...themeProviderProps}>
{/* The ThemeProvider will automatically:
1. Apply dark/light mode classes
2. Apply custom theme colors if envTheme is provided
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/Artifacts/DownloadArtifact.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const DownloadArtifact = ({ artifact }: { artifact: Artifact }) => {
<CircleCheckBig size={16} />
) : (
<img
src="/assets/download.svg"
src="/research/assets/download.svg"
alt="Download"
className="opacity-70 dark:invert dark:opacity-70"
style={{ width: '16px', height: '16px' }}
Expand Down
5 changes: 3 additions & 2 deletions client/src/components/Auth/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { useState, useEffect } from 'react';
import { useNavigate, useOutletContext } from 'react-router-dom';
import { useToastContext } from '@librechat/client';
import type { TLoginLayoutContext } from '~/common';
import { asset } from '~/utils/assetPath';

function Login() {
const navigate = useNavigate();
Expand Down Expand Up @@ -95,7 +96,7 @@ function Login() {
<div className="flex items-center gap-2 sm:gap-3">
<div className="w-10 h-10 sm:w-12 sm:h-12 rounded-lg flex items-center justify-center p-1 flex-shrink-0">
<img
src="/assets/Logo.svg"
src={asset('Logo.svg')}
alt="FIA Logo"
className="w-full h-full object-contain"
/>
Expand All @@ -115,7 +116,7 @@ function Login() {
{/* FYERS Illustration */}
<div className="flex justify-start">
<img
src="/assets/Fia Login.png"
src={asset('Fia Login.png')}
alt="FYERS platform preview"
className="w-full max-w-[900px] h-[260px] sm:h-[320px] lg:h-[420px] object-contain"

Expand Down
4 changes: 2 additions & 2 deletions client/src/components/Auth/OTP.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ function OTP() {
<div className="flex items-center gap-2 sm:gap-3">
<div className="w-10 h-10 sm:w-12 sm:h-12 rounded-lg flex items-center justify-center p-1">
<img
src="/assets/Logo.svg"
src="/research/assets/Logo.svg"
alt="FIA Logo"
className="w-full h-full object-contain"
/>
Expand All @@ -274,7 +274,7 @@ function OTP() {
</h1>

<img
src="/assets/Fia Login.png"
src="/research/assets/Fia Login.png"
alt="FYERS platform preview"
className="w-full max-w-[900px] h-[260px] sm:h-[320px] lg:h-[420px] object-contain"
/>
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/Chat/GeneratePDFButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ export default function GeneratePDFButton() {
) : (
<>
<img
src="/assets/documents.svg"
src="/research/assets/documents.svg"
alt="Generate PDF"
className="h-3.5 w-3.5 opacity-70 dark:invert dark:opacity-70"
/>
Expand Down
53 changes: 34 additions & 19 deletions client/src/components/Chat/Header.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
import { AnimatePresence, motion } from 'framer-motion';
import { useState } from 'react';
import { useOutletContext } from 'react-router-dom';
import type { ContextType } from '~/common';
import { HeaderNewChat, OpenSidebar } from './Menus';
import { AnimatePresence, motion } from 'framer-motion';
import ModelSelector from '~/components/Chat/Menus/Endpoints/ModelSelector';
import Settings from '~/components/Nav/Settings';
import { useGetStartupConfig } from '~/data-provider';
import { useLocalize } from '~/hooks';
import { asset } from '~/utils/assetPath';
import { HeaderNewChat } from './Menus';

export default function Header() {
const { navVisible, setNavVisible } = useOutletContext<ContextType>();
const { navVisible } = useOutletContext<ContextType>();
const { data: startupConfig } = useGetStartupConfig();
const localize = useLocalize();
const [showSettings, setShowSettings] = useState(false);

return (
<div className="sticky top-0 z-10 flex h-14 w-full items-center justify-between bg-white p-2 font-semibold text-text-primary dark:!bg-[#111111]">
Expand All @@ -23,37 +28,47 @@ export default function Header() {
transition={{ duration: 0.2 }}
key="header-buttons"
>
<OpenSidebar setNavVisible={setNavVisible} className="max-md:hidden" />
<HeaderNewChat />
</motion.div>
)}
</AnimatePresence>
</div>

{/* Center: FIA Logo and Text */}
<div className="absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 flex items-center justify-center gap-1">
<div className="w-8 h-8 relative rounded-sm flex items-center justify-center">
<img
src="/assets/FIA.svg"
alt="FIA"
className="w-full h-full object-contain"
/>
<div className="absolute left-1/2 top-1/2 flex -translate-x-1/2 -translate-y-1/2 items-center justify-center gap-1">
<div className="relative flex h-8 w-8 items-center justify-center rounded-sm">
<img src={asset('FIA.svg')} alt="FIA" className="h-full w-full object-contain" />
</div>
<div
className="text-[20px] font-sans leading-5 text-text-primary dark:text-gray-100"
<div
className="font-sans text-[20px] leading-5 text-text-primary dark:text-gray-100"
style={{ fontSize: '20px' }}
>
FIA - FYERS Intelligent Assistant
</div>
</div>

{/* Right: Model Selector */}
<div className="mx-1 flex items-center">
<div className="scale-75 origin-right">
<ModelSelector startupConfig={startupConfig} />
{/* Right: model row + Settings inside same scale-75 block (gear sits beside model button) */}
{/* <div className="mx-1 flex items-center">
<div className="flex flex-row items-center gap-2 scale-75 origin-right">
<div className="min-w-0 max-w-md flex-1">
<ModelSelector startupConfig={startupConfig} />
</div>
<button
type="button"
onClick={() => setShowSettings(true)}
className="my-1 flex h-10 w-10 shrink-0 items-center justify-center rounded-xl border border-border-light bg-surface-secondary text-text-primary hover:bg-surface-tertiary"
aria-label={localize('com_nav_settings')}
>
<img
src="/research/assets/settings.svg"
alt=""
className="h-5 w-5 dark:brightness-0 dark:invert"
/>
</button>
</div>
</div>
</div> */}
</div>
{showSettings && <Settings open={showSettings} onOpenChange={setShowSettings} />}
</div>
);
}
4 changes: 2 additions & 2 deletions client/src/components/Chat/Input/ChatForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ const ChatForm = memo(({ index = 0 }: { index?: number }) => {
cn(
'px-1.5 pt-3 pb-1 m-0 w-full resize-none font-inter',
'placeholder-gray-400 dark:placeholder-gray-500',
'bg-white dark:bg-gray-800',
'bg-transparent',
'text-gray-900 dark:text-gray-100',
'text-base',
isCollapsed ? 'max-h-[52px]' : 'max-h-[45vh] md:max-h-[55vh]',
Expand Down Expand Up @@ -248,7 +248,7 @@ const ChatForm = memo(({ index = 0 }: { index?: number }) => {
onClick={handleContainerClick}
className={cn(
'relative flex w-full flex-grow flex-col overflow-hidden rounded-[2px]',
'bg-white dark:bg-gray-800 border border-[#2434E7] dark:border-blue-500',
'bg-transparent border border-[#2434E7]',
'transition-all duration-200',
isTextAreaFocused ? 'shadow-lg' : 'shadow-md',
)}
Expand Down
4 changes: 2 additions & 2 deletions client/src/components/Chat/Input/Files/UploadButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ const UploadButton = () => {
aria-label="Upload Document"
style={{ width: '34px', height: '34px' }}
className={cn(
'flex items-center justify-center rounded-full p-1 transition-colors hover:bg-surface-hover focus:outline-none focus:ring-2 focus:ring-primary focus:ring-opacity-50',
'flex cursor-pointer items-center justify-center rounded-lg border border-border-light bg-transparent p-1 transition-all hover:bg-surface-hover focus:outline-none focus:ring-2 focus:ring-primary focus:ring-opacity-50',
)}
>
<div className="flex w-full items-center justify-center gap-2">
<img
src="/assets/export.svg"
src="/research/assets/export.svg"
alt="Upload Document"
className="icon-md dark:invert"
style={{ width: '18px', height: '18px' }}
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/Chat/Input/SendButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const SubmitButton = React.memo(
id="send-button"
disabled={props.disabled}
className={cn(
'rounded-full bg-blue-600 p-1.5 text-white outline-offset-4 transition-all duration-200 hover:bg-blue-700 disabled:cursor-not-allowed disabled:bg-blue-400 disabled:opacity-50',
'rounded-full bg-[#2434E7] p-1.5 text-white outline-offset-4 transition-all duration-200 hover:bg-[#1c2ac9] disabled:cursor-not-allowed disabled:opacity-50',
)}
data-testid="send-button"
type="submit"
Expand Down
Loading
Loading