Currently, `ChatContext` does not provide a public way to remove an item by id, forcing users to manipulate the private `_items` list directly. A helper to remove items by id would simplify this process.
### Feature Type Would make my life easier ### Feature Description ## Problem `ChatContext` exposes helpers like: - `get_by_id()` - `index_by_id()` but it does not provide a public way to remove an item by id. As a result, users often need to manipulate the private `_items` list directly: ```python idx = ctx.index_by_id(item_id) if idx is not None: ctx._items.pop(idx) ```` Accessing `_items` directly relies on internal implementation details and may break if the internal structure changes. --- ## Use case When building conversational agents that dynamically modify the prompt (e.g. graph-based dialogue orchestration), it is sometimes necessary to replace or remove a specific item in the context (for example a dynamically updated system instruction message). Without a public helper, this requires mutating the private `_items` attribute. --- ## Proposal Add a helper method: ```python def remove_by_id(self, item_id: str) -> ChatItem | None: ``` Behavior: * removes th