Deadman922 commited on
Commit
b0efb7d
Β·
verified Β·
1 Parent(s): 6ef5988

Upload index.html

Browse files
Files changed (1) hide show
  1. static/index.html +23 -1
static/index.html CHANGED
@@ -796,7 +796,8 @@
796
  <!-- RIGHT: Schema -->
797
  <div class="card">
798
  <div class="card-header">
799
- <span class="card-title">Schema</span>
 
800
  </div>
801
  <div class="card-body" id="schema-panel">
802
  <div class="output-body empty">Select a task to view schema</div>
@@ -1166,6 +1167,27 @@ async function runQuery() {
1166
  setLoading('query', false);
1167
  }
1168
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1169
  // ─── PROFILE ────────────────────────────────────────────────────────────
1170
  async function profileColumn() {
1171
  if (!state.currentTask) { toast('No active task β€” initialize first', 'error'); return; }
 
796
  <!-- RIGHT: Schema -->
797
  <div class="card">
798
  <div class="card-header">
799
+ Schema Info
800
+ <button class="btn btn-xs btn-secondary" onclick="refreshSchema()" style="margin-left: auto;">Refresh</button>
801
  </div>
802
  <div class="card-body" id="schema-panel">
803
  <div class="output-body empty">Select a task to view schema</div>
 
1167
  setLoading('query', false);
1168
  }
1169
 
1170
+ // ─── REFRESH SCHEMA ─────────────────────────────────────────────────────
1171
+ async function refreshSchema() {
1172
+ if (!state.currentTask) { toast('No active task β€” initialize first', 'error'); return; }
1173
+
1174
+ // Get current schema from server
1175
+ const r = await api('POST', '/step', {
1176
+ task_id: state.currentTask,
1177
+ action_type: 'query',
1178
+ sql: 'SELECT 1 as schema_refresh'
1179
+ });
1180
+
1181
+ if (r.ok) {
1182
+ // Reset and re-initialize to get updated schema
1183
+ const taskId = state.currentTask;
1184
+ await resetEpisode();
1185
+ toast('Schema refreshed for custom columns', 'success');
1186
+ } else {
1187
+ toast('Failed to refresh schema', 'error');
1188
+ }
1189
+ }
1190
+
1191
  // ─── PROFILE ────────────────────────────────────────────────────────────
1192
  async function profileColumn() {
1193
  if (!state.currentTask) { toast('No active task β€” initialize first', 'error'); return; }