Skip to content
Merged
Show file tree
Hide file tree
Changes from 64 commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
9fda1ce
chore: upgrade to deckgl 9.2.11
igorDykhta Mar 23, 2026
62ab8c3
fixes
igorDykhta Mar 23, 2026
6f72afe
fix lint follow up
igorDykhta Mar 23, 2026
9882ed9
fix blending
igorDykhta Mar 23, 2026
0e35da0
fix geojson layer
igorDykhta Mar 24, 2026
8ccb79d
more fixes for aggregation layers
igorDykhta Mar 24, 2026
6a86082
fix h3 layer
igorDykhta Mar 24, 2026
4befa17
potential fix for issues with geoarrow in point and line layers
igorDykhta Mar 24, 2026
4a8b816
fix postprocessing effects
igorDykhta Mar 24, 2026
ec2ec63
fixes for light and shadow effect
igorDykhta Mar 24, 2026
a199c5a
shadow and light effect - restore uniform shadow during the nighttime
igorDykhta Mar 24, 2026
ec45a94
don't hide line and arc layers when layer type changed
igorDykhta Mar 25, 2026
fbedc0d
restore filters for aggregation layers
igorDykhta Mar 25, 2026
8647f18
fix aggregation layers - hightlight outlines
igorDykhta Mar 25, 2026
541095a
fixes for raster tile layer - raster pmtiles related
igorDykhta Mar 25, 2026
f76a005
fixes for raster tiles shader modules updates
igorDykhta Mar 26, 2026
99d799f
merge master
igorDykhta Mar 26, 2026
17f0866
fix lint
igorDykhta Mar 26, 2026
448ca73
more lint
igorDykhta Mar 26, 2026
9b07f70
try to fix CI lint
igorDykhta Mar 26, 2026
6b33e07
try to fix CI tests
igorDykhta Mar 26, 2026
d5fdfd6
install webgpu
igorDykhta Mar 26, 2026
c419b75
try to fix Ci test env setup
igorDykhta Mar 26, 2026
b2967b4
cont fix setup browser env
igorDykhta Mar 26, 2026
98954b4
remove upgrade in examples - not yet released packages
igorDykhta Mar 26, 2026
f24754f
fix more tests
igorDykhta Mar 26, 2026
497d3db
fixes for line layer
igorDykhta Mar 26, 2026
aabd51c
_resizeRenderBuffers override changes
igorDykhta Mar 27, 2026
1cae110
revert jupyter loaders bump
igorDykhta Mar 27, 2026
c72c558
change luma shader validation logic for raster tile layer
igorDykhta Mar 27, 2026
655bd0b
Replaced the injected standalone with a proper UBO-backed shader module
igorDykhta Mar 27, 2026
0a41e25
unify deckgl type fixes
igorDykhta Mar 27, 2026
73b8d8f
fix plot container deckGLProps; fix lint
igorDykhta Mar 27, 2026
ed4ef7d
lint again
igorDykhta Mar 27, 2026
3c3e405
restore test for aggregation layers
igorDykhta Mar 27, 2026
d9f0c8d
fix cpu aggregator
igorDykhta Mar 27, 2026
a8cfe89
more error handling for aggregation layers
igorDykhta Mar 27, 2026
306226c
fixes to enchanced column draw
igorDykhta Mar 27, 2026
e271f1b
restore trip layer tests
igorDykhta Mar 27, 2026
c98e747
fix raster tile shader again
igorDykhta Mar 27, 2026
56dd767
fix for pickInfo types
igorDykhta Mar 27, 2026
6f778a6
postpone patchDeckRendererForPostProcessing
igorDykhta Mar 27, 2026
2520811
minor ts fix
igorDykhta Mar 27, 2026
a1a717e
add missing effect deps
igorDykhta Mar 27, 2026
00e2f96
ts changes
igorDykhta Mar 27, 2026
f9e4e8f
fix lint
igorDykhta Mar 27, 2026
8543b80
more small fixes
igorDykhta Mar 27, 2026
298852d
sync yarn
igorDykhta Mar 27, 2026
fc60c7a
fix lint again
igorDykhta Mar 27, 2026
1ec04cf
fix build
igorDykhta Mar 28, 2026
f7c2b92
remove unused hubble.gl from deps
igorDykhta Mar 28, 2026
6f117b7
ts fixes; test fixes
igorDykhta Mar 28, 2026
7ca5990
minor fixes
igorDykhta Mar 30, 2026
cc293e2
minor fixes
igorDykhta Mar 30, 2026
210094f
ts fixes
igorDykhta Mar 30, 2026
b5d9e7d
move gpu constants to constants module
igorDykhta Mar 30, 2026
9d2bbfb
fix lint
igorDykhta Mar 30, 2026
64f9eee
raster tile layer - migrate shaders to UBOs
igorDykhta Mar 30, 2026
a0acb64
raster tile fixes; ts impr
igorDykhta Mar 31, 2026
f8b556f
remove deprecated blending setter
igorDykhta Mar 31, 2026
4217926
more detailed tests
igorDykhta Mar 31, 2026
0b420e9
patch pipeline validation only if raster tile layers are created
igorDykhta Mar 31, 2026
b8629d7
fight with any
igorDykhta Mar 31, 2026
4db9dc6
add migration steps to docs
igorDykhta Mar 31, 2026
b3ca094
fix: aggregation - infinite config changes; add patch for non-numeric…
igorDykhta Mar 31, 2026
f54eccf
update aggr update triggers
igorDykhta Mar 31, 2026
cd71295
fix for count to column agg type change (numeric)
igorDykhta Mar 31, 2026
143de10
disable loggin mouse move and hover by default in console
igorDykhta Mar 31, 2026
8450ab2
fix tests
igorDykhta Mar 31, 2026
fb230b2
fog effects
igorDykhta Apr 1, 2026
f94e6aa
fix lint
igorDykhta Apr 1, 2026
73863c7
docs updates; typos
igorDykhta Apr 1, 2026
a6abe41
more docs upd
igorDykhta Apr 1, 2026
c6de237
fix remove shadow effect layer crash
igorDykhta Apr 2, 2026
af252a4
fix surface fog
igorDykhta Apr 2, 2026
f1dfa10
fix light and shadow image export; remove hubble warnings; hide loadi…
igorDykhta Apr 2, 2026
cb3cf11
fix image export - wait for tiled layers
igorDykhta Apr 2, 2026
194def2
enable tile 3d layer
igorDykhta Apr 3, 2026
945a7df
docs update; new install fix
igorDykhta Apr 3, 2026
8677ca5
fog adjuements; note about performance on older hardware
igorDykhta Apr 3, 2026
195206e
update docs; fixes to 3d tile layer
igorDykhta Apr 3, 2026
a5b540a
ui fixes; to bounds fix
igorDykhta Apr 3, 2026
4185609
fixes
igorDykhta Apr 3, 2026
6c64992
editable layer + effects -> disable
igorDykhta Apr 3, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
168 changes: 168 additions & 0 deletions docs/upgrade-guide-v3.3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,168 @@
# Upgrade Guide — kepler.gl 3.3

kepler.gl 3.3 upgrades the rendering stack from **deck.gl 8 / luma.gl 8** to **deck.gl 9 / luma.gl 9**. This is a major dependency upgrade that changes how WebGL resources, shaders, and rendering parameters are handled under the hood. Most kepler.gl users will not need to change application code, but library consumers who extend layers, interact with the WebGL context directly, or depend on internal types should review this guide.

## Dependency Changes

| Package group | Old version | New version |
| --------------- | ----------- | ----------- |
| `@deck.gl/*` | 8.9.x | **9.2.11** |
| `@luma.gl/*` | 8.x | **9.2.6** |
| `@loaders.gl/*` | 3.x / 4.3.2 | **4.3.4** |
| `math.gl` | — | **^4.1.0** |
| `typescript` | 4.7.2 | **5.6.3** |

### New dependencies

| Package | Version | Notes |
| ------------------------------------ | ------- | --------------------------------------------- |
| `@deck.gl-community/editable-layers` | 9.2.8 | Replaces `@nebula.gl/layers` for editor layer |
| `@deck.gl-community/layers` | 9.2.8 | Community layers package |
| `@deck.gl/widgets` | 9.2.11 | New deck.gl 9 module |
| `@luma.gl/effects` | 9.2.6 | New luma.gl 9 module |

### Removed dependencies

| Package | Notes |
| ----------------------------------- | ------------------------------------------------ |
| `hubble.gl/core`, `hubble.gl/react` | Removed from kepler.gl |
| `@nebula.gl/layers` | Replaced by `@deck.gl-community/editable-layers` |

### Yarn resolutions

All `@deck.gl/*`, `@loaders.gl/*`, and `@luma.gl/*` packages are pinned via resolutions. If your project has its own resolutions for these packages, make sure they are consistent with the versions above.

---

## Breaking Changes for Library Consumers

### 1. WebGL context callback renamed

The `DeckGL` component callback changed from `onWebGLInitialized` to `onDeviceInitialized`. The callback now receives a luma.gl `Device` instead of a raw `WebGLRenderingContext`.

If you override `MapContainerFactory` and rely on the initialization callback:

```diff
- onWebGLInitialized={gl => this._onDeckInitialized(gl)}
+ onDeviceInitialized={device => this._onDeckInitialized(device)}
```

### 2. Layer blending is now declarative

In deck.gl 8, kepler.gl called `setParameters(gl, {...})` with GL constants before each render to set blending mode. In deck.gl 9, blending is set via a `parameters` prop on `DeckGL` using WebGPU-style string constants.

**Old (removed):**

```js
import {setParameters} from '@luma.gl/core';
setParameters(gl, {
blendFunc: [GL.SRC_ALPHA, GL.ONE_MINUS_SRC_ALPHA],
blendEquation: GL.FUNC_ADD
});
```

**New:**

```js
import {getLayerBlendingParameters} from '@kepler.gl/utils';
<DeckGL parameters={getLayerBlendingParameters(layerBlending)} />;
```

If your application calls `setParameters` for blending, migrate to the `parameters` prop instead.

### 3. GPU parameter constants

A new module `@kepler.gl/constants` exports WebGPU-style string constants that replace the old GL enum values throughout the codebase:

- `BLEND_FACTOR` — `'zero'`, `'one'`, `'src-alpha'`, etc.
- `BLEND_OPERATION` — `'add'`, `'subtract'`, etc.
- `FILTER_MODE` — `'nearest'`, `'linear'`
- `ADDRESS_MODE` — `'clamp-to-edge'`, `'repeat'`, `'mirror-repeat'`
- `TEXTURE_FORMAT` — `'r8uint'`, `'rgba8unorm'`, etc.
- `TOPOLOGY` — `'triangle-list'`, `'triangle-strip'`, etc.

If you referenced GL constants for kepler.gl layer configuration, switch to these string constants.

### 4. `setLayerBlending` removed

The function `setLayerBlending` (previously exported from `@kepler.gl/utils`) is removed. Use `getLayerBlendingParameters` instead, which returns a `parameters` object for deck.gl 9.

### 5. Aggregation layers use deck.gl 9 native CPU aggregation

`GridLayer` and `HexagonLayer` now use deck.gl 9's built-in CPU aggregation (`gpuAggregation: false`) instead of kepler.gl's custom `CPUAggregator`. This means:

- `onSetColorDomain` / `onSetElevationDomain` callbacks now receive `[min, max]` number arrays instead of `{domain, aggregatedBins}` objects.
- Per-bin filtering is applied at the accessor level (`getColorValue`, `getElevationValue`) rather than via a `_filterData` prop.
- `ClusterLayer` still uses the internal `CPUAggregator`.

If you listen to domain callbacks on aggregation layers, update your handler to accept the new format:

```diff
- onSetColorDomain={({domain, aggregatedBins}) => { ... }}
+ onSetColorDomain={domain => { /* domain is [min, max] */ }}
```

### 6. Shader changes — GLSL 300 es and UBOs

All custom shaders now target **GLSL 300 es**:

- `attribute` → `in`, `varying` → `in`/`out`
- `texture2D()` → `texture()`
- `gl_FragColor` → explicit `out vec4 fragColor`
- Uniforms are declared inside **Uniform Buffer Objects** (UBOs) instead of standalone `uniform` declarations. For example, `uniform float opacity` becomes a field inside a `uniform layerUniforms { float opacity; } layer;` block, accessed as `layer.opacity`.

If you have custom layers that inject into kepler.gl's shaders (via `editShader` or shader hooks), review the new GLSL 300 es syntax.

### 7. Model API changes in custom layers

If you extend any kepler.gl layer and interact with `Model` objects:

```diff
- model.setUniforms({elevationScale: 1.0});
+ model.shaderInputs.setProps({elevationScale: {elevationScale: 1.0}});
```

```diff
- model.draw();
+ model.draw(this.context.renderPass);
```

The `_getModel(gl)` pattern is replaced — models are now created from `super._getModel()` and modified via `model.setGeometry()`.

### 8. `PickInfo` type change

A custom `PickInfo<DataT>` type is now defined in `@kepler.gl/types`. This type is a relaxed version of deck.gl 9's `PickingInfo` to work around stricter generic inference in the `DeckGL` component's callback types. If you import `PickingInfo` from `@deck.gl/core`, be aware that kepler.gl's callbacks use `PickInfo` instead.

### 9. `MapViewState` type is locally defined

`MapViewState` is no longer imported from `@deck.gl/core/typed`. It is defined locally in `@kepler.gl/types` (from `reducers.d.ts`). If you were importing it from deck.gl, import from `@kepler.gl/types` instead.

### 10. Editor layers migrated to `@deck.gl-community`

The editor layer (`EditableGeoJsonLayer`) is now imported from `@deck.gl-community/editable-layers` instead of `@nebula.gl/layers`. If you extend or replace the editor layer factory, update your imports.

### 11. Lighting effect API changes

`CustomDeckLightingEffect` (kepler.gl's lighting/shadow effect) has been rewritten for deck.gl 9:

- `preRender` → `setup(context)` / `cleanup(context)` lifecycle
- `getModuleParameters` → `getShaderModuleProps`
- Shadow module uses UBO-based uniforms with `uniformTypes` declarations
- `Texture2D` constructor → `device.createTexture()`
- `addDefaultShaderModule` / `removeDefaultShaderModule` API on `deck` instance

If you extend `CustomDeckLightingEffect`, review the new lifecycle methods.

### 12. `MapView` with `legacyMeterSizes`

kepler.gl now creates `MapView` with `{legacyMeterSizes: true}` to preserve backward-compatible meter-based sizing behavior from deck.gl 8.

---

## Runtime Patches

kepler.gl 3.3 applies two patches to work around deck.gl 9 / luma.gl 9 issues. These are applied automatically and require no action, but are documented for awareness:

1. **`patchDeckRendererForPostProcessing()`** — Patches `DeckRenderer._resizeRenderBuffers` to add depth-stencil attachments to post-processing framebuffers. In deck.gl 9, FBOs are created without depth buffers by default, which breaks depth testing when post-processing effects are active.

2. **`patchPipelineValidation()`** — Patches `WEBGLRenderPipeline._getLinkStatus` to suppress false-positive "mixed sampler type" validation errors in luma.gl 9. This patch is applied lazily only when a raster tile layer is instantiated.
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const config = {
// Some libraries (even if transitive) are transitioning to ESM and need additional transpilation. Relevant issues:
// - tiny-sdf: https://github.com/visgl/deck.gl/issues/7735
transformIgnorePatterns: [
'/node_modules\\/(?!(.*@mapbox\\/tiny-sdf\\.*|@loaders\\.gl))',
'/node_modules\\/(?!(.*@mapbox\\/tiny-sdf\\.*|@loaders\\.gl|@deck\\.gl|@deck\\.gl-community|@luma\\.gl|preact))',
'\\.pnp\\.[^\\/]+$'
]
};
Expand Down
68 changes: 40 additions & 28 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,12 @@
"umd"
],
"dependencies": {
"@deck.gl/mapbox": "^8.9.27",
"@hubble.gl/core": "1.4.0",
"@hubble.gl/react": "1.4.0",
"@deck.gl/mapbox": "^9.2.11",
"@kepler.gl/components": "3.2.6",
"@loaders.gl/polyfills": "^4.3.2",
"@loaders.gl/polyfills": "^4.3.4",
"@types/mapbox__geo-viewport": "^0.4.1",
"html-webpack-plugin": "^4.3.0",
"math.gl": "^4.1.0",
"monaco-editor": "^0.52.0",
"typedoc": "^0.19.2"
},
Expand All @@ -133,10 +132,12 @@
"@babel/runtime": "^7.12.1",
"@babel/traverse": "^7.12.1",
"@cfaester/enzyme-adapter-react-18": "^0.7.0",
"@deck.gl/test-utils": "^8.9.27",
"@loaders.gl/polyfills": "^4.3.2",
"@luma.gl/test-utils": "^8.5.20",
"@nebula.gl/layers": "1.0.2-alpha.1",
"@deck.gl-community/editable-layers": "9.2.8",
"@deck.gl-community/layers": "9.2.8",
"@deck.gl/test-utils": "^9.2.11",
"@loaders.gl/polyfills": "^4.3.4",
"@luma.gl/test-utils": "^9.2.6",
"@luma.gl/webgpu": "^9.2.6",
"@open-wc/webpack-import-meta-loader": "0.4.7",
"@probe.gl/env": "^3.5.0",
"@probe.gl/test-utils": "^3.5.0",
Expand Down Expand Up @@ -210,7 +211,7 @@
"tape": "^4.9.2",
"tape-catch": "^1.0.6",
"typedoc-plugin-markdown": "^3.0.11",
"typescript": "4.7.2",
"typescript": "5.6.3",
"url-loader": "^4.1.1",
"usehooks-ts": "^3.1.0",
"watchify": "^3.6.1",
Expand All @@ -223,25 +224,36 @@
"webpack-stats-plugin": "^0.2.1"
},
"resolutions": {
"@loaders.gl/core": "4.3.2",
"@loaders.gl/csv": "4.3.2",
"@loaders.gl/draco": "4.3.2",
"@loaders.gl/gltf": "4.3.2",
"@loaders.gl/json": "4.3.2",
"@loaders.gl/loader-utils": "4.3.2",
"@loaders.gl/polyfills": "4.3.2",
"@loaders.gl/arrow": "4.3.2",
"@loaders.gl/parquet": "4.3.2",
"@loaders.gl/gis": "4.3.2",
"@loaders.gl/schema": "4.3.2",
"@loaders.gl/wkt": "4.3.2",
"@loaders.gl/wms": "4.3.2",
"@luma.gl/constants": "8.5.21",
"@luma.gl/core": "8.5.21",
"@luma.gl/experimental": "8.5.21",
"@luma.gl/shadertools": "8.5.21",
"@luma.gl/test-utils": "8.5.21",
"@luma.gl/webgl": "8.5.21",
"@deck.gl/aggregation-layers": "9.2.11",
"@deck.gl/core": "9.2.11",
"@deck.gl/extensions": "9.2.11",
"@deck.gl/geo-layers": "9.2.11",
"@deck.gl/layers": "9.2.11",
"@deck.gl/mesh-layers": "9.2.11",
"@deck.gl/mapbox": "9.2.11",
"@deck.gl/react": "9.2.11",
"@deck.gl/widgets": "9.2.11",
"@loaders.gl/core": "4.3.4",
"@loaders.gl/csv": "4.3.4",
"@loaders.gl/draco": "4.3.4",
"@loaders.gl/gltf": "4.3.4",
"@loaders.gl/json": "4.3.4",
"@loaders.gl/loader-utils": "4.3.4",
"@loaders.gl/polyfills": "4.3.4",
"@loaders.gl/arrow": "4.3.4",
"@loaders.gl/parquet": "4.3.4",
"@loaders.gl/gis": "4.3.4",
"@loaders.gl/schema": "4.3.4",
"@loaders.gl/wkt": "4.3.4",
"@loaders.gl/wms": "4.3.4",
"@luma.gl/constants": "9.2.6",
"@luma.gl/core": "9.2.6",
"@luma.gl/effects": "9.2.6",
"@luma.gl/engine": "9.2.6",
"@luma.gl/shadertools": "9.2.6",
"@luma.gl/test-utils": "9.2.6",
"@luma.gl/webgl": "9.2.6",
"@luma.gl/webgpu": "9.2.6",
"@types/lodash": "4.17.5",
"browserslist": "^4.17.0",
"caniuse-lite": "^1.0.30001636",
Expand Down
10 changes: 10 additions & 0 deletions scripts/fix-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,16 @@
# We use tail to avoid the first line of the the output which is the command itself
yarn babel node_modules/@mapbox/tiny-sdf/index.js | tail -n +2 > node_modules/@mapbox/tiny-sdf/index.cjs

# Make the CJS build resolvable by require() - patch package.json to add exports and remove ESM-only type
node -e "
const fs = require('fs');
const p = 'node_modules/@mapbox/tiny-sdf/package.json';
const pkg = JSON.parse(fs.readFileSync(p, 'utf8'));
pkg.exports = { '.': { require: './index.cjs', import: './index.js', default: './index.cjs' } };
pkg.main = './index.cjs';
fs.writeFileSync(p, JSON.stringify(pkg, null, 2));
"

# Patch for an issue with react-virtualized output having an invalid import
# https://github.com/bvaughn/react-virtualized/issues/1212
if [[ -f "node_modules/react-virtualized/dist/es/WindowScroller/utils/onScroll.js" ]]; then
Expand Down
2 changes: 1 addition & 1 deletion src/actions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"umd"
],
"dependencies": {
"@deck.gl/core": "^8.9.27",
"@deck.gl/core": "^9.2.11",
"@kepler.gl/cloud-providers": "3.2.6",
"@kepler.gl/constants": "3.2.6",
"@kepler.gl/layers": "3.2.6",
Expand Down
10 changes: 5 additions & 5 deletions src/actions/src/vis-state-actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// Copyright contributors to the kepler.gl project

// vis-state-reducer
import {PickInfo} from '@deck.gl/core/lib/deck';
import {default as ActionTypes} from './action-types';
import {FileCacheItem} from '@kepler.gl/processors';
import {Layer, LayerBaseConfig} from '@kepler.gl/layers';
Expand All @@ -11,6 +10,7 @@ import {
AddDataToMapPayload,
ValueOf,
Merge,
PickInfo,
RGBColor,
NestedPartial,
LayerVisConfig,
Expand Down Expand Up @@ -1112,7 +1112,7 @@ export function toggleFilterFeature(
}

export type OnLayerHoverUpdaterAction = {
info: PickInfo<any> | null;
info: PickInfo | null;
mapIndex?: number;
};
/**
Expand All @@ -1124,7 +1124,7 @@ export type OnLayerHoverUpdaterAction = {
* @public
*/
export function onLayerHover(
info: PickInfo<any> | null,
info: PickInfo | null,
mapIndex?: number
): Merge<OnLayerHoverUpdaterAction, {type: typeof ActionTypes.LAYER_HOVER}> {
return {
Expand All @@ -1135,7 +1135,7 @@ export function onLayerHover(
}

export type OnLayerClickUpdaterAction = {
info: PickInfo<any> | null;
info: PickInfo | null;
};
/**
* Trigger layer click event with clicked object
Expand All @@ -1145,7 +1145,7 @@ export type OnLayerClickUpdaterAction = {
* @public
*/
export function onLayerClick(
info: PickInfo<any> | null
info: PickInfo | null
): Merge<OnLayerClickUpdaterAction, {type: typeof ActionTypes.LAYER_CLICK}> {
return {
type: ActionTypes.LAYER_CLICK,
Expand Down
11 changes: 7 additions & 4 deletions src/ai-assistant/src/components/ai-assistant-component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,11 @@ export function AiAssistantComponent() {
const instructions = `${INSTRUCTIONS}\n\n${datasetMetaData}`;

// generate ideas from LLM
const {temporaryPrompt, restartChat: libraryRestartChat} = useAssistant({...assistantProps, instructions});

const {temporaryPrompt, restartChat: libraryRestartChat} = useAssistant({
...assistantProps,
instructions
});

const restartChatRef = useRef(libraryRestartChat);
restartChatRef.current = libraryRestartChat;

Expand Down Expand Up @@ -104,13 +107,13 @@ export function AiAssistantComponent() {

const onRestartAssistant = async () => {
dispatch(updateAiAssistantMessages([]));

try {
await restartChatRef.current();
} catch (e) {
console.error('Error restarting chat:', e);
}

setRestartKey(prev => prev + 1);
};

Expand Down
Loading
Loading