Skip to content

Enable Local File Selection for Settings Import in Remote SSH Environments #7930

@jqknono

Description

@jqknono

What specific problem does this solve?

When using Roo Code via Remote SSH connection, the import/export functionality for settings is inconsistent and creates workflow friction.

  • Who is affected? Users who develop on remote servers via SSH and need to migrate or backup their Roo Code settings between local and remote environments.

  • When does this happen? This occurs specifically when a user is connected to a remote host via the "Remote - SSH" extension and navigates to the "About Roo Code" view to manage their settings.

  • Current behaviour:

    • User clicks Export: The system correctly opens a file dialog on the local machine, allowing the user to save the settings.json file to their desktop or other local directory.

    • User clicks Import: The system incorrectly opens a file dialog on the remote SSH machine. The user can only browse the remote server's file system and cannot select a .json file that exists on their local machine.

  • Expected behaviour: The Import button should provide a consistent experience, allowing users to choose a settings file from their local machine, just like the Export function does.

  • What's the impact? This asymmetry forces users to perform a cumbersome workaround: they must first manually copy their local settings file to the remote server using a separate SCP/SFTP tool or terminal command before they can import it. This disrupts the workflow, adds unnecessary steps, and increases the time required to restore a settings backup or sync settings across machines.

This fix is crucial for maintaining a seamless and intuitive user experience in remote development scenarios.

Additional context (optional)

No response

Roo Code Task Links (Optional)

No response

Request checklist

  • I've searched existing Issues and Discussions for duplicates
  • This describes a specific problem with clear impact and context

Interested in implementing this?

  • Yes, I'd like to help implement this feature

Implementation requirements

  • I understand this needs approval before implementation begins

How should this be solved? (REQUIRED if contributing, optional otherwise)

Add import from the local settings file.

Before:

Image

After:

Image

How will we know it works? (Acceptance Criteria - REQUIRED if contributing, optional otherwise)

Scenario: Importing settings from a local file while connected via Remote-SSH

Given I am connected to a remote development host using the Remote-SSH extension in VSCode
And I have a valid Roo Code settings .json file on my local machine
When I open the "About Roo Code" view and click the "Import" button
Then a system file dialog opens, allowing me to browse the file system of my local machine
And I can select a local .json file to import
And upon selection, the settings are successfully applied to Roo Code on the remote host

Technical considerations (REQUIRED if contributing, optional otherwise)

The vscode.window.showSaveDialog and vscode.window.showOpenDialog APIs cannot properly handle URI requirements in remote SSH scenarios. To resolve this, we would need to switch to using vscode.window.showQuickPick to allow the user to select a file for reading or writing instead.

Trade-offs and risks (REQUIRED if contributing, optional otherwise)

  • Potential negative impacts: The proposed implementation would involve saving the local settings file to a temporary directory on the remote machine before importing it, with deletion immediately after the process completes. However, this approach still introduces a small window during which the settings could potentially be exposed. That said, this still presents a lower risk than the current implementation in Roo Code, which offers no import capability from local files in remote SSH scenarios. A more robust long-term solution would be to encrypt settings at rest, but we can defer the discussion on secure storage and encryption of settings for a future iteration.

Metadata

Metadata

Assignees

Labels

Issue - In ProgressSomeone is actively working on this. Should link to a PR soon.enhancementNew feature or requestproposal

Type

No type

Projects

Status

Issue [In Progress]

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions