Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,10 @@ export const attachedHostFollowUpScenario = {
if (posts.length !== 1 || posts[0].sessionId !== sessionIdFor(attachedGoal.id) || posts[0].message !== followUp) {
throw new Error(`The attached_host follow-up did not reach its Session queue: ${JSON.stringify(posts)}`);
}
const queuedFollowUp = page.locator(".personal-conversation-queue li").filter({ hasText: followUp });
const queuedFollowUp = page.locator(".personal-conversation-queue > ol > li").filter({ hasText: followUp });
await queuedFollowUp.waitFor({ timeout: 10_000 });
await queuedFollowUp.locator("summary").click();
const expandedMessage = queuedFollowUp.locator(".personal-queue-message > p");
const expandedMessage = queuedFollowUp.locator(".personal-queue-message > .personal-md > p");
await expandedMessage.waitFor();
const assertExpandedBodyTypography = async (viewport) => {
const typography = await expandedMessage.evaluate(element => {
Expand Down
10 changes: 8 additions & 2 deletions loopx/capabilities/native_chat/queue_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,16 @@
from urllib.parse import parse_qs, urlparse

from ...chat_store import CHAT_STORE_SCHEMA_VERSION
from ...extensions.lark.private_ingress import project_private_reply_history


class ChatQueueRequestMixin:
def _project_queue_reply_history(
self,
store: Any,
session: dict[str, Any],
rows: list[dict[str, Any]],
) -> list[dict[str, Any]]:
return rows
def _managed_native_turn(self, session_id: str, *, execute: bool = False) -> None:
from .steward_managed_mode import ManagedSessionTurn
service = ManagedSessionTurn(self.server.runtime_controller)
Expand Down Expand Up @@ -68,7 +74,7 @@ def _session_queue(self, session_id: str) -> None:
# a preview cannot decode a partial context envelope.
original = {"role": "user", "origin": turn.get("origin"),
"turn_id": turn["turn_id"], "text": str(turn.get("message") or "")}
visible = project_private_reply_history(store, session, [original])[0]
visible = self._project_queue_reply_history(store, session, [original])[0]
text = visible.get("reply_context", {}).get("source_text", original["text"])
rows.append({
"turn_id": turn["turn_id"],
Expand Down
3 changes: 3 additions & 0 deletions loopx/chat_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -926,6 +926,9 @@ def _session_turn(self, session_id: str) -> None:
}
)

def _project_queue_reply_history(self, store: object, session: dict[str, object], rows: list[dict[str, object]]) -> list[dict[str, object]]:
return project_private_reply_history(store, session, rows)

@effect_runtime_request_scope()
def _session_snapshot(self, session_id: str) -> None:
try:
Expand Down
Loading