diff --git a/.gitignore b/.gitignore index 8d2ffe0f..cf075fca 100644 --- a/.gitignore +++ b/.gitignore @@ -54,6 +54,13 @@ next-env.d.ts # user uploads (runtime data) .codepilot-uploads/ +# runtime logs +/logs/ + +# local fork icons (not upstream) +src/app/apple-icon.png +src/app/icon.png + # monorepo: site app build artifacts apps/site/.next/ apps/site/.source/ diff --git a/src/components/ai-elements/prompt-input.tsx b/src/components/ai-elements/prompt-input.tsx index 8acb21d8..cc4e796a 100644 --- a/src/components/ai-elements/prompt-input.tsx +++ b/src/components/ai-elements/prompt-input.tsx @@ -678,7 +678,7 @@ export const PromptInput = ({ } } }, - // eslint-disable-next-line react-hooks/exhaustive-deps -- cleanup only on unmount; filesRef always current + [usingProvider] ); @@ -920,7 +920,12 @@ export const PromptInputTextarea = ({ [attachments] ); - const handleCompositionEnd = useCallback(() => setIsComposing(false), []); + const handleCompositionEnd = useCallback(() => { + // Delay resetting isComposing so that the Enter keydown fired + // right after compositionend (macOS Chinese IME confirming + // English text) is still suppressed. + setTimeout(() => setIsComposing(false), 0); + }, []); const handleCompositionStart = useCallback(() => setIsComposing(true), []); const controlledProps = controller diff --git a/src/instrumentation.ts b/src/instrumentation.ts index c1c1b177..f1e9f0f0 100644 --- a/src/instrumentation.ts +++ b/src/instrumentation.ts @@ -1,10 +1,20 @@ /** * Next.js instrumentation hook — runs once when the server starts. - * Used to initialize runtime log capture for the Doctor export feature. + * Used to trigger bridge auto-start and initialize runtime log capture. */ export async function register() { if (process.env.NEXT_RUNTIME === 'nodejs') { const { initRuntimeLog } = await import('@/lib/runtime-log'); initRuntimeLog(); + + // Delay to let the database and other infrastructure initialize + setTimeout(async () => { + try { + const { tryAutoStart } = await import('@/lib/bridge/bridge-manager'); + tryAutoStart(); + } catch (err) { + console.error('[instrumentation] Bridge auto-start failed:', err); + } + }, 3000); } }