Refactor imports and remove duplicate code in main.py
This commit is contained in:
parent
1b4540a7a8
commit
13ac7c466a
@ -2,6 +2,7 @@ import os
|
||||
import re
|
||||
import sys
|
||||
|
||||
from lib.ide_service import IDEService
|
||||
from devchat.llm import chat
|
||||
from devchat.memory import FixSizeChatMemory
|
||||
|
||||
@ -34,7 +35,7 @@ To add comments, you need to follow the following rules:
|
||||
5. don't change string value in code block;
|
||||
|
||||
there are a examples with correct outputs:
|
||||
input:
|
||||
input:
|
||||
file: a1.py
|
||||
```
|
||||
# print("hello")
|
||||
@ -191,8 +192,6 @@ file: t2.ts
|
||||
},
|
||||
]
|
||||
|
||||
from lib.ide_service import IDEService
|
||||
|
||||
|
||||
def get_selected_code():
|
||||
"""Retrieves the selected lines of code from the user's selection."""
|
||||
|
@ -2,6 +2,8 @@ import os
|
||||
import re
|
||||
import sys
|
||||
|
||||
from lib.ide_service import IDEService
|
||||
|
||||
from devchat.llm import chat
|
||||
from devchat.memory import FixSizeChatMemory
|
||||
|
||||
@ -142,8 +144,6 @@ def content_to_json(content):
|
||||
},
|
||||
]
|
||||
|
||||
from lib.ide_service import IDEService
|
||||
|
||||
|
||||
def get_selected_code():
|
||||
"""
|
||||
|
@ -2,8 +2,8 @@ import os
|
||||
import re
|
||||
import sys
|
||||
|
||||
from devchat.ide.service import IDEService
|
||||
from devchat.ide.vscode_services import selected_lines, visible_lines
|
||||
from lib.ide_service import IDEService
|
||||
|
||||
from devchat.llm import chat
|
||||
from devchat.memory import FixSizeChatMemory
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user