xiaozuoassistant 0.2.20 → 0.2.21

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,4 +1,4 @@
1
- <svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <rect width="32" height="32" fill="#0A0B0D"/>
3
- <path d="M26.6677 23.7149H8.38057V20.6496H5.33301V8.38159H26.6677V23.7149ZM8.38057 20.6496H23.6201V11.4482H8.38057V20.6496ZM16.0011 16.0021L13.8461 18.1705L11.6913 16.0021L13.8461 13.8337L16.0011 16.0021ZM22.0963 16.0008L19.9414 18.1691L17.7865 16.0008L19.9414 13.8324L22.0963 16.0008Z" fill="#32F08C"/>
4
- </svg>
1
+ <svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <rect width="32" height="32" fill="#0A0B0D"/>
3
+ <path d="M26.6677 23.7149H8.38057V20.6496H5.33301V8.38159H26.6677V23.7149ZM8.38057 20.6496H23.6201V11.4482H8.38057V20.6496ZM16.0011 16.0021L13.8461 18.1705L11.6913 16.0021L13.8461 13.8337L16.0011 16.0021ZM22.0963 16.0008L19.9414 18.1691L17.7865 16.0008L19.9414 13.8324L22.0963 16.0008Z" fill="#32F08C"/>
4
+ </svg>
@@ -1,14 +1,14 @@
1
- <!doctype html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8" />
5
- <link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>🍇</text></svg>" />
6
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
- <title>xiaozuoAssistant</title>
8
- <script type="module" crossorigin src="/assets/index-Bn8oA3Sc.js"></script>
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>🍇</text></svg>" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
+ <title>xiaozuoAssistant</title>
8
+ <script type="module" crossorigin src="/assets/index-BfvHy-SS.js"></script>
9
9
  <link rel="stylesheet" crossorigin href="/assets/index-u0lXmgyZ.css">
10
- </head>
11
- <body>
12
- <div id="root"></div>
13
- </body>
14
- </html>
10
+ </head>
11
+ <body>
12
+ <div id="root"></div>
13
+ </body>
14
+ </html>
@@ -1,110 +1,110 @@
1
- {
2
- "welcome": {
3
- "title": "Welcome to xiaozuoAssistant",
4
- "subtitle": "Your personal AI assistant. Select a conversation from the sidebar or start a new one to begin."
5
- },
6
- "chat": {
7
- "title": "Chat",
8
- "empty": "Start a conversation...",
9
- "you": "You",
10
- "assistant": "xiaozuoAssistant",
11
- "thinking": "Thinking...",
12
- "inputPlaceholder": "Message xiaozuoAssistant...",
13
- "disclaimer": "xiaozuoAssistant can make mistakes. Consider checking important information."
14
- },
15
- "sessionList": {
16
- "title": "xiaozuoAssistant",
17
- "newChat": "New chat",
18
- "recent": "Recent",
19
- "settings": "Settings",
20
- "editSession": "Edit session",
21
- "deleteConfirm": "Are you sure you want to delete this session?"
22
- },
23
- "sessionMeta": {
24
- "title": "Session Settings",
25
- "aliasLabel": "Alias (optional)",
26
- "aliasPlaceholder": "e.g., Project A / Requirements",
27
- "aliasHint": "Alias is shown in the list and header. Empty falls back to session ID.",
28
- "workspaceLabel": "Workspace",
29
- "workspaceHint": "File tools default to this workspace and are restricted to it.",
30
- "contextLabel": "Context (optional)",
31
- "contextPlaceholder": "E.g. project background, terminology, current conclusions, long-lived context...",
32
- "contextHint": "This is persisted and can be used as session context in complex tasks.",
33
- "selectWorkspace": "Select workspace",
34
- "selectCurrentFolder": "Select current folder",
35
- "persistNow": "Persist now",
36
- "persisting": "Persisting...",
37
- "persistSuccess": "Persisted",
38
- "delete": "Delete session",
39
- "deleting": "Deleting...",
40
- "deleteConfirm": "Are you sure you want to delete this session?"
41
- },
42
- "settings": {
43
- "title": "Settings",
44
- "tabs": {
45
- "general": "General",
46
- "identity": "Identity",
47
- "scheduler": "Memory & Scheduler"
48
- },
49
- "general": {
50
- "provider": "Provider",
51
- "apiKey": "API Key",
52
- "baseURL": "Base URL",
53
- "modelName": "Model Name",
54
- "temperature": "Temperature"
55
- },
56
- "identity": {
57
- "title": "User identity",
58
- "userId": "UserId",
59
- "userIdHint": "Used to load identity profile and memories for this userId.",
60
- "name": "Name",
61
- "role": "Role",
62
- "company": "Company",
63
- "email": "Email",
64
- "promptTitle": "Base prompt",
65
- "promptPlaceholder": "E.g. how the assistant should work, output format, constraints...",
66
- "promptHint": "System prompt is composed from user identity + base prompt and is loaded before new sessions."
67
- },
68
- "prompt": {
69
- "description": "Define how xiaozuoAssistant behaves and responds.",
70
- "placeholder": "You are a helpful AI assistant..."
71
- },
72
- "scheduler": {
73
- "memoryMaintenance": "Memory Maintenance",
74
- "description": "Configure when the system should compress old memories and delete expired sessions.",
75
- "sessionRetentionDays": "Session retention",
76
- "sessionRetentionHint": "Sessions inactive for longer than this will be deleted during maintenance.",
77
- "days": "days",
78
- "cronSchedule": "Cron Schedule",
79
- "cronHint": "Format: Minute Hour Day Month DayOfWeek (e.g., \"0 0 * * *\" for daily at midnight)",
80
- "manualTrigger": "Manual Trigger",
81
- "manualDescription": "Force run the maintenance task immediately.",
82
- "runNow": "Run Maintenance Now",
83
- "daily": "Daily",
84
- "weekly": "Weekly",
85
- "custom": "Custom (Cron)"
86
- },
87
- "buttons": {
88
- "close": "Close",
89
- "save": "Save Changes",
90
- "saving": "Saving...",
91
- "cancel": "Cancel"
92
- },
93
- "messages": {
94
- "savedSuccess": "Configuration saved successfully!",
95
- "saveFailed": "Failed to save configuration",
96
- "networkError": "Network error occurred",
97
- "maintenanceSuccess": "Maintenance triggered successfully!"
98
- },
99
- "language": "Language"
100
- },
101
- "weekdays": {
102
- "sunday": "Sunday",
103
- "monday": "Monday",
104
- "tuesday": "Tuesday",
105
- "wednesday": "Wednesday",
106
- "thursday": "Thursday",
107
- "friday": "Friday",
108
- "saturday": "Saturday"
109
- }
110
- }
1
+ {
2
+ "welcome": {
3
+ "title": "Welcome to xiaozuoAssistant",
4
+ "subtitle": "Your personal AI assistant. Select a conversation from the sidebar or start a new one to begin."
5
+ },
6
+ "chat": {
7
+ "title": "Chat",
8
+ "empty": "Start a conversation...",
9
+ "you": "You",
10
+ "assistant": "xiaozuoAssistant",
11
+ "thinking": "Thinking...",
12
+ "inputPlaceholder": "Message xiaozuoAssistant...",
13
+ "disclaimer": "xiaozuoAssistant can make mistakes. Consider checking important information."
14
+ },
15
+ "sessionList": {
16
+ "title": "xiaozuoAssistant",
17
+ "newChat": "New chat",
18
+ "recent": "Recent",
19
+ "settings": "Settings",
20
+ "editSession": "Edit session",
21
+ "deleteConfirm": "Are you sure you want to delete this session?"
22
+ },
23
+ "sessionMeta": {
24
+ "title": "Session Settings",
25
+ "aliasLabel": "Alias (optional)",
26
+ "aliasPlaceholder": "e.g., Project A / Requirements",
27
+ "aliasHint": "Alias is shown in the list and header. Empty falls back to session ID.",
28
+ "workspaceLabel": "Workspace",
29
+ "workspaceHint": "File tools default to this workspace and are restricted to it.",
30
+ "contextLabel": "Context (optional)",
31
+ "contextPlaceholder": "E.g. project background, terminology, current conclusions, long-lived context...",
32
+ "contextHint": "This is persisted and can be used as session context in complex tasks.",
33
+ "selectWorkspace": "Select workspace",
34
+ "selectCurrentFolder": "Select current folder",
35
+ "persistNow": "Persist now",
36
+ "persisting": "Persisting...",
37
+ "persistSuccess": "Persisted",
38
+ "delete": "Delete session",
39
+ "deleting": "Deleting...",
40
+ "deleteConfirm": "Are you sure you want to delete this session?"
41
+ },
42
+ "settings": {
43
+ "title": "Settings",
44
+ "tabs": {
45
+ "general": "General",
46
+ "identity": "Identity",
47
+ "scheduler": "Memory & Scheduler"
48
+ },
49
+ "general": {
50
+ "provider": "Provider",
51
+ "apiKey": "API Key",
52
+ "baseURL": "Base URL",
53
+ "modelName": "Model Name",
54
+ "temperature": "Temperature"
55
+ },
56
+ "identity": {
57
+ "title": "User identity",
58
+ "userId": "UserId",
59
+ "userIdHint": "Used to load identity profile and memories for this userId.",
60
+ "name": "Name",
61
+ "role": "Role",
62
+ "company": "Company",
63
+ "email": "Email",
64
+ "promptTitle": "Base prompt",
65
+ "promptPlaceholder": "E.g. how the assistant should work, output format, constraints...",
66
+ "promptHint": "System prompt is composed from user identity + base prompt and is loaded before new sessions."
67
+ },
68
+ "prompt": {
69
+ "description": "Define how xiaozuoAssistant behaves and responds.",
70
+ "placeholder": "You are a helpful AI assistant..."
71
+ },
72
+ "scheduler": {
73
+ "memoryMaintenance": "Memory Maintenance",
74
+ "description": "Configure when the system should compress old memories and delete expired sessions.",
75
+ "sessionRetentionDays": "Session retention",
76
+ "sessionRetentionHint": "Sessions inactive for longer than this will be deleted during maintenance.",
77
+ "days": "days",
78
+ "cronSchedule": "Cron Schedule",
79
+ "cronHint": "Format: Minute Hour Day Month DayOfWeek (e.g., \"0 0 * * *\" for daily at midnight)",
80
+ "manualTrigger": "Manual Trigger",
81
+ "manualDescription": "Force run the maintenance task immediately.",
82
+ "runNow": "Run Maintenance Now",
83
+ "daily": "Daily",
84
+ "weekly": "Weekly",
85
+ "custom": "Custom (Cron)"
86
+ },
87
+ "buttons": {
88
+ "close": "Close",
89
+ "save": "Save Changes",
90
+ "saving": "Saving...",
91
+ "cancel": "Cancel"
92
+ },
93
+ "messages": {
94
+ "savedSuccess": "Configuration saved successfully!",
95
+ "saveFailed": "Failed to save configuration",
96
+ "networkError": "Network error occurred",
97
+ "maintenanceSuccess": "Maintenance triggered successfully!"
98
+ },
99
+ "language": "Language"
100
+ },
101
+ "weekdays": {
102
+ "sunday": "Sunday",
103
+ "monday": "Monday",
104
+ "tuesday": "Tuesday",
105
+ "wednesday": "Wednesday",
106
+ "thursday": "Thursday",
107
+ "friday": "Friday",
108
+ "saturday": "Saturday"
109
+ }
110
+ }
@@ -1,112 +1,112 @@
1
- {
2
- "welcome": {
3
- "title": "欢迎使用 xiaozuoAssistant",
4
- "subtitle": "您的个人 AI 助手。请从侧边栏选择一个会话或开始一个新的会话。"
5
- },
6
- "chat": {
7
- "title": "聊天",
8
- "empty": "开始一个新的对话...",
9
- "you": "你",
10
- "assistant": "xiaozuoAssistant",
11
- "thinking": "思考中...",
12
- "inputPlaceholder": "给 xiaozuoAssistant 发送消息 (Cmd/Ctrl + Enter 发送)...",
13
- "disclaimer": "xiaozuoAssistant 可能会犯错。请核对重要信息。",
14
- "resetSession": "重置会话",
15
- "confirmReset": "确定要重置当前会话记忆吗?这将清空所有消息历史。"
16
- },
17
- "sessionList": {
18
- "title": "xiaozuoAssistant",
19
- "newChat": "新对话",
20
- "recent": "最近",
21
- "settings": "设置",
22
- "editSession": "编辑会话",
23
- "deleteConfirm": "确定要删除这个会话吗?"
24
- },
25
- "sessionMeta": {
26
- "title": "会话设置",
27
- "aliasLabel": "会话别名(可选)",
28
- "aliasPlaceholder": "例如:项目A / 需求讨论",
29
- "aliasHint": "列表与聊天头部将优先展示别名。留空将回退显示会话 ID。",
30
- "workspaceLabel": "Workspace(工作目录)",
31
- "workspaceHint": "文件相关工具默认以该目录为工作区,并限制访问范围。",
32
- "contextLabel": "上下文数据(可选)",
33
- "contextPlaceholder": "例如:项目背景、术语约定、当前阶段结论、需要长期保持的上下文...",
34
- "contextHint": "该内容会持久化保存,并在复杂任务中作为会话上下文使用。",
35
- "selectWorkspace": "选择工作目录",
36
- "selectCurrentFolder": "选择当前目录",
37
- "persistNow": "立即持久化",
38
- "persisting": "持久化中...",
39
- "persistSuccess": "已持久化",
40
- "delete": "删除会话",
41
- "deleting": "删除中...",
42
- "deleteConfirm": "确定要删除这个会话吗?"
43
- },
44
- "settings": {
45
- "title": "设置",
46
- "tabs": {
47
- "general": "常规",
48
- "identity": "用户身份管理",
49
- "scheduler": "定时任务"
50
- },
51
- "general": {
52
- "provider": "模型提供商",
53
- "apiKey": "API Key",
54
- "baseURL": "Base URL",
55
- "modelName": "模型名称",
56
- "temperature": "温度 (Temperature)"
57
- },
58
- "identity": {
59
- "title": "用户身份",
60
- "userId": "UserId",
61
- "userIdHint": "用于加载该 UserId 对应的身份资料与记忆。",
62
- "name": "姓名",
63
- "role": "岗位",
64
- "company": "公司",
65
- "email": "邮箱",
66
- "promptTitle": "基本提示信息",
67
- "promptPlaceholder": "例如:你希望助手的工作方式、输出格式、约束规则...",
68
- "promptHint": "系统提示词将由“用户身份 + 基本提示信息”自动组成,并在新会话中预先加载。"
69
- },
70
- "prompt": {
71
- "description": "定义 xiaozuoAssistant 的行为和响应方式。",
72
- "placeholder": "你是一个有用的 AI 助手..."
73
- },
74
- "scheduler": {
75
- "memoryMaintenance": "记忆维护",
76
- "description": "配置系统何时压缩旧记忆并删除过期会话。",
77
- "sessionRetentionDays": "会话保留天数",
78
- "sessionRetentionHint": "超过该天数未活跃的会话会在维护任务中被自动删除。",
79
- "days": "天",
80
- "cronSchedule": "Cron 表达式",
81
- "cronHint": "格式: 分 时 日 月 周 (例如 \"0 0 * * *\" 表示每天午夜)",
82
- "manualTrigger": "手动触发",
83
- "manualDescription": "立即强制运行维护任务。",
84
- "runNow": "立即运行维护",
85
- "daily": "每天",
86
- "weekly": "每周",
87
- "custom": "自定义 (Cron)"
88
- },
89
- "buttons": {
90
- "close": "关闭",
91
- "save": "保存更改",
92
- "saving": "保存中...",
93
- "cancel": "取消"
94
- },
95
- "messages": {
96
- "savedSuccess": "配置保存成功!",
97
- "saveFailed": "保存配置失败",
98
- "networkError": "发生网络错误",
99
- "maintenanceSuccess": "维护任务触发成功!"
100
- },
101
- "language": "语言"
102
- },
103
- "weekdays": {
104
- "sunday": "星期日",
105
- "monday": "星期一",
106
- "tuesday": "星期二",
107
- "wednesday": "星期三",
108
- "thursday": "星期四",
109
- "friday": "星期五",
110
- "saturday": "星期六"
111
- }
112
- }
1
+ {
2
+ "welcome": {
3
+ "title": "欢迎使用 xiaozuoAssistant",
4
+ "subtitle": "您的个人 AI 助手。请从侧边栏选择一个会话或开始一个新的会话。"
5
+ },
6
+ "chat": {
7
+ "title": "聊天",
8
+ "empty": "开始一个新的对话...",
9
+ "you": "你",
10
+ "assistant": "xiaozuoAssistant",
11
+ "thinking": "思考中...",
12
+ "inputPlaceholder": "给 xiaozuoAssistant 发送消息 (Cmd/Ctrl + Enter 发送)...",
13
+ "disclaimer": "xiaozuoAssistant 可能会犯错。请核对重要信息。",
14
+ "resetSession": "重置会话",
15
+ "confirmReset": "确定要重置当前会话记忆吗?这将清空所有消息历史。"
16
+ },
17
+ "sessionList": {
18
+ "title": "xiaozuoAssistant",
19
+ "newChat": "新对话",
20
+ "recent": "最近",
21
+ "settings": "设置",
22
+ "editSession": "编辑会话",
23
+ "deleteConfirm": "确定要删除这个会话吗?"
24
+ },
25
+ "sessionMeta": {
26
+ "title": "会话设置",
27
+ "aliasLabel": "会话别名(可选)",
28
+ "aliasPlaceholder": "例如:项目A / 需求讨论",
29
+ "aliasHint": "列表与聊天头部将优先展示别名。留空将回退显示会话 ID。",
30
+ "workspaceLabel": "Workspace(工作目录)",
31
+ "workspaceHint": "文件相关工具默认以该目录为工作区,并限制访问范围。",
32
+ "contextLabel": "上下文数据(可选)",
33
+ "contextPlaceholder": "例如:项目背景、术语约定、当前阶段结论、需要长期保持的上下文...",
34
+ "contextHint": "该内容会持久化保存,并在复杂任务中作为会话上下文使用。",
35
+ "selectWorkspace": "选择工作目录",
36
+ "selectCurrentFolder": "选择当前目录",
37
+ "persistNow": "立即持久化",
38
+ "persisting": "持久化中...",
39
+ "persistSuccess": "已持久化",
40
+ "delete": "删除会话",
41
+ "deleting": "删除中...",
42
+ "deleteConfirm": "确定要删除这个会话吗?"
43
+ },
44
+ "settings": {
45
+ "title": "设置",
46
+ "tabs": {
47
+ "general": "常规",
48
+ "identity": "用户身份管理",
49
+ "scheduler": "定时任务"
50
+ },
51
+ "general": {
52
+ "provider": "模型提供商",
53
+ "apiKey": "API Key",
54
+ "baseURL": "Base URL",
55
+ "modelName": "模型名称",
56
+ "temperature": "温度 (Temperature)"
57
+ },
58
+ "identity": {
59
+ "title": "用户身份",
60
+ "userId": "UserId",
61
+ "userIdHint": "用于加载该 UserId 对应的身份资料与记忆。",
62
+ "name": "姓名",
63
+ "role": "岗位",
64
+ "company": "公司",
65
+ "email": "邮箱",
66
+ "promptTitle": "基本提示信息",
67
+ "promptPlaceholder": "例如:你希望助手的工作方式、输出格式、约束规则...",
68
+ "promptHint": "系统提示词将由“用户身份 + 基本提示信息”自动组成,并在新会话中预先加载。"
69
+ },
70
+ "prompt": {
71
+ "description": "定义 xiaozuoAssistant 的行为和响应方式。",
72
+ "placeholder": "你是一个有用的 AI 助手..."
73
+ },
74
+ "scheduler": {
75
+ "memoryMaintenance": "记忆维护",
76
+ "description": "配置系统何时压缩旧记忆并删除过期会话。",
77
+ "sessionRetentionDays": "会话保留天数",
78
+ "sessionRetentionHint": "超过该天数未活跃的会话会在维护任务中被自动删除。",
79
+ "days": "天",
80
+ "cronSchedule": "Cron 表达式",
81
+ "cronHint": "格式: 分 时 日 月 周 (例如 \"0 0 * * *\" 表示每天午夜)",
82
+ "manualTrigger": "手动触发",
83
+ "manualDescription": "立即强制运行维护任务。",
84
+ "runNow": "立即运行维护",
85
+ "daily": "每天",
86
+ "weekly": "每周",
87
+ "custom": "自定义 (Cron)"
88
+ },
89
+ "buttons": {
90
+ "close": "关闭",
91
+ "save": "保存更改",
92
+ "saving": "保存中...",
93
+ "cancel": "取消"
94
+ },
95
+ "messages": {
96
+ "savedSuccess": "配置保存成功!",
97
+ "saveFailed": "保存配置失败",
98
+ "networkError": "发生网络错误",
99
+ "maintenanceSuccess": "维护任务触发成功!"
100
+ },
101
+ "language": "语言"
102
+ },
103
+ "weekdays": {
104
+ "sunday": "星期日",
105
+ "monday": "星期一",
106
+ "tuesday": "星期二",
107
+ "wednesday": "星期三",
108
+ "thursday": "星期四",
109
+ "friday": "星期五",
110
+ "saturday": "星期六"
111
+ }
112
+ }
@@ -6,11 +6,11 @@ export const createOfficeAgent = () => {
6
6
  return new AgentRuntime({
7
7
  name: 'office_agent',
8
8
  description: 'A specialist in handling Microsoft Office documents (Word, Excel, PowerPoint). Capable of reading, creating, and modifying files.',
9
- systemPrompt: `你是一个办公文档专家 Agent。
10
- 你的目标是帮助用户处理 Word、Excel 和 PowerPoint 任务。
11
- 你可以使用工具来读取、创建和修改这些文件。
12
- 在进行操作之前,请始终确认文件路径。
13
- 如果创建文件的内容结构不明确,请先向用户确认。
9
+ systemPrompt: `你是一个办公文档专家 Agent。
10
+ 你的目标是帮助用户处理 Word、Excel 和 PowerPoint 任务。
11
+ 你可以使用工具来读取、创建和修改这些文件。
12
+ 在进行操作之前,请始终确认文件路径。
13
+ 如果创建文件的内容结构不明确,请先向用户确认。
14
14
  请始终用中文回复用户。`,
15
15
  skills: [
16
16
  new ReadWordSkill(),
@@ -10,11 +10,26 @@ export class FeishuChannel extends BaseChannel {
10
10
  async start() {
11
11
  try {
12
12
  // 每次 start 时重新读取最新配置,避免使用旧缓存
13
- const feishuConfig = config.channels?.feishu;
13
+ let feishuConfig = config.channels?.feishu;
14
14
  // 清空现有机器人
15
15
  this.bots = [];
16
- // 检查配置是否为数组
17
- if (!Array.isArray(feishuConfig) || feishuConfig.length === 0) {
16
+ if (!feishuConfig) {
17
+ console.log('Feishu bots not configured, skipping Feishu channel.');
18
+ return;
19
+ }
20
+ // 兼容旧版的单对象配置,将其转换为数组
21
+ if (!Array.isArray(feishuConfig)) {
22
+ const oldConfig = feishuConfig;
23
+ if (oldConfig.appId && oldConfig.appSecret) {
24
+ feishuConfig = [{ name: 'default', appId: oldConfig.appId, appSecret: oldConfig.appSecret }];
25
+ }
26
+ else {
27
+ console.log('Feishu bots not configured properly, skipping Feishu channel.');
28
+ return;
29
+ }
30
+ }
31
+ // 检查配置是否为空数组
32
+ if (feishuConfig.length === 0) {
18
33
  console.log('Feishu bots not configured, skipping Feishu channel.');
19
34
  return;
20
35
  }
@@ -1,12 +1,12 @@
1
- export const SYSTEM_PROMPT = `
2
- 你现在是 我的个人AI助手,叫xiaozuoAssistant。
3
-
4
- 核心规则:
5
- 1. 所有记忆完全本地存储,不上传任何内容到云端。
6
- 2. 默认工作模式:优先使用 office_work 类别的记忆。
7
- 3. 当用户提到 Word、PPT、Excel、汇报、客户、模板、格式、数据整理、邮件等办公相关内容时,**必须先检索相关记忆**,然后再回答。
8
- 4. 如果记忆中有明确偏好,直接应用,不要再次询问。
9
- 5. 风格:专业、简洁、高效,像一个靠谱的行政/助理。
10
- 6. 语言:默认用中文,必要时中英混用(比如函数名、文件名)。
11
- 7. 主动建议:如果用户在处理重复性工作,可以提醒“您上次处理类似内容时用了XX方法,要不要继续沿用?”
1
+ export const SYSTEM_PROMPT = `
2
+ 你现在是 我的个人AI助手,叫xiaozuoAssistant。
3
+
4
+ 核心规则:
5
+ 1. 所有记忆完全本地存储,不上传任何内容到云端。
6
+ 2. 默认工作模式:优先使用 office_work 类别的记忆。
7
+ 3. 当用户提到 Word、PPT、Excel、汇报、客户、模板、格式、数据整理、邮件等办公相关内容时,**必须先检索相关记忆**,然后再回答。
8
+ 4. 如果记忆中有明确偏好,直接应用,不要再次询问。
9
+ 5. 风格:专业、简洁、高效,像一个靠谱的行政/助理。
10
+ 6. 语言:默认用中文,必要时中英混用(比如函数名、文件名)。
11
+ 7. 主动建议:如果用户在处理重复性工作,可以提醒“您上次处理类似内容时用了XX方法,要不要继续沿用?”
12
12
  `.trim();
@@ -193,8 +193,8 @@ export class Brain {
193
193
  const response = await this.openai.chat.completions.create({
194
194
  model: config.llm.model,
195
195
  messages: [
196
- { role: 'system', content: `${prompt}
197
- Return a JSON array of objects with "title" and "content" fields. If no relevant info, return empty array [].
196
+ { role: 'system', content: `${prompt}
197
+ Return a JSON array of objects with "title" and "content" fields. If no relevant info, return empty array [].
198
198
  Format: [{"title": "...", "content": "..."}]` },
199
199
  { role: 'user', content: content }
200
200
  ],
@@ -80,15 +80,15 @@ export class MemoryManager {
80
80
  // 3. Get User Profile (Structured)
81
81
  const profile = await this.structured.getUserProfile(uid);
82
82
  const profileContext = Object.entries(profile).map(([k, v]) => `[User Info] ${k}: ${v}`).join('\n');
83
- return `
84
- === User Identity (userId: ${uid}) ===
85
- ${profileContext}
86
-
87
- === Relevant Memories ===
88
- ${vectorContext}
89
-
90
- === Recent Conversation ===
91
- ${recentMessages}
83
+ return `
84
+ === User Identity (userId: ${uid}) ===
85
+ ${profileContext}
86
+
87
+ === Relevant Memories ===
88
+ ${vectorContext}
89
+
90
+ === Recent Conversation ===
91
+ ${recentMessages}
92
92
  `;
93
93
  }
94
94
  getUserProfile(userId) {