Skip to content

feat: add merge-blocks command for merging adjacent compressed blocks#33

Closed
ranxianglei wants to merge 1 commit into
masterfrom
ranxianglei/2026-06-29_merge-blocks
Closed

feat: add merge-blocks command for merging adjacent compressed blocks#33
ranxianglei wants to merge 1 commit into
masterfrom
ranxianglei/2026-06-29_merge-blocks

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

Summary

  • New /acp merge-blocks command: merge adjacent compressed blocks in one call
  • Enhanced block list: shows topic per block (e.g., b1: "Proxy cost analysis")
  • Nudge update: >50 blocks → guides to use /acp merge-blocks <range>

Problem

Sessions accumulate 400+ small blocks. Model can't merge them because it doesn't know compress can cover existing blocks, and mark_block is deferred + one-at-a-time.

Solution

/acp merge-blocks 421-428 — auto-finds message range, concatenates summaries, creates new block, deactivates old ones via consumedBlockIds.

Changes (8 files)

  • lib/commands/merge-blocks.ts (350 lines) — new command
  • lib/commands/help.ts — help text
  • lib/commands/index.ts — command registration
  • lib/hooks.ts — command handler wiring
  • lib/prompts/extensions/nudge.ts — enhanced block list + merge guidance
  • tests/nudge-text.test.ts — updated tests
  • devlog/2026-06-29_merge-blocks/{REQ,WORKLOG}.md

Test plan

  • typecheck clean
  • tests pass (0 fail)
  • build success
  • Manual: /acp merge-blocks 1-3 merges blocks correctly

@ranxianglei ranxianglei force-pushed the ranxianglei/2026-06-29_merge-blocks branch 2 times, most recently from f636c7e to 1cfdc10 Compare June 28, 2026 17:57
… blocks

- lib/compress/merge-blocks.ts: model-callable merge_blocks tool
- lib/commands/merge-blocks.ts: /acp merge-blocks user command
- nudge.ts: guide model to use merge_blocks tool (not slash command)
- Enhanced block list shows topic per block
- Tests updated for new nudge text
@ranxianglei ranxianglei force-pushed the ranxianglei/2026-06-29_merge-blocks branch from 1cfdc10 to 797a027 Compare June 28, 2026 18:06
@ranxianglei

Copy link
Copy Markdown
Owner Author

Not help ,close .

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