Riapplica la fase 5 di aKode (86e7c72e) sulla base ripulita:
- crate codex-* -> akode-*, codex-rs -> akode-rs, codex-cli -> akode-cli, binario e ausiliari akode;
- ~/.codex -> ~/.akode, CODEX_HOME -> AKODE_HOME, variabili CODEX_* -> AKODE_*, .codex/ -> .akode/ di progetto;
nessun fallback a ~/.codex o a CODEX_*;
- testi per l'utente "Codex" -> "aKode"; testi verso il modello e istruzioni di sistema invariati;
- snapshot insta rinominati (non ancora rigenerati).
I conflitti con la base ripulita sono stati risolti riapplicando la rinomina ai file senza le
funzioni di imeAI (script di mappa dei token per file).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
33 lines
1.1 KiB
Rust
33 lines
1.1 KiB
Rust
//! Display-only previews for recognized delegated inputs; model content is never rewritten.
|
|
|
|
use akode_protocol::items::FunctionCallOutputItem;
|
|
|
|
/// Extract the task text from a delegated input, ignoring unrelated tool outputs.
|
|
pub fn delegated_output_preview(output: &FunctionCallOutputItem) -> Option<String> {
|
|
if !matches!(output.namespace.as_deref(), Some("codex_app" | "akode_tui"))
|
|
|| !matches!(
|
|
output.name.as_str(),
|
|
"create_thread" | "send_message_to_thread"
|
|
)
|
|
{
|
|
return None;
|
|
}
|
|
let text = output.output.to_text()?;
|
|
let preview = text
|
|
.strip_prefix("<codex_delegation>\n <source_thread_id>")
|
|
.and_then(|delegation| delegation.split_once("</source_thread_id>\n <input>"))
|
|
.and_then(|(_, input)| input.strip_suffix("</input>\n</codex_delegation>"))
|
|
.map(|input| {
|
|
input
|
|
.replace("<", "<")
|
|
.replace(">", ">")
|
|
.replace("&", "&")
|
|
})
|
|
.unwrap_or(text);
|
|
(!preview.trim().is_empty()).then_some(preview)
|
|
}
|
|
|
|
#[cfg(test)]
|
|
#[path = "delegated_preview_tests.rs"]
|
|
mod tests;
|