Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use executeCommand instead of sendText to activate Start Terminal REPL #23929

Closed
Tyriar opened this issue Aug 8, 2024 · 1 comment · Fixed by #24078
Closed

Use executeCommand instead of sendText to activate Start Terminal REPL #23929

Tyriar opened this issue Aug 8, 2024 · 1 comment · Fixed by #24078
Assignees
Labels
area-terminal verification-needed Verification of issue is requested verified Verification succeeded

Comments

@Tyriar
Copy link
Member

Tyriar commented Aug 8, 2024

Running & /usr/bin/python3 in the terminal on macOS after starting the REPL:

Screenshot 2024-08-08 at 8 59 58 AM

This is likely because sendText is happening before the prompt is ready. Using the new executeCommand should fix this:

await this.getTerminalService(file, options).sendCommand(command, args);

this.terminal!.sendText(text, true);

@Tyriar Tyriar added the feature-request Request for new features or functionality label Aug 8, 2024
@Tyriar Tyriar removed the feature-request Request for new features or functionality label Aug 8, 2024
@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Aug 8, 2024
@anthonykim1 anthonykim1 added area-terminal and removed triage-needed Needs assignment to the proper sub-team labels Aug 21, 2024
@anthonykim1 anthonykim1 added this to the September 2024 milestone Sep 10, 2024
anthonykim1 added a commit to anthonykim1/vscode-python that referenced this issue Sep 13, 2024
Resolves: microsoft#23929 

TODO: (debt --> in separate PR) Have ensureTerminal return
Promise<Terminal> instead of Promise<void> and saving this in the
TerminalService class. Would avoid many uses of the !, and maybe even
get to throw away the TerminalService class itself.
anthonykim1 added a commit to anthonykim1/vscode-python that referenced this issue Sep 15, 2024
Resolves: microsoft#23929

TODO: (debt --> in separate PR) Have ensureTerminal return
Promise<Terminal> instead of Promise<void> and saving this in the
TerminalService class. Would avoid many uses of the !, and maybe even
get to throw away the TerminalService class itself.
@anthonykim1
Copy link

Verification steps:

  1. Install latest pre-release of the Python extension
  2. Open Python file with Python code
  3. Shift+enter and send code to terminal (You may have to turn off sending to native repl setting in order to send command to terminal via shift+enter)
  4. Observe that you do not see duplicated Python executable+code when you first launch your Python Terminal REPL.

@anthonykim1 anthonykim1 added the verification-needed Verification of issue is requested label Sep 23, 2024
@bpasero bpasero added the verified Verification succeeded label Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-terminal verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants