From 77e142eb24ed7fa5a85f517ce84fcd23fcff60b0 Mon Sep 17 00:00:00 2001 From: Levis-w Date: Sun, 10 May 2026 22:20:58 +0800 Subject: [PATCH 1/2] fix: add pointer-events-none to TileLayout to allow scrolling in chat The TileLayout component covers the entire screen with absolute positioning, which intercepts touch/mouse events and prevents scrolling in the chat area below it. Adding pointer-events-none allows events to pass through to the underlying chat content. Co-Authored-By: Claude Opus 4.6 --- .../blocks/agent-session-view-01/components/tile-view.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/agents-ui/blocks/agent-session-view-01/components/tile-view.tsx b/components/agents-ui/blocks/agent-session-view-01/components/tile-view.tsx index 2fbe2f841..86552bd40 100644 --- a/components/agents-ui/blocks/agent-session-view-01/components/tile-view.tsx +++ b/components/agents-ui/blocks/agent-session-view-01/components/tile-view.tsx @@ -106,7 +106,7 @@ export function TileLayout({ const videoHeight = agentVideoTrack?.publication.dimensions?.height ?? 0; return ( -
+
{/* Agent */} From b9d369e134ff752542414e67dab99e9090daf7cc Mon Sep 17 00:00:00 2001 From: Levis-w Date: Wed, 3 Jun 2026 22:37:23 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=9D=E5=AD=98=20AI=20=E7=9A=84?= =?UTF-8?q?=E6=89=80=E6=9C=89=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app-config.ts | 11 +- app/api/token/route.ts | 6 +- app/layout.tsx | 45 +- app/telephone/page.tsx | 10 + app/test/page.tsx | 38 + .../agents-ui/agent-audio-visualizer-aura.tsx | 64 +- .../agents-ui/agent-audio-visualizer-wave.tsx | 1 + .../agents-ui/agent-chat-transcript.tsx | 21 +- .../agents-ui/agent-control-bar-telephone.tsx | 496 + components/agents-ui/agent-control-bar.tsx | 230 +- .../agent-track-control-telephone.tsx | 323 + components/agents-ui/agent-track-control.tsx | 76 +- .../agent-session-block-telephone.tsx | 545 + .../components/agent-session-block.tsx | 576 +- .../components/audio-visualizer.tsx | 7 +- .../components/tile-view.tsx | 15 +- components/agents-ui/bottom-controls.tsx | 96 + components/agents-ui/react-shader-toy.tsx | 172 +- ...ct-shader-toy\345\244\207\344\273\275.tsx" | 979 ++ components/agents-ui/tool-card.tsx | 91 + .../agents-ui/voice-character-button.tsx | 70 + components/agents-ui/voice-context.tsx | 54 + ...7\346\234\254\346\226\207\346\241\243.txt" | 26 + components/ai-elements/message.tsx | 18 +- components/app/app-telephone.tsx | 78 + components/app/app.tsx | 21 +- components/app/view-controller-telephone.tsx | 88 + components/app/welcome-view-telephone.tsx | 75 + components/app/welcome-view.tsx | 39 +- hooks/agents-ui/use-agent-control-bar.ts | 23 +- hooks/useAgentErrors.tsx | 2 +- next.config.ts | 2 + package-lock.json | 12830 ++++++++++++++++ public/icon-192.png | Bin 0 -> 5920 bytes public/icon-1920.png | Bin 0 -> 7404 bytes public/icon-512.png | Bin 0 -> 5920 bytes public/icon-5120.png | Bin 0 -> 4711 bytes public/manifest.json | 21 + sw.js | 16 + web.log | 207 + ...1\351\222\256\351\253\230\345\272\246.txt" | 4 + 41 files changed, 16914 insertions(+), 462 deletions(-) create mode 100644 app/telephone/page.tsx create mode 100644 app/test/page.tsx create mode 100644 components/agents-ui/agent-control-bar-telephone.tsx create mode 100644 components/agents-ui/agent-track-control-telephone.tsx create mode 100644 components/agents-ui/blocks/agent-session-view-01/components/agent-session-block-telephone.tsx create mode 100644 components/agents-ui/bottom-controls.tsx create mode 100644 "components/agents-ui/react-shader-toy\345\244\207\344\273\275.tsx" create mode 100644 components/agents-ui/tool-card.tsx create mode 100644 components/agents-ui/voice-character-button.tsx create mode 100644 components/agents-ui/voice-context.tsx create mode 100644 "components/agents-ui/\346\226\260\345\273\272 \346\226\207\346\234\254\346\226\207\346\241\243.txt" create mode 100644 components/app/app-telephone.tsx create mode 100644 components/app/view-controller-telephone.tsx create mode 100644 components/app/welcome-view-telephone.tsx create mode 100644 package-lock.json create mode 100644 public/icon-192.png create mode 100644 public/icon-1920.png create mode 100644 public/icon-512.png create mode 100644 public/icon-5120.png create mode 100644 public/manifest.json create mode 100644 sw.js create mode 100644 web.log create mode 100644 "\344\277\256\346\224\271\351\237\263\350\211\262\346\214\211\351\222\256\351\253\230\345\272\246.txt" 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 && } {pageTitle} + + {/* 👇 新增的 PWA 核心标签 👇 */} + + + + - {children} + + {children} +
+ {/* 👇👇👇 在这里插入这段 Script 代码 👇👇👇 */} +