cody icon indicating copy to clipboard operation
cody copied to clipboard

Restoration of unit test generation, path normalization

Open tomaszgolebiowski opened this issue 10 months ago • 0 comments

This PR adds a class that attempts to normalize all the Uri with file paths that we get from the agent. Non-standard formatted uri causes inability to create file in editor (ex. file with unit tests). In addition, the editor does not support the creation of new files in memory by which the use of the prefix untitled in uri was incorrectly interpreted as a request to create a scratchpad file. This PR causes that if the agent request that a file needs to be created, it will be created as a project file (not a scratch file).

Test plan

Scenario I

  1. Open file with code in JB editor
  2. Select code and open context menu
  3. Run Generate unit test command
  4. New test file should appear

Scenario II

  1. On Windows start JB editor
  2. From sidebar select Remote Development -> WSL
  3. Use + button to start wizard to configure new Ubuntu environment
  4. Select project to edit
  5. Start editing remote project
  6. Select code and open context menu
  7. Run Generate unit test command
  8. New test file should appear

tomaszgolebiowski avatar Apr 18 '25 10:04 tomaszgolebiowski