Syntax highlighting fixes, autocomplete overhaul, tui changes

This commit is contained in:
Alexander R.
2026-07-28 22:30:25 +00:00
parent bcb054a3fa
commit 0559f7549a
11 changed files with 1046 additions and 245 deletions
+6 -7
View File
@@ -353,7 +353,7 @@ class HandbookService:
{"role": "user", "content": prompt},
],
"temperature": 0.2,
"max_tokens": 900,
"max_tokens": max(config.llm_max_tokens, 4096),
}
headers = {"Content-Type": "application/json"}
@@ -366,12 +366,11 @@ class HandbookService:
response.raise_for_status()
data = response.json()
example_md = (
data.get("choices", [{}])[0]
.get("message", {})
.get("content", "")
.strip()
)
msg_obj = data.get("choices", [{}])[0].get("message", {})
example_md = msg_obj.get("content") or ""
if not example_md.strip() and msg_obj.get("reasoning_content"):
example_md = msg_obj.get("reasoning_content", "")
example_md = example_md.strip()
return {
"status": "success",