Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions cortex-tui-framework/crates/cortex-tui-input/src/reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,15 @@ impl InputReader {
}
}

impl<'a> IntoIterator for &'a InputReader {
type Item = InputResult<Event>;
type IntoIter = EventIterator<'a>;

fn into_iter(self) -> Self::IntoIter {
self.iter()
}
}

/// Helper function to run a closure with terminal input configured.
///
/// This function:
Expand Down
2 changes: 1 addition & 1 deletion src/cortex-prompt-harness/src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ impl SystemPromptBuilder {

// Sort sections by priority and add them
let mut sections: Vec<_> = self.sections.values().collect();
sections.sort_by(|a, b| b.priority.cmp(&a.priority));
sections.sort_by_key(|s| std::cmp::Reverse(s.priority));

for section in sections {
if section.enabled {
Expand Down
Loading