chore: move AI assistant to demo app#3532
Open
lixun910 wants to merge 13 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR relocates the AI assistant feature out of the published kepler.gl core package and into the demo app, aiming to keep the core library focused on geo-visualization and free of AI/LLM dependencies while preserving the assistant as an optional add-on.
Changes:
- Removed AI assistant exports/config/constants/translations/build hooks from the core package (and deleted the
src/ai-assistantpackage files). - Updated core typing/config to allow demo-app-defined map controls while removing the
aiAssistantcore control constant. - Added a full demo-app-local AI assistant module (reducers, UI, map control, and a set of OpenAssistant-powered tools) and updated demo-app dependencies/lockfile.
Reviewed changes
Copilot reviewed 24 out of 55 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| website/webpack.config.js | Renames CSS-loader comment (generic CSS loader). |
| webpack/umd.js | Removes CSS loader previously added for AI assistant UMD bundling. |
| src/types/reducers.d.ts | Broadens MapControls typing via index signature (supports demo-defined controls). |
| src/styles/src/base.ts | Removes aiAssistantPanelWidth constant and theme entry from core styles. |
| src/reducers/src/ui-state-updaters.ts | Removes effect/AI-assistant mutual exclusion logic from core map-control toggling. |
| src/localization/src/translations/ru.ts | Removes AI assistant tooltip strings from core localization. |
| src/localization/src/translations/pt.ts | Removes AI assistant tooltip strings from core localization. |
| src/localization/src/translations/ja.ts | Removes AI assistant tooltip strings from core localization. |
| src/localization/src/translations/fi.ts | Removes AI assistant tooltip strings from core localization. |
| src/localization/src/translations/es.ts | Removes AI assistant tooltip strings from core localization. |
| src/localization/src/translations/en.ts | Removes AI assistant tooltip strings from core localization. |
| src/localization/src/translations/cn.ts | Removes AI assistant tooltip strings from core localization. |
| src/localization/src/translations/ca.ts | Removes AI assistant tooltip strings from core localization. |
| src/index.js | Removes @kepler.gl/ai-assistant export from the core entry point. |
| src/constants/src/default-settings.ts | Removes aiAssistant from MAP_CONTROLS core defaults. |
| src/ai-assistant/tsconfig.production.json | Deletes AI assistant package build config from core. |
| src/ai-assistant/package.json | Deletes AI assistant package manifest from core. |
| src/ai-assistant/babel.config.js | Deletes AI assistant package babel config from core. |
| package.json | Removes src/ai-assistant from workspaces/build script and adds editor-related deps. |
| examples/demo-app/yarn.lock | Updates lockfile for new demo-app AI assistant dependencies and transitive deps. |
| examples/demo-app/src/reducers/index.js | Switches AI assistant reducer import to local demo-app module; adds mapControls.aiAssistant default. |
| examples/demo-app/src/factories/map-control.js | Switches AiAssistantControlFactory import to local demo-app module. |
| examples/demo-app/src/constants/localization.js | Adds AI assistant tooltip keys to demo-app localization messages. |
| examples/demo-app/src/app.tsx | Switches AI assistant imports to local demo-app module. |
| examples/demo-app/src/ai-assistant/tools/utils.ts | Adds demo-app AI assistant data utilities (dataset/layer helpers, color interpolation, etc.). |
| examples/demo-app/src/ai-assistant/tools/tools.tsx | Adds tool setup composition for LLM tools (Kepler/ECharts/Geo/Query). |
| examples/demo-app/src/ai-assistant/tools/query-tool.tsx | Adds DuckDB query tools wired into the assistant. |
| examples/demo-app/src/ai-assistant/tools/lisa-tool.tsx | Adds LISA tool component to create datasets/layers from results. |
| examples/demo-app/src/ai-assistant/tools/kepler-tools/table-tool.tsx | Adds tool component to execute SQL and materialize results into Kepler datasets. |
| examples/demo-app/src/ai-assistant/tools/kepler-tools/save-data-tool.tsx | Adds tool for persisting tool-cache results into Kepler datasets. |
| examples/demo-app/src/ai-assistant/tools/kepler-tools/loaddata-tool.tsx | Adds tool to load remote datasets into Kepler from a URL. |
| examples/demo-app/src/ai-assistant/tools/kepler-tools/layer-style-tool.tsx | Adds tool to update layer color styling. |
| examples/demo-app/src/ai-assistant/tools/kepler-tools/layer-creation-tool.tsx | Adds tool to create Kepler layers from datasets (with optional color mapping). |
| examples/demo-app/src/ai-assistant/tools/kepler-tools/index.ts | Wires Kepler-specific tools together and supplies runtime context. |
| examples/demo-app/src/ai-assistant/tools/kepler-tools/boundary-tool.tsx | Adds tool to read current map boundary for downstream tools. |
| examples/demo-app/src/ai-assistant/tools/kepler-tools/basemap-tool.tsx | Adds tool to change basemap styles. |
| examples/demo-app/src/ai-assistant/tools/geo-tools.tsx | Adds GeoDa/OSM-powered geospatial tools and wiring to tool-cache and Kepler datasets. |
| examples/demo-app/src/ai-assistant/tools/echarts-tools.tsx | Adds plot tools (ECharts) and selection-to-map highlighting integration. |
| examples/demo-app/src/ai-assistant/reducers/index.ts | Adds demo-app AI assistant reducer and state model. |
| examples/demo-app/src/ai-assistant/README.md | Adds demo-app AI assistant module documentation. |
| examples/demo-app/src/ai-assistant/plugin.ts | Adds demo-app AI assistant plugin stub/init hook. |
| examples/demo-app/src/ai-assistant/map/ai-assistant-control.tsx | Adds demo-app map control button for the assistant panel. |
| examples/demo-app/src/ai-assistant/localization.ts | Adds demo-app AI assistant translations (tooltips + panel labels) for multiple locales. |
| examples/demo-app/src/ai-assistant/index.ts | Adds demo-app AI assistant public module exports. |
| examples/demo-app/src/ai-assistant/icons/api-key.tsx | Adds demo-app AI assistant API key icon. |
| examples/demo-app/src/ai-assistant/icons/ai-star.tsx | Adds demo-app AI assistant button icon. |
| examples/demo-app/src/ai-assistant/constants.ts | Adds demo-app AI assistant prompt/instruction constants. |
| examples/demo-app/src/ai-assistant/config/models.ts | Adds demo-app LLM provider model lists and default base URLs. |
| examples/demo-app/src/ai-assistant/components/ai-assistant-manager.tsx | Adds demo-app assistant side panel container and i18n composition. |
| examples/demo-app/src/ai-assistant/components/ai-assistant-config.tsx | Adds demo-app assistant configuration UI (provider/model/key/baseUrl/temp/topP). |
| examples/demo-app/src/ai-assistant/components/ai-assistant-component.tsx | Adds demo-app assistant chat UI wiring to tools, ideas, screenshots, restart, etc. |
| examples/demo-app/src/ai-assistant/actions.ts | Adds demo-app assistant Redux actions. |
| examples/demo-app/package.json | Removes dependency on published @kepler.gl/ai-assistant and adds required assistant deps directly. |
| examples/demo-app/esbuild.config.mjs | Updates local aliasing comment and removes alias for @kepler.gl/ai-assistant. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This change removes the AI assistant module from kepler.gl's core package, ensuring the published library contains only geo-visualization functionality (maps, layers, filters, effects) with zero AI/LLM dependencies. The AI chat feature now lives as an optional demo-app add-on, keeping the core lightweight and focused on its purpose as a geospatial data visualization tool.
Next: upgrade ai-assistent in kepler.gl demo-app using sqlrooms/ai skill framework.