17 Commits

Author SHA1 Message Date
kite 01c9c85456 feat: add review filter to remove provably incorrect comments after subtask
- Add REVIEW_FILTER_TASK template and LLM conversation config
- Implement executeReviewFilter to post-process comments per file
- Add CommentsForPath and RemoveByPathAndIndices to CommentCollector
- Apply timeout from template config to review filter LLM call
- Await CommentWorkerPool before running filter to prevent race condition
- Include raw response preview in filter JSON parse error logs
2026-06-09 20:41:42 +08:00
kite 48cc6a3329 feat: change default output language from Chinese to English 2026-06-09 09:57:45 +08:00
MuoDoo adb9ac8b4e feat(rules): add built-in Rust and Cargo.toml review rules (#74)
* Add Rust review rules

* Fix case-insensitive rule matching
2026-06-08 20:56:00 +08:00
kite 2bebc86cfc feat(config): increase default max tool call rounds from 20 to 30
Allow more thorough analysis per file by raising MAX_TOOL_REQUEST_TIMES.
2026-06-06 20:35:32 +08:00
kite aa86d9fa60 fix(rules): align test expectations with English rule docs and isolate global config
Rule doc files were translated from Chinese to English but tests still
expected Chinese substrings. Also added HOME isolation to prevent the
user's ~/.opencodereview/rule.json from interfering with system-default
rule assertions.
2026-06-06 19:26:34 +08:00
kite 729c8647b7 fix(tool): use fixed-string matching by default in code_search to fix Linux failures
The code_search tool used -E (extended regex) by default, causing
unmatched parentheses in search patterns (e.g. "func Hello()") to
trigger "Unmatched ( or \(" fatal errors on Linux (GNU regex is strict),
while macOS (BSD regex) silently tolerated them. Since the tool
definition states the default mode is "literal text", switch to -F
(fixed string). Also capture stderr separately so real errors are
surfaced instead of being silently reported as "No matches found".
2026-06-05 23:59:01 +08:00
kite 8c4463f657 docs(rule): Translated into English 2026-06-05 19:51:06 +08:00
Lei Zhang 95c5d5930e feat: Add HarmonyOS support for .ets files and review configurations (#48)
* feat: add .ets file extension support for HarmonyOS development

* feat: add complete HarmonyOS review support with ArkTS rules, .json5 config, and oh_modules exclusion

- Add arkts.md rule doc with ArkTS-specific and TypeScript general checks
- Add .json5 to supported file types for HarmonyOS config files
- Map .json5 to json.md rules in system_rules.json
- Exclude oh_modules/** (HarmonyOS dependency dir) from review
- Exclude *.test.ets (HarmonyOS test files) from review
- Add unit tests for all new extensions and patterns

* refactor: merge json and json5 glob patterns into single brace expansion
2026-06-05 12:22:11 +08:00
kite d3e29bd581 fix(config): update main_task template 2026-06-02 11:32:57 +08:00
kite f363702a15 feat(agent): integrate session recording and token tracking for re-location task
Re-location LLM calls were invisible in session history and their token
  consumption was unaccounted for. Refactor the code_comment handling path
  to record re-location requests/responses into session JSONL, accumulate
  token usage into global counters, and display them in the viewer.

  Also fixes: async context cancellation risk (WithoutCancel), duplicate
  telemetry recording, missing timeout enforcement, missing {existing_code}
  placeholder in the re-location prompt, and renames Parse to ParseComments
  for clarity.
2026-05-30 23:25:12 +08:00
kite 834a4e7e3f feat(rules): add ocr rules check command to preview effective rule for a file path 2026-05-26 22:11:39 +08:00
kite 971ab0a626 feat(rules): extract inline rule content into separate markdown files
Move verbose rule definitions from system_rules.json into individual
  markdown files under rule_docs/, loaded at runtime via embed.FS.
  This improves maintainability by separating rule content from config
  structure and merges duplicate mapper/dao XML patterns into one entry.
2026-05-26 21:39:32 +08:00
kite 5053e6dca8 refactor(config): rename config directory from .open-code-review to .opencodereview
Unify the config folder name to `.opencodereview` across all runtime paths,
  tests, docs, and i18n strings. Also make defaultConfigPath() return an error
  instead of silently falling back to a current-directory file when $HOME is
  unresolvable.
2026-05-25 23:07:36 +08:00
kite db5bc4b8a9 feat(rules): add include/exclude file filter support in rule.json
Allow users to configure include/exclude glob patterns in
  .open-code-review/rule.json (global or project-level) to control
  which files are reviewed. Exclude has highest priority, include
  penetrates default path exclusions but not the extension allowlist.
  Only one layer takes effect following --rule > project > global priority.
2026-05-25 20:19:02 +08:00
kite d44fd31989 feat(rules): unify rule resolution behind Resolver interface with four-layer priority
Consolidate review rules into a composedResolver that supports four layers
  (--rule flag > project .open-code-review/rule.json > global ~/rule.json >
  embedded system default), each with first-match-wins fall-through semantics.
2026-05-25 17:45:53 +08:00
kite 35424d18bf feat(config): add path exclusion patterns for file filtering
This change introduces a new configuration mechanism for excluding specific file paths during code reviews. It adds support for glob patterns including recursive directory matching (**), single-segment wildcards (*), and brace expansion ({a,b}), allowing more flexible control over which files should be reviewed or skipped based on their location within the repository.
2026-05-23 00:11:35 +08:00
kite 7c8b8562aa feat: init 2026-05-20 22:03:52 +08:00