Spaces:
Paused
Paused
Commit ·
44c8a3e
1
Parent(s): e47c16c
feat: show web search status in welcome panel
Browse filesDisplays whether web search is ON or OFF with color indicator,
and tells the user how to toggle it with /websearch on|off.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- app_cli.py +10 -0
app_cli.py
CHANGED
|
@@ -198,6 +198,16 @@ def main() -> None:
|
|
| 198 |
"before showing it to you. If I can't find it in your documents, "
|
| 199 |
"I'll let you know rather than guess.\n\n",
|
| 200 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 201 |
welcome.append("Type your question, or /help for commands.\n", style="italic")
|
| 202 |
welcome.append("Type /quit to exit.", style="italic dim")
|
| 203 |
console.print(Panel(welcome, title="Welcome", border_style="cyan"))
|
|
|
|
| 198 |
"before showing it to you. If I can't find it in your documents, "
|
| 199 |
"I'll let you know rather than guess.\n\n",
|
| 200 |
)
|
| 201 |
+
web_enabled = cfg.get("web_search", {}).get("enabled", False)
|
| 202 |
+
if web_enabled:
|
| 203 |
+
welcome.append("Web search: ", style="bold")
|
| 204 |
+
welcome.append("ON", style="bold green")
|
| 205 |
+
welcome.append(" (Semantic Scholar). Use /websearch off to disable.\n\n")
|
| 206 |
+
else:
|
| 207 |
+
welcome.append("Web search: ", style="bold")
|
| 208 |
+
welcome.append("OFF", style="bold red")
|
| 209 |
+
welcome.append(". Use /websearch on to enable.\n\n")
|
| 210 |
+
|
| 211 |
welcome.append("Type your question, or /help for commands.\n", style="italic")
|
| 212 |
welcome.append("Type /quit to exit.", style="italic dim")
|
| 213 |
console.print(Panel(welcome, title="Welcome", border_style="cyan"))
|