qingflow-mcp 0.3.1 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/server.js +9 -2
  2. package/package.json +1 -1
package/dist/server.js CHANGED
@@ -2372,12 +2372,19 @@ function extractSummaryColumnValue(answers, column) {
2372
2372
  }
2373
2373
  function extractAnswerDisplayValue(answer) {
2374
2374
  const tableValues = answer.tableValues ?? answer.table_values;
2375
- if (tableValues !== undefined) {
2375
+ if (Array.isArray(tableValues)) {
2376
+ // Qingflow often sends tableValues: [] for non-table fields.
2377
+ // Prefer non-empty tableValues; otherwise fallback to values.
2378
+ if (tableValues.length > 0) {
2379
+ return tableValues;
2380
+ }
2381
+ }
2382
+ else if (tableValues !== undefined && tableValues !== null) {
2376
2383
  return tableValues;
2377
2384
  }
2378
2385
  const values = asArray(answer.values);
2379
2386
  if (values.length === 0) {
2380
- return null;
2387
+ return Array.isArray(tableValues) ? tableValues : null;
2381
2388
  }
2382
2389
  const normalized = values.map((item) => extractAnswerValueCell(item));
2383
2390
  return normalized.length === 1 ? normalized[0] : normalized;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qingflow-mcp",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "type": "module",