Skip to content

feat(connector): add schema refresh subcommand#186

Merged
BlackHole1 merged 1 commit into
mainfrom
refactor-refresh
May 11, 2026
Merged

feat(connector): add schema refresh subcommand#186
BlackHole1 merged 1 commit into
mainfrom
refactor-refresh

Conversation

@BlackHole1

@BlackHole1 BlackHole1 commented May 11, 2026

Copy link
Copy Markdown
Member

Introduce oo connector schema refresh to clear all locally cached
connector action schemas. The command requires no authentication and
defers metadata refetching to subsequent oo connector schema or
oo connector run invocations.

Also override visibleGlobalOptions in the localized help renderer so
nested subcommands surface root-level global options (--debug,
--lang) on their --help output, which previously appeared blank.

Introduce `oo connector schema refresh` to clear all locally cached
connector action schemas. The command requires no authentication and
defers metadata refetching to subsequent `oo connector schema` or
`oo connector run` invocations.

Also override `visibleGlobalOptions` in the localized help renderer so
nested subcommands surface root-level global options (`--debug`,
`--lang`) on their `--help` output, which previously appeared blank.

Signed-off-by: Kevin Cui <bh@bugs.cc>
@coderabbitai

coderabbitai Bot commented May 11, 2026

Copy link
Copy Markdown

Review Change Stack
No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 07a9c12c-5d94-4771-b3f3-2abbb7d7f8ca

📥 Commits

Reviewing files that changed from the base of the PR and between 443af48 and cd2dcf9.

⛔ Files ignored due to path filters (1)
  • src/application/commands/connector/__snapshots__/index.cli.test.ts.snap is excluded by !**/*.snap
📒 Files selected for processing (10)
  • docs/commands.md
  • docs/commands.zh-CN.md
  • src/adapters/commander/localized-help.ts
  • src/application/commands/connector/index.cli.test.ts
  • src/application/commands/connector/schema-cache.test.ts
  • src/application/commands/connector/schema-cache.ts
  • src/application/commands/connector/schema-refresh.ts
  • src/application/commands/connector/schema.ts
  • src/application/commands/telemetry-decisions.test.ts
  • src/i18n/catalog.ts

Summary by CodeRabbit

New Features

  • Introduced oo connector schema refresh command to clear all locally cached connector action schemas without requiring authentication. No immediate metadata fetching occurs—schemas are refreshed automatically on demand during subsequent connector schema or connector run operations.

Documentation

  • Added comprehensive documentation for the connector schema refresh command in both English and Chinese.

Walkthrough

This PR introduces a new oo connector schema refresh subcommand that clears all locally cached connector action schemas. The change adds i18n and telemetry support for the new command, implements cache clearing logic via a new clearConnectorActionSchemaCache function, defines the refresh command, integrates it as a child of the connector schema command, improves help text rendering for global options, adds comprehensive test coverage validating cache invalidation and legacy directory cleanup, and documents the command in English and Chinese with behavior notes about no authentication required and deferred remote metadata fetching.

Possibly related PRs

  • oomol-lab/oo-cli#173: Modifies the same connector schema and cache surface with related schema-handling CLI subcommands and cache functions.
  • oomol-lab/oo-cli#181: Modifies src/application/commands/connector/schema-cache.ts alongside the main PR's cache clearing additions.
  • oomol-lab/oo-cli#180: Modifies connector schema codepaths in schema.ts and schema-cache.ts with overlapping module interactions.
🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The PR title follows the required format <type>(<scope>): <subject> with type 'feat', scope 'connector', and subject 'add schema refresh subcommand' which directly matches the main change.
Description check ✅ Passed The PR description is directly related to the changeset, describing both the new connector schema refresh command and the localized help renderer updates.
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
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch refactor-refresh

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

@BlackHole1 BlackHole1 merged commit ab5aea6 into main May 11, 2026
6 checks passed
@BlackHole1 BlackHole1 deleted the refactor-refresh branch May 11, 2026 09:17
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