Files
openclaw/src
sheeek 00b77421dd refactor: improve sandbox commands code structure
Improvements:
- Extract validation into separate function
- Split display logic from business logic
- Create reusable container matcher for agent filtering
- Abstract status/image formatting into helpers
- Reduce code duplication between containers and browsers
- Extract container removal into generic function
- Add type safety with FilteredContainers type
- Improve readability with smaller, focused functions

Changes:
- validateRecreateOptions(): Validate mutual exclusivity
- fetchAndFilterContainers(): Fetch + filter in one place
- createAgentMatcher(): Reusable agent filter predicate
- displayContainers/Browsers(): Dedicated display functions
- displaySummary/RecreatePreview/Result(): Clear separation
- removeContainer(): Generic removal with error handling
- Format helpers: formatStatus, formatImageMatch, etc.
- Count helpers: countRunning, countMismatches

Result: 85 more lines but much better maintainability and testability.
2026-01-09 13:23:16 +01:00
..
2026-01-08 03:54:35 +00:00
2026-01-08 05:20:39 +01:00
2026-01-09 00:57:17 +01:00
2026-01-09 08:30:24 +01:00
wip
2026-01-09 11:06:49 +01:00
2026-01-09 02:29:54 +00:00
2026-01-09 07:09:15 +00:00
2026-01-09 05:27:54 +00:00
2026-01-06 04:51:05 +00:00
2026-01-06 04:51:05 +00:00
2026-01-08 03:03:03 +00:00