diff --git a/apps/web/app/api/google/calendar/callback/route.ts b/apps/web/app/api/google/calendar/callback/route.ts index 588c30d29e..b3ce59a7d0 100644 --- a/apps/web/app/api/google/calendar/callback/route.ts +++ b/apps/web/app/api/google/calendar/callback/route.ts @@ -1,4 +1,4 @@ -import { type NextRequest, NextResponse } from "next/server"; +import { NextResponse } from "next/server"; import { env } from "@/env"; import prisma from "@/utils/prisma"; import { createScopedLogger } from "@/utils/logger"; @@ -15,7 +15,7 @@ import { prefixPath } from "@/utils/path"; const logger = createScopedLogger("google/calendar/callback"); -export const GET = withError(async (request: NextRequest) => { +export const GET = withError(async (request) => { const searchParams = request.nextUrl.searchParams; const code = searchParams.get("code"); const receivedState = searchParams.get("state"); diff --git a/apps/web/app/api/google/linking/callback/route.ts b/apps/web/app/api/google/linking/callback/route.ts index 4790104b15..9dd95ac3fb 100644 --- a/apps/web/app/api/google/linking/callback/route.ts +++ b/apps/web/app/api/google/linking/callback/route.ts @@ -1,4 +1,4 @@ -import { type NextRequest, NextResponse } from "next/server"; +import { NextResponse } from "next/server"; import { env } from "@/env"; import prisma from "@/utils/prisma"; import { createScopedLogger } from "@/utils/logger"; @@ -10,7 +10,7 @@ import { parseOAuthState } from "@/utils/oauth/state"; const logger = createScopedLogger("google/linking/callback"); -export const GET = withError(async (request: NextRequest) => { +export const GET = withError(async (request) => { const searchParams = request.nextUrl.searchParams; const code = searchParams.get("code"); const receivedState = searchParams.get("state"); diff --git a/apps/web/app/api/outlook/linking/callback/route.ts b/apps/web/app/api/outlook/linking/callback/route.ts index 02bcbd4d50..a915bb1995 100644 --- a/apps/web/app/api/outlook/linking/callback/route.ts +++ b/apps/web/app/api/outlook/linking/callback/route.ts @@ -1,4 +1,4 @@ -import { type NextRequest, NextResponse } from "next/server"; +import { NextResponse } from "next/server"; import { env } from "@/env"; import prisma from "@/utils/prisma"; import { createScopedLogger } from "@/utils/logger"; @@ -10,7 +10,7 @@ import { parseOAuthState } from "@/utils/oauth/state"; const logger = createScopedLogger("outlook/linking/callback"); -export const GET = withError(async (request: NextRequest) => { +export const GET = withError(async (request) => { if (!env.MICROSOFT_CLIENT_ID || !env.MICROSOFT_CLIENT_SECRET) throw new SafeError("Microsoft login not enabled"); diff --git a/apps/web/app/api/sso/signin/route.ts b/apps/web/app/api/sso/signin/route.ts index 93fc7afc7b..9dff6f4975 100644 --- a/apps/web/app/api/sso/signin/route.ts +++ b/apps/web/app/api/sso/signin/route.ts @@ -1,5 +1,5 @@ import { z } from "zod"; -import { type NextRequest, NextResponse } from "next/server"; +import { NextResponse } from "next/server"; import { betterAuthConfig } from "@/utils/auth"; import { SafeError } from "@/utils/error"; import { createScopedLogger } from "@/utils/logger"; @@ -18,7 +18,7 @@ export type GetSsoSignInResponse = { const logger = createScopedLogger("api/sso/signin"); -export const GET = withError(async (request: NextRequest) => { +export const GET = withError(async (request) => { const { searchParams } = new URL(request.url); const { email, organizationSlug } = getSsoSignInSchema.parse({ email: searchParams.get("email"), diff --git a/apps/web/utils/ai/digest/summarize-email-for-digest.ts b/apps/web/utils/ai/digest/summarize-email-for-digest.ts index cd8398d78a..82f4c96d7d 100644 --- a/apps/web/utils/ai/digest/summarize-email-for-digest.ts +++ b/apps/web/utils/ai/digest/summarize-email-for-digest.ts @@ -37,11 +37,22 @@ I will provide you with: Guidelines for summarizing the email: - If the email is spam, promotional, or irrelevant, return "null". -- If the email contains extractable fields such as order details, totals, dates, IDs, payment info, or similar, summarize the content using a list with the format: "Key: Value" separated by newlines. +- Do NOT mention the sender's name or start with phrases like "This is a message from X" or "This email from Y" - the sender information is already displayed separately. +- Jump directly into the content of the email. +- Use bullet points to structure information when there are multiple items or pieces of information. +- For structured data (orders, confirmations, receipts): + • Use bullet points with "Key: Value" format + • Example: "• Order Total: $99.99\\n• Delivery Date: March 15" +- For newsletters and announcements: + • List the key topics or news items as bullet points + • Focus on the actual content, not who sent it + • Example: "• New feature launches next week\\n• 20% discount on all plans\\n• Webinar scheduled for Friday" +- For direct messages: + • Summarize in the second person (as if talking directly to the user) + • Use phrasing like: "You have received…", "You are invited…", "Your request has been…" + • Use bullet points if there are multiple action items or pieces of information - Only include human-relevant and human-readable information. - Exclude opaque technical identifiers like account IDs, payment IDs, tracking tokens, or long alphanumeric strings that aren't meaningful to users. -- If the email is a direct message to the user, summarize it in the second person (as if talking directly to the user) using phrasing such as: "You have received…", "X wants you to review…", "You are invited…", etc. -- If second person phrasing is not possible or natural (e.g., for announcements, newsletters, or general updates), summarize in a clear neutral third-person style. `; const prompt = ` diff --git a/version.txt b/version.txt index 6f9cc441d9..58cc4d41b0 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -v2.12.2 +v2.12.3