xiaozuoassistant 0.2.55 → 0.2.56

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,8 @@
1
1
  import { memory } from './memory.js';
2
2
  import { brain } from './brain.js';
3
3
  import { eventBus } from './event-bus.js';
4
+ import { config } from '../config/loader.js';
5
+ import { SYSTEM_PROMPT } from '../config/prompts.js';
4
6
  export class TaskQueue {
5
7
  constructor() {
6
8
  this.chains = new Map();
@@ -43,11 +45,18 @@ export class TaskQueue {
43
45
  const context = await memory.getRelevantContext(run.userContent, run.sessionId);
44
46
  const sessionAlias = session.meta.alias ? `Session Alias: ${session.meta.alias}` : '';
45
47
  const workspaceLine = session.meta.workspace ? `Current Workspace: ${session.meta.workspace}` : '';
46
- const enhancedSystemPrompt = `You are xiaozuoAssistant, a helpful AI assistant.
48
+ const baseSystemPrompt = (config.systemPrompt && String(config.systemPrompt).trim())
49
+ ? String(config.systemPrompt).trim()
50
+ : (SYSTEM_PROMPT && String(SYSTEM_PROMPT).trim())
51
+ ? String(SYSTEM_PROMPT).trim()
52
+ : 'You are xiaozuoAssistant, a helpful AI assistant. You can use tools to help users.';
53
+ const enhancedSystemPrompt = `${baseSystemPrompt}
54
+
47
55
  ${sessionAlias}
48
56
  ${workspaceLine}
57
+
49
58
  Here is some relevant context from your memory:
50
- ${context}`;
59
+ ${context}`.trim();
51
60
  const ctx = {
52
61
  sessionId: run.sessionId,
53
62
  history: session.messages,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xiaozuoassistant",
3
- "version": "0.2.55",
3
+ "version": "0.2.56",
4
4
  "description": "A local-first personal AI assistant with multi-channel support and enhanced memory.",
5
5
  "author": "mantle.lau",
6
6
  "license": "MIT",