Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions peak_assistant/streamlit/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,13 +156,12 @@
logger.debug(f"Received state: {state}")
logger.debug(f"Available OAuth states: {[k for k in st.session_state.keys() if k.startswith('oauth_state_')]}")

# Read the local context file if it's not already in the session state.
# Initialize local context for this user session.
#
# Do not auto-load server-side files into every session because this can
# disclose local context through downstream LLM prompts.
if "local_context" not in st.session_state:
# Find and load our local context file (used for the agents)
with open("context.txt", "r", encoding="utf-8") as file:
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 👍 / 👎.


# Use the full page instead of a narrow central column
st.set_page_config(
Expand Down
Loading