Skip to content

Add link to native REPL information - #26134

Open
Eduardo Villalpando Mello (edvilme) wants to merge 6 commits into
mainfrom
pyrepl-link
Open

Add link to native REPL information#26134
Eduardo Villalpando Mello (edvilme) wants to merge 6 commits into
mainfrom
pyrepl-link

Conversation

@edvilme

Copy link
Copy Markdown

Fixes #24754

image

This pull request refactors how shell integration sequences are managed in python_files/pythonrc.py by introducing a dedicated ShellIntegrationSequence enum, and updates related string formatting to use this enum. It also updates user-facing messages in both the Python startup script and the VS Code terminal link provider to include a documentation URL. These changes improve maintainability, clarity, and user guidance.

Shell integration refactoring:

  • Introduced the ShellIntegrationSequence enum to centralize shell integration control sequences, replacing hard-coded string literals throughout the code. [1] [2]
  • Refactored the __str__ method in the prompt class to use the new enum values, improving readability and reducing duplication.

User guidance improvements:

  • Updated the printed startup message in pythonrc.py to include a documentation URL, guiding users to more information about the VS Code Native REPL.
  • Updated the expected link text in pythonStartupLinkProvider.ts to match the new message format (excluding the URL), ensuring the link detection logic remains consistent with the Python script output.

@edvilme Eduardo Villalpando Mello (edvilme) changed the title Pyrepl link Add link to native REPL information Aug 31, 2026
@bschnurr

Bill Schnurr (bschnurr) commented Aug 31, 2026

Copy link
Copy Markdown
Member

🔒 Automated review in progress — Bill Schnurr (@bschnurr) is auto-reviewing this PR.

@bschnurr

Copy link
Copy Markdown
Member

Verification: The relevant tests could not be fully run in the isolated environment; this review is not fully verified.

Result: could-not-verify

Summary: Verification could not run because no trusted sandbox image is configured for `microsoft/vscode-python`, and local execution was not authorized. The PR modifies existing Python and TypeScript tests but adds no new test cases. Linux startup-message behavior lacks coverage because the non-Darwin print test is restricted to Windows.

Test runs: 1 not run

  • ⚠️ Not run | Dependency and test discovery preflight | git status --short && git branch --show-current && git diff --name-status upstream/main...HEAD && git diff --unified=0 upstream/main...HEAD -- python_files/tests/test_shell_integration.py src/test/terminals/shellIntegration/pythonStartup.test.ts && echo AUTOMATION_SANDBOX_PROFILE=$AUTOMATION_SANDBOX_PROFILE && if [ -d node_modules ]; then echo node_modules=present; else echo node_modules=missing; fi && python --version && node --version && npm --version
⚠️ Dependency and test discovery preflight diagnostic output
Container verification could not start: no trusted sandbox image is configured for microsoft/vscode-python. Local execution was not authorized for this PR HEAD.

@bschnurr Bill Schnurr (bschnurr) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved via Review Center.

@bschnurr Bill Schnurr (bschnurr) added the review-auto:approved Automated review: no blocking findings (approval posted). label Sep 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature-request Request for new features or functionality review-auto:approved Automated review: no blocking findings (approval posted).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Embed Native REPL description link in the terminal

2 participants