Skip to content

Add support for Chinese keyword detection in CJK#8

Open
TheOrdinaryWow wants to merge 2 commits intokandotrun:mainfrom
TheOrdinaryWow:main
Open

Add support for Chinese keyword detection in CJK#8
TheOrdinaryWow wants to merge 2 commits intokandotrun:mainfrom
TheOrdinaryWow:main

Conversation

@TheOrdinaryWow
Copy link
Copy Markdown

@TheOrdinaryWow TheOrdinaryWow commented May 7, 2026

Summary by CodeRabbit

リリースノート

  • 新機能

    • 中国語(簡体字・繁体字)キーワードサポートを追加しました。メモリー検出と回想トリガーが英語・日本語に加えて中国語で動作します。
  • ドキュメント

    • 中国語のREADMEを追加しました。
    • 既存ドキュメントを更新し、多言語キーワードサポート、信号キーワード、コンテキスト再注入機能を含む詳細な情報を記載しました。

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 7, 2026

Review Change Stack

概要

OpenCode Supermemory Maxプラグインに中国語(簡体字・繁体字)キーワード検出対応を追加。デフォルト設定にパターンを拡張し、単語境界処理をCJK文字対応に修正し、英語・日本語・中国語の3言語ドキュメントを整備。

変更内容

マルチ言語キーワード対応拡張

レイヤー / ファイル 要約
キーワード設定
src/config.ts
DEFAULT_KEYWORD_PATTERNS、DEFAULT_RECALL_KEYWORD_PATTERNS、DEFAULT_SIGNAL_KEYWORDSに中国語(簡体字・繁体字)パターンを追加。
パターン検出実装
src/index.ts
単語境界チェック用wrapWordBoundaryヘルパーを導入し、ASCII文字のみに\b...\bを適用、CJK文字は部分文字列マッチとして処理。
メタデータ更新
package.json
プラグイン説明に中国語キーワード対応を明記。
ドキュメント整備
README.md
機能比較表に中国語キーワードを追加、マルチ言語キーワードセクションを3言語対応に拡張、シグナルキーワード・コンテキスト再注入トリガーに中国語用語を追加。
中国語README追加
README.zh.md
プロジェクト概要、機能説明、インストール・設定方法、マルチ言語トリガー、メモリースコープ、信号抽出、コンテキスト再注入、重複排除、設定リファレンス、プライバシー、開発コマンド、ライセンスを含む完全な中国語ドキュメント。

推定レビュー工数

🎯 2 (Simple) | ⏱️ ~12 分

ポエム

ウサギより:🐰
中国語のキーワード、喜びいっぱい
東西の言葉が一つになりて
単語の境、CJKに優し
新しいREADMEも翻訳完備
マルチ言語の力、記憶も深し!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed プルリクエストのタイトルは、中国語(簡体字・繁体字)キーワード検出サポートの追加という主要な変更を正確に要約しており、変更内容と完全に関連している。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@README.zh.md`:
- Around line 154-156: The fenced code block containing "API key 是
<private>sk-abc123</private>" is missing a language identifier, triggering
markdownlint MD040; update the opening backticks from ``` to ```text (or another
appropriate language tag) so the block becomes fenced with a language specifier,
ensuring the README.zh.md code block is recognized and MD040 is resolved.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 1f56538e-68f4-44af-9330-256415680223

📥 Commits

Reviewing files that changed from the base of the PR and between 2c3ca4f and 32dd9cd.

📒 Files selected for processing (5)
  • README.md
  • README.zh.md
  • package.json
  • src/config.ts
  • src/index.ts

Comment thread README.zh.md
Comment on lines +154 to +156
```
API key 是 <private>sk-abc123</private>
```
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

フェンスコードブロックに言語指定子がありません。

markdownlint (MD040) の警告に対応するため、言語識別子を追加してください。

📝 修正案
-```
+```text
 API key 是 <private>sk-abc123</private>
</details>

<details>
<summary>🧰 Tools</summary>

<details>
<summary>🪛 markdownlint-cli2 (0.22.1)</summary>

[warning] 154-154: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

</details>

</details>

<details>
<summary>🤖 Prompt for AI Agents</summary>

Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @README.zh.md around lines 154 - 156, The fenced code block containing "API
key 是 sk-abc123" is missing a language identifier, triggering
markdownlint MD040; update the opening backticks from totext (or another
appropriate language tag) so the block becomes fenced with a language specifier,
ensuring the README.zh.md code block is recognized and MD040 is resolved.


</details>

<!-- fingerprinting:phantom:poseidon:churro -->

<!-- d98c2f50 -->

<!-- This is an auto-generated comment by CodeRabbit -->

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