refactor(FN-2161): standardize on createFnAgent naming
- Rename engine export and call sites to use createFnAgent consistently across runtime flows - Update core lazy engine loader and dashboard agent-generation/planning/chat paths to reference createFnAgent - Refresh affected unit and integration tests, including renaming pi-create-kb-agent.test.ts to pi-create-fn-agent.test.ts - Update AGENTS.md documentation references to match the new createFnAgent name
This commit is contained in:
@@ -79,8 +79,8 @@ export async function compactMemoryWithAi(
|
||||
provider?: string,
|
||||
modelId?: string
|
||||
): Promise<string> {
|
||||
const createKbAgent = await getKbAgent();
|
||||
if (!createKbAgent) {
|
||||
const createFnAgent = await getKbAgent();
|
||||
if (!createFnAgent) {
|
||||
if (DEBUG) console.log("[memory-compaction] AI engine not available");
|
||||
throw new AiServiceError("AI engine not available");
|
||||
}
|
||||
@@ -104,7 +104,7 @@ export async function compactMemoryWithAi(
|
||||
}
|
||||
|
||||
if (DEBUG) console.log("[memory-compaction] Creating agent session...");
|
||||
const agentResult = await createKbAgent(agentOptions);
|
||||
const agentResult = await createFnAgent(agentOptions);
|
||||
|
||||
if (!agentResult?.session) {
|
||||
if (DEBUG) console.log("[memory-compaction] Failed to initialize AI agent - no session");
|
||||
|
||||
Reference in New Issue
Block a user