Disable automatic local context file injection in Streamlit app#75
Disable automatic local context file injection in Streamlit app#75DavidJBianco wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fdbcc4dbbe
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| local_context = file.read() | ||
|
|
||
| st.session_state["local_context"] = local_context | ||
| st.session_state["local_context"] = "" |
There was a problem hiding this comment.
Preserve explicit local context input path
Setting local_context to an empty string here removes the only Streamlit code path that ever populates this value, so every runner now receives empty context in normal app usage. In environments that rely on context.txt guidance (including launches using the --context compatibility option), this is a functional regression rather than just disabling automatic injection; the app should still support an explicit, user-controlled way to provide local context.
Useful? React with 👍 / 👎.
Motivation
context.txtintost.session_state["local_context"]and forwarding it to external LLM providers.Description
st.session_state["local_context"] = ""inpeak_assistant/streamlit/app.py, and add a comment explaining the security rationale so callers must provide context explicitly.Testing
python -m compileall peak_assistant/streamlit/app.pysucceeded;pytest -q tests/integration/test_streamlit_workflow.pyfailed during collection due to a missing dependency (ModuleNotFoundError: No module named 'dotenv') in this environment.Codex Task