mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-21 10:34:35 -07:00
Make PASTE_WORKAROUND the default. (#12008)
This commit is contained in:
committed by
GitHub
parent
ce26b58f09
commit
ef70e63230
@@ -481,19 +481,8 @@ export function useKeypressContext() {
|
||||
return context;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines if the passthrough stream workaround should be used.
|
||||
* This is necessary for Node.js versions older than 20 or when the
|
||||
* PASTE_WORKAROUND environment variable is set, to correctly handle
|
||||
* paste events.
|
||||
*/
|
||||
function shouldUsePassthrough(): boolean {
|
||||
const nodeMajorVersion = parseInt(process.versions.node.split('.')[0], 10);
|
||||
return (
|
||||
nodeMajorVersion < 20 ||
|
||||
process.env['PASTE_WORKAROUND'] === '1' ||
|
||||
process.env['PASTE_WORKAROUND'] === 'true'
|
||||
);
|
||||
return process.env['PASTE_WORKAROUND'] !== 'false';
|
||||
}
|
||||
|
||||
export function KeypressProvider({
|
||||
|
||||
Reference in New Issue
Block a user