Skip to content

Conversation

@pamelafox
Copy link
Owner

Purpose

Since the Ask tab was removed (#8), there is now only one approach implementation. This refactor merges ChatReadRetrieveReadApproach into the base Approach class, simplifying the codebase by removing the unnecessary inheritance hierarchy.

Does this introduce a breaking change?

- [ ] Yes
- [x] No

Type of change

- [ ] Bugfix
- [ ] Feature
- [x] Code style update (formatting, local variables)
- [x] Refactoring (no functional changes, no api changes)
- [ ] Documentation content changes
- [ ] Infrastructure-related changes (Bicep files, GitHub Actions workflows)
- [ ] Other... Please describe:

What is the current behavior?

  • The Approach class was an abstract base class (ABC) in approach.py
  • ChatReadRetrieveReadApproach extended it in a separate file chatreadretrieveread.py
  • This inheritance pattern was designed for multiple approach implementations (Ask and Chat tabs)

What is the new behavior?

  • Approach class now contains the full implementation (no longer ABC)
  • chatreadretrieveread.py has been deleted
  • app.py imports and uses Approach directly
  • All tests updated to use new import paths
  • Documentation updated to reflect simplified architecture

Other information

Files changed:

  • app/backend/approaches/approach.py: Merged all chat-specific code, removed ABC
  • app/backend/approaches/chatreadretrieveread.py: Deleted
  • app/backend/app.py: Updated imports to use Approach directly
  • tests/conftest.py: Updated chat_approach fixture
  • tests/test_chatapproach.py: Updated imports
  • tests/test_app.py: Updated monkeypatch paths
  • docs/architecture.md: Simplified architecture diagram and descriptions
  • docs/customization.md: Updated file references
  • AGENTS.md: Updated approach file reference

All 457 tests pass ✅"

Since the Ask tab was removed, there is now only one approach implementation.
This refactor merges ChatReadRetrieveReadApproach into the base Approach class,
simplifying the codebase by removing the unnecessary inheritance hierarchy.

Changes:
- Merge all ChatReadRetrieveReadApproach code into approach.py
- Remove ABC base class since there's only one implementation
- Delete chatreadretrieveread.py
- Update app.py to use Approach directly
- Update tests to use new import paths
- Update documentation to reflect simplified architecture
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR successfully merges the ChatReadRetrieveReadApproach class into the base Approach class, simplifying the codebase after the removal of the Ask tab feature. The refactoring eliminates unnecessary inheritance and consolidates all RAG functionality into a single implementation.

Key changes:

  • Merged ChatReadRetrieveReadApproach implementation into Approach class, converting it from an abstract base class to a concrete implementation
  • Updated all imports across test files and application code to reference the unified Approach class directly
  • Refined documentation to reflect the simplified architecture with a single RAG approach

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
app/backend/approaches/approach.py Merged full chat implementation from child class, removed ABC inheritance, added improved validation for agentic retrieval
app/backend/approaches/chatreadretrieveread.py Deleted file as functionality merged into base class
app/backend/app.py Updated imports and instantiation to use Approach directly
tests/conftest.py Updated chat_approach fixture to instantiate Approach
tests/test_chatapproach.py Updated imports and corrected constant reference from NO_RESPONSE to QUERY_REWRITE_NO_RESPONSE
tests/test_app.py Updated monkeypatch paths to reference approaches.approach.Approach
docs/architecture.md Simplified architecture diagram and descriptions, updated model references
docs/customization.md Updated file reference to point to approach.py
AGENTS.md Updated approach file reference and description for coding agents

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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