diff --git a/merico/refactor/command.yml b/merico/refactor/command.yml index bbededf..36ffc42 100644 --- a/merico/refactor/command.yml +++ b/merico/refactor/command.yml @@ -1,5 +1,6 @@ description: rewrite selected code. hint: question input: required +help: README.md steps: - run: $devchat_python $command_path/rewrite.py "$input" \ No newline at end of file diff --git a/merico/refactor/names/command.yml b/merico/refactor/names/command.yml index 5da4a09..b509f0d 100644 --- a/merico/refactor/names/command.yml +++ b/merico/refactor/names/command.yml @@ -1,4 +1,5 @@ description: Automatically rename poorly-named local variables for improved readability. Select the code segment and execute this command to optimize variable names. +help: ../README.md steps: - run: $devchat_python $command_path/../rewrite.py "Refine internal variable and function names within the code to achieve concise and meaningful identifiers that comply with English naming conventions." diff --git a/merico/refactor/rewrite.py b/merico/refactor/rewrite.py index f956919..38e2de8 100644 --- a/merico/refactor/rewrite.py +++ b/merico/refactor/rewrite.py @@ -2,10 +2,10 @@ import os import re import sys -from devchat.ide.service import IDEService -from devchat.ide.vscode_services import selected_lines, visible_lines from devchat.llm import chat +from lib.ide_service import IDEService + def get_selected_code(): """