memory: clean prompt helper warning
This commit is contained in:
parent
03256db913
commit
3a0c8e1597
|
|
@ -117,7 +117,7 @@ impl SystemPromptTemplate {
|
|||
let body = tmpl
|
||||
.render(ctx.to_minijinja_value())
|
||||
.map_err(|e| SystemPromptError::Render(e.to_string()))?;
|
||||
append_trailing_section_with_capabilities(
|
||||
append_trailing_section(
|
||||
&body,
|
||||
ctx.prompts,
|
||||
ctx.scope,
|
||||
|
|
@ -272,28 +272,7 @@ impl ToolCapabilities {
|
|||
/// comes from the prompt catalog (`PodPrompt::WorkingBoundariesSection`
|
||||
/// / `PodPrompt::AgentsMdSection`) so that wording can be overridden
|
||||
/// per-pack without touching this function.
|
||||
pub fn append_trailing_section(
|
||||
body: &str,
|
||||
prompts: &PromptCatalog,
|
||||
scope: &Scope,
|
||||
agents_md: Option<&str>,
|
||||
resident_summary: Option<&str>,
|
||||
resident_knowledge: Option<&[ResidentKnowledgeEntry]>,
|
||||
resident_workflows: Option<&[ResidentWorkflowEntry]>,
|
||||
) -> Result<String, SystemPromptError> {
|
||||
append_trailing_section_with_capabilities(
|
||||
body,
|
||||
prompts,
|
||||
scope,
|
||||
agents_md,
|
||||
resident_summary,
|
||||
resident_knowledge,
|
||||
resident_workflows,
|
||||
ToolCapabilities::default(),
|
||||
)
|
||||
}
|
||||
|
||||
fn append_trailing_section_with_capabilities(
|
||||
fn append_trailing_section(
|
||||
body: &str,
|
||||
prompts: &PromptCatalog,
|
||||
scope: &Scope,
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ It is recommended to run tools that handle asynchronous processing, such as quer
|
|||
|
||||
### Memory and knowledge
|
||||
|
||||
Use memory and knowledge proactively when the request may depend on prior project decisions, historical rationale, durable user preferences, recently completed tickets, or established workflow/policy conventions.
|
||||
{% if tool_capabilities.memory_records and tool_capabilities.knowledge_query %}Use memory and knowledge proactively{% elif tool_capabilities.memory_records %}Use memory proactively{% else %}Use knowledge proactively{% endif %} when the request may depend on prior project decisions, historical rationale, durable user preferences, recently completed tickets, or established workflow/policy conventions.
|
||||
{% if tool_capabilities.memory_query and tool_capabilities.knowledge_query %}Prefer a small targeted `MemoryQuery` / `KnowledgeQuery` before relying on vague recollection.
|
||||
{% elif tool_capabilities.memory_query %}Prefer a small targeted `MemoryQuery` before relying on vague recollection.
|
||||
{% elif tool_capabilities.knowledge_query %}Prefer a small targeted `KnowledgeQuery` before relying on vague recollection.
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user