Zum Hauptinhalt springen

Dashboards

Functions for folder custom dashboards: read configuration, enable an empty dashboard, add KPI/chart widgets, and update existing widgets backed by workspace tables.

MVP: Higento walks you through widget options with ask-user (one question per turn), then calls dashboard-add-widget. There is no inline chart preview in chat yet — open the folder in the UI to see widgets.

Tables must live in the folder tree (folder + subfolders). Use dashboard-read to list available tables and saved views.


dashboard-read

Read a folder's custom dashboard state and datasource pickers.

Input

FieldTypeRequiredDescription
folderIdstringNoFolder id (dir_…). Omit when Higento is opened inside that folder.

Output

FieldTypeDescription
enabledbooleanWhether a version-2 dashboard config exists.
widgetCountnumberNumber of widgets on the dashboard.
widgetsarrayEach: id, type, title, tableId, tableName.
tablesarrayTables in the folder tree: id, name, views[] (id, name).
folderIdstringFolder id.
folderNamestringFolder display name.

dashboard-enable

Enable an empty custom dashboard on a folder. Idempotent if already enabled.

Input

FieldTypeRequiredDescription
folderIdstringNoFolder id. Omit when scoped to that folder.

Output

FieldTypeDescription
alreadyEnabledbooleantrue if the dashboard was already on.
widgetCountnumberCurrent widget count (0 when newly enabled).

dashboard-add-widget

Append one widget to a folder dashboard after the user confirmed the wizard.

Input

FieldTypeRequiredDescription
folderIdstringNoTarget folder.
typestringYeskpi, bar, line, pie, or timeseries.
titlestringYesWidget title on the dashboard.
tableIdstringYesTable id from dashboard-read.tables.
opstringYescount, sum, or avg.
viewIdstringNoSaved view id (AND-merged filter).
extraFilterobjectNoTableRecordFilter (same as table-read-rows).
valueFieldstringNoColumn for sum/avg.
groupBystringNoCategory column for bar/line/pie.
timeFieldstringNoDate column for timeseries.
bucketstringNohour, day, week, or month (timeseries; default day).

Output

FieldTypeDescription
widgetIdstringNew widget id (wid_…).
widgetTypestringVisualization type.
widgetTitlestringTitle stored on the widget.
widgetCountnumberTotal widgets on the dashboard after add.

Widget types

typeRequired fields
kpiop (count needs no valueField; sum/avg need valueField)
bar, line, piegroupBy, op, optional valueField
timeseriestimeField, op, optional bucket, optional valueField

dashboard-update-widget

Update an existing widget on a folder dashboard. Same input shape as dashboard-add-widget, plus widgetId from dashboard-read.widgets. Grid layout for that widget is preserved.

Input

FieldTypeRequiredDescription
widgetIdstringYesWidget id (wid_…) from dashboard-read.
folderIdstringNoTarget folder.
typestringYeskpi, bar, line, pie, or timeseries.
titlestringYesWidget title on the dashboard.
tableIdstringYesTable id from dashboard-read.tables.
opstringYescount, sum, or avg.
viewIdstringNoSaved view id (AND-merged filter).
extraFilterobjectNoTableRecordFilter (omit when no filter — do not pass {}).
valueFieldstringNoColumn for sum/avg.
groupBystringNoCategory column for bar/line/pie.
timeFieldstringNoDate column for timeseries.
bucketstringNohour, day, week, or month (timeseries; default day).

Output

FieldTypeDescription
widgetIdstringUpdated widget id (unchanged).
widgetTypestringVisualization type.
widgetTitlestringTitle stored on the widget.
widgetCountnumberTotal widgets on the dashboard.

Call table-read for the target table before updating metrics or filters. Never guess column names.


  1. Widget type (KPI / bar / line / pie / time series)
  2. Table (from dashboard-read.tables)
  3. Filter (all rows / view / custom)
  4. Metrics (op, groupBy, timeField, … — one ask-user topic at a time)
  5. Title
  6. Confirm → dashboard-add-widget

See Folder dashboards use case for a full example flow.