Skip to content

Add new files - #1

Merged
fchityan merged 1 commit into
cy_branchfrom
cy_hack_branch
Jun 18, 2026
Merged

Add new files #1
fchityan merged 1 commit into
cy_branchfrom
cy_hack_branch

Conversation

@fchityan

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings June 18, 2026 16:35
@fchityan
fchityan merged commit b3b8840 into cy_branch Jun 18, 2026
@fchityan
fchityan deleted the cy_hack_branch branch June 18, 2026 16:39

Copilot AI left a comment

Copy link
Copy Markdown

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 updates the Streamlit frontend to automatically choose between live backend results and mock data, adds an optional “frontend live mode” path using Bright Data + Kimi directly from the UI, and aligns env loading so the repo root .env is preferred.

Changes:

  • Add a unified frontend config reader (env + Streamlit secrets) and auto-mock behavior for Streamlit Cloud when BACKEND_URL points to localhost.
  • Add frontend live mode integrations (Bright Data SERP + Kimi via OpenAI-compatible client) and backend /health checking.
  • Update backend Daytona sandbox stage to support newer daytona-sdk config style with a logged local fallback.

Reviewed changes

Copilot reviewed 13 out of 64 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
frontend/settings.py Adds shared config getter (env + Streamlit secrets) and cloud/localhost auto-mock logic.
frontend/services/llm_reasoning.py Switches LLM reasoning to Kimi/OpenAI-compatible client and adds JSON normalization.
frontend/services/bright_data.py Replaces placeholder with a real Bright Data SERP request + parsing + fallback.
frontend/app.py Adds backend health-based data source resolution + frontend live mode flow + UI updates.
frontend/api_client.py Adds get_health() endpoint call.
frontend/env_shared.py Loads root .env first, then backend/.env for compatibility.
frontend/requirements.txt Adds openai and httpx dependencies for live mode.
frontend/README.md Documents new data source resolution behavior and config location.
backend/stages/stage3_sandbox.py Supports new daytona-sdk initialization style with warning + local fallback.
backend/config.py Loads settings from root .env + backend .env; adds Daytona server URL/target; updates default Kimi model.
backend/runs/RSR-20260617-001/checkpoint_subject_prep.json Adds a run checkpoint artifact (should not be committed).
backend/runs/RSR-20260617-001/checkpoint_entity_resolution.json Adds a run checkpoint artifact (should not be committed).
backend/runs/RSR-20260617-001/checkpoint_data_collection.json Adds a run checkpoint artifact (should not be committed).
backend/logs/pipeline.log Adds runtime log output (should not be committed).

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

Comment thread frontend/README.md
Comment on lines 33 to 34
| `POLL_INTERVAL_SECONDS` | `5` | Status poll interval |
| `POLL_TIMEOUT_SECONDS` | `900` | Max wait for pipeline completion |
Comment on lines +10 to +14
KIMI_API_KEY = os.getenv("KIMI_API_KEY")
KIMI_BASE_URL = os.getenv("KIMI_BASE_URL", "https://api.moonshot.ai/v1")
KIMI_MODEL = os.getenv("KIMI_MODEL", "moonshot-v1-auto")

client = OpenAI(api_key=OPENAI_API_KEY) if OPENAI_API_KEY else None
client = OpenAI(api_key=KIMI_API_KEY, base_url=KIMI_BASE_URL) if KIMI_API_KEY else None
Comment on lines +1 to +5
{
"run_id": "RSR-20260617-001",
"stage": "subject_prep",
"status": "complete",
"timestamp": "2026-06-17T11:32:36.886755+00:00",
Comment on lines +1 to +5
{
"run_id": "RSR-20260617-001",
"stage": "entity_resolution",
"status": "complete",
"timestamp": "2026-06-17T11:32:36.893025+00:00",
Comment on lines +1 to +10
{
"run_id": "RSR-20260617-001",
"stage": "data_collection",
"status": "complete",
"timestamp": "2026-06-17T11:32:44.721720+00:00",
"subject": {
"subject_type": "organization",
"primary_name": "Singapore Airlines",
"aliases": [],
"country": "Singapore",
Comment thread frontend/app.py
Comment on lines 363 to 365
_init_state()
_resolve_data_source()
_poll_if_needed()
Comment on lines +13 to +22
def _api_key() -> str:
return (os.getenv("BRIGHT_DATA_API_KEY") or os.getenv("BRIGHTDATA_API_KEY") or "").strip()


def _serp_zone() -> str:
return (os.getenv("BRIGHT_DATA_SERP_ZONE") or "").strip()


def bright_data_configured() -> bool:
return bool(_api_key()) and bool(_serp_zone())
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