Skip to content

fix(runner): avoid duplicate system prompt#241

Open
YOMXXX wants to merge 1 commit into
TencentCloud:mainfrom
YOMXXX:fix/clean-context-system-prompt-override
Open

fix(runner): avoid duplicate system prompt#241
YOMXXX wants to merge 1 commit into
TencentCloud:mainfrom
YOMXXX:fix/clean-context-system-prompt-override

Conversation

@YOMXXX

@YOMXXX YOMXXX commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Avoids passing extraSystemPrompt on OpenClaw versions that support agents.defaults.systemPromptOverride.
  • Preserves the legacy extraSystemPrompt fallback for unknown or older OpenClaw versions.
  • Captures api.runtime.version at plugin registration and adds regression coverage for the version gate plus the actual CleanContextRunner.run() embedded-agent call.

This is a fresh, mergeable replacement for the older conflicting PR #86.

Verification

  • npx vitest run src/utils/clean-context-runner.test.ts
  • npm test (4 files, 51 tests)
  • npm run build
  • git diff --check

Signed-off-by: 李冠辰 <liguanchen@xiaomi.com>
@Maxwell-Code07

Copy link
Copy Markdown
Collaborator

Awesome work! 13 fixes in one batch covering Gateway hardening, embedding compatibility, Hermes memory injection, offload stability, and pipeline optimization — a very productive cleanup session 👏

We'll review and merge them one by one 🚀

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.

2 participants