Spaces:
Sleeping
Sleeping
root commited on
Commit ·
d88a4a2
1
Parent(s): 8aa8df1
feat: add SQL input hints and update instructions for interactive mode in playground.html
Browse files- server/playground.html +13 -1
server/playground.html
CHANGED
|
@@ -215,6 +215,13 @@
|
|
| 215 |
}
|
| 216 |
.status-bar.ok { color: var(--accent); }
|
| 217 |
.status-bar.bad { color: var(--err); }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 218 |
</style>
|
| 219 |
</head>
|
| 220 |
<body>
|
|
@@ -232,6 +239,8 @@
|
|
| 232 |
<p class="status-bar" style="margin:-0.5rem 0 1.25rem;">
|
| 233 |
Interactive mode uses a persistent <strong>WebSocket</strong> session at <code>/ws</code>
|
| 234 |
(OpenEnv HTTP <code>/step</code> is stateless). Connect, then run reset → SQL steps.
|
|
|
|
|
|
|
| 235 |
</p>
|
| 236 |
|
| 237 |
<div class="grid">
|
|
@@ -250,7 +259,10 @@
|
|
| 250 |
|
| 251 |
<div class="panel full">
|
| 252 |
<h2>Your SQL</h2>
|
| 253 |
-
<
|
|
|
|
|
|
|
|
|
|
| 254 |
<div class="actions">
|
| 255 |
<button type="button" class="primary" id="btnConnect">Connect session</button>
|
| 256 |
<button type="button" class="primary" id="btnReset" disabled>Start episode (reset)</button>
|
|
|
|
| 215 |
}
|
| 216 |
.status-bar.ok { color: var(--accent); }
|
| 217 |
.status-bar.bad { color: var(--err); }
|
| 218 |
+
.sql-hint {
|
| 219 |
+
font-size: 0.88rem;
|
| 220 |
+
line-height: 1.5;
|
| 221 |
+
color: var(--muted);
|
| 222 |
+
margin: 0 0 0.65rem;
|
| 223 |
+
}
|
| 224 |
+
.sql-hint code { font-family: "JetBrains Mono", monospace; font-size: 0.8rem; }
|
| 225 |
</style>
|
| 226 |
</head>
|
| 227 |
<body>
|
|
|
|
| 239 |
<p class="status-bar" style="margin:-0.5rem 0 1.25rem;">
|
| 240 |
Interactive mode uses a persistent <strong>WebSocket</strong> session at <code>/ws</code>
|
| 241 |
(OpenEnv HTTP <code>/step</code> is stateless). Connect, then run reset → SQL steps.
|
| 242 |
+
The <strong>task</strong> is shown in natural language; each <strong>step</strong> must be SQL (OpenEnv action space).
|
| 243 |
+
To drive the env from plain English automatically, use the <code>inference.py</code> LLM baseline — not this textarea.
|
| 244 |
</p>
|
| 245 |
|
| 246 |
<div class="grid">
|
|
|
|
| 259 |
|
| 260 |
<div class="panel full">
|
| 261 |
<h2>Your SQL</h2>
|
| 262 |
+
<p class="sql-hint">
|
| 263 |
+
Type <strong>only valid SQLite</strong> here. Natural language is not executed as SQL — English belongs in the task description (left), not in this box.
|
| 264 |
+
</p>
|
| 265 |
+
<textarea id="sql" placeholder="Executable SQL only, e.g. SELECT department_id, AVG(salary) ..."></textarea>
|
| 266 |
<div class="actions">
|
| 267 |
<button type="button" class="primary" id="btnConnect">Connect session</button>
|
| 268 |
<button type="button" class="primary" id="btnReset" disabled>Start episode (reset)</button>
|