Skip to content

Commit 17ffb10

Browse files
committed
fix(llm_client): ensure description is handled correctly in result
1 parent 4c7e0ad commit 17ffb10

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

penify_hook/llm_client.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ def generate_commit_summary(self, diff: str, message: str, generate_description:
140140
"description": description
141141
}
142142

143-
if not generate_description:
143+
if not generate_description and 'description' in result:
144144
# If description is missing and user requested it, add a placeholder
145145
del result['description']
146146
return result
@@ -150,5 +150,4 @@ def generate_commit_summary(self, diff: str, message: str, generate_description:
150150
print(f"Error generating commit summary with LLM: {e}")
151151
return {
152152
"title": "Update code",
153-
"description": f"Changes were made to the repository.\n\nUser message: {message}"
154153
}

0 commit comments

Comments
 (0)