Skip to content

Fix/chat fallback code correction - #1674

Open
Void-Anvesha wants to merge 5 commits into
imDarshanGK:mainfrom
Void-Anvesha:fix/chat-fallback-code-correction
Open

Fix/chat fallback code correction#1674
Void-Anvesha wants to merge 5 commits into
imDarshanGK:mainfrom
Void-Anvesha:fix/chat-fallback-code-correction

Conversation

@Void-Anvesha

Copy link
Copy Markdown

Description

Fixes the follow-up chat fallback response so it provides clear and actionable code corrections when the LLM is unavailable.

The chat assistant now:

  • Detects Python syntax errors.
  • Identifies the affected line.
  • Explains what needs to be changed.
  • Displays corrected code.

Example input:

print(hello);;

The response explains the extra semicolon, advises adding quotes for text, and provides:

print("hello")

The frontend now prefers the local backend (http://localhost:8000) when opened locally, so local changes are reflected immediately.

Related Issue

Fixes #

Type of change

  • Bug fix
  • New feature / enhancement
  • Test addition

Checklist

  • I have read CONTRIBUTING.md
  • My branch is up to date with main
  • I have run relevant validation
  • I have added tests for the new behavior

Test evidence

Verified the local /chat/ endpoint with:

print(hello);;

The response returns the issue, the required changes, and corrected code.

@Void-Anvesha

Copy link
Copy Markdown
Author

#1674
https://drive.google.com/file/d/1HYvMyHerMN3jFuZZHxRrRMmG5F16rV8V/view?usp=sharing
This is the drive link for the feature that I've added on.
Review this & accordingly merge the changes

@imDarshanGK

Copy link
Copy Markdown
Owner

@Void-Anvesha issue number?

@Void-Anvesha

Copy link
Copy Markdown
Author

#1659

@imDarshanGK

Copy link
Copy Markdown
Owner

@Void-Anvesha resolve conflicts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants