feat: add /summary command to summarize the current conversation (v0.1.15)#20
Conversation
…1.15) /summary forwards a prompt to the session's Claude process and lets the reply stream back like a normal turn, so it summarizes the current session (this DM or thread; sessionKey = thread_ts ?? channel). - No arg: a handover-oriented default prompt (目的/やったこと/現状/未解決/次の一手) - /summary <request>: forwards the user's own text verbatim - The result is wrapped in a fenced code block for easy copy into a handover note Adds CommandResult.forwardToClaude; tryCommand forwards it via manager.send. Ported from the upstream (GitLab) v0.1.15. Tests + README (en/ja) updated. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughAdds a Changes/summary Command Implementation
Sequence Diagram(s)sequenceDiagram
participant Slack
participant tryCommand
participant cmdSummary
participant manager as ClaudeManager
Slack->>tryCommand: /summary [arg]
tryCommand->>cmdSummary: dispatch(arg)
cmdSummary-->>tryCommand: { text: '', forwardToClaude: prompt }
tryCommand->>manager: send(prompt, handlersFor(project, channel, threadTs))
manager-->>Slack: streamed Claude summary in fenced code block
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/index.ts`:
- Line 222: The log statement in the forwarding path logs the full user-provided
prompt via prompt.trim(), which can expose sensitive user input in logs. Modify
the log.debug call to log only command metadata (such as command name or type)
instead of the raw prompt content, while still maintaining visibility into the
forwarding action to Claude. Ensure no user-provided text or sensitive input is
included in the debug log message.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: e58dce62-00f8-41d6-889d-8c4b8e963f2c
📒 Files selected for processing (6)
README.ja.mdREADME.mdpackage.jsonsrc/commands.test.tssrc/commands.tssrc/index.ts
A command argument (e.g. /summary <free text>) may contain sensitive user content; logging prompt.trim() verbatim could leak it. Log the command name only — applied to both the forwarding and responding debug lines. Addresses CodeRabbit review on PR #20. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
|
@coderabbitai Addressed: the forwarding-path log no longer logs the raw prompt. It now logs only the command name ( |
|
Tip For best results, initiate chat on the files or code changes.
|
Summary
Adds a
/summaryslash command that summarizes the current conversation (this DM or thread) — intended for handing work over to another person or a fresh session.Behaviour
/summary— forwards a handover-oriented default prompt (目的 / やったこと / 現状 / 未解決 / 次の一手)/summary <request>— forwards your own text verbatim as the promptthread_ts ?? channel, so it summarizes whatever conversation you run it inImplementation
CommandResult.forwardToClaude: when set,tryCommand(index.ts) forwards the prompt to the session's Claude process viamanager.sendand lets the reply stream back like a normal turn — instead of the command answering by itself.handleCommandstays synchronous./helpupdated; README (en/ja) updated; version bumped to 0.1.15.Ported from the upstream (GitLab) v0.1.15. The OS-independent
basenametest for/switchis preserved (not overwritten by the upstreamendsWith('/mile')variant).Checks
pnpm verify— 99 tests pass🤖 Generated with Claude Code
Summary by CodeRabbit
/summarycommand to generate conversation summaries, supporting an optional custom request to guide the output and formatting./summaryand expanding related command descriptions./summary, including default behavior, custom requests, and help listing.