Add dog icon and env ff
This commit is contained in:
parent
f51890a90f
commit
5c747977cc
8 changed files with 52 additions and 8 deletions
22
frontend/components/logo/dog-icon.tsx
Normal file
22
frontend/components/logo/dog-icon.tsx
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
const DogIcon = (props: React.SVGProps<SVGSVGElement>) => {
|
||||||
|
return (
|
||||||
|
<svg
|
||||||
|
width="24"
|
||||||
|
height="24"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
fill="none"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
{...props}
|
||||||
|
>
|
||||||
|
<path
|
||||||
|
d="M19.9049 23H17.907C17.907 23 15.4096 20.5 16.908 16C17.3753 14.2544 17.3813 12.4181 17.2439 11C17.161 10.1434 17.0256 9.43934 16.908 9C16.7416 8.33333 16.8081 7 18.4065 7C19.5457 7 20.9571 6.92944 21.4034 6.5C22.3268 5.61145 21.9029 4 21.9029 4C21.9029 4 20.9039 3 18.906 3C18.7395 2.33333 17.7072 1 14.9101 1C12.113 1 11.5835 2.16589 10.9143 4C10.4155 5.36686 10.423 6.99637 11.1692 7.71747M14.4106 4C14.2441 5.33333 14.4106 8 11.9132 8C11.5968 8 11.3534 7.89548 11.1692 7.71747M14.9101 23H12.4127M7.91738 23H12.4127M10.4148 15.5C11.5715 16.1667 13.5905 18.6 12.4127 23M3.42204 15C1.02177 18.5 1.64205 23 5.41997 23C5.41997 22 5.71966 19.2 6.91841 16C8.41686 12 11.1692 11.4349 11.1692 7.71747M16.908 4V4.5"
|
||||||
|
stroke="#0F62FE"
|
||||||
|
strokeWidth="1.5"
|
||||||
|
strokeLinecap="round"
|
||||||
|
strokeLinejoin="round"
|
||||||
|
/>
|
||||||
|
</svg>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export default DogIcon;
|
||||||
|
|
@ -1,4 +1,9 @@
|
||||||
import type { NextConfig } from "next";
|
import type { NextConfig } from "next";
|
||||||
|
import dotenv from "dotenv";
|
||||||
|
import path from "path";
|
||||||
|
|
||||||
|
// Load environment variables from root .env file
|
||||||
|
dotenv.config({ path: path.resolve(__dirname, "../.env") });
|
||||||
|
|
||||||
const nextConfig: NextConfig = {
|
const nextConfig: NextConfig = {
|
||||||
// Increase timeout for API routes
|
// Increase timeout for API routes
|
||||||
|
|
@ -9,6 +14,9 @@ const nextConfig: NextConfig = {
|
||||||
eslint: {
|
eslint: {
|
||||||
ignoreDuringBuilds: true,
|
ignoreDuringBuilds: true,
|
||||||
},
|
},
|
||||||
|
env: {
|
||||||
|
UPDATED_ONBOARDING: process.env.UPDATED_ONBOARDING,
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
export default nextConfig;
|
export default nextConfig;
|
||||||
13
frontend/package-lock.json
generated
13
frontend/package-lock.json
generated
|
|
@ -35,6 +35,7 @@
|
||||||
"class-variance-authority": "^0.7.1",
|
"class-variance-authority": "^0.7.1",
|
||||||
"clsx": "^2.1.1",
|
"clsx": "^2.1.1",
|
||||||
"cmdk": "^1.1.1",
|
"cmdk": "^1.1.1",
|
||||||
|
"dotenv": "^17.2.3",
|
||||||
"lucide-react": "^0.525.0",
|
"lucide-react": "^0.525.0",
|
||||||
"motion": "^12.23.12",
|
"motion": "^12.23.12",
|
||||||
"next": "15.3.5",
|
"next": "15.3.5",
|
||||||
|
|
@ -4088,6 +4089,18 @@
|
||||||
"node": ">=0.10.0"
|
"node": ">=0.10.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/dotenv": {
|
||||||
|
"version": "17.2.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-17.2.3.tgz",
|
||||||
|
"integrity": "sha512-JVUnt+DUIzu87TABbhPmNfVdBDt18BLOWjMUFJMSi/Qqg7NTYtabbvSNJGOJ7afbRuv9D/lngizHtP7QyLQ+9w==",
|
||||||
|
"license": "BSD-2-Clause",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://dotenvx.com"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/dunder-proto": {
|
"node_modules/dunder-proto": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz",
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,7 @@
|
||||||
"class-variance-authority": "^0.7.1",
|
"class-variance-authority": "^0.7.1",
|
||||||
"clsx": "^2.1.1",
|
"clsx": "^2.1.1",
|
||||||
"cmdk": "^1.1.1",
|
"cmdk": "^1.1.1",
|
||||||
|
"dotenv": "^17.2.3",
|
||||||
"lucide-react": "^0.525.0",
|
"lucide-react": "^0.525.0",
|
||||||
"motion": "^12.23.12",
|
"motion": "^12.23.12",
|
||||||
"next": "15.3.5",
|
"next": "15.3.5",
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ import { Bot, GitBranch } from "lucide-react";
|
||||||
import { MarkdownRenderer } from "@/components/markdown-renderer";
|
import { MarkdownRenderer } from "@/components/markdown-renderer";
|
||||||
import { FunctionCalls } from "./function-calls";
|
import { FunctionCalls } from "./function-calls";
|
||||||
import type { FunctionCall } from "../types";
|
import type { FunctionCall } from "../types";
|
||||||
|
import DogIcon from "@/components/logo/dog-icon";
|
||||||
|
|
||||||
interface AssistantMessageProps {
|
interface AssistantMessageProps {
|
||||||
content: string;
|
content: string;
|
||||||
|
|
@ -24,10 +25,13 @@ export function AssistantMessage({
|
||||||
showForkButton = false,
|
showForkButton = false,
|
||||||
onFork,
|
onFork,
|
||||||
}: AssistantMessageProps) {
|
}: AssistantMessageProps) {
|
||||||
|
const updatedOnboarding = process.env.UPDATED_ONBOARDING === "true";
|
||||||
|
const IconComponent = updatedOnboarding ? DogIcon : Bot;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex gap-3">
|
<div className="flex gap-3">
|
||||||
<div className="w-8 h-8 rounded-lg bg-accent/20 flex items-center justify-center flex-shrink-0 select-none">
|
<div className="w-8 h-8 rounded-lg bg-accent/20 flex items-center justify-center flex-shrink-0 select-none">
|
||||||
<Bot className="h-4 w-4 text-accent-foreground" />
|
<IconComponent className="h-4 w-4 text-accent-foreground" />
|
||||||
</div>
|
</div>
|
||||||
<div className="flex-1 min-w-0">
|
<div className="flex-1 min-w-0">
|
||||||
<FunctionCalls
|
<FunctionCalls
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,6 @@ interface ChatInputProps {
|
||||||
loading: boolean;
|
loading: boolean;
|
||||||
isUploading: boolean;
|
isUploading: boolean;
|
||||||
selectedFilter: KnowledgeFilterData | null;
|
selectedFilter: KnowledgeFilterData | null;
|
||||||
isFilterHighlighted: boolean;
|
|
||||||
isFilterDropdownOpen: boolean;
|
isFilterDropdownOpen: boolean;
|
||||||
availableFilters: KnowledgeFilterData[];
|
availableFilters: KnowledgeFilterData[];
|
||||||
filterSearchTerm: string;
|
filterSearchTerm: string;
|
||||||
|
|
@ -48,7 +47,6 @@ export const ChatInput = forwardRef<ChatInputHandle, ChatInputProps>((
|
||||||
loading,
|
loading,
|
||||||
isUploading,
|
isUploading,
|
||||||
selectedFilter,
|
selectedFilter,
|
||||||
isFilterHighlighted,
|
|
||||||
isFilterDropdownOpen,
|
isFilterDropdownOpen,
|
||||||
availableFilters,
|
availableFilters,
|
||||||
filterSearchTerm,
|
filterSearchTerm,
|
||||||
|
|
|
||||||
|
|
@ -1886,7 +1886,6 @@ function ChatPage() {
|
||||||
loading={loading}
|
loading={loading}
|
||||||
isUploading={isUploading}
|
isUploading={isUploading}
|
||||||
selectedFilter={selectedFilter}
|
selectedFilter={selectedFilter}
|
||||||
isFilterHighlighted={isFilterHighlighted}
|
|
||||||
isFilterDropdownOpen={isFilterDropdownOpen}
|
isFilterDropdownOpen={isFilterDropdownOpen}
|
||||||
availableFilters={availableFilters}
|
availableFilters={availableFilters}
|
||||||
filterSearchTerm={filterSearchTerm}
|
filterSearchTerm={filterSearchTerm}
|
||||||
|
|
|
||||||
|
|
@ -30,11 +30,10 @@ import { OpenAIOnboarding } from "./openai-onboarding";
|
||||||
|
|
||||||
const OnboardingCard = ({
|
const OnboardingCard = ({
|
||||||
isDoclingHealthy,
|
isDoclingHealthy,
|
||||||
boarderless = false,
|
|
||||||
}: {
|
}: {
|
||||||
isDoclingHealthy: boolean;
|
isDoclingHealthy: boolean;
|
||||||
boarderless?: boolean;
|
|
||||||
}) => {
|
}) => {
|
||||||
|
const updatedOnboarding = process.env.UPDATED_ONBOARDING === "true";
|
||||||
const { data: settingsDb, isLoading: isSettingsLoading } =
|
const { data: settingsDb, isLoading: isSettingsLoading } =
|
||||||
useGetSettingsQuery();
|
useGetSettingsQuery();
|
||||||
|
|
||||||
|
|
@ -120,7 +119,7 @@ const OnboardingCard = ({
|
||||||
const isComplete = !!settings.llm_model && !!settings.embedding_model && isDoclingHealthy;
|
const isComplete = !!settings.llm_model && !!settings.embedding_model && isDoclingHealthy;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Card className={`w-full max-w-[600px] ${boarderless ? "border-none" : ""}`}>
|
<Card className={`w-full max-w-[600px] ${updatedOnboarding ? "border-none" : ""}`}>
|
||||||
<Tabs
|
<Tabs
|
||||||
defaultValue={modelProvider}
|
defaultValue={modelProvider}
|
||||||
onValueChange={handleSetModelProvider}
|
onValueChange={handleSetModelProvider}
|
||||||
|
|
@ -165,7 +164,7 @@ const OnboardingCard = ({
|
||||||
</TabsContent>
|
</TabsContent>
|
||||||
</CardContent>
|
</CardContent>
|
||||||
</Tabs>
|
</Tabs>
|
||||||
<CardFooter className="flex justify-end">
|
<CardFooter className={`flex ${updatedOnboarding ? "" : "justify-end"}`}>
|
||||||
<Tooltip>
|
<Tooltip>
|
||||||
<TooltipTrigger asChild>
|
<TooltipTrigger asChild>
|
||||||
<div>
|
<div>
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue