| 333 | } |
| 334 | |
| 335 | pub(super) fn assemble_context_results( |
| 336 | &self, |
| 337 | context_results: &[ContextResult], |
| 338 | ) -> ContextAssembly { |
| 339 | let mut results = context_results.to_vec(); |
| 340 | |
| 341 | if self.config.prompt_slots.guidelines.is_none() { |
| 342 | let project_hint = project_context::detect_project_hint(&self.tool_context.workspace); |
| 343 | if !project_hint.is_empty() { |
| 344 | let token_count = project_hint.split_whitespace().count().max(1); |
| 345 | let mut result = ContextResult::new("project_hint"); |
| 346 | result.add_item( |
| 347 | ContextItem::new("project_hint", ContextType::Resource, project_hint) |
| 348 | .with_source("a3s://project-hint") |
| 349 | .with_provenance("workspace_marker") |
| 350 | .with_priority(0.65) |
| 351 | .with_trust(0.8) |
| 352 | .with_freshness(1.0) |
| 353 | .with_relevance(0.9) |
| 354 | .with_token_count(token_count), |
| 355 | ); |
| 356 | results.push(result); |
| 357 | } |
| 358 | } |
| 359 | |
| 360 | ContextAssembler::with_default_budget().assemble(&results) |
| 361 | } |
| 362 | |
| 363 | fn build_augmented_system_prompt_with_base( |
| 364 | &self, |