aKode fase 5: rinomina interna (crate akode-*, akode-rs/, akode-cli/, binario akode, AKODE_*, ~/.akode, snapshot)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
12
akode-rs/ext/skills/src/warnings.rs
Normal file
12
akode-rs/ext/skills/src/warnings.rs
Normal file
@@ -0,0 +1,12 @@
|
||||
use crate::render::truncate_utf8_to_bytes;
|
||||
|
||||
const MAX_WARNINGS: usize = 4;
|
||||
const MAX_WARNING_BYTES: usize = 256;
|
||||
|
||||
pub(crate) fn bounded_warnings(warnings: &[String]) -> Vec<String> {
|
||||
warnings
|
||||
.iter()
|
||||
.take(MAX_WARNINGS)
|
||||
.map(|warning| truncate_utf8_to_bytes(warning, MAX_WARNING_BYTES).0)
|
||||
.collect()
|
||||
}
|
||||
Reference in New Issue
Block a user