Skip to content

WIP: openclaw localized stream display projector#1746

Draft
WineChord wants to merge 3 commits into
trpc-group:mainfrom
WineChord:openclaw_stream_display_i18n
Draft

WIP: openclaw localized stream display projector#1746
WineChord wants to merge 3 commits into
trpc-group:mainfrom
WineChord:openclaw_stream_display_i18n

Conversation

@WineChord
Copy link
Copy Markdown
Collaborator

@WineChord WineChord commented May 6, 2026

Summary

  • Add openclaw/streamdisplay, a reusable localized projector for stream display snapshots.
  • Split the core projector from the gwproto adapter so render state is not tied to transport structs.
  • Surface tool-call names and compact redacted argument summaries in run.progress events, including multi-tool-call responses.
  • Render tool argument details as localized Args / 参数 child lines while preserving tool lifecycle status.

Design Notes

  • Projector exposes explicit methods such as ApplyTool, ApplyPublicDelta, ApplyAnswerCompleted, and terminal state methods.
  • gwproto.go is the protocol adapter; it maps stream stages/tool status into display item kinds and statuses.
  • Reasoning is hidden by default and only appears when ShowReasoning is enabled.
  • Tool arguments are summarized generically from JSON, with sensitive keys such as tokens, passwords, cookies, API keys, and credentials redacted before they enter stream events.
  • Partial or malformed tool argument fragments are conservatively redacted when they mention a sensitive key, so streaming deltas do not expose half-written secrets.
  • Snapshots copy item and option state so callers cannot mutate projector render output by changing a previous snapshot.

Validation

  • cd openclaw && go test ./streamdisplay ./gwclient ./internal/gateway
  • cd openclaw && go test ./...

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 6, 2026

Important

Review skipped

Ignore keyword(s) in the title.

⛔ Ignored keywords (3)
  • WIP
  • DO NOT MERGE
  • [skip review]

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: da6fcab8-c039-455e-9562-19238fdeaeb0

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 6, 2026

Codecov Report

❌ Patch coverage is 86.10709% with 96 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.84732%. Comparing base (b95acb8) to head (2c22d1c).
⚠️ Report is 8 commits behind head on main.

Files with missing lines Patch % Lines
openclaw/internal/gateway/tool_arguments.go 70.08547% 31 Missing and 4 partials ⚠️
openclaw/streamdisplay/display.go 91.09415% 18 Missing and 17 partials ⚠️
openclaw/streamdisplay/gwproto.go 86.36364% 10 Missing and 5 partials ⚠️
openclaw/internal/gateway/stream.go 84.50704% 6 Missing and 5 partials ⚠️
Additional details and impacted files
@@                 Coverage Diff                 @@
##                main       #1746         +/-   ##
===================================================
- Coverage   89.87151%   89.84732%   -0.02420%     
===================================================
  Files            912         918          +6     
  Lines         147169      147961        +792     
===================================================
+ Hits          132263      132939        +676     
- Misses          9381        9458         +77     
- Partials        5525        5564         +39     
Flag Coverage Δ
unittests 89.84732% <86.10709%> (-0.02420%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@WineChord WineChord force-pushed the openclaw_stream_display_i18n branch 2 times, most recently from 193a3f7 to 0fb3fcf Compare May 6, 2026 09:02
@WineChord WineChord force-pushed the openclaw_stream_display_i18n branch from 0fb3fcf to 642dfce Compare May 6, 2026 09:09
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