@@ -27,7 +27,7 @@ fn truncate_to_chars(s: &str, max_chars: usize) -> &str {
2727}
2828
2929/// Map the classified [`TaskIntent`] to a human-readable intent string.
30- fn intent_label ( intent : TaskIntent ) -> & ' static str {
30+ const fn intent_label ( intent : TaskIntent ) -> & ' static str {
3131 match intent {
3232 TaskIntent :: Simple => "simple" ,
3333 TaskIntent :: Delegate => "delegate" ,
@@ -86,17 +86,17 @@ fn tool_result_to_artifact(_tool_call_id: &str, content: &str, index: usize) ->
8686///
8787/// # Parameters
8888///
89- /// - `session_id` — Stable session identifier (passed through).
90- /// - `user_message` — Raw user message; truncated to [`GOAL_MAX_CHARS`]
91- /// chars for the `goal` field.
92- /// - `classify_result` — Output of the task classifier; drives `user_intent`.
93- /// - `history` — Full conversation history for the current session.
89+ /// - `session_id` — Stable session identifier (passed through).
90+ /// - `user_message` — Raw user message; truncated to [`GOAL_MAX_CHARS`]
91+ /// chars for the `goal` field.
92+ /// - `classify_result` — Output of the task classifier; drives `user_intent`.
93+ /// - `history` — Full conversation history for the current session.
9494/// - `Chat` messages with `role == "assistant"` become completed
9595/// [`StepRecord`]s.
9696/// - `ToolResults` entries become [`ArtifactRef`]s.
97- /// - `side_effect_mode` — Current permission mode; controls `active_constraints`.
98- /// - `policy` — Active [`CausalPolicy`]; used to set the
99- /// [`BudgetState`].
97+ /// - `side_effect_mode` — Current permission mode; controls `active_constraints`.
98+ /// - `policy` — Active [`CausalPolicy`]; used to set the
99+ /// [`BudgetState`].
100100pub fn build_causal_state (
101101 session_id : & str ,
102102 user_message : & str ,
@@ -168,6 +168,7 @@ pub fn build_causal_state(
168168}
169169
170170#[ cfg( test) ]
171+ #[ allow( clippy:: indexing_slicing, clippy:: unwrap_used, clippy:: expect_used) ]
171172mod tests {
172173 use super :: super :: policy:: CausalPolicy ;
173174 use super :: * ;
0 commit comments