fix Merge Confict
This commit is contained in:
parent
ba40f6fc82
commit
3216a9a5f6
@ -476,11 +476,19 @@ def render_normal_chat():
|
||||
st.toggle("Agent Mode", key="agent_mode")
|
||||
with col_settings:
|
||||
with st.popover("⚙️ Settings", use_container_width=True):
|
||||
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,
|
||||
)
|
||||
else:
|
||||
st.toggle(
|
||||
"Include current file as context",
|
||||
key="include_file_context",
|
||||
value=True,
|
||||
)
|
||||
|
||||
st.divider()
|
||||
|
||||
@ -593,43 +601,6 @@ def render_normal_chat():
|
||||
st.session_state.chat_history.append({"role": "assistant", "content": ai_response})
|
||||
st.rerun()
|
||||
|
||||
# 5d — Clear Chat opens a confirmation dialog instead of deleting immediately.
|
||||
if st.button("🗑️ Clear Chat"):
|
||||
_clear_chat_dialog()
|
||||
|
||||
# Toggle to switch to Agent Mode (render_normal_chat and render_agent_mode are
|
||||
# mutually exclusive, so the same key here causes no DuplicateWidgetID conflict).
|
||||
st.toggle("Agent Mode", key="agent_mode")
|
||||
|
||||
# 5h — Settings expander: file context toggle, model, token limit, custom prompt.
|
||||
with st.expander("⚙️ Settings", expanded=False):
|
||||
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 []
|
||||
|
||||
st.selectbox("Model", model_options, key="selected_model")
|
||||
|
||||
st.slider(
|
||||
"Max Response Tokens",
|
||||
min_value=256, max_value=8000,
|
||||
value=chat_manager.max_tokens,
|
||||
step=256, key="chat_max_tokens",
|
||||
)
|
||||
|
||||
st.divider()
|
||||
|
||||
st.text_area(
|
||||
"Custom System Prompt (overrides default if set)",
|
||||
key="custom_system_prompt",
|
||||
height=120,
|
||||
placeholder="Leave empty to use the default assistant prompt with optional file context.",
|
||||
)
|
||||
|
||||
|
||||
# ── Entry point ───────────────────────────────────────────────────────────────
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user