Skip to content

Conversation

@akshatbatra
Copy link
Contributor

@akshatbatra akshatbatra commented Aug 27, 2025

Closes #401

Functionality for inline AI suggestions inside code editors and dark mode support for AI Assistant.

Changes

  • autocompletion.ts is the core that produces the suggestions.
  • If the last LLM call is still being processed or if it's been less than 2 seconds since the last call, then another LLM call isn't made to make sure that LLMs are used conservatively and provide practical suggestions instead of intrusive completions one after the other.
  • activityTracker.ts keeps track of timestamp of last user activity in the editors, this is used in autocompletion.ts to trigger the LLM call for inline suggestions if the user has been inactive for 1 second.
  • Appropriate prompt has been added in prompts.ts to generate the suggestions.
  • Auto-completion is registered before the editors mount.
  • Inline AI suggestions can be enabled/disabled under advanced settings of AI Assistant configuration.
  • AI Assistant, including the configuration popup, now supports dark mode via theming implementation.

Flags

  • Some redundant code that applied concertoTheme has been removed as it was not having any effect anyway due to not being applied at the right place. No visual change can be observed due to the removal of that code. It was added at the right place to test but the color scheme of that theme didn't seem to go well with dark mode. Default theme (same as before) works well in both light and dark mode.
  • This work was done with the old Playground UI as the base, it was later rebased onto restructuring/redesign branch to allow for testing with new design. When the redesign branch was merged, this branch was rebased onto main.

Demo Video

inline.completion.webm

Author Checklist

  • Ensure you provide a DCO sign-off for your commits using the --signoff option of git commit.
  • Vital features and changes captured in unit and/or integration tests
  • Commits messages follow AP format
  • Extend the documentation, if necessary
  • Merging to main from fork:branchname

Signed-off-by: Akshat Batra <akshatbatra25@gmail.com>
Signed-off-by: Akshat Batra <akshatbatra25@gmail.com>
@netlify
Copy link

netlify bot commented Aug 27, 2025

Deploy Preview for ap-template-playground ready!

Name Link
🔨 Latest commit 9818824
🔍 Latest deploy log https://app.netlify.com/projects/ap-template-playground/deploys/68b1cc5fcd2e0d0008ea97b6
😎 Deploy Preview https://deploy-preview-402--ap-template-playground.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@akshatbatra akshatbatra force-pushed the inline-ai-suggestions branch 2 times, most recently from 945f800 to 9818824 Compare August 29, 2025 15:50
@akshatbatra akshatbatra marked this pull request as ready for review August 29, 2025 16:02
@akshatbatra akshatbatra requested a review from a team as a code owner August 29, 2025 16:02
@sanketshevkar sanketshevkar merged commit d11918d into accordproject:main Sep 3, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Inline Suggestions in Code Editors via AI Assistant

2 participants