toggle file context

This commit is contained in:
Irina Rueegg 2026-05-28 09:46:20 +02:00
parent 33969a7b59
commit da236ce14e

View File

@ -545,15 +545,16 @@ def render_normal_chat():
# 5h — Settings expander: file context toggle, model, token limit, custom prompt.
with st.expander("⚙️ Settings", expanded=False):
st.toggle("Include current file as context", key="include_file_context", value=True)
current_file = st.session_state.get("active_file")
if current_file:
st.toggle(f"Include current file as context: **{Path(current_file).name}**", key="include_file_context", value=True)
st.divider()
default_model = chat_manager.model or ""
model_options = [default_model] if default_model else []
for m in ["claude-3-5-sonnet-20241022", "claude-3-haiku-20240307", "gpt-4o", "gpt-4o-mini"]:
if m not in model_options:
model_options.append(m)
st.selectbox("Model", model_options, key="selected_model")
st.slider(