Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update project.py, Fix Type Error #361

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 8 additions & 6 deletions src/project.py
Expand Up @@ -120,12 +120,14 @@ def get_all_messages_formatted(self, project: str):
if project_state:
message_stack = json.loads(project_state.message_stack_json)
for message in message_stack:
if message["from_devika"]:
formatted_messages.append(f"Devika: {message['message']}")
else:
formatted_messages.append(f"User: {message['message']}")

return formatted_messages
if isinstance(message, dict):
if message["from_devika"]:
formatted_messages.append(f"Devika: {message['message']}")
else:
formatted_messages.append(f"User: {message['message']}")
else:
print(f"Invalid message format: {message}")
return formatted_messages

def get_project_path(self, project: str):
return os.path.join(self.project_path, project.lower().replace(" ", "-"))
Expand Down