From 8a7fcccc93b4ef36b075069b4b24044daa93874f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E0=AE=AE=E0=AE=A9=E0=AF=8B=E0=AE=9C=E0=AF=8D=E0=AE=95?= =?UTF-8?q?=E0=AF=81=E0=AE=AE=E0=AE=BE=E0=AE=B0=E0=AF=8D=20=E0=AE=AA?= =?UTF-8?q?=E0=AE=B4=E0=AE=A9=E0=AE=BF=E0=AE=9A=E0=AF=8D=E0=AE=9A=E0=AE=BE?= =?UTF-8?q?=E0=AE=AE=E0=AE=BF?= Date: Wed, 21 Aug 2024 19:22:30 +0530 Subject: [PATCH] update regext --- frontend/src/services/terminalService.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/services/terminalService.ts b/frontend/src/services/terminalService.ts index e37e5698f1cd..b80865a1fc21 100644 --- a/frontend/src/services/terminalService.ts +++ b/frontend/src/services/terminalService.ts @@ -2,9 +2,9 @@ import ActionType from "#/types/ActionType"; import Session from "./session"; export function sendTerminalCommand(command: string): void { - // replace END OF TEXT character copied from terminal + // replace ^c character when copied from terminal // eslint-disable-next-line no-control-regex - const cleanedCommand = command.replace(/\u0003+/, ""); + const cleanedCommand = command.replace(/\u0003\b/, ""); if (!cleanedCommand) return; const event = { action: ActionType.RUN, args: { command: cleanedCommand } }; const eventString = JSON.stringify(event);