Deadman922 commited on
Commit
bc8458c
·
verified ·
1 Parent(s): ade9165

Upload index.html

Browse files
Files changed (1) hide show
  1. static/index.html +18 -1
static/index.html CHANGED
@@ -1169,7 +1169,24 @@ async function runQuery() {
1169
  output.innerHTML = '<div class="output-error">' + escapeHtml(feedback) +
1170
  '<div class="error-tip">Tip: Use SELECT statements only in this panel. For data modification, use the FIX tab or Submit.</div></div>';
1171
  } else {
1172
- output.innerHTML = formatResult(r.data);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1173
 
1174
  // Add score evaluation note after query results
1175
  if (r.data.reward?.feedback && !feedback.includes('read-only') && !feedback.includes('FIX action')) {
 
1169
  output.innerHTML = '<div class="output-error">' + escapeHtml(feedback) +
1170
  '<div class="error-tip">Tip: Use SELECT statements only in this panel. For data modification, use the FIX tab or Submit.</div></div>';
1171
  } else {
1172
+ // Extract table data from feedback if it's a string representation of dict
1173
+ let tableData = null;
1174
+ if (typeof feedback === 'string') {
1175
+ try {
1176
+ const parsed = JSON.parse(feedback);
1177
+ if (parsed.type === 'table' && parsed.rows) {
1178
+ tableData = parsed.rows;
1179
+ }
1180
+ } catch (e) {
1181
+ // Not JSON, keep as is
1182
+ }
1183
+ }
1184
+
1185
+ if (tableData) {
1186
+ output.innerHTML = formatArrayAsTable(tableData);
1187
+ } else {
1188
+ output.innerHTML = formatResult(r.data);
1189
+ }
1190
 
1191
  // Add score evaluation note after query results
1192
  if (r.data.reward?.feedback && !feedback.includes('read-only') && !feedback.includes('FIX action')) {