()
| 146 | # Sidebar |
| 147 | # ───────────────────────────────────────────────────────────── |
| 148 | def sidebar(): |
| 149 | with st.sidebar: |
| 150 | st.title("AI Logging Agent") |
| 151 | st.markdown("---") |
| 152 | |
| 153 | st.subheader("Configuration") |
| 154 | provider = {"gemini": "Gemini", "github": "GitHub Models", "minimax": "MiniMax"}.get( |
| 155 | Config.LLM_PROVIDER, Config.LLM_PROVIDER, |
| 156 | ) |
| 157 | st.markdown(f"- Provider: **{provider}**") |
| 158 | st.markdown(f"- AWS: {'Connected' if Config.is_aws_configured() else 'Placeholder mode'}") |
| 159 | st.markdown(f"- Slack: {'Connected' if Config.is_slack_configured() else 'Placeholder mode'}") |
| 160 | |
| 161 | st.markdown("---") |
| 162 | st.subheader("Available Tools") |
| 163 | st.markdown(""" |
| 164 | **Auto-execute (safe):** |
| 165 | - `read_log_file` — Read pod log files |
| 166 | - `list_log_files` — List available logs |
| 167 | - `search_logs` — Search log patterns |
| 168 | - `send_slack_notification` — Notify team |
| 169 | |
| 170 | **Requires approval:** |
| 171 | - `reboot_rds_instance` — Reboot RDS database |
| 172 | - `restart_kubernetes_pod` — Restart failed pod |
| 173 | """) |
| 174 | |
| 175 | st.markdown("---") |
| 176 | if st.button("Clear Chat History", use_container_width=True): |
| 177 | st.session_state.messages = [] |
| 178 | st.rerun() |
| 179 | |
| 180 | |
| 181 | # ───────────────────────────────────────────────────────────── |
no test coverage detected