Expose templates to the system prompt

This commit is contained in:
Alex Gleason committed 2025-12-01 14:59:24 -06:00
1 parent 6941710a3d
commit fe0becb2c8
3 files changed
+131 -8

No files matched your search

+11
View File
@@ -266,6 +266,16 @@ export class SessionManager {
// No repository URL available
}
// Get project template metadata if available
let projectTemplate: { name: string; description: string; url: string } | undefined;
try {
const dotai = new DotAI(this.fs, `${config.fsPathProjects}/${projectId}`);
const template = await dotai.readTemplate();
projectTemplate = template || undefined;
} catch {
// Template metadata not available
}
const systemPrompt = await makeSystemPrompt({
cwd: `${config.fsPathProjects}/${projectId}`,
fs: this.fs,
@@ -277,6 +287,7 @@ export class SessionManager {
metadata,
repositoryUrl,
template: config.systemPrompt,
projectTemplate,
});
// Helper function to filter out unsupported image formats (keep only JPG/JPEG/PNG)