|
@@ -15,6 +15,7 @@ import {
|
|
|
createLsTool,
|
|
createLsTool,
|
|
|
createWriteTruthFileTool,
|
|
createWriteTruthFileTool,
|
|
|
} from "./agent-tools.js";
|
|
} from "./agent-tools.js";
|
|
|
|
|
+import { createBookContextTransform } from "./context-transform.js";
|
|
|
|
|
|
|
|
// ---------------------------------------------------------------------------
|
|
// ---------------------------------------------------------------------------
|
|
|
// Types
|
|
// Types
|
|
@@ -245,6 +246,7 @@ export async function runAgentSession(
|
|
|
createLsTool(projectRoot),
|
|
createLsTool(projectRoot),
|
|
|
],
|
|
],
|
|
|
},
|
|
},
|
|
|
|
|
+ transformContext: createBookContextTransform(bookId, projectRoot),
|
|
|
streamFn: streamSimple,
|
|
streamFn: streamSimple,
|
|
|
getApiKey: (provider: string) => {
|
|
getApiKey: (provider: string) => {
|
|
|
if (config.apiKey) return config.apiKey;
|
|
if (config.apiKey) return config.apiKey;
|