Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down
9 changes: 7 additions & 2 deletions src/components/ai-elements/prompt-input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,7 @@ export const PromptInput = ({
}
}
},
// eslint-disable-next-line react-hooks/exhaustive-deps -- cleanup only on unmount; filesRef always current
[usingProvider]
);

Expand Down Expand Up @@ -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
Expand Down
12 changes: 11 additions & 1 deletion src/instrumentation.ts
Original file line number Diff line number Diff line change
@@ -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);
}
}