Skip to content

feat(hooks): suppress user prompt hook display#929

Open
tt-a1i wants to merge 1 commit into
MoonshotAI:mainfrom
tt-a1i:fix/hook-suppress-tui-display
Open

feat(hooks): suppress user prompt hook display#929
tt-a1i wants to merge 1 commit into
MoonshotAI:mainfrom
tt-a1i:fix/hook-suppress-tui-display

Conversation

@tt-a1i

@tt-a1i tt-a1i commented Jun 20, 2026

Copy link
Copy Markdown

Fixes #897

Summary

  • add a per-hook suppress_tui_display option for UserPromptSubmit allow-output
  • keep suppressed hook output injected into the model/context
  • skip live hook.result events and transcript replay entries for suppressed chunks
  • preserve mixed visible/hidden hook output order in context
  • keep blocking UserPromptSubmit hook output visible
  • update EN/ZH hooks docs and protocol origin parsing

Validation

  • pnpm --filter @moonshot-ai/agent-core exec vitest run test/agent/turn.test.ts test/config/configs.test.ts test/hooks/engine.test.ts
  • pnpm --filter @moonshot-ai/kimi-code exec vitest run test/tui/message-replay.test.ts
  • pnpm --filter @moonshot-ai/protocol exec vitest run src/__tests__/events.test.ts
  • pnpm --filter @moonshot-ai/agent-core run test
  • pnpm --filter @moonshot-ai/protocol run test
  • pnpm --filter @moonshot-ai/agent-core run typecheck
  • pnpm --filter @moonshot-ai/protocol run typecheck
  • pnpm --filter @moonshot-ai/kimi-code run typecheck
  • pnpm exec oxlint --type-aware ... --quiet
  • pnpm --filter @moonshot-ai/agent-core run build
  • pnpm --filter @moonshot-ai/protocol run build
  • pnpm --filter @moonshot-ai/kimi-code run build
  • git diff --check

Review

Ran a subagent review after implementation. It caught ordering/docs/protocol gaps; those are fixed now. Second pass found no blockers.

AI Assistance Disclosure

I used Codex to review the changes, sanity-check the implementation against existing patterns, and help spot potential edge cases.

@changeset-bot

changeset-bot Bot commented Jun 20, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: e86d7a3

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@moonshot-ai/kimi-code Minor

Not sure what this means? Click here to learn what changesets are.

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

@tt-a1i tt-a1i marked this pull request as ready for review June 20, 2026 04:20
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.

Suggestion: option to hide UserPromptSubmit hook output from TUI

1 participant