Skip to content

feat(cli): add platform unbind and forget commands (#678)#683

Open
mo1998 wants to merge 1 commit into
tirth8205:mainfrom
mo1998:feat/issue-678-unbind-and-forget
Open

feat(cli): add platform unbind and forget commands (#678)#683
mo1998 wants to merge 1 commit into
tirth8205:mainfrom
mo1998:feat/issue-678-unbind-and-forget

Conversation

@mo1998

@mo1998 mo1998 commented Jul 20, 2026

Copy link
Copy Markdown

Resolves two gaps raised in issue #678: there was no way to unbind a single already-configured platform, and no way to remove already-parsed files from the graph short of a full rebuild.

  • uninstall --platform NAME: scopes the run to unbinding one platform's MCP registration. Graph data and every other integration are preserved; the full uninstall still runs when --platform is omitted.
  • forget PATH [PATH ...]: drops parsed files from the graph without a rebuild. Accepts absolute paths, repo-relative paths, directories, and glob patterns, with --dry-run to preview. The FTS index is refreshed after removal so search stays consistent.

Adds tests for the platform filter, the path matcher, and both commands.

Pull Request

Linked issue

Closes #678

What & why

How it was tested

uv run pytest tests/ --tb=short -q
uv run ruff check code_review_graph/
uv run mypy code_review_graph/ --ignore-missing-imports --no-strict-optional

Checklist

  • Tests added for new functionality
  • All tests pass: uv run pytest tests/ --tb=short -q
  • Linting passes: uv run ruff check code_review_graph/
  • Type checking passes: uv run mypy code_review_graph/ --ignore-missing-imports --no-strict-optional
  • Lines are at most 100 characters
  • Docs updated where behavior changed (README, docs/, docstrings)

Resolves two gaps raised in issue tirth8205#678: there was no way to unbind a
single already-configured platform, and no way to remove already-parsed
files from the graph short of a full rebuild.

- uninstall --platform NAME: scopes the run to unbinding one platform's
  MCP registration. Graph data and every other integration are preserved;
  the full uninstall still runs when --platform is omitted.
- forget PATH [PATH ...]: drops parsed files from the graph without a
  rebuild. Accepts absolute paths, repo-relative paths, directories, and
  glob patterns, with --dry-run to preview. The FTS index is refreshed
  after removal so search stays consistent.

Adds tests for the platform filter, the path matcher, and both commands.
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.

[Platform]: 如何取消绑定已经配置的平台和已经解析过的files?

1 participant