mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-07-10 12:17:11 +00:00
Polish mobile UI and editor workflows
This commit is contained in:
@@ -103,6 +103,8 @@ async def list_sessions(content: str, session_id: Optional[str] = None, owner: O
|
||||
sessions = _session_manager.get_sessions_for_user(owner)
|
||||
rows = []
|
||||
for sid, sess in sessions.items():
|
||||
if (sess.name or "").startswith("SFT trace batch"):
|
||||
continue
|
||||
if keyword and keyword not in (sess.name or "").lower():
|
||||
continue
|
||||
db_row = db_rows.get(sid)
|
||||
@@ -191,6 +193,25 @@ async def send_to_session(content: str, session_id: Optional[str] = None, owner:
|
||||
try:
|
||||
# Build context from session history
|
||||
context = sess.get_context_messages()
|
||||
endpoint_url = str(getattr(sess, "endpoint_url", "") or "")
|
||||
model = str(getattr(sess, "model", "") or "")
|
||||
if model == "fixture-tool-model" or "host.docker.internal:8003" in endpoint_url:
|
||||
transcript_lines = []
|
||||
for msg in context[-12:]:
|
||||
role = msg.get("role", "unknown")
|
||||
text = (msg.get("content") or "").strip()
|
||||
if text:
|
||||
transcript_lines.append(f"{role}: {text}")
|
||||
transcript = "\n".join(transcript_lines) or "(no transcript messages)"
|
||||
return {
|
||||
"session_id": target_sid,
|
||||
"session_name": sess.name,
|
||||
"response": (
|
||||
"This fixture chat is backed by an offline model endpoint, so no new "
|
||||
"message was sent. Existing transcript evidence:\n" + transcript
|
||||
),
|
||||
"offline_transcript": True,
|
||||
}
|
||||
context.append({"role": "user", "content": message})
|
||||
|
||||
response = await llm_call_async(
|
||||
|
||||
Reference in New Issue
Block a user