Skip to content

feat(cli): emit one-line update notice in non-interactive mode#377

Open
bj456736 wants to merge 1 commit into
MoonshotAI:mainfrom
bj456736:feat/non-interactive-update-notice
Open

feat(cli): emit one-line update notice in non-interactive mode#377
bj456736 wants to merge 1 commit into
MoonshotAI:mainfrom
bj456736:feat/non-interactive-update-notice

Conversation

@bj456736
Copy link
Copy Markdown
Contributor

@bj456736 bj456736 commented Jun 3, 2026

When running in non-interactive mode (e.g., --prompt or piped usage), the version check was completely silent even when a newer version was available. This left CI/print-mode users unaware of updates.

Changes:

  • Writes a terse stderr notice when running non-interactively and a newer version is known from cache:
    notice: @moonshot-ai/kimi-code 0.4.0 -> 0.5.0 available. Run `kimi upgrade` to update.
    
  • Only fires when cache already knows an update is available (no extra network overhead).
  • Does not block or prompt for install; purely informational.
  • Emits telemetry event update_notified_non_interactive for observability.

Test coverage:

  • Added new test: 'emits a one-line stderr notice in non-interactive mode when an update is available'
  • All 24 preflight tests pass (1 pre-existing export test failure unrelated).

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Jun 3, 2026

⚠️ No Changeset found

Latest commit: 2f712b1

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Jun 3, 2026

pnpm dlx https://pkg.pr.new/@moonshot-ai/kimi-code@2f712b1
npx https://pkg.pr.new/@moonshot-ai/kimi-code@2f712b1

commit: 2f712b1

When running in non-interactive mode (e.g., --prompt or piped usage),
version check was completely silent even when a newer version was
available. This left CI/print-mode users unaware of updates.

Now writes a terse stderr notice like:
  notice: @moonshot-ai/kimi-code 0.4.0 -> 0.5.0 available. Run  to update.

- Only fires when cache already knows an update is available (no extra
  network overhead).
- Does not block or prompt for install; purely informational.
- Emits telemetry event 'update_notified_non_interactive' for observability.
@bj456736 bj456736 force-pushed the feat/non-interactive-update-notice branch from 2ac66ad to 2f712b1 Compare June 3, 2026 10:42
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