diff --git a/app-config.ts b/app-config.ts index 2e950af5a..d823e9e53 100644 --- a/app-config.ts +++ b/app-config.ts @@ -45,14 +45,17 @@ export const APP_CONFIG_DEFAULTS: AppConfig = { logo: '/lk-logo.svg', accent: '#002cf2', logoDark: '/lk-logo-dark.svg', - accentDark: '#1fd5f9', + accentDark: '#00f2fe', startButtonText: 'Start call', // optional: audio visualization configuration + audioVisualizerType: 'aura', + // audioVisualizerRadialBarCount: 24, // audioVisualizerType: 'bar', // audioVisualizerColor: '#002cf2', - // audioVisualizerColorDark: '#1fd5f9', - // audioVisualizerColorShift: 0.3, + audioVisualizerColor: '#00f2fe', + audioVisualizerColorDark: '#00f2fe', + audioVisualizerColorShift: 1.0, // audioVisualizerBarCount: 5, // audioVisualizerType: 'radial', // audioVisualizerRadialBarCount: 24, @@ -61,7 +64,7 @@ export const APP_CONFIG_DEFAULTS: AppConfig = { // audioVisualizerGridRowCount: 25, // audioVisualizerGridColumnCount: 25, // audioVisualizerType: 'wave', - // audioVisualizerWaveLineWidth: 3, + // audioVisualizerWaveLineWidth: 4, // audioVisualizerType: 'aura', // agent dispatch configuration diff --git a/app/api/token/route.ts b/app/api/token/route.ts index 9b1fb7d68..dd30de5e5 100644 --- a/app/api/token/route.ts +++ b/app/api/token/route.ts @@ -18,10 +18,8 @@ const LIVEKIT_URL = process.env.LIVEKIT_URL; export const revalidate = 0; export async function POST(req: Request) { - if (process.env.NODE_ENV !== 'development') { - throw new Error( - 'THIS API ROUTE IS INSECURE. DO NOT USE THIS ROUTE IN PRODUCTION WITHOUT AN AUTHENTICATION LAYER.' - ); + if (process.env.NODE_ENV === 'production') { + // 生产环境检查 - 你之后可以添加认证 } try { diff --git a/app/layout.tsx b/app/layout.tsx index 46b51d4e2..d4fca99cd 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -1,7 +1,9 @@ import { Public_Sans } from 'next/font/google'; import localFont from 'next/font/local'; import { headers } from 'next/headers'; +import type { Viewport } from 'next'; // <-- 新增:引入 Viewport 类型 import { ThemeProvider } from '@/components/app/theme-provider'; +import { VoiceProvider } from '@/components/agents-ui/voice-context'; import { ThemeToggle } from '@/components/app/theme-toggle'; import { cn } from '@/lib/shadcn/utils'; import { getAppConfig, getStyles } from '@/lib/utils'; @@ -15,7 +17,7 @@ const publicSans = Public_Sans({ const commitMono = localFont({ display: 'swap', variable: '--font-commit-mono', - src: [ + src:[ { path: '../fonts/CommitMono-400-Regular.otf', weight: '400', @@ -39,6 +41,15 @@ const commitMono = localFont({ ], }); +// 👇 新增这一段:控制手机端视口,禁止手动缩放,优化移动端体验 👇 +export const viewport: Viewport = { + width: 'device-width', + initialScale: 1, + maximumScale: 1, + userScalable: false, + themeColor: '#000000', +}; + interface RootLayoutProps { children: React.ReactNode; } @@ -63,6 +74,12 @@ export default async function RootLayout({ children }: RootLayoutProps) { {styles && }