Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .claude/CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ Only update the `Status` field — do not modify any other frontmatter or prompt

<!-- BEGIN:REPO:current-state -->
## Current State
Branch: `main`
In-progress: PR #119 (release alpha.70) open, auto-merge enabled. After merge, run github-release skill to publish. PR #122 (fix #121, abort crash on early escape) open, auto-merge enabled.
Branch: `fix/slash-command-attachments`
In-progress: PR open for #89 (slash commands discarding attachments). Awaiting merge.
<!-- END:REPO:current-state -->

<!-- BEGIN:REPO:architecture -->
Expand Down
17 changes: 17 additions & 0 deletions .claude/sessions/2026-03-27.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Session Log: 2026-03-27

### 07:36 - fix/slash-command-attachments (Stage 1 of #89)

- Did: Moved `takeAttachments()` after `handleCommand()` check in `submit()`. Slash commands now return early before consuming attachments. Also moved the `> text [N attachments]` log after the check (it uses `attachments`). All checks pass: type-check, build, 105 tests, biome.
- Files: src/ClaudeCli.ts
- Decisions: Moved the log line along with `takeAttachments()` since the log references the `attachments` variable. For slash commands, the `> /command` echo is no longer printed (slash commands are internal, not queries). Stage 2 (commit, push, PR) awaits manual verification.
- Next: Stage 2 after Supreme Commander verifies the fix manually.
- Violations: None

### 07:39 - fix/slash-command-attachments (Stage 2 of #89)

- Did: Committed Stage 1 fix, pushed to remote, created PR for #89.
- Files: src/ClaudeCli.ts, .claude/CLAUDE.md, .claude/sessions/2026-03-27.md
- Decisions: All changes in one commit per session-end protocol. Prompt status set to completed.
- Next: Await PR merge.
- Violations: None
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Fixed

- Slash commands no longer discard pending file attachments

### Security

- Fixed [CVE-2026-33672](https://github.com/advisories/GHSA-c2c7-rcm5-vvqj) (ReDoS) and [GHSA-3v7f-55p6-f55p](https://github.com/advisories/GHSA-3v7f-55p6-f55p) (method injection) in picomatch
Expand Down
13 changes: 7 additions & 6 deletions src/ClaudeCli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -298,21 +298,22 @@ export class ClaudeCli {
return;
}

const attachments = this.attachmentStore.takeAttachments();
this.commandMode.exit();

this.editor = clear(this.editor);
if (attachments) {
this.term.log(`> ${text} [${attachments.length} attachment${attachments.length === 1 ? '' : 's'}]`);
} else {
this.term.log(`> ${text}`);
}

if (await this.handleCommand(text)) {
this.redraw();
return;
}

const attachments = this.attachmentStore.takeAttachments();
if (attachments) {
this.term.log(`> ${text} [${attachments.length} attachment${attachments.length === 1 ? '' : 's'}]`);
} else {
this.term.log(`> ${text}`);
}

const startTime = Date.now();
this.term.log('Sending query...');
this.appState.sending();
Expand Down
Loading