MCPcopy Create free account
hub / github.com/ChrisFeldmeier/OpenCodeRust / dedup_sort

Function dedup_sort

crates/opencode-tui/src/components/prompt.rs:1142–1147  ·  view source on GitHub ↗
(mut items: Vec<String>)

Source from the content-addressed store, hash-verified

1140}
1141
1142fn dedup_sort(mut items: Vec<String>) -> Vec<String> {
1143 items.retain(|item| !item.trim().is_empty());
1144 items.sort_by(|a, b| a.to_ascii_lowercase().cmp(&b.to_ascii_lowercase()));
1145 items.dedup_by(|a, b| a.eq_ignore_ascii_case(b));
1146 items
1147}
1148
1149fn inset_horizontal(area: Rect, padding: u16) -> Rect {
1150 if area.width <= padding.saturating_mul(2) {

Callers 2

set_agent_suggestionsMethod · 0.85
set_skill_suggestionsMethod · 0.85

Calls 1

is_emptyMethod · 0.80

Tested by

no test coverage detected