Polish mobile UI and editor workflows

This commit is contained in:
pewdiepie-archdaemon
2026-06-27 13:05:44 +00:00
parent 87e46e576a
commit 45ee5a71f4
48 changed files with 6455 additions and 1177 deletions
+21
View File
@@ -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(