Skip to content

feat(chat): wire follow-up chat UI + add LLM setup docs - #1669

Open
Void-Anvesha wants to merge 4 commits into
imDarshanGK:mainfrom
Void-Anvesha:added-chatbot
Open

feat(chat): wire follow-up chat UI + add LLM setup docs#1669
Void-Anvesha wants to merge 4 commits into
imDarshanGK:mainfrom
Void-Anvesha:added-chatbot

Conversation

@Void-Anvesha

Copy link
Copy Markdown

Description

Add a minimal follow-up chat handler to the frontend and document safe LLM/API-key setup for contributors.

  • Wire the chat Send button and Enter key in frontend/index.html so the chat pane sends POSTs to /chat/.
  • Send richer chat payload (code, latest analysis/context, simple history) to help backend produce better replies.
  • Add guidance to CONTRIBUTING.md describing how to create a local backend/.env, where to set LLM_API_KEY, and CI/deploy best-practices for secrets.
  • Small housekeeping: expose a simple window.chatHistory to collect recent messages used as context.

Notes:

  • Default behavior remains rule-based when LLM_ENABLED=false.
  • Ensure no secrets are committed: .env is ignored by .gitignore. If you accidentally committed backend/.env, remove it from the commit and rotate the key before opening this PR.

Related Issue

Fixes #

Type of change

  • Bug fix
  • New feature / enhancement
  • Documentation update
  • Test addition
  • Refactor

Checklist

  • I have read CONTRIBUTING.md
  • My branch is up to date with main
  • I have run pytest -v and all tests pass
  • I have not introduced duplicate issues or features
  • My PR title follows the format: feat/fix/docs/test: short description
  • I have added tests for new features (Level 2 and 3 issues)
  • No hardcoded secrets or API keys in my code (If backend/.env exists locally, ensure it's NOT staged for commit)
  • This PR is linked to a GSSoC 2026 issue

Screenshots:

image

Before: n/a
After: chat input wired; Send/Enter submits; assistant replies appear in chat pane.

Test evidence

# Run backend locally and verify:
cd backend
python -m uvicorn app.main:app --reload

# Then in browser open frontend/index.html (or use curl)
curl -s -X POST http://localhost:8000/chat/ -H "Content-Type: application/json" \
  -d '{"message":"Is there an issue with this code?","code":"print(hello);;","context":"","history":[]}'

# Expected: backend responds (rule-based fallback or LLM reply if LLM enabled)

--

@imDarshanGK

Copy link
Copy Markdown
Owner

@Void-Anvesha
issue number and add demo video showing the working features

@Void-Anvesha

Copy link
Copy Markdown
Author

#1659

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