MCPcopy Create free account
hub / github.com/VersusControl/devops-ai-guidelines / sidebar

Function sidebar

03-ai-agent-for-devops/code/10/app.py:148–178  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

146# Sidebar
147# ─────────────────────────────────────────────────────────────
148def 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# ─────────────────────────────────────────────────────────────

Callers 1

mainFunction · 0.70

Calls 2

is_aws_configuredMethod · 0.45
is_slack_configuredMethod · 0.45

Tested by

no test coverage detected