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 thetracingcrate, includinginfo,debug,warn, andinstrumentmacros to various functions for better observability.
Dependency Updates:
-
assistant/Cargo.toml: Updated thetracing-subscriberdependency to include theenv-filterfeature.
Bug Fixes:
-
assistant/sql/functions.surql: Corrected thefn::update_chatfunction to update thechattable instead of theplantable. -
assistant/config.json: Changed theserver_bindaddress from0.0.0.0:3500to127.0.0.1:3500for improved security.
Code Refactoring:
-
assistant/src/interfaces.rs: Refactored theSessionJWTstructure to directly store the payload as aStringand simplified the session token processing logic. [1] [2]
Additional Enhancements:
-
assistant/src/main.rs: Initialized thetracing_subscriberwith detailed configuration for better log output, including file names, line numbers, and log levels.