Adjust refactor

This commit is contained in:
kagami 2024-05-09 21:55:23 +08:00
parent d69f270262
commit f596f7729d
3 changed files with 4 additions and 2 deletions

View File

@ -1,5 +1,6 @@
description: rewrite selected code. description: rewrite selected code.
hint: question hint: question
input: required input: required
help: README.md
steps: steps:
- run: $devchat_python $command_path/rewrite.py "$input" - run: $devchat_python $command_path/rewrite.py "$input"

View File

@ -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. 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: 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." - 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."

View File

@ -2,10 +2,10 @@ import os
import re import re
import sys import sys
from devchat.ide.service import IDEService
from devchat.ide.vscode_services import selected_lines, visible_lines
from devchat.llm import chat from devchat.llm import chat
from lib.ide_service import IDEService
def get_selected_code(): def get_selected_code():
""" """