Skip to content
Merged
Show file tree
Hide file tree
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
24 changes: 22 additions & 2 deletions src/webapp/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,25 @@
text-align: left !important;
width: 100% !important;
}
/* Example prompt button styling to match panel buttons */
div[data-testid="stExpander"] .stButton > button {
border-radius: 8px !important;
width: 100% !important;
text-align: left !important;
justify-content: flex-start !important;
display: flex !important;
align-items: center !important;
background-color: transparent !important;
border: 1px solid #e0e0e0 !important;
margin-bottom: 4px !important;
}
div[data-testid="stExpander"] .stButton > button:hover {
background-color: #d2d2d2 !important;
}
div[data-testid="stExpander"] .stButton > button > div {
text-align: left !important;
width: 100% !important;
}
div[data-testid="stChatMessage"] div img,
.stChatMessage img {
width: 40px !important;
Expand Down Expand Up @@ -422,18 +441,19 @@ def format_chat_history(conversation_id: str, max_turns=10):

# Display example prompts only on a new chat
if len(st.session_state.messages) <= 1:
with st.expander("Not sure where to start? Try these examples..."):
with st.expander("Not sure where to start? Try these examples :", expanded=False):
# Function to handle prompt click
def handle_prompt_click(prompt_text):
st.session_state.clicked_prompt = prompt_text

for example in EXAMPLE_PROMPTS:
if st.button(
f"**{example['title']}** - {example['prompt']}",
example["title"],
key=f"example_{example['title']}",
on_click=handle_prompt_click,
args=[example["prompt"]],
use_container_width=True,
help=example["prompt"],
):
pass

Expand Down
5 changes: 4 additions & 1 deletion src/webapp/example_prompts.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# src/webapp/example_prompts.py

EXAMPLE_PROMPTS = [
{"title": "Identifier une équipe projet", "prompt": "Quelle équipe travaille sur le projet Isschat ?"},
{
"title": "Identifier une technologie utilisé",
"prompt": "What tool does Isskar use for data versioning and pipeline management ?",
},
{"title": "Résumer un événement", "prompt": "Que s’est-il passé lors de la matinale du 2 Juillet ?"},
]