Skip to content

Commit

Permalink
Remove frontend terminal prompt string
Browse files Browse the repository at this point in the history
  • Loading branch information
SmartManoj committed Aug 9, 2024
1 parent 47069fb commit 7795062
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions frontend/src/hooks/useTerminal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export const useTerminal = (commands: Command[] = []) => {
terminal.current.loadAddon(fitAddon.current);
terminal.current.open(ref.current);

terminal.current.write("$ ");
terminal.current.write("opendevin@docker-desktop:/ $ ");
terminal.current.onKey(({ key, domEvent }) => {
if (domEvent.key === "Enter") {
terminal.current?.write("\r\n");
Expand Down Expand Up @@ -95,13 +95,13 @@ export const useTerminal = (commands: Command[] = []) => {
const command = commands[i];
const lines = command.content.split("\n");

lines.forEach((line: string) => {
terminal.current?.writeln(line);
lines.forEach((line, index) => {
terminal.current?.write(line);
if (index < lines.length - 1) {
terminal.current?.write("\r\n");
}
});

if (command.type === "output") {
terminal.current.write("\n$ ");
}
}

lastCommandIndex.current = commands.length; // Update the position of the last command
Expand Down

0 comments on commit 7795062

Please sign in to comment.