Add Cesium Copilot AI assistant to Sandcastle#13188
Open
Conversation
Integrates an AI-powered coding assistant into Sandcastle that helps users write and modify Cesium code. Features include: - Multi-model support (Gemini, Anthropic Claude) with API key management - Intelligent diff parsing and application for code modifications - Chat interface with streaming responses and tool call handling - Error context extraction for debugging assistance - Comprehensive test coverage for AI client and diff logic
The MatchStrategy enum was imported only as a type, but it's used as a value in the code. This change imports it as both value and type.
|
Thank you for the pull request, @jdehorty! ✅ We can confirm we have a CLA on file for you. |
The sandcastle package had "cesium": "*" as a dependency, which caused npm to install cesium from npm registry into node_modules/cesium. This conflicted with the local Source/Cesium.d.ts during TypeScript definition generation in the deploy workflow, causing TS2649 and TS6200 errors. Sandcastle doesn't need cesium as a direct dependency - the cesium types/code are loaded dynamically at runtime for the Monaco editor.
This commit adds "cesium": "*" as a dependency in the sandcastle package.json file. Additionally, it includes various formatting improvements in the ChatPanel component and related tests for better readability and consistency.
Contributor
|
Hey @jdehorty and @Guillar1, thanks for getting this started! I had some general concerns before I dig too deep into the PR itself
There is also a general concern that I don't currently have access to API keys to actually test with the models that have been selected. We can continue that conversation in the other issues that will be opened. |
e163821 to
578a494
Compare
ca7df89 to
199658b
Compare
199658b to
fbbdde4
Compare
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 PR introduces Cesium Copilot, an AI-powered coding assistant integrated directly into Sandcastle. Cesium Copilot helps developers write, modify, and debug CesiumJS code through an intuitive chat interface with intelligent code understanding and modification capabilities.
Key Features
Technical Highlights
New Components
ChatPanelDiffPreviewApiKeyDialogSettingsModalModelPickerFiles Changed
packages/sandcastle/src/AI/): Client implementations, diff parsing/application, error handlingpackages/sandcastle/src/): Chat interface, diff preview, settings panelspackages/sandcastle/src/contexts/): State management for history and model selectionTest Plan
npm run test --workspace=@cesium/sandcastleScreenshots
Note: This feature requires users to provide their own API keys for the AI services they wish to use. No API keys are stored on Cesium servers.