Skip to content

feat(tui): context inventory — list and remove attached/prompt files (/drop) #3435

Description

@aheritier

Summary

Let users see what files are currently in context and remove them — an Aider-style /add / /drop inventory. docker-agent has /attach and @file references but no way to view or remove them.

Proposed behavior

  • Extend the /context view (or add a /drop command) to list attached files and prompt files, each with a per-item token estimate.
  • Allow removing an attachment from the session.

Implementation notes (starting points)

  • Add a removal API to Session.AttachedFiles in pkg/session/session.go (~718-745)
  • pkg/tui/dialog/context.go, pkg/tui/commands/commands.go
  • Keep @ref completion consistent in pkg/tui/components/editor/editor.go

Complexity: M. (Note: this pairs naturally with the /context view but should be shippable on its own against the current attachment model.)

Background: shared plan context-management-gap-analysis (Phase 2, item 4).

Dependencies / Relationships

Metadata

Metadata

Assignees

Labels

area/coreCore agent runtime, session managementarea/sessionsFor features/issues/fixes related to session lifecycle (resume, persistence, export)area/tuiFor features/issues/fixes related to the TUIkind/featPR adds a new feature (maps to feat:). Use on PRs only.

Fields

No fields configured for Enhancement.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions