@shun-js/aibaiban-server 1.2.6 → 1.2.7

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shun-js/aibaiban-server",
3
- "version": "1.2.6",
3
+ "version": "1.2.7",
4
4
  "description": "aibaiban.com server",
5
5
  "keywords": [
6
6
  "ai aibaiban"
@@ -45,5 +45,5 @@
45
45
  "access": "public",
46
46
  "registry": "https://registry.npmjs.org/"
47
47
  },
48
- "gitHead": "66c933a20f3e0b055d9e414c0651acd821e6a320"
48
+ "gitHead": "7f2b401901bcf0070e9349fab5e18b8a7c8484ee"
49
49
  }
@@ -164,6 +164,14 @@ exports.drawAgent = async (req, res) => {
164
164
  req.logger.info(methodName, 'lastUserMsg', lastUserMsg);
165
165
  chatFeishuMsg(req, `${lastUserMsg}`);
166
166
 
167
+ // 清洗对话历史:将前端确认文案替换为简短标记,避免 LLM 模仿自然语言回复
168
+ const cleanedMessages = messages.map((m) => {
169
+ if (m.role === 'assistant' && /^[✅❌]/.test(m.content)) {
170
+ return { ...m, content: '[已执行]' };
171
+ }
172
+ return m;
173
+ });
174
+
167
175
  try {
168
176
  const startTime = Date.now();
169
177
 
@@ -182,7 +190,7 @@ exports.drawAgent = async (req, res) => {
182
190
  modelName,
183
191
  thinking,
184
192
  isJson: true,
185
- messages: [{ role: 'system', content: prompts.AGENT_PROMPT }, ...messages],
193
+ messages: [{ role: 'system', content: prompts.AGENT_PROMPT }, ...cleanedMessages],
186
194
  },
187
195
  agentEndCallback: (result) => {
188
196
  decision = result;
package/views/index.html CHANGED
@@ -105,7 +105,7 @@
105
105
  <script
106
106
  type="module"
107
107
  crossorigin
108
- src="https://static-small.vincentqiao.com/aibaiban/static/index-DCJwq4XN.js"
108
+ src="https://static-small.vincentqiao.com/aibaiban/static/index-BKiaaj_x.js"
109
109
  ></script>
110
110
  <link
111
111
  rel="modulepreload"