save_agent_log: write flat context array matching AST order
The old code wrote a JSON object with named section keys, which serde_json serialized in alphabetical order — putting conversation before system, making logs misleading. Write a single flat array in section order instead, matching what the model actually sees. Co-Authored-By: Proof of Concept <poc@bcachefs.org>
This commit is contained in:
parent
c300013ce5
commit
28e564aeb2
2 changed files with 6 additions and 9 deletions
|
|
@ -764,7 +764,7 @@ impl ContextState {
|
|||
pub fn conversation(&self) -> &[AstNode] { &self.conversation }
|
||||
pub fn conversation_mut(&mut self) -> &mut Vec<AstNode> { &mut self.conversation }
|
||||
|
||||
fn sections(&self) -> [&Vec<AstNode>; 4] {
|
||||
pub fn sections(&self) -> [&Vec<AstNode>; 4] {
|
||||
[&self.system, &self.identity, &self.journal, &self.conversation]
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue