Let system prompt be configurable in System Settings (EJS template)

This commit is contained in:
Alex Gleason committed 2025-11-13 17:36:04 -06:00
1 parent 4d88823c2d
commit db02b9fb94
14 files changed
+271 -124

No files matched your search

+4 -2
View File
@@ -67,6 +67,7 @@ export class SessionManager {
private corsProxy?: string;
private projectsPath: string;
private pluginsPath?: string;
private systemPromptTemplate?: string;
constructor(
fs: JSRuntimeFS,
@@ -77,6 +78,7 @@ export class SessionManager {
corsProxy?: string,
projectsPath = '/projects',
pluginsPath?: string,
systemPromptTemplate?: string,
) {
this.fs = fs;
this.git = new Git({ fs, nostr, corsProxy });
@@ -86,6 +88,7 @@ export class SessionManager {
this.projectsPath = projectsPath;
this.pluginsPath = pluginsPath;
this.corsProxy = corsProxy;
this.systemPromptTemplate = systemPromptTemplate;
}
/**
@@ -256,14 +259,13 @@ export class SessionManager {
cwd: `${this.projectsPath}/${projectId}`,
fs: this.fs,
mode: "agent",
name: "Shakespeare",
profession: "software extraordinaire",
tools: Object.values(session.tools),
pluginsPath: this.pluginsPath,
user,
metadata,
corsProxy: this.corsProxy,
repositoryUrl,
template: this.systemPromptTemplate,
});
// Prepare messages for AI