dashboard: show a pending submit while its run spins up; retune codegen defaults
Submitting from the dashboard cleared the input and then showed nothing until the next poll, so a slow submit looked like a no-op. POST /api/submit now returns the new request_id alongside status/detail (Scheduler.submit_request), and the front end keeps a `pendingSubmit` entry: it immediately renders a synthetic "submitted" node plus an in-flight spinner, then swaps to the real run once its trace row appears (matching by request_id) and clears the pending state. A run that has landed but has no decisions yet also gets the spinner instead of an empty flow. Adds a test asserting the returned request_id matches a trace run. Also flip config.example.json codegen defaults to stream:true and temperature 1 / top_p 0.95 / presence_penalty 0 / frequency_penalty 1.
This commit is contained in:
1 parent
da53e1eefc
commit
8751e7c08e
5 files changed
+113
-8
No files matched your search
@@ -236,13 +236,13 @@ class DashboardHandler(BaseHTTPRequestHandler):
|
||||
with self.lock:
|
||||
try:
|
||||
body = self._read_json()
|
||||
status, detail = self.scheduler.submit(
|
||||
status, detail, request_id = self.scheduler.submit_request(
|
||||
str(body.get("text", "")), source=str(body.get("source", "dashboard"))
|
||||
)
|
||||
except Exception as exc:
|
||||
self._send_error(500, str(exc))
|
||||
return
|
||||
self._send(200, {"status": status, "detail": detail})
|
||||
self._send(200, {"status": status, "detail": detail, "request_id": request_id})
|
||||
return
|
||||
if path == "/api/relabel":
|
||||
with self.lock:
|
||||
|
||||
Reference in new issue
Block a user