add response versioning support in messages for regeneration improvements
This commit is contained in:
@@ -77,6 +77,7 @@ test("thinking streams separately and survives reload, retry, branch and import"
|
||||
assert.equal(bot.content, "Answer");
|
||||
const retry = await api(`/chats/${chatId}/messages/${bot.id}/retry`, {});
|
||||
assert.equal(retry.message.thinking, undefined);
|
||||
await api(`/chats/${chatId}/messages/${bot.id}/versions/0`, {});
|
||||
const branch = await api(`/chats/${chatId}/messages/${bot.id}/branch`, {confirmed: true});
|
||||
assert.equal(branch.messages.at(-1).thinking, bot.thinking);
|
||||
const exported = await api(`/exports/chats/${chatId}?format=json`);
|
||||
@@ -125,6 +126,19 @@ test("thinking streams separately and survives reload, retry, branch and import"
|
||||
assert.match(roleplayWire, /event: done/);
|
||||
assert.ok(requests.at(-1).messages.some(message => message.content.includes("Guide")));
|
||||
assert.equal(requests.at(-1).think, true);
|
||||
const roleplayMessages = (await api(`/chats/${roleplay.chat.id}/messages`)).messages;
|
||||
for (const target of [roleplayMessages[0], roleplayMessages.at(-1)]) {
|
||||
const retryResponse = await fetch(base + `/chats/${roleplay.chat.id}/messages/${target.id}/retry/stream`, {
|
||||
method: "POST", headers: {"Content-Type": "application/json", Cookie: cookie},
|
||||
body: JSON.stringify({model: "qwen3:14b", reasoning: true})
|
||||
});
|
||||
const retryWire = await retryResponse.text();
|
||||
assert.match(retryWire, /event: thinking/);
|
||||
assert.match(retryWire, /event: chunk/);
|
||||
assert.match(retryWire, /event: done/);
|
||||
assert.ok(requests.at(-1).messages.some(message => message.content.includes("Guide")));
|
||||
assert.equal(requests.at(-1).think, true);
|
||||
}
|
||||
});
|
||||
|
||||
test("reasoning disclosure is collapsed, preserves open state and renders text safely", (t) => {
|
||||
|
||||
Reference in New Issue
Block a user