Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
math_tutor_dev
public_math_tutor
Commits
a8ba91dd
Commit
a8ba91dd
authored
Mar 13, 2026
by
Kantz
Browse files
ü,ö,ä, im Context
parent
187b5745
Changes
3
Show whitespace changes
Inline
Side-by-side
math-tutor/backend/app/deterministic_services/context_stores/context_store_base.py
View file @
a8ba91dd
...
@@ -73,7 +73,7 @@ def save_sheet(sheet: dict[str, Any]) -> None:
...
@@ -73,7 +73,7 @@ def save_sheet(sheet: dict[str, Any]) -> None:
chat_id
=
sheet
.
get
(
"chat_id"
,
"unknown"
)
chat_id
=
sheet
.
get
(
"chat_id"
,
"unknown"
)
latest_path
=
os
.
path
.
join
(
_LOG_DIR
,
f
"
{
chat_id
}
_latest.json"
)
latest_path
=
os
.
path
.
join
(
_LOG_DIR
,
f
"
{
chat_id
}
_latest.json"
)
payload
=
json
.
dumps
(
sheet
,
ensure_ascii
=
Tru
e
,
indent
=
2
)
payload
=
json
.
dumps
(
sheet
,
ensure_ascii
=
Fals
e
,
indent
=
2
)
with
open
(
latest_path
,
"w"
,
encoding
=
"utf-8"
)
as
file_handle
:
with
open
(
latest_path
,
"w"
,
encoding
=
"utf-8"
)
as
file_handle
:
file_handle
.
write
(
payload
)
file_handle
.
write
(
payload
)
...
...
math-tutor/backend/app/deterministic_services/session_store.py
View file @
a8ba91dd
...
@@ -52,7 +52,7 @@ def archive_chat(
...
@@ -52,7 +52,7 @@ def archive_chat(
}
}
os
.
makedirs
(
_LOG_DIR
,
exist_ok
=
True
)
os
.
makedirs
(
_LOG_DIR
,
exist_ok
=
True
)
payload
=
json
.
dumps
(
record
,
ensure_ascii
=
Tru
e
)
payload
=
json
.
dumps
(
record
,
ensure_ascii
=
Fals
e
)
with
_LOCK
:
with
_LOCK
:
with
open
(
_LOG_PATH
,
"a"
,
encoding
=
"utf-8"
)
as
f
:
with
open
(
_LOG_PATH
,
"a"
,
encoding
=
"utf-8"
)
as
f
:
f
.
write
(
payload
+
"
\n
"
)
f
.
write
(
payload
+
"
\n
"
)
...
...
math-tutor/backend/app/deterministic_services/tool_logging.py
View file @
a8ba91dd
...
@@ -42,5 +42,5 @@ def write_tool_log(entries: list[dict], created_at: str | None = None, chat_id:
...
@@ -42,5 +42,5 @@ def write_tool_log(entries: list[dict], created_at: str | None = None, chat_id:
except
(
OSError
,
json
.
JSONDecodeError
):
except
(
OSError
,
json
.
JSONDecodeError
):
pass
pass
with
open
(
path
,
"w"
,
encoding
=
"utf-8"
)
as
f
:
with
open
(
path
,
"w"
,
encoding
=
"utf-8"
)
as
f
:
json
.
dump
(
payload
,
f
,
ensure_ascii
=
Tru
e
,
indent
=
2
)
json
.
dump
(
payload
,
f
,
ensure_ascii
=
Fals
e
,
indent
=
2
)
return
path
return
path
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment