Skip to content

[feat][backend]: add chat view and thread query#475

Open
kidkidkid wants to merge 22 commits intomainfrom
feat/ob_thread
Open

[feat][backend]: add chat view and thread query#475
kidkidkid wants to merge 22 commits intomainfrom
feat/ob_thread

Conversation

@kidkidkid
Copy link
Copy Markdown
Collaborator

  • Add GetTraceChat/GetThreadChat/GetThreadStat IDL definitions
  • Add ChatMessage struct with message_type and span fields
  • Implement ChatProcessor for extracting last user message from model span input
  • Support Standard ChatCompletion and Responses API formats
  • Add service layer implementations with chat processor integration
  • Add application handler layer with permission validation
  • Add ChatMessagesDO2DTO convertor function
  • Add unit tests for ChatProcessor

What type of PR is this?

Check the PR title

  • This PR title match the format: [<type>][<scope>] <description>. For example: [fix][backend] flaky fix
  • The description of this PR title is user-oriented and clear enough for others to understand.
  • Add documentation if the current PR requires user awareness at the usage level.
  • This PR is written in English. PRs not in English will not be reviewed.

(Optional) Translate the PR title into Chinese

(Optional) More detailed description for this PR(en: English/zh: Chinese)

en:
zh(optional):

(Optional) Which issue(s) this PR fixes

@kidkidkid kidkidkid changed the title feat(observability): add chat view and thread query feat(backend): add chat view and thread query Mar 25, 2026
@kidkidkid kidkidkid changed the title feat(backend): add chat view and thread query [feat][backend]: add chat view and thread query Mar 25, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 25, 2026

Codecov Report

❌ Patch coverage is 87.11790% with 59 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...bservability/domain/trace/service/trace_service.go 88.66% 19 Missing and 9 partials ⚠️
...ace/service/trace/span_processor/chat_processor.go 87.50% 5 Missing and 3 partials ⚠️
backend/modules/observability/application/trace.go 93.69% 4 Missing and 3 partials ⚠️
...ckend/modules/observability/infra/repo/ck/spans.go 0.00% 6 Missing and 1 partial ⚠️
...dler/coze/loop/apis/observability_trace_service.go 0.00% 6 Missing ⚠️
backend/modules/observability/infra/repo/trace.go 66.66% 2 Missing and 1 partial ⚠️

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #475      +/-   ##
==========================================
+ Coverage   75.70%   75.78%   +0.08%     
==========================================
  Files         642      643       +1     
  Lines       68902    69355     +453     
==========================================
+ Hits        52162    52563     +401     
- Misses      13465    13503      +38     
- Partials     3275     3289      +14     
Flag Coverage Δ
unittests 75.78% <87.11%> (+0.08%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...observability/application/convertor/trace/trace.go 59.45% <100.00%> (+19.45%) ⬆️
...bservability/domain/trace/entity/loop_span/span.go 80.31% <100.00%> (+0.06%) ⬆️
backend/modules/observability/infra/repo/trace.go 84.77% <66.66%> (-0.30%) ⬇️
...dler/coze/loop/apis/observability_trace_service.go 0.00% <0.00%> (ø)
backend/modules/observability/application/trace.go 75.13% <93.69%> (+2.43%) ⬆️
...ckend/modules/observability/infra/repo/ck/spans.go 74.28% <0.00%> (-1.17%) ⬇️
...ace/service/trace/span_processor/chat_processor.go 87.50% <87.50%> (ø)
...bservability/domain/trace/service/trace_service.go 87.29% <88.66%> (+0.21%) ⬆️

... and 2 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cf749da...1086ccb. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

- Add GetTraceChat/GetThreadChat/GetThreadStat IDL definitions
- Add ChatMessage struct with message_type and span fields
- Implement ChatProcessor for extracting last user message from model span input
- Support Standard ChatCompletion and Responses API formats
- Add service layer implementations with chat processor integration
- Add application handler layer with permission validation
- Add ChatMessagesDO2DTO convertor function
- Add unit tests for ChatProcessor
…eneTraceChat/SceneThreadChat, complete processor config
…at, add GetThreadStat processor chain, improve test coverage
@kidkidkid kidkidkid force-pushed the feat/ob_thread branch 4 times, most recently from 7944d43 to 74f2651 Compare April 10, 2026 10:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant