@ykurilov/agent-chat-core 0.101.0 → 0.101.1
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/CHANGELOG.md +8 -0
- package/dist/{chunk-ITXLUAPJ.js → chunk-GTRWXDWX.js} +2 -2
- package/dist/{chunk-ITXLUAPJ.js.map → chunk-GTRWXDWX.js.map} +1 -1
- package/dist/index.js +1 -1
- package/dist/storage-contract.js +1 -1
- package/dist/types/subject-chats/greeting-replacement.d.ts +2 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @ykurilov/agent-chat-core
|
|
2
2
|
|
|
3
|
+
## 0.101.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 0c258ee: Повтор `service.replaceGreeting` с тем же `text` и прежним `previousText` после успешной замены теперь возвращает `unchanged`, а не `not_a_greeting` (`previous_text_mismatch`). Если текущий текст уже равен целевому, ответ `unchanged` при любом `previousText`; несовпадение `previousText` с текстом, не равным целевому, по-прежнему даёт `previous_text_mismatch`.
|
|
8
|
+
|
|
9
|
+
Обновление ничего не требует.
|
|
10
|
+
|
|
3
11
|
## 0.101.0
|
|
4
12
|
|
|
5
13
|
### Minor Changes
|
|
@@ -14853,9 +14853,9 @@ function createChatService(input) {
|
|
|
14853
14853
|
const [{ messages, branch }, compactions] = await Promise.all([loadTree(chatId), storage.listCompactions(chatId)]);
|
|
14854
14854
|
const found = findGreeting(chat, messages, branch);
|
|
14855
14855
|
if (!found.ok) return { status: "not_a_greeting", chatId, reason: found.reason };
|
|
14856
|
-
if (previousText !== void 0 && previousText !== found.text) return { status: "not_a_greeting", chatId, reason: "previous_text_mismatch" };
|
|
14857
14856
|
const known = { chatId, messageId: found.message.id, recognizedBy: found.recognizedBy, compacted: activeCompaction(branch, compactions) !== null };
|
|
14858
14857
|
if (found.text === text) return { status: "unchanged", ...known };
|
|
14858
|
+
if (previousText !== void 0 && previousText !== found.text) return { status: "not_a_greeting", chatId, reason: "previous_text_mismatch" };
|
|
14859
14859
|
if (dryRun) return { status: "would_replace", ...known, previousText: found.text };
|
|
14860
14860
|
const written = await storage.replaceFinishedMessageParts(found.message.id, { expectedParts: found.message.parts, parts: [{ type: "text", text }] });
|
|
14861
14861
|
if (!written) return { status: "busy", chatId };
|
|
@@ -15856,4 +15856,4 @@ export {
|
|
|
15856
15856
|
InvalidWidgetAnswerError,
|
|
15857
15857
|
createChatService
|
|
15858
15858
|
};
|
|
15859
|
-
//# sourceMappingURL=chunk-
|
|
15859
|
+
//# sourceMappingURL=chunk-GTRWXDWX.js.map
|