Fix issue #4876: [Bug]: Entering tab into the bash command line screws it up

This commit is contained in:
openhands 2024-11-10 18:33:04 +00:00
parent 090771674c
commit 421d123f77
2 changed files with 15 additions and 0 deletions

11
frontend/server.log Normal file
View File

@ -0,0 +1,11 @@
> openhands-frontend@0.13.0 dev
> npm run make-i18n && cross-env VITE_MOCK_API=false remix vite:dev
> openhands-frontend@0.13.0 make-i18n
> node scripts/make-i18n-translations.cjs
➜ Local: http://localhost:3001/
➜ Network: use --host to expose
➜ press h + enter to show help

View File

@ -101,6 +101,10 @@ export const useTerminal = (
if (commandBuffer.length > 0) {
commandBuffer = handleBackspace(commandBuffer);
}
} else if (domEvent.key === "Tab") {
// Swallow tab key and convert to space
commandBuffer += " ";
terminal.current?.write(" ");
} else {
// Ignore paste event
if (key.charCodeAt(0) === 22) {