udi-yac 0.7.0 → 0.8.0
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.
- package/README.md +21 -14
- package/dist/{ce-entry-BnNwSRz9.js → ce-entry-BMR0nqQT.js} +23202 -23853
- package/dist/index.d.ts +81 -5
- package/dist/temporal-CeeidCkA.js +114 -0
- package/dist/udi-yac.css +1 -1
- package/dist/udi-yac.js +11704 -10911
- package/package.json +15 -15
- package/dist/rolldown-runtime-DArdT4gl.js +0 -23
package/README.md
CHANGED
|
@@ -24,16 +24,17 @@ Each is described once in [`src/app/envVars.ts`](src/app/envVars.ts); this table
|
|
|
24
24
|
|
|
25
25
|
<!-- BEGIN generated: env vars (scripts/gen-chat-env-docs.mjs) -->
|
|
26
26
|
|
|
27
|
-
| Variable | Default | Description
|
|
28
|
-
| -------------------------- | ------------------------------- |
|
|
29
|
-
| `VITE_UDI_API_BASE_URL` | `http://localhost:8007` | UDIAgent FastAPI server URL. May also be a same-origin path (e.g. `/api/yac`) when the chat sits behind the host app’s reverse proxy.
|
|
30
|
-
| `VITE_UDI_DATA_PACKAGE` | `/data/hubmap/datapackage.json` | Path or URL to a `datapackage.json`. Defaults to the bundled HuBMAP snapshot synced from `sample-data/`. Ignored when `VITE_UDI_REMOTE_PACKAGE` is set.
|
|
31
|
-
| `VITE_UDI_REMOTE_PACKAGE` | — | Name of a server-side data package (configured on the agent via `UDI_QUERY_BACKENDS`). When set, no CSVs load in the browser: metadata comes from `/v1/yac/metadata` and queries go to `/v1/yac/query`. Takes precedence over `VITE_UDI_DATA_PACKAGE`.
|
|
32
|
-
| `VITE_UDI_REQUIRE_API_KEY` | `true` | Prompt the user for an OpenAI key in the UI. Defaults to `true`, but `.env.example` ships `false` because local dev runs against an agent that has its own `OPENAI_API_KEY`.
|
|
33
|
-
| `VITE_UDI_MODEL` | — | LLM model override. Sent **only when the user supplies their own OpenAI key** — the agent honors a requested model only alongside an `X-OpenAI-Key`, so whoever pays for the tokens picks the model. Otherwise the agent’s `GPT_MODEL_NAME` applies.
|
|
34
|
-
| `VITE_UDI_READ_ONLY` | `false` | Start in read-only mode: the chat pane and the dashboard’s top bar (counts, grid settings, session import/export, downloads) are hidden, as is every editing control on the cards, while brushing, filters and the table toggle stay. `true` leaves an Explore Data button over the dashboard that opens the chat; `locked` removes it. With the chat hidden there is nothing to build a dashboard from, so pair this with `VITE_UDI_INITIAL_SESSION`.
|
|
35
|
-
| `VITE_UDI_INITIAL_SESSION` | — | Path or URL to a session export — the JSON written by the dashboard’s `Session → Export session` action. Fetched at startup and used to seed the dashboard and the conversation behind it. Anything under `public/` is served from the site root, so
|
|
36
|
-
| `
|
|
27
|
+
| Variable | Default | Description |
|
|
28
|
+
| -------------------------- | ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
29
|
+
| `VITE_UDI_API_BASE_URL` | `http://localhost:8007` | UDIAgent FastAPI server URL. May also be a same-origin path (e.g. `/api/yac`) when the chat sits behind the host app’s reverse proxy. |
|
|
30
|
+
| `VITE_UDI_DATA_PACKAGE` | `/data/hubmap/datapackage.json` | Path or URL to a `datapackage.json`. Defaults to the bundled HuBMAP snapshot synced from `sample-data/`. Ignored when `VITE_UDI_REMOTE_PACKAGE` is set. |
|
|
31
|
+
| `VITE_UDI_REMOTE_PACKAGE` | — | Name of a server-side data package (configured on the agent via `UDI_QUERY_BACKENDS`). When set, no CSVs load in the browser: metadata comes from `/v1/yac/metadata` and queries go to `/v1/yac/query`. Takes precedence over `VITE_UDI_DATA_PACKAGE`. |
|
|
32
|
+
| `VITE_UDI_REQUIRE_API_KEY` | `true` | Prompt the user for an OpenAI key in the UI. Defaults to `true`, but `.env.example` ships `false` because local dev runs against an agent that has its own `OPENAI_API_KEY`. |
|
|
33
|
+
| `VITE_UDI_MODEL` | — | LLM model override. Sent **only when the user supplies their own OpenAI key** — the agent honors a requested model only alongside an `X-OpenAI-Key`, so whoever pays for the tokens picks the model. Otherwise the agent’s `GPT_MODEL_NAME` applies. |
|
|
34
|
+
| `VITE_UDI_READ_ONLY` | `false` | Start in read-only mode: the chat pane and the dashboard’s top bar (counts, grid settings, session import/export, downloads) are hidden, as is every editing control on the cards, while brushing, filters and the table toggle stay. `true` leaves an Explore Data button over the dashboard that opens the chat; `locked` removes it. With the chat hidden there is nothing to build a dashboard from, so pair this with `VITE_UDI_INITIAL_SESSION`. |
|
|
35
|
+
| `VITE_UDI_INITIAL_SESSION` | — | Path or URL to a session export — the JSON written by the dashboard’s `Session → Export session` action. Fetched at startup and used to seed the dashboard and the conversation behind it. Anything under `public/` is served from the site root, so the pcx demo session (synced from `sample-data/`) is `/data/pcx/sessions/demo.json`. A malformed file fails loudly through the ErrorBoundary; a missing one only logs, and the dashboard starts empty. |
|
|
36
|
+
| `VITE_UDI_ISSUE_REPORTING` | `false` | Let users report a problem to the development team (Session menu, crash screen, and an offer from the agent). Reports go to the agent’s `POST /v1/yac/issue_report`, which records them in LangFuse, so turn this on only against an agent with LangFuse configured. |
|
|
37
|
+
| `VITE_BASE` | `/` | Public base path for the built SPA (read in `vite.config.ts`, build-time only). The library build always uses `./`. |
|
|
37
38
|
|
|
38
39
|
<!-- END generated: env vars -->
|
|
39
40
|
|
|
@@ -135,8 +136,10 @@ Embedding in another app? Two things worth knowing up front:
|
|
|
135
136
|
| `fontScale` | `number?` | Text size multiplier (1–2) for every chart, table and label. Overrides and hides the viewer's own Text size setting; omit it to leave text size to the viewer. |
|
|
136
137
|
| `readOnly` | `boolean \| 'locked'?` | Start with the chat collapsed to a rail and every editing control hidden. `'locked'` removes the way back out. See [Read-only dashboard embed](#read-only-dashboard-embed). |
|
|
137
138
|
| `initialSession` | `unknown?` | A session export to seed the dashboard and conversation with. See [Read-only dashboard embed](#read-only-dashboard-embed). |
|
|
139
|
+
| `savedSessionsKey` | `string?` | Adds **Saved in browser…** to the dashboard's Session menu: save the current session by name, then load or delete it later. Stored in `localStorage` under this key, so use one key per data package. |
|
|
138
140
|
| `filters` | `UDIFilter[]?` | Filters set by the embedding page. See [Filters from the host page](#filters-from-the-host-page). |
|
|
139
141
|
| `onFiltersChange` | `(filters) => void` | Called with every filter in place whenever one changes. See [Filters from the host page](#filters-from-the-host-page). |
|
|
142
|
+
| `issueReporting` | `boolean?` | Let users report a problem to the development team: a Report an issue item in the Session menu, a button on the crash screen, and an offer from the agent. Needs LangFuse on the agent, which records reports via `POST /v1/yac/issue_report`. |
|
|
140
143
|
| `className` | `string?` | CSS class for the root element |
|
|
141
144
|
| `style` | `CSSProperties?` | Inline styles for the root element |
|
|
142
145
|
|
|
@@ -196,9 +199,10 @@ silently empty dashboard. It is applied once, after the data package finishes lo
|
|
|
196
199
|
and `initialSession` are independent — seeding a normal, chat-enabled session works too.
|
|
197
200
|
|
|
198
201
|
To try the same thing in the standalone app without writing any code, point the two env vars at
|
|
199
|
-
an exported session — `VITE_UDI_READ_ONLY=locked` and
|
|
200
|
-
in `.env.local
|
|
201
|
-
|
|
202
|
+
an exported session — `VITE_UDI_READ_ONLY=locked` and
|
|
203
|
+
`VITE_UDI_INITIAL_SESSION=/data/pcx/sessions/demo.json` in `.env.local` (the pcx demo session,
|
|
204
|
+
synced from `sample-data/` and served from the site root; pair it with the pcx package). The app
|
|
205
|
+
fetches it at startup and hands it to `initialSession`.
|
|
202
206
|
|
|
203
207
|
### Filters from the host page
|
|
204
208
|
|
|
@@ -562,6 +566,9 @@ Event names are stable, snake_case strings. **Properties carry metadata only —
|
|
|
562
566
|
| `filter_field_changed` | User changes the target field on a tweakable filter card | `filterType: 'interval' \| 'point'`<br>`entity: string`<br>`field: string` — the newly selected field |
|
|
563
567
|
| `visualization_tweaked` | User changes the field a `VizTweakComponent` dropdown controls | `encoding: string` — the channel, or the template parameter for a re-bind<br>`kind: 'field' \| 'dimension' \| 'measure' \| 'binding'` — `binding` means the agent re-instantiated the template; the rest are local spec rewrites |
|
|
564
568
|
| `visualization_tweak_failed` | The agent refused a template re-bind (invalid binding, unknown template, transport failure) | `encoding: string`<br>`kind: 'binding'` |
|
|
569
|
+
| `issue_report_opened` | The Report an issue dialog opens (from the Session menu or an agent offer) | `source: 'menu' \| 'chat'` |
|
|
570
|
+
| `issue_report_submitted` | The agent accepts an issue report | `source: 'menu' \| 'chat'`<br>`hasContact: boolean` |
|
|
571
|
+
| `issue_report_failed` | Sending an issue report fails (network error, HTTP !ok — e.g. no LangFuse on the agent) | `source: 'menu' \| 'chat'` |
|
|
565
572
|
|
|
566
573
|
Every row in the table above also includes `sessionId: string`; it's omitted from the per-event cells to keep the table scannable.
|
|
567
574
|
|
|
@@ -609,7 +616,7 @@ src/
|
|
|
609
616
|
ChatInput.tsx # Message input
|
|
610
617
|
MessageList.tsx # Message history with auto-scroll
|
|
611
618
|
MessageBubble.tsx # Single message + tool call tabs
|
|
612
|
-
ConversationList.tsx #
|
|
619
|
+
ConversationList.tsx # Debug sidebar (`//admin`): new conversation
|
|
613
620
|
ApiKeyInput.tsx # OpenAI API key input
|
|
614
621
|
hooks/
|
|
615
622
|
useChatApi.ts # LLM API integration hook
|