Skip to content

feat: Add AI helpers to Javascript and Queries#41530

Draft
salevine wants to merge 16 commits intoreleasefrom
feat/enable-ai
Draft

feat: Add AI helpers to Javascript and Queries#41530
salevine wants to merge 16 commits intoreleasefrom
feat/enable-ai

Conversation

@salevine
Copy link
Contributor

@salevine salevine commented Jan 27, 2026

Description

Tip

Add AI helpers to javascript and queries

Fixes #Issue Number
or
Fixes Issue URL

Warning

If no issue exists, please create an issue first, and check with the maintainers if the issue is valid.

Automation

/ok-to-test tags=""

🔍 Cypress test results

Warning

Tests have not run on the HEAD 05bcbdf yet


Wed, 04 Feb 2026 20:41:50 UTC

Communication

Should the DevRel and Marketing teams inform users about this change?

  • Yes
  • No

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 27, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • 🔍 Trigger a full review
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/enable-ai

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot added the Enhancement New feature or request label Jan 27, 2026
@salevine
Copy link
Contributor Author

/build-deploy-preview skip-tests=true

@github-actions
Copy link

Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/21385153498.
Workflow: On demand build Docker image and deploy preview.
skip-tests: true.
env: ``.
PR: 41530.
recreate: .

@github-actions
Copy link

🔴🔴🔴 Cyclic Dependency Check:

This PR has increased the number of cyclic dependencies by 2, when compared with the release branch.

Refer this document to identify the cyclic dependencies introduced by this PR.

You can view the dependency diff in the run log. Look for the check-cyclic-dependencies job in the run.

1 similar comment
@github-actions
Copy link

🔴🔴🔴 Cyclic Dependency Check:

This PR has increased the number of cyclic dependencies by 2, when compared with the release branch.

Refer this document to identify the cyclic dependencies introduced by this PR.

You can view the dependency diff in the run log. Look for the check-cyclic-dependencies job in the run.

@github-actions
Copy link

🔴🔴🔴 Cyclic Dependency Check:

This PR has increased the number of cyclic dependencies by 2, when compared with the release branch.

Refer this document to identify the cyclic dependencies introduced by this PR.

You can view the dependency diff in the run log. Look for the check-cyclic-dependencies job in the run.

@github-actions
Copy link

🔴🔴🔴 Cyclic Dependency Check:

This PR has increased the number of cyclic dependencies by 2, when compared with the release branch.

Refer this document to identify the cyclic dependencies introduced by this PR.

You can view the dependency diff in the run log. Look for the check-cyclic-dependencies job in the run.

@github-actions
Copy link

🔴🔴🔴 Cyclic Dependency Check:

This PR has increased the number of cyclic dependencies by 1, when compared with the release branch.

Refer this document to identify the cyclic dependencies introduced by this PR.

You can view the dependency diff in the run log. Look for the check-cyclic-dependencies job in the run.

@salevine
Copy link
Contributor Author

/build-deploy-preview skip-tests=true

@github-actions
Copy link

Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/21406392448.
Workflow: On demand build Docker image and deploy preview.
skip-tests: true.
env: ``.
PR: 41530.
recreate: .

@github-actions
Copy link

🔴🔴🔴 Cyclic Dependency Check:

This PR has increased the number of cyclic dependencies by 1, when compared with the release branch.

Refer this document to identify the cyclic dependencies introduced by this PR.

You can view the dependency diff in the run log. Look for the check-cyclic-dependencies job in the run.

@github-actions
Copy link

🔴🔴🔴 Cyclic Dependency Check:

This PR has increased the number of cyclic dependencies by 1, when compared with the release branch.

Refer this document to identify the cyclic dependencies introduced by this PR.

You can view the dependency diff in the run log. Look for the check-cyclic-dependencies job in the run.

@github-actions
Copy link

🔴🔴🔴 Cyclic Dependency Check:

This PR has increased the number of cyclic dependencies by 1, when compared with the release branch.

Refer this document to identify the cyclic dependencies introduced by this PR.

You can view the dependency diff in the run log. Look for the check-cyclic-dependencies job in the run.

@github-actions
Copy link

🔴🔴🔴 Cyclic Dependency Check:

This PR has increased the number of cyclic dependencies by 1, when compared with the release branch.

Refer this document to identify the cyclic dependencies introduced by this PR.

You can view the dependency diff in the run log. Look for the check-cyclic-dependencies job in the run.

@salevine
Copy link
Contributor Author

/build-deploy-preview skip-tests=true

@github-actions
Copy link

Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/21462850562.
Workflow: On demand build Docker image and deploy preview.
skip-tests: true.
env: ``.
PR: 41530.
recreate: .

@github-actions
Copy link

Deploy-Preview-URL: https://ce-41530.dp.appsmith.com

…n testing

- Add AI Settings page at /settings/ai with provider selection (Claude, OpenAI, Local LLM)
- Add LOCAL_LLM enum to AIProvider
- Add localLlmUrl and localLlmContextSize fields to OrganizationConfiguration
- Add Test Connection button for Local LLM that validates:
  - URL parsing and format
  - DNS resolution with resolved IP display
  - TCP connection to host:port
  - TLS handshake (for HTTPS)
  - HTTP response and endpoint validation
  - Checks if response looks like an LLM API (JSON with expected fields)
  - Shows actual response preview from the server
- Add Test Key button for Claude and OpenAI that:
  - Sends a real test request to verify API key works
  - Shows step-by-step diagnostics
  - Displays the AI response on success
  - Shows detailed error info and suggestions on failure
- Fix GPT component to use styled textarea instead of missing Textarea export
- Fix response interceptor handling in AI Settings page

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@github-actions
Copy link

github-actions bot commented Feb 2, 2026

🔴🔴🔴 Cyclic Dependency Check:

This PR has increased the number of cyclic dependencies by 2, when compared with the release branch.

Refer this document to identify the cyclic dependencies introduced by this PR.

You can view the dependency diff in the run log. Look for the check-cyclic-dependencies job in the run.

…ling fixes

- Add AISidePanel component with quick actions (Explain, Fix Errors, Refactor, Add Comments)
- Add AIEditorLayout for side-by-side editor + AI panel integration
- Fix response extraction in sagas to handle both axios wrapped and interceptor unwrapped formats
- Add context detection: JS mode uses AST to find current function, SQL/GraphQL uses cursor window
- Fix icon names to use valid Appsmith design system icons
- Enable AI for JavaScript, SQL, and GraphQL editor modes in DynamicTextField

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@github-actions
Copy link

github-actions bot commented Feb 2, 2026

🔴🔴🔴 Cyclic Dependency Check:

This PR has increased the number of cyclic dependencies by 2, when compared with the release branch.

Refer this document to identify the cyclic dependencies introduced by this PR.

You can view the dependency diff in the run log. Look for the check-cyclic-dependencies job in the run.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@github-actions
Copy link

github-actions bot commented Feb 2, 2026

🔴🔴🔴 Cyclic Dependency Check:

This PR has increased the number of cyclic dependencies by 2, when compared with the release branch.

Refer this document to identify the cyclic dependencies introduced by this PR.

You can view the dependency diff in the run log. Look for the check-cyclic-dependencies job in the run.

Removed import of getJSFunctionLocationFromCursor from pages/Editor/JSEditor/utils
which was creating a cyclic dependency chain. Now using a simple window-based
approach for JavaScript context (same as SQL/GraphQL) - 15 lines before/after cursor.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@salevine
Copy link
Contributor Author

salevine commented Feb 3, 2026

/build-deploy-preview skip-tests=true

@github-actions
Copy link

github-actions bot commented Feb 3, 2026

Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/21611295826.
Workflow: On demand build Docker image and deploy preview.
skip-tests: true.
env: ``.
PR: 41530.
recreate: .

@github-actions
Copy link

github-actions bot commented Feb 3, 2026

Deploy-Preview-URL: https://ce-41530.dp.appsmith.com

salevine and others added 2 commits February 2, 2026 19:28
When the AI response contains code blocks without a language specifier,
use the current editor mode (SQL, GraphQL, etc.) instead of always
defaulting to JavaScript.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Added CLEAR_AI_RESPONSE action to reset lastResponse and error when
the editor mode changes. This prevents AI responses from one editor
(e.g., JS) from persisting when switching to another editor (e.g., SQL).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@github-actions
Copy link

github-actions bot commented Feb 3, 2026

Failed server tests

  • com.appsmith.server.git.ServerSchemaMigrationEnforcerTest#saveGitRepo_ImportAndThenExport_diffOccurs

salevine and others added 5 commits February 3, 2026 11:41
- Change Redux state from lastResponse to messages array for multi-turn chat
- Pass conversation history to Claude/OpenAI APIs for context-aware responses
- Add chat-style UI with message bubbles and auto-scroll
- Add clear chat button and green toggle for enabled state
- Create AIMessageDTO for backend conversation history support
- Simplify EE files to re-export from CE where possible

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Rename "Appsmith AI Beta" to "Ask AI" in slash command menu
- Remove beta flag from Ask AI command
- Add Redux state and actions for AI panel open/close
- Wire slash command to dispatch OPEN_AI_PANEL action
- CodeEditor syncs Redux state to open panel when triggered

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Increase the number of lines sent to AI for context:
- JavaScript: 15 -> 50 lines before/after cursor
- SQL: 10 -> 40 lines before/after cursor
- GraphQL: 10 -> 40 lines before/after cursor (EE only)
- JSON: 10 -> 40 lines before/after cursor (EE only)

This helps the AI better understand larger code structures when
providing assistance.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Create AIReferenceService to load mode-specific reference documentation
- Add reference files for JavaScript, SQL, GraphQL, and common issues
- Implement three-tier fallback: external path -> bundled -> inline
- Update AIAssistantServiceCEImpl to use dynamic prompts
- Increase max_tokens from 4096 to 8192 for longer responses
- Increase response truncation from 100K to 200K chars
- Add appsmith.ai.references.path configuration property

The reference files contain Appsmith-specific patterns, best practices,
and common issues to help the AI provide more accurate, context-aware
responses.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Documents how users can customize AI reference files:
- Docker volume mount
- Docker Compose
- Kubernetes ConfigMap
- Environment variable for custom path
- File format guidelines
- Fallback behavior explanation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@salevine
Copy link
Contributor Author

salevine commented Feb 3, 2026

/build-deploy-preview skip-tests=true

@github-actions
Copy link

github-actions bot commented Feb 3, 2026

Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/21647286087.
Workflow: On demand build Docker image and deploy preview.
skip-tests: true.
env: ``.
PR: 41530.
recreate: .

@github-actions
Copy link

github-actions bot commented Feb 3, 2026

Deploy-Preview-URL: https://ce-41530.dp.appsmith.com

- Replace per-editor AI panels with single global side panel
- Add GlobalAISidePanel component with scrollable responses and resizable input
- Update CodeEditor to dispatch openAIPanelWithContext action
- Add editor context tracking (mode, entity, cursor position)
- Auto-close panel on route navigation
- Fix AI selector state path and add missing reducer properties
- Add quick actions (Explain, Fix Errors, Refactor, Add Comments)
- Support conversation history display with code block rendering

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@tomjose92
Copy link
Contributor

/build-deploy-preview skip-tests=true

1 similar comment
@tomjose92
Copy link
Contributor

/build-deploy-preview skip-tests=true

@github-actions
Copy link

github-actions bot commented Feb 4, 2026

Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/21659736374.
Workflow: On demand build Docker image and deploy preview.
skip-tests: true.
env: ``.
PR: 41530.
recreate: .

@github-actions
Copy link

github-actions bot commented Feb 4, 2026

Deploy-Preview-URL: https://ce-41530.dp.appsmith.com

salevine and others added 3 commits February 4, 2026 11:01
- Add getReferenceFilesInfo() method to AIReferenceService to detect
  whether external files are being used instead of bundled defaults
- Show "Custom AI Context Files Active" notice on AI Configuration page
  when external reference files are detected
- Refactor AI settings page with reusable TestResultDisplay and
  ApiKeyTestResult components, reducing code duplication

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…rotection

- Add model dropdown that auto-fetches available models after successful connection test
- Add context size preset buttons (4K, 8K, 16K, 32K, 128K) with custom input option
- Add POST /ai-config/fetch-models endpoint to query Ollama's /api/tags
- Add localLlmModel field to AIConfigDTO and OrganizationConfigurationCE
- Fix SSRF vulnerabilities by using WebClientUtils with IP filtering
- Block requests to internal IPs and cloud metadata endpoints (169.254.169.254)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…sage visibility

- Clear AI messages when switching between editor contexts (JS to Query)
- Fix user message bubble contrast by using subtle background with border
- Add security audit document to gitignore

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@salevine
Copy link
Contributor Author

salevine commented Feb 4, 2026

/build-deploy-preview skip-tests=true

@github-actions
Copy link

github-actions bot commented Feb 4, 2026

Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/21692456328.
Workflow: On demand build Docker image and deploy preview.
skip-tests: true.
env: ``.
PR: 41530.
recreate: .

@github-actions
Copy link

github-actions bot commented Feb 4, 2026

Deploy-Preview-URL: https://ce-41530.dp.appsmith.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants