Deploy AIOS web (React glide grid + FastAPI slice)
Browse files- RELEASES.json +1 -1
- VERSION +1 -1
- api/routes_query.py +23 -1
- web/public/AIOS_DEPLOY_RECEIPT +1 -1
RELEASES.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
{
|
| 2 |
-
"current": "
|
| 3 |
"releases": []
|
| 4 |
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"current": "fc5334541d",
|
| 3 |
"releases": []
|
| 4 |
}
|
VERSION
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
|
|
|
|
| 1 |
+
fc5334541d
|
api/routes_query.py
CHANGED
|
@@ -1048,7 +1048,10 @@ def _call_model(question, snapshot, model=MODEL_AUTO, chat=None, history=None, s
|
|
| 1048 |
if turn.get("context"):
|
| 1049 |
prompt += "\n\n" + turn["context"]
|
| 1050 |
if turn.get("conversation"):
|
| 1051 |
-
|
|
|
|
|
|
|
|
|
|
| 1052 |
if turn.get("toolShareRequests"):
|
| 1053 |
prompt += ("\nThis turn concerns a pending tool-share approval only. Use the prior conversation to identify "
|
| 1054 |
"the request. Ask which request when the user's approval is ambiguous. "
|
|
@@ -2087,6 +2090,7 @@ def _submit_active(body, session, question, selected_model, context_hint, dock,
|
|
| 2087 |
turn["memoryOnly"] = True
|
| 2088 |
if conversation:
|
| 2089 |
turn["conversation"] = True
|
|
|
|
| 2090 |
turn["memoryCompanyRequested"] = assistant_memory.company_requested(question)
|
| 2091 |
if snapshot is not None:
|
| 2092 |
turn["memorySources"] = [{"database": snapshot["database"],
|
|
@@ -2767,6 +2771,24 @@ def _route_candidates(session):
|
|
| 2767 |
return candidates
|
| 2768 |
|
| 2769 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2770 |
def _conversation(question, routed):
|
| 2771 |
"""True when an auto route found no database or the question holds no data word."""
|
| 2772 |
from harness import semantic as sem
|
|
|
|
| 1048 |
if turn.get("context"):
|
| 1049 |
prompt += "\n\n" + turn["context"]
|
| 1050 |
if turn.get("conversation"):
|
| 1051 |
+
names = turn.get("conversationSources")
|
| 1052 |
+
prompt += CONVERSATION_PROMPT + ("" if names is None else
|
| 1053 |
+
" The databases this user can open: " + "; ".join(names) + "."
|
| 1054 |
+
if names else " This user can open no database yet.")
|
| 1055 |
if turn.get("toolShareRequests"):
|
| 1056 |
prompt += ("\nThis turn concerns a pending tool-share approval only. Use the prior conversation to identify "
|
| 1057 |
"the request. Ask which request when the user's approval is ambiguous. "
|
|
|
|
| 2090 |
turn["memoryOnly"] = True
|
| 2091 |
if conversation:
|
| 2092 |
turn["conversation"] = True
|
| 2093 |
+
turn["conversationSources"] = _readable_labels(session)
|
| 2094 |
turn["memoryCompanyRequested"] = assistant_memory.company_requested(question)
|
| 2095 |
if snapshot is not None:
|
| 2096 |
turn["memorySources"] = [{"database": snapshot["database"],
|
|
|
|
| 2771 |
return candidates
|
| 2772 |
|
| 2773 |
|
| 2774 |
+
def _readable_labels(session):
|
| 2775 |
+
"""The names of the databases this session may open: the picker's set, no record read.
|
| 2776 |
+
|
| 2777 |
+
None when the status wall cannot be read, so a greeting still gets its reply."""
|
| 2778 |
+
from harness import semantic as sem
|
| 2779 |
+
try:
|
| 2780 |
+
projection = getattr(session.runtime, "get_projection", None)
|
| 2781 |
+
definitions = (projection("user_tables", drop=("rows",)) or {}) if projection else {}
|
| 2782 |
+
topics = {row.get("grid"): row.get("label") for row in sem.topics().values()}
|
| 2783 |
+
statuses = assistant_source_status(session, None)
|
| 2784 |
+
except Exception: # noqa: BLE001
|
| 2785 |
+
return None
|
| 2786 |
+
return sorted({_said(status.get("label") or (definitions.get(database) or {}).get("label")
|
| 2787 |
+
or topics.get(database) or database.removeprefix("ut_").replace("_", " ")) or database
|
| 2788 |
+
for database, status in statuses.items()
|
| 2789 |
+
if status.get("permitted")})
|
| 2790 |
+
|
| 2791 |
+
|
| 2792 |
def _conversation(question, routed):
|
| 2793 |
"""True when an auto route found no database or the question holds no data word."""
|
| 2794 |
from harness import semantic as sem
|
web/public/AIOS_DEPLOY_RECEIPT
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
|
|
|
|
| 1 |
+
42f0993fcfa83acf5fc8b7c3a72b9a81d3343590a6a89aa6b4bfb346edb7eabb
|