feat(core): seeds without text wait for the first turn
This commit is contained in:
@@ -396,8 +396,14 @@ async def test_copy_seed_forks_parent_with_window(world: World) -> None:
|
||||
"q6",
|
||||
[{"type": "text", "text": "a7"}],
|
||||
]
|
||||
assert (await world.conversations.get(child.external_id)).flags["seed"] == "copy"
|
||||
await world.conversations.post(child, "go")
|
||||
await world.settle(child, 1)
|
||||
assert ScriptedClient.instances[0].options.resume == child.session_id
|
||||
prompt = ScriptedClient.instances[0].prompts[0]
|
||||
assert prompt.startswith("[сид: copy] branch, ")
|
||||
assert "последние 1 тёрнов" in prompt and prompt.endswith("\n\ngo")
|
||||
assert (await world.conversations.get(child.external_id)).flags["seed"] is None
|
||||
|
||||
|
||||
async def test_merge_injects_summary_into_parent(world: World) -> None:
|
||||
|
||||
@@ -462,13 +462,14 @@ async def test_commands_status_merge_and_new(stack: Stack) -> None:
|
||||
frontend="telegram", external_id=f"{USER}/902"
|
||||
)
|
||||
assert child is not None and child.title == "отчёт"
|
||||
await stack.world.settle(child, 1)
|
||||
await asyncio.sleep(0.2)
|
||||
assert await stack.world.conversations.queue.recent(child.id) == []
|
||||
assert all(m["thread"] != 902 for m in stack.bot.sent)
|
||||
assert all(d["message_thread_id"] != 902 for d in stack.bot.drafts)
|
||||
stack.bot.message("первое в новый топик", thread=902)
|
||||
reply = await stack.until(lambda: stack.sent_with("первое в новый топик"), what="r")
|
||||
assert reply["thread"] == 902
|
||||
assert reply["text"].startswith("ok:[сид: morning] branch «отчёт»")
|
||||
assert await stack.tg.mark_topic(child)
|
||||
assert stack.bot.topics[-1] == "edit:902:✅ отчёт"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user