@ww_nero/mini-cli 1.0.103 → 1.0.104
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 +1 -1
- package/src/chat.js +3 -1
package/package.json
CHANGED
package/src/chat.js
CHANGED
|
@@ -1230,7 +1230,9 @@ const startChatSession = async ({
|
|
|
1230
1230
|
if (!conversationAdvanced) {
|
|
1231
1231
|
const lastMessage = messages[messages.length - 1];
|
|
1232
1232
|
if (lastMessage && lastMessage.role === 'user') {
|
|
1233
|
-
|
|
1233
|
+
// 用户中断时,添加assistant消息标记中断,保留用户问题
|
|
1234
|
+
messages.push({ role: 'assistant', content: '已被用户中断' });
|
|
1235
|
+
persistHistorySafely();
|
|
1234
1236
|
}
|
|
1235
1237
|
}
|
|
1236
1238
|
if (isAbortError) {
|