Skip to content

Commit 50eaf96

Browse files
committed
fixed build issues
1 parent 8224a81 commit 50eaf96

11 files changed

Lines changed: 29 additions & 19 deletions

File tree

backend/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ mangum
77
pydantic
88
langchain
99
langchain-groq
10+
langchain-community
1011
qdrant-client
1112
google-generativeai
1213
langchain-google-genai

frontend/src/App.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { useState } from 'react';
21
import Icon from "./assets/icon.png";
32
import { Button } from "@/components/ui/button";
43
import { Separator } from "@/components/ui/separator";

frontend/src/components/KnowledgeGraph/KnowledgeGraph.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import { div } from 'framer-motion/client';
2-
import React, { useRef } from 'react';
1+
import { useRef } from 'react';
32
import { GraphCanvas, useSelection, type GraphEdge, type GraphNode} from 'reagraph';
43

54
interface KGInputs {

frontend/src/components/NoteCard/NoteCard.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import {
22
Card,
3-
CardAction,
43
CardContent,
54
CardDescription,
65
CardFooter,
@@ -17,7 +16,6 @@ import {
1716
SelectValue,
1817
} from "@/components/ui/select"
1918
import { Input } from "@/components/ui/input"
20-
import { Label } from "@/components/ui/label"
2119
import { type NoteItem } from "@/types/NoteItem"
2220
import { type GroupsItem } from "@/types/GroupsItem"
2321
import { useEffect, useState } from "react"
@@ -51,6 +49,8 @@ export default function NoteCard({noteItem} : NoteProps) {
5149
const user_id = Number(localStorage.getItem('user_id'))
5250

5351
const { data: groups, isLoading, error } = useGroups({user_id: user_id})
52+
if(error) toast.error(error.message)
53+
5454
const setNoteSelected = useNoteSelect((store) => store.setNoteSelected)
5555

5656
useEffect(() => {

frontend/src/components/NoteMaker/NoteMaker.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ export default function NoteMaker() {
3535
const queryClient = useQueryClient()
3636

3737
const { data: groups, isLoading, error } = useGroups({user_id: user_id})
38+
if(error) toast.error(error.message)
3839

3940
return( isLoading ? (<div>Loading</div>): (
4041
<div className="flex px-2 justify-start">

frontend/src/components/ToolBar/ToolBar.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import { useToolStore } from "@/zustand_stores/tool_select_store"
88
export default function ToolBar() {
99

1010
const setTool = useToolStore((tool) => tool.setTool)
11-
const toolSelected = useToolStore((tool) => tool.toolSelected)
1211

1312
return (
1413
<ToggleGroup className="gap-2" type="single">

frontend/src/components/ui/audio-visualizer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export function AudioVisualizer({
2929
const canvasRef = useRef<HTMLCanvasElement>(null)
3030
const audioContextRef = useRef<AudioContext | null>(null)
3131
const analyserRef = useRef<AnalyserNode | null>(null)
32-
const animationFrameRef = useRef<number>()
32+
const animationFrameRef = useRef<number>(null)
3333
const containerRef = useRef<HTMLDivElement>(null)
3434

3535
// Cleanup function to stop visualization and close audio context

frontend/src/components/ui/markdown-renderer.tsx

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { Suspense } from "react"
1+
import React, { Suspense, type JSX } from "react"
22
import Markdown from "react-markdown"
33
import remarkGfm from "remark-gfm"
44

@@ -185,11 +185,14 @@ const COMPONENTS = {
185185
}
186186

187187
function withClass(Tag: keyof JSX.IntrinsicElements, classes: string) {
188-
const Component = ({ node, ...props }: any) => (
189-
<Tag className={classes} {...props} />
190-
)
191-
Component.displayName = Tag
192-
return Component
188+
const Component = ({ node, className, ...props }: React.HTMLAttributes<HTMLElement> & { node?: any }) => {
189+
return React.createElement(
190+
Tag as any,
191+
{ className: cn(classes, className), ...props },
192+
);
193+
};
194+
Component.displayName = String(Tag);
195+
return Component;
193196
}
194197

195198
export default MarkdownRenderer

frontend/src/pages/Notes/Notes.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ import ComboBox from '@/components/ComboBox/ComboBox';
2424
import { type listItem } from '@/types/ListItem';
2525
import { useFilterGroup } from '@/zustand_stores/filter_group_store';
2626
import { useFilterTags } from '@/zustand_stores/filter_tags_store';
27+
import { Toaster } from "@/components/ui/sonner"
28+
import { toast } from "sonner"
2729

2830
function Notes() {
2931

@@ -64,8 +66,13 @@ function Notes() {
6466

6567

6668
const { data: notesData, isLoading: notesLoading, error: notesError } = useNotes({page: page, pageSize: PAGE_SIZE, user_id: user_id})
69+
if(notesError) toast.error(notesError.message)
70+
6771
const { data: kgData, isLoading: kgLoading, error: kgError } = useKnowledgeGraph({user_id: user_id})
72+
if(kgError) toast.error(kgError.message)
73+
6874
const { data: groups, isLoading, error } = useGroups({user_id: user_id})
75+
if(error) toast.error(error.message)
6976

7077
console.log("kgEdges: ", kgData?.kgEdges)
7178

@@ -106,6 +113,7 @@ function Notes() {
106113

107114
return (
108115
<div className='w-full min-w-screen min-h-screen px-4 py-4 bg-gray-100/70 bg-clip-padding backdrop-filter backdrop-blur-sm border border-gray-100 text-gray-800'>
116+
<Toaster richColors position="top-center"/>
109117
<div className='flex justify-between items-center w-10/12 mx-auto p-2'>
110118
<div className='flex items-center gap-4'>
111119
<img src={Icon} className='size-12' />

frontend/tsconfig.app.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717

1818
/* Linting */
1919
"strict": true,
20-
"noUnusedLocals": true,
21-
"noUnusedParameters": true,
20+
"noUnusedLocals": false,
21+
"noUnusedParameters": false,
2222
"erasableSyntaxOnly": true,
2323
"noFallthroughCasesInSwitch": true,
24-
"noUncheckedSideEffectImports": true,
24+
"noUncheckedSideEffectImports": false,
2525

2626
"baseUrl": ".",
2727
"paths": {

0 commit comments

Comments
 (0)