mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-06 00:27:24 +00:00
Expose templates to the system prompt
This commit is contained in:
3 files changed
+131
-8
No files matched your search
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user