Skip to content

Commit f4dd95d

Browse files
committed
bugfix
1 parent 6365904 commit f4dd95d

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

lazydev/modules/developer.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,9 @@ def write_file_content(self, file_path, review_iteration: int = 1):
166166
)
167167
response = self.brain_storm(
168168
review_prompt, f'code-{file_path.split("/")[-1]}')
169-
response = response.strip('"\'`-\n')
170-
if (response.strip('"\'`-\n') == "NONE"):
169+
response = response.strip('."\'`-\n')
170+
nonecheck_response = response.split("\n")[0].split(" ")[0]
171+
if (nonecheck_response.strip('."\'`-\n') == "NONE"):
171172
break
172173
code = response
173174

lazydev/modules/prompts.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,11 +179,15 @@ def get_code_feedback(draft: str, question, clarifications: str, plan: str, file
179179
your job is to find problems with the code and refine it.
180180
181181
As your response will go to an automated parser, things to keep in mind all the time:
182-
* if no refinement is required then just say NONE, and nothing else
182+
* if no refinement is required then just say "NONE", and nothing else
183183
* only write the file content, no expiation, no pretext as this will directly go as code.
184184
* if the language support, add comments at steps, which expains what you are about to do, dont add comment if comment is not supported by the file type example json file
185185
* keep in mind there wont be any additional files other then the full files list given above, only use files that are mentioned in that list
186186
Begin!
187+
188+
File: {file_path_to_write}
189+
190+
Refined code:
187191
"""
188192

189193
def get_compressed_code(code: str):

setup.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
setup(
77
name="lazydev",
8-
version='0.0.8',
8+
version='0.0.9',
99
packages=find_packages(),
1010
install_requires=[
1111
"langchain>=0.0.188",
@@ -46,3 +46,8 @@
4646
# ],
4747

4848
)
49+
50+
# steps to build and publish
51+
# source .venv/bin/activate
52+
# python -m bild
53+
# twine upload dist/*

0 commit comments

Comments
 (0)