Bindu icon indicating copy to clipboard operation
Bindu copied to clipboard

feat(ui): add context and task clear controls

Open A-VISHAL opened this issue 9 months ago • 0 comments

Changes Made • Added clearMessages and clearContext imports from $lib/stores/chat • Added IconTrash2 and IconEraser icons from Lucide

Context Clear • Implemented handleClearContextClick(): • Confirms action with user dialog • Calls clearContext($contextId) to hit /contexts/clear API endpoint • Updates context and messages state after successful clearing

Task Clear • Implemented handleClearTasksClick(): • Confirms action with user dialog • Calls clearMessages() to clear all displayed tasks/messages

UI Updates • Added compact toolbar in agent mode (visible when $contextId exists) • Toolbar includes: • Clear context button (trash icon: IconTrash2) • Clear tasks button (eraser icon: IconEraser) • Styled using existing Tailwind classes for consistent design

A-VISHAL avatar Feb 18 '26 13:02 A-VISHAL