@optima-chat/optima-agent 0.8.57 → 0.8.58
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"system-prompt.d.ts","sourceRoot":"","sources":["../../src/system-prompt.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"system-prompt.d.ts","sourceRoot":"","sources":["../../src/system-prompt.ts"],"names":[],"mappings":"AASA,wBAAgB,eAAe,IAAI,MAAM,CA0KxC"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
+
// Memoize date at module load — session-level stability for prompt cache.
|
|
2
|
+
// Changing the date mid-session would bust the entire cached prefix.
|
|
3
|
+
const sessionDate = new Date().toLocaleDateString('zh-CN', {
|
|
4
|
+
year: 'numeric',
|
|
5
|
+
month: 'long',
|
|
6
|
+
day: 'numeric',
|
|
7
|
+
weekday: 'long',
|
|
8
|
+
});
|
|
1
9
|
export function getSystemPrompt() {
|
|
2
|
-
const now = new Date();
|
|
3
|
-
const dateStr = now.toLocaleDateString('zh-CN', {
|
|
4
|
-
year: 'numeric',
|
|
5
|
-
month: 'long',
|
|
6
|
-
day: 'numeric',
|
|
7
|
-
weekday: 'long',
|
|
8
|
-
});
|
|
9
10
|
return `
|
|
10
11
|
# Optima Agent - 电商运营 AI 助手
|
|
11
12
|
|
|
@@ -15,7 +16,7 @@ export function getSystemPrompt() {
|
|
|
15
16
|
|
|
16
17
|
## 当前环境
|
|
17
18
|
|
|
18
|
-
- **当前日期**:${
|
|
19
|
+
- **当前日期**:${sessionDate}
|
|
19
20
|
|
|
20
21
|
## 核心能力
|
|
21
22
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"system-prompt.js","sourceRoot":"","sources":["../../src/system-prompt.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"system-prompt.js","sourceRoot":"","sources":["../../src/system-prompt.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,qEAAqE;AACrE,MAAM,WAAW,GAAG,IAAI,IAAI,EAAE,CAAC,kBAAkB,CAAC,OAAO,EAAE;IACzD,IAAI,EAAE,SAAS;IACf,KAAK,EAAE,MAAM;IACb,GAAG,EAAE,SAAS;IACd,OAAO,EAAE,MAAM;CAChB,CAAC,CAAC;AAEH,MAAM,UAAU,eAAe;IAC7B,OAAO;;;;;;;;;aASI,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+JvB,CAAC;AACF,CAAC"}
|