Skip to content

Commit 8ce90be

Browse files
author
ajosh0504
committed
Pre-commit checks pass
1 parent f6af944 commit 8ce90be

Some content is hidden

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

57 files changed

+15
-67
lines changed

apps/mongo-feed/.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ node_modules
22
.env
33
.env.local
44
package-lock.json
5-
.next
5+
.next

apps/mongo-feed/app/api/agent-analysis/route.ts

-1
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,3 @@ export async function GET() {
4343
return NextResponse.json({ error: "An error occurred while fetching agent analysis." }, { status: 500 })
4444
}
4545
}
46-

apps/mongo-feed/app/api/agent-sentiment/route.ts

-1
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,3 @@ export async function GET() {
4848
return NextResponse.json({ error: "An error occurred while fetching agent sentiment." }, { status: 500 })
4949
}
5050
}
51-

apps/mongo-feed/app/api/analyze-feedback/route.ts

-1
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,3 @@ export async function POST(req: NextRequest) {
5353
return NextResponse.json({ error: "An error occurred while analyzing feedback." }, { status: 500 })
5454
}
5555
}
56-

apps/mongo-feed/app/api/analyze-sentiment/route.ts

-1
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,3 @@ export async function POST(req: NextRequest) {
3232
return NextResponse.json({ error: 'An error occurred while analyzing sentiment.' }, { status: 500 });
3333
}
3434
}
35-

apps/mongo-feed/app/api/feedback/overview/route.ts

-1
Original file line numberDiff line numberDiff line change
@@ -88,4 +88,3 @@ export async function GET() {
8888
return NextResponse.json({ error: "Failed to fetch feedback overview" }, { status: 500 })
8989
}
9090
}
91-

apps/mongo-feed/app/api/feedback/recent/route.ts

-1
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,3 @@ export async function GET() {
5151
return NextResponse.json({ error: "Failed to fetch recent feedback" }, { status: 500 })
5252
}
5353
}
54-

apps/mongo-feed/app/api/feedback/sentiment-distribution/route.ts

-1
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,3 @@ export async function GET() {
3838
return NextResponse.json({ error: "An error occurred while fetching sentiment distribution." }, { status: 500 })
3939
}
4040
}
41-

apps/mongo-feed/app/api/feedback/top-issues/route.ts

-1
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,3 @@ export async function GET() {
5757
return NextResponse.json({ error: "An error occurred while fetching top issues." }, { status: 500 })
5858
}
5959
}
60-

apps/mongo-feed/app/api/feedback/trend/route.ts

-1
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,3 @@ export async function GET() {
6969
return NextResponse.json({ error: "An error occurred while fetching feedback trend." }, { status: 500 })
7070
}
7171
}
72-

apps/mongo-feed/app/api/past-analysis/route.ts

-1
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,3 @@ function calculateDuration(start: Date, end: Date): string {
4242
const seconds = Math.floor((durationMs % 60000) / 1000)
4343
return `${minutes}m ${seconds}s`
4444
}
45-

apps/mongo-feed/app/api/process-chat/route.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const chatAnalysisSchema = z.object({
2424
),
2525
})
2626

27-
const systemPrompt = `You are an AI assistant that analyzes customer service chat conversations for MongoFeed, a feedback analysis platform.
27+
const systemPrompt = `You are an AI assistant that analyzes customer service chat conversations for MongoFeed, a feedback analysis platform.
2828
Your task is to analyze the provided chat messages and return a structured analysis including:
2929
- summary: A brief summary of the conversation (max 3 sentences)
3030
- overallSentiment: The overall sentiment of the conversation (positive, negative, or neutral)
@@ -141,4 +141,3 @@ export async function POST(req: NextRequest) {
141141
return NextResponse.json({ error: "An error occurred while processing the chat." }, { status: 500 })
142142
}
143143
}
144-

apps/mongo-feed/app/api/process-queue/route.ts

-1
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,3 @@ export async function GET() {
5656
return NextResponse.json({ error: "An error occurred while fetching the process queue." }, { status: 500 })
5757
}
5858
}
59-

apps/mongo-feed/app/api/processing-logs/[id]/route.ts

-1
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,3 @@ export async function GET(req: NextRequest, { params }: { params: { id: string }
2424
return NextResponse.json({ error: "An error occurred while fetching processing logs." }, { status: 500 })
2525
}
2626
}
27-

apps/mongo-feed/app/api/submit-chat/route.ts

-1
Original file line numberDiff line numberDiff line change
@@ -113,4 +113,3 @@ async function processChatAnalysis(db, chatId: ObjectId, messages) {
113113
await db.collection("chat_queue").updateOne({ _id: chatId }, { $set: { status: "error", updatedAt: new Date() } })
114114
}
115115
}
116-

apps/mongo-feed/app/charts/page.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,3 @@ export default function ChartsPage() {
4040
</div>
4141
)
4242
}
43-

apps/mongo-feed/app/feedback/loading.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,3 @@ import { LoadingSpinner } from "@/components/ui/loading-spinner"
33
export default function Loading() {
44
return <LoadingSpinner />
55
}
6-

apps/mongo-feed/app/feedback/page.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,3 @@ export default async function FeedbackPage() {
2828
</div>
2929
)
3030
}
31-

apps/mongo-feed/app/globals.css

-1
Original file line numberDiff line numberDiff line change
@@ -74,4 +74,3 @@
7474
@apply bg-background text-foreground;
7575
}
7676
}
77-

apps/mongo-feed/app/layout.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,3 @@ export default function RootLayout({
3535
</html>
3636
)
3737
}
38-

apps/mongo-feed/app/page.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -191,4 +191,3 @@ export default function HomePage() {
191191
</div>
192192
)
193193
}
194-

apps/mongo-feed/app/paste/page.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,3 @@ export default function PastePage() {
1616
</div>
1717
)
1818
}
19-

apps/mongo-feed/app/process-queue/page.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,3 @@ export default function ProcessQueuePage() {
4242
</div>
4343
)
4444
}
45-

apps/mongo-feed/app/sentiment/page.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,3 @@ export default function SentimentPage() {
77
</div>
88
)
99
}
10-

apps/mongo-feed/app/upload/page.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,3 @@ export default function UploadPage() {
1616
</div>
1717
)
1818
}
19-

apps/mongo-feed/components.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@
1818
"hooks": "@/hooks"
1919
},
2020
"iconLibrary": "lucide"
21-
}
21+
}

apps/mongo-feed/components/agent-analysis.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -89,4 +89,3 @@ export function AgentAnalysis() {
8989
</Card>
9090
)
9191
}
92-

apps/mongo-feed/components/charts/feedback-trend.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -98,4 +98,3 @@ export function FeedbackTrendChart() {
9898
</div>
9999
)
100100
}
101-

apps/mongo-feed/components/charts/sentiment-distribution.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -131,4 +131,3 @@ export function SentimentDistributionChart() {
131131
</div>
132132
)
133133
}
134-

apps/mongo-feed/components/charts/top-issues.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -88,4 +88,3 @@ export function TopIssuesChart() {
8888
</div>
8989
)
9090
}
91-

apps/mongo-feed/components/feedback/feedback-chart.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,3 @@ export function FeedbackChart({ data }: FeedbackChartProps) {
3232
</ResponsiveContainer>
3333
)
3434
}
35-

apps/mongo-feed/components/feedback/list.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,3 @@ export function FeedbackList() {
6060
</div>
6161
)
6262
}
63-

apps/mongo-feed/components/feedback/overview.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -85,4 +85,3 @@ export function FeedbackOverview() {
8585
</Card>
8686
)
8787
}
88-

apps/mongo-feed/components/feedback/recent-feedback.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -67,4 +67,3 @@ export function RecentFeedback() {
6767
</div>
6868
)
6969
}
70-

apps/mongo-feed/components/feedback/top-issues.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,3 @@ export function TopIssues() {
5858
</div>
5959
)
6060
}
61-

apps/mongo-feed/components/navigation.tsx

+6-7
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,14 @@ export function Navigation() {
5151
</ScrollArea>
5252
)
5353

54-
const NavItem = ({
55-
href,
56-
icon: Icon,
57-
children
58-
}: {
54+
const NavItem = ({
55+
href,
56+
icon: Icon,
57+
children
58+
}: {
5959
href: string
6060
icon: React.ComponentType<{ className?: string }>
61-
children: React.ReactNode
61+
children: React.ReactNode
6262
}) => {
6363
const isActive = pathname === href
6464
return (
@@ -111,4 +111,3 @@ export function Navigation() {
111111
</>
112112
)
113113
}
114-

apps/mongo-feed/components/past-analysis.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -92,4 +92,3 @@ export function PastAnalysis() {
9292
</div>
9393
)
9494
}
95-

apps/mongo-feed/components/paste-form.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -180,4 +180,3 @@ export function PasteForm() {
180180
</form>
181181
)
182182
}
183-

apps/mongo-feed/components/processing-queue.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -148,4 +148,3 @@ export function ProcessingQueue() {
148148
</Suspense>
149149
)
150150
}
151-

apps/mongo-feed/components/sentiment/agent-list.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -209,4 +209,3 @@ export function AgentList() {
209209
</Card>
210210
)
211211
}
212-

apps/mongo-feed/components/theme-provider.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,3 @@ import { type ThemeProviderProps } from "next-themes"
77
export function ThemeProvider({ children, ...props }: ThemeProviderProps) {
88
return <NextThemesProvider {...props}>{children}</NextThemesProvider>
99
}
10-

apps/mongo-feed/components/ui/badge.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,3 @@ function Badge({ className, variant, ...props }: BadgeProps) {
2323
}
2424

2525
export { Badge, badgeVariants }
26-

apps/mongo-feed/components/ui/collapsible.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,3 @@ const CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger
1010
const CollapsibleContent = CollapsiblePrimitive.CollapsibleContent
1111

1212
export { Collapsible, CollapsibleTrigger, CollapsibleContent }
13-

apps/mongo-feed/components/ui/error-message.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,3 @@ export function ErrorMessage({ message }: ErrorMessageProps) {
99
</div>
1010
)
1111
}
12-

apps/mongo-feed/components/ui/loading-spinner.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,3 @@ export function LoadingSpinner() {
55
</div>
66
)
77
}
8-

apps/mongo-feed/components/upload-form.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -152,4 +152,3 @@ export function UploadForm() {
152152
</div>
153153
)
154154
}
155-

apps/mongo-feed/lib/analyze-content.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { generateObject } from "ai"
33
import { z } from "zod"
44

55
const sentimentAnalysisSchema = z.object({
6-
sentiment:
6+
sentiment:
77
z.object({
88
name: z.string(),
99
sentiment: z.enum(["positive", "negative", "neutral"]),
@@ -97,4 +97,3 @@ export async function analyzeProductReview(
9797
throw error
9898
}
9999
}
100-

apps/mongo-feed/lib/bedrock.ts

-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,3 @@ export const bedrock = createAmazonBedrock({
88
secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY!,
99
},
1010
});
11-

apps/mongo-feed/lib/chat-processing.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const chatAnalysisSchema = z.object({
1111

1212
type ChatAnalysis = z.infer<typeof chatAnalysisSchema>
1313

14-
const systemPrompt = `You are an AI assistant that analyzes customer service chat conversations.
14+
const systemPrompt = `You are an AI assistant that analyzes customer service chat conversations.
1515
Your task is to analyze the entire chat conversation provided and return a structured analysis including:
1616
- overallSentiment: The overall sentiment of the entire conversation (positive, negative, or neutral)
1717
- mainTopics: An array of main topics discussed throughout the conversation (max 5 topics)
@@ -42,4 +42,3 @@ export async function analyzeEntireChat(messages: { role: string; content: strin
4242
}
4343
}
4444
}
45-

apps/mongo-feed/lib/db/models.ts

-1
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,3 @@ export async function getChatsCollection() {
2828
cachedChats = chats
2929
return chats
3030
}
31-

apps/mongo-feed/lib/db/queries.ts

-1
Original file line numberDiff line numberDiff line change
@@ -87,4 +87,3 @@ export async function getDailyFeedbackTrend(days = 30) {
8787
])
8888
.toArray()
8989
}
90-

apps/mongo-feed/lib/mongodb.ts

-1
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,3 @@ if (process.env.NODE_ENV === "development") {
2727
// Export a module-scoped MongoClient promise. By doing this in a
2828
// separate module, the client can be shared across functions.
2929
export default clientPromise
30-

apps/mongo-feed/lib/utils.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { type ClassValue, clsx } from "clsx"
22
import { twMerge } from "tailwind-merge"
3-
3+
44
export function cn(...inputs: ClassValue[]) {
55
return twMerge(clsx(inputs))
66
}
7-

apps/mongo-feed/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,4 @@
6969
"tailwindcss": "^3.4.17",
7070
"typescript": "^5"
7171
}
72-
}
72+
}
+1-1

0 commit comments

Comments
 (0)