fix: do not truncate summaries
Some checks failed
distribution-gate / distribution-gate (push) Failing after 1m55s
Some checks failed
distribution-gate / distribution-gate (push) Failing after 1m55s
This commit is contained in:
@@ -64,7 +64,7 @@ From another flake:
|
||||
|
||||
```nix
|
||||
{
|
||||
inputs.codex-controller-loop.url = "github:your-org/codex-controller-loop";
|
||||
inputs.codex-controller-loop.url = "git+ssh://git@git.dgren.dev/eric/codex-controller-loop";
|
||||
|
||||
outputs = { self, nixpkgs, codex-controller-loop, ... }:
|
||||
let
|
||||
@@ -81,7 +81,7 @@ Through the overlay:
|
||||
```nix
|
||||
{
|
||||
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
inputs.codex-controller-loop.url = "github:your-org/codex-controller-loop";
|
||||
inputs.codex-controller-loop.url = "git+ssh://git@git.dgren.dev/eric/codex-controller-loop";
|
||||
|
||||
outputs = { self, nixpkgs, codex-controller-loop, ... }:
|
||||
let
|
||||
|
||||
@@ -377,39 +377,23 @@ fn build_completion_summary(plan: &crate::model::Plan) -> String {
|
||||
return "Goal complete.".to_string();
|
||||
}
|
||||
|
||||
let mut details = completed_steps
|
||||
let details = completed_steps
|
||||
.iter()
|
||||
.take(4)
|
||||
.map(|step| {
|
||||
let mut item = format!(
|
||||
"{}: {}",
|
||||
step.id,
|
||||
prompt::truncate_text(&step.title, 80)
|
||||
);
|
||||
let mut item = format!("{}: {}", step.id, step.title);
|
||||
if !step.notes.trim().is_empty() {
|
||||
item.push_str(" - ");
|
||||
item.push_str(&prompt::truncate_text(&step.notes, 120));
|
||||
item.push_str(step.notes.trim());
|
||||
}
|
||||
item
|
||||
})
|
||||
.collect::<Vec<_>>();
|
||||
let omitted = completed_steps.len().saturating_sub(details.len());
|
||||
if omitted > 0 {
|
||||
details.push(format!(
|
||||
"... and {} more completed step{}",
|
||||
omitted,
|
||||
if omitted == 1 { "" } else { "s" }
|
||||
));
|
||||
}
|
||||
|
||||
prompt::truncate_text(
|
||||
&format!(
|
||||
"Completed {} step{}: {}",
|
||||
completed_steps.len(),
|
||||
if completed_steps.len() == 1 { "" } else { "s" },
|
||||
details.join("; ")
|
||||
),
|
||||
320,
|
||||
format!(
|
||||
"Completed {} step{}: {}",
|
||||
completed_steps.len(),
|
||||
if completed_steps.len() == 1 { "" } else { "s" },
|
||||
details.join("; ")
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user