Created by: oblivisheee
This pull request includes several updates to improve logging, update dependencies, and fix bugs in the codebase. The most important changes include adding structured logging with tracing, updating the tracing-subscriber
dependency, fixing bugs in the chat-related functions, and refactoring the SessionJWT
structure.
Logging Improvements:
-
assistant/src/interfaces.rs
: Added structured logging using thetracing
crate, includinginfo
,debug
,warn
, andinstrument
macros to various functions for better observability.
Dependency Updates:
-
assistant/Cargo.toml
: Updated thetracing-subscriber
dependency to include theenv-filter
feature.
Bug Fixes:
-
assistant/sql/functions.surql
: Corrected thefn::update_chat
function to update thechat
table instead of theplan
table. -
assistant/config.json
: Changed theserver_bind
address from0.0.0.0:3500
to127.0.0.1:3500
for improved security.
Code Refactoring:
-
assistant/src/interfaces.rs
: Refactored theSessionJWT
structure to directly store the payload as aString
and simplified the session token processing logic. [1] [2]
Additional Enhancements:
-
assistant/src/main.rs
: Initialized thetracing_subscriber
with detailed configuration for better log output, including file names, line numbers, and log levels.