feat: integrate web terminal interface with xtermjs support
feat: add basic version control functionality using minigit refactor: update context management and system message refresh maintenance: update pyproject.toml version to 1.59.0 fix: handle api connection errors more gracefully feat: add directory context tool
This commit is contained in:
+7
-3
@@ -155,7 +155,11 @@ def _perform_search(
|
||||
response = requests.get(base_url, headers=default_headers, params=search_params, timeout=30)
|
||||
response.raise_for_status() # Raise HTTPError for bad responses (4xx or 5xx)
|
||||
|
||||
return {"status": "success", "content": response.json()}
|
||||
try:
|
||||
data = response.json()
|
||||
except ValueError:
|
||||
data = response.text
|
||||
return {"status": "success", "content": data}
|
||||
except requests.exceptions.RequestException as e:
|
||||
return {"status": "error", "error": str(e)}
|
||||
|
||||
@@ -169,7 +173,7 @@ def web_search(query: str) -> Dict[str, Any]:
|
||||
Returns:
|
||||
Dict with status and search results.
|
||||
"""
|
||||
base_url = "https://search.molodetz.nl/search"
|
||||
base_url = "https://static.molodetz.nl/search.cgi"
|
||||
return _perform_search(base_url, query)
|
||||
|
||||
|
||||
@@ -182,5 +186,5 @@ def web_search_news(query: str) -> Dict[str, Any]:
|
||||
Returns:
|
||||
Dict with status and news search results.
|
||||
"""
|
||||
base_url = "https://search.molodetz.nl/search"
|
||||
base_url = "https://static.molodetz.nl/search.cgi"
|
||||
return _perform_search(base_url, query)
|
||||
|
||||
Reference in New Issue
Block a user