Skip to content

fix: stop auto-loading context.txt into Streamlit sessions#86

Closed
DavidJBianco wants to merge 1 commit into
batch-a-quick-fixesfrom
batch-b-context-file
Closed

fix: stop auto-loading context.txt into Streamlit sessions#86
DavidJBianco wants to merge 1 commit into
batch-a-quick-fixesfrom
batch-b-context-file

Conversation

@DavidJBianco

Copy link
Copy Markdown
Collaborator

Summary

Stops peak_assistant/streamlit/app.py from automatically reading context.txt from disk and injecting it into every user session, which could forward sensitive server-side data to external LLM providers.

Initializes st.session_state["local_context"] to "" instead. Users provide context explicitly via the in-UI Local Context field. Adds an inline comment explaining the security rationale.

Cherry-picked from #76. Closes #75 (duplicate, identical change with a less explanatory comment).

Test plan

  • Launch Streamlit app, verify Local Context field starts empty
  • Verify agents run normally with no local context set
  • Verify manually entering context in the field works as expected

🤖 Generated with Claude Code

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f0601d2095

ℹ️ 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"] = ""

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Restore a configurable local_context source

Setting st.session_state["local_context"] to "" here removes the only initialization path in the Streamlit app, and there is no other write path in peak_assistant/streamlit to populate that key before util/runners.py forwards it to every agent call. In practice, Streamlit sessions now always run with empty local context, so users lose the previous context-file behavior and the --context/PEAK_CONTEXT_FILE compatibility path becomes effectively unused.

Useful? React with 👍 / 👎.

@DavidJBianco

Copy link
Copy Markdown
Collaborator Author

Merged into dev via merge commit 39cb907.

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.

1 participant