tabby/rules/only-service-can-depend-tabby-db.yml
boxbeam 8af645bcaf
feat(webserver): Log completion events to database (#1571)
* add user completions draft

* [autofix.ci] apply automated fixes

* feat(db): Create DAO for user completion logging (#1514)

* feat(db): Create DAO for user completion logging

* Apply suggestions

* Remove todo

* Apply suggestions

* test(webserver): Create test for user completions (#1523)

* test(webserver): Create test for user completions

* Utility function to sleep 50ms

* Delete ee/tabby-webserver/src/service/logger.rs

* Update ee/tabby-webserver/src/service/mod.rs

* [autofix.ci] apply automated fixes

* Apply suggestion

* Fix test

* Add test cases for missing or invalid user

* Add test for chat completion event

* Apply suggestions

* feat(webserver): Use db logger for chat completions

* Make webserver non-optional dependency

* Restructure code to not depend on webserver unconditionally

* Move dep back

* Fixes for conflicts

* Change to use IDs instead of emails

* Use db logger for webserver

* Remove bound from EventLogger

* [autofix.ci] apply automated fixes

* Create raw event logger wrapper

* Apply suggestions

* [autofix.ci] apply automated fixes

* Fix event logging

* Apply suggestions

* Make new_event_logger non-public

* Make import feature-gated

* [autofix.ci] apply automated fixes

* Apply suggestion

* Hopefully fix tests

* Apply suggestions

* Fix compile error

---------

Co-authored-by: Meng Zhang <meng@tabbyml.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-03-13 00:53:18 +08:00

12 lines
261 B
YAML

id: only-service-can-depend-tabby-db
message: Only service can depend on tabby-db
severity: error
language: rust
files:
- ./ee/tabby-webserver/src/**
ignores:
- ./ee/tabby-webserver/src/service/**
- ./ee/tabby-webserver/src/handler.rs
rule:
pattern: tabby_db