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
|
```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, ... }:
|
outputs = { self, nixpkgs, codex-controller-loop, ... }:
|
||||||
let
|
let
|
||||||
@@ -81,7 +81,7 @@ Through the overlay:
|
|||||||
```nix
|
```nix
|
||||||
{
|
{
|
||||||
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
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, ... }:
|
outputs = { self, nixpkgs, codex-controller-loop, ... }:
|
||||||
let
|
let
|
||||||
|
|||||||
@@ -377,39 +377,23 @@ fn build_completion_summary(plan: &crate::model::Plan) -> String {
|
|||||||
return "Goal complete.".to_string();
|
return "Goal complete.".to_string();
|
||||||
}
|
}
|
||||||
|
|
||||||
let mut details = completed_steps
|
let details = completed_steps
|
||||||
.iter()
|
.iter()
|
||||||
.take(4)
|
|
||||||
.map(|step| {
|
.map(|step| {
|
||||||
let mut item = format!(
|
let mut item = format!("{}: {}", step.id, step.title);
|
||||||
"{}: {}",
|
|
||||||
step.id,
|
|
||||||
prompt::truncate_text(&step.title, 80)
|
|
||||||
);
|
|
||||||
if !step.notes.trim().is_empty() {
|
if !step.notes.trim().is_empty() {
|
||||||
item.push_str(" - ");
|
item.push_str(" - ");
|
||||||
item.push_str(&prompt::truncate_text(&step.notes, 120));
|
item.push_str(step.notes.trim());
|
||||||
}
|
}
|
||||||
item
|
item
|
||||||
})
|
})
|
||||||
.collect::<Vec<_>>();
|
.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!(
|
||||||
&format!(
|
"Completed {} step{}: {}",
|
||||||
"Completed {} step{}: {}",
|
completed_steps.len(),
|
||||||
completed_steps.len(),
|
if completed_steps.len() == 1 { "" } else { "s" },
|
||||||
if completed_steps.len() == 1 { "" } else { "s" },
|
details.join("; ")
|
||||||
details.join("; ")
|
|
||||||
),
|
|
||||||
320,
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user