Conversation
Contributor
147736e to
dd23665
Compare
7a2dae5 to
c0f7621
Compare
22 tasks
cb23caf to
e756cf0
Compare
|
Docker image build succeeded: quay.io/eclipse/che-dashboard:pr-1505 (linux/amd64, linux/arm64) kubectl patch commandkubectl patch -n eclipse-che "checluster/eclipse-che" --type=json -p="[{"op": "replace", "path": "/spec/components/dashboard/deployment", "value": {containers: [{image: "quay.io/eclipse/che-dashboard:pr-1505", name: che-dashboard}]}}]" |
73b403a to
183e6c5
Compare
|
Docker image build succeeded: quay.io/eclipse/che-dashboard:pr-1505 (linux/amd64, linux/arm64) kubectl patch commandkubectl patch -n eclipse-che "checluster/eclipse-che" --type=json -p="[{"op": "replace", "path": "/spec/components/dashboard/deployment", "value": {containers: [{image: "quay.io/eclipse/che-dashboard:pr-1505", name: che-dashboard}]}}]" |
1 similar comment
|
Docker image build succeeded: quay.io/eclipse/che-dashboard:pr-1505 (linux/amd64, linux/arm64) kubectl patch commandkubectl patch -n eclipse-che "checluster/eclipse-che" --type=json -p="[{"op": "replace", "path": "/spec/components/dashboard/deployment", "value": {containers: [{image: "quay.io/eclipse/che-dashboard:pr-1505", name: che-dashboard}]}}]" |
Rework AiProviderKeysList table to follow WorkspacesList patterns: - Use variant="compact" string, screenReaderText for select columns - Add CSS classes for column width constraints and cell overflow - Move inline styles to CSS module (envVarCell, actionsCell, noKeyLabel) - Inline row rendering to simplify component Assisted-by: Claude Opus 4.6 Signed-off-by: Oleksii Orel <[email protected]>
Use CSS class with hover state for the question-circle icon in the Add/Edit API Key form, matching the Temporary Storage switch pattern. Assisted-by: Claude Opus 4.6 Signed-off-by: Oleksii Orel <[email protected]>
Fix icon margins, tooltip styling, toolbar alignment, label help positioning, and reorder AI Provider Keys as the last preferences tab. Assisted-by: Claude Opus 4.6 Signed-off-by: Oleksii Orel <[email protected]>
Replace hardcoded AI provider/tool defaults with a ConfigMap-based registry read via GET /api/ai-registry. Remove AI fields from server-config API. Hide all AI UI elements (provider selector, table column, preferences tab, detail form) when the registry is empty. Add tag-agnostic image comparison and admin-manageable component cleanup before workspace start. Assisted-by: Claude Opus 4.6 Signed-off-by: Oleksii Orel <[email protected]>
Assisted-by: Claude Opus 4.6 Signed-off-by: Oleksii Orel <[email protected]>
Assisted-by: Claude Opus 4.6 Signed-off-by: Oleksii Orel <[email protected]>
…al render Assisted-by: Claude Opus 4.6 Signed-off-by: Oleksii Orel <[email protected]>
Assisted-by: Claude Opus 4.6 Signed-off-by: Oleksii Orel <[email protected]>
The setupCommand (e.g. creating ~/.gemini config dir) was joined with && to the critical symlink/PATH commands. When $HOME is read-only (e.g. Go toolset container), the setup failure prevented the symlink from being created, leaving the AI tool binary missing from PATH. Wrap setupCommand in a best-effort block so symlink and PATH setup always execute regardless of setup failures. Assisted-by: Claude Opus 4.6 Signed-off-by: Oleksii Orel <[email protected]>
…and test cleanup - Guard fetchAiProviderKeyStatus to skip when no AI providers/tools exist - Implement updateOutdatedAiTools() to auto-update stale AI tool injectors before workspace start (tag priority: next > latest > semver) - Fix bulk delete of AI provider keys (modal now accepts array of providers) - Replace personal image references with dummy names in tests - Add unit tests for updateOutdatedAiTools and prepareDevfile AI injection Assisted-by: Claude Opus 4.6 Signed-off-by: Oleksii Orel <[email protected]>
…cleanup commands Init containers now clean their own files before copying, handling image updates naturally. removeAiToolFromWorkspace no longer adds postStart cleanup commands. sanitizeStaleAiTools now also removes orphaned tool commands (install/symlink/run/cleanup) whose injector component no longer exists in the spec. Assisted-by: Claude Opus 4.6 Signed-off-by: Oleksii Orel <[email protected]>
…Line Assisted-by: Claude Opus 4.6 Signed-off-by: Oleksii Orel <[email protected]>
The frontend no longer base64-encodes the API key via btoa() before posting it to the backend. The backend is responsible for encoding when creating the Kubernetes Secret. Assisted-by: Claude Opus 4.6 Signed-off-by: Oleksii Orel <[email protected]>
Kubernetes Secret `data` expects base64-encoded values, but the API key now arrives as plain text after removing frontend btoa() encoding. Switch to `stringData` so Kubernetes handles base64 encoding automatically. Assisted-by: Claude Opus 4.6 Signed-off-by: Oleksii Orel <[email protected]>
The onSelect callback was called inside the setState() updater function and read this.state.expandedId instead of prevState. Move the side effect to the setState callback to ensure it runs after state is committed and reads the correct values. Assisted-by: Claude Opus 4.6 Signed-off-by: Oleksii Orel <[email protected]>
When removing an AI tool, a cleanup postStart command is added to remove stale binaries from the shared PVC on the next workspace start. sanitizeStaleAiTools now preserves cleanup commands (they must run at least once) while still removing orphaned install/symlink/run commands. Also adds missing ai-registry mock in workspaceCreationTimeCheck to fix CI failure. Assisted-by: Claude Opus 4.6 Signed-off-by: Oleksii Orel <[email protected]>
Wrap cleanup commands in `nohup sh -c '...' &` so they never block or freeze workspace startup. Each tool's cleanup runs independently and in parallel. If removal fails the command retries on next start. Assisted-by: Claude Opus 4.6 Signed-off-by: Oleksii Orel <[email protected]>
Since cleanup postStart commands run in the background, by the next workspace start they have already executed. sanitizeStaleAiTools now removes orphaned cleanup-* commands automatically, so they do not accumulate in the spec even if the tool is never re-added. Assisted-by: Claude Opus 4.6 Signed-off-by: Oleksii Orel <[email protected]>
- Restrict toolId schema to K8s-label-safe characters (remove : and @) - Sanitize all non-label-safe chars in toSanitizedProviderId - Fix stuck isLoading when tools array is empty in refreshKeyStatus - Combine sanitize + update AI tools into a single PATCH on start - Batch double setState in AiSelector.handleToggle - Use providerId comparison instead of reference equality in List - Add onError fallback to provider icon <img> tags - Avoid redundant getProvider() calls in Gallery render Assisted-by: Claude Opus 4.6 Signed-off-by: Oleksii Orel <[email protected]>
Replace all occurrences of the specific AI agent name in code comments with a generic "AI Assistant" identifier. Assisted-by: AI Assistant Signed-off-by: Oleksii Orel <[email protected]>
When sanitizeStaleAiTools removes the injected-tools volume (because no recognized injectors remain), also remove the injected-tools volume mount and PATH env override from editor containers. Without this, the DevWorkspace operator rejects the spec with "unable to find volume mount injected-tools in devfile volume components". Assisted-by: AI Assistant Signed-off-by: Oleksii Orel <[email protected]>
Cleanup commands added by removeAiToolFromWorkspace were removed by sanitizeStaleAiTools before they could execute on cold start. Add a pending-cleanup annotation so the cleanup command survives one start cycle, executes during postStart, then gets removed on the next start. Also add a comment explaining why $(PATH) substitution cannot be used in the editor container env. Assisted-by: Claude Opus 4.6 Signed-off-by: Oleksii Orel <[email protected]>
JSON.parse can return primitives or arrays, not just objects. Add a runtime type guard before casting to Record<string, unknown> to prevent potential property access on non-object values. Assisted-by: Claude Opus 4.6 Signed-off-by: Oleksii Orel <[email protected]>
Add tests for AiConfig selectors, fetchAiRegistry API client, AiSelectorDocsLink component, and AiSelectorErrorBoundary component to bring global function coverage back above the 85% threshold. Assisted-by: Claude Opus 4.6 Signed-off-by: Oleksii Orel <[email protected]>
The PATCH in startWorkspace only sent /spec/template, so annotation changes from sanitizeStaleAiTools were lost. This caused cleanup commands to never be removed and stale tool binaries to persist on the shared volume across restarts. Also adds tests for AddEditModal and DeleteModal to restore function coverage above the 85% threshold. Assisted-by: Claude Sonnet 4.5 Signed-off-by: Oleksii Orel <[email protected]>
Assisted-by: Claude Sonnet 4.5 Signed-off-by: Oleksii Orel <[email protected]>
Assisted-by: Claude Sonnet 4.5 Signed-off-by: Oleksii Orel <[email protected]>
|
Docker image build succeeded: quay.io/eclipse/che-dashboard:pr-1505 (linux/amd64, linux/arm64) kubectl patch commandkubectl patch -n eclipse-che "checluster/eclipse-che" --type=json -p="[{"op": "replace", "path": "/spec/components/dashboard/deployment", "value": {containers: [{image: "quay.io/eclipse/che-dashboard:pr-1505", name: che-dashboard}]}}]" |
Contributor
|
I have a few questions:
|
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.

What does this PR do?
Adds an AI Selector widget to the Create Workspace page and integrates AI tool management across the dashboard, allowing users to pick an AI tool (e.g. Gemini CLI, Claude Code, OpenCode), save their API key, and have the tool automatically injected into workspaces.
Type Definitions
Two separate types model the AI feature:
AiProviderDefinition— provider metadata (id, name, publisher, description, icon, docs URL). Icons and descriptions live on the provider, not on individual tools.AiToolDefinition— injection details (providerId as FK to provider, tag, binary, pattern, injectorImage, envVarName). TheproviderIdfollowsvendor/productconvention (e.g.anthropic/claude,google/gemini).Create Workspace — AI Provider Selector
User Preferences — AI Providers Keys
Workspace Details — Overview Tab
AiToolFormGroupsection displaying the currently injected AI tool (or "None").Workspaces List — AI Provider Column
AI Tool Injection into DevWorkspace
addAiToolToWorkspace()creates an init container from the tool'sinjectorImage, a sharedinjected-toolsvolume, and DevWorkspace lifecycle commands:applycommand runs the injector init container.execcommand symlinks the binary into PATH and optionally runssetupCommand.init(single binary copy) andbundle(full runtime directory with symlink).Screenshot/screencast of this PR
What issues does this PR fix or reference?
fixes eclipse-che/che#23796
Is it tested? How?
Setting up the AI Tool Registry
The dashboard reads AI tool definitions from a Kubernetes ConfigMap at runtime. To enable the AI widgets you need to create this ConfigMap:
When no ConfigMap is found, the dashboard returns an empty registry and all AI-related UI elements are hidden automatically. To remove all AI tools:
oc delete configmap ai-tool-registry -n "${CHE_NAMESPACE:-eclipse-che}"Manual testing steps
defaultAiProviderin the CheCluster CR, the "Use a Default AI Provider" panel should display the resolved provider name (e.g. "The default AI provider "Gemini" configured by your administrator will be used.").che.eclipse.org/ai-provider-id,controller.devfile.io/mount-to-devworkspace,controller.devfile.io/watch-secret) and annotation (controller.devfile.io/mount-as: env). Update and delete the key. Verify the "Key configured" badge updates on the Create Workspace gallery cards.which gemini). Verify the API key env var is set (e.g.echo $GEMINI_API_KEY).ai-tool-registryConfigMap and verify that the AI Provider Selector on the Create Workspace page, the AI Provider(s) column in the Workspaces List, and the AI Providers Keys tab in User Preferences are all hidden.gemini— verify the Gemini CLI starts (or prints its help/version output), confirming the AI tool binary was injected into PATH.claude— verify the Claude Code CLI is available.geminiandclaudecommands are available. Check the Workspaces List — the "AI Provider(s)" column should show icons for both tools.Release Notes
Docs PR
eclipse-che/che-docs#3062