Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking β€œSign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: code assistant option #1922

Merged
merged 7 commits into from
Feb 11, 2025
Merged

fix: code assistant option #1922

merged 7 commits into from
Feb 11, 2025

Conversation

astandrik
Copy link
Collaborator

@astandrik astandrik commented Feb 10, 2025 β€’

CI Results

Test Status: βœ… PASSED

πŸ“Š Full Report

Total Passed Failed Flaky Skipped
262 262 0 0 0

😟 No changes in tests. πŸ˜•

Bundle Size: βœ…

Current: 80.32 MB | Main: 80.32 MB
Diff: +4.10 KB (0.00%)

βœ… Bundle size unchanged.

ℹ️ CI Information
  • Test recordings for failed tests are available in the full report.
  • Bundle size is measured for the entire 'dist' directory.
  • πŸ“Š indicates links to detailed reports.
  • πŸ”Ί indicates increase, πŸ”½ decrease, and βœ… no change in bundle size.

@astandrik astandrik requested review from Raubzeug and removed request for Raubzeug February 10, 2025 15:06
@astandrik astandrik requested a review from Raubzeug February 10, 2025 15:11
Raubzeug
Raubzeug previously approved these changes Feb 10, 2025
@astandrik
Copy link
Collaborator Author

astandrik commented Feb 10, 2025 β€’

@Raubzeug used factory instance creation instead of hook for register/unregister functionality
Checked on internal instance that it actually works

@artemmufazalov - you may find it interesting to take a glance

React.useEffect(() => {
if (monacoGhostInstance && isCodeAssistEnabled) {
monacoGhostInstance.register(monacoGhostConfig);
prepareUserQueriesCache();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we prepare cache every time any useEffect dependency changes?

@@ -45,8 +46,11 @@ export function YqlEditor({
}: YqlEditorProps) {
const input = useTypedSelector(selectUserInput);
const dispatch = useTypedDispatch();
const [monacoGhostInstance, setMonacoGhostInstance] =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's not use state for editor instance? Will window.ydbEditor be enough?

@astandrik astandrik added this pull request to the merge queue Feb 11, 2025
Merged via the queue into main with commit 38ea87f Feb 11, 2025
7 checks passed
@astandrik astandrik deleted the astandrik.code-assitant-option branch February 11, 2025 08:42
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.

2 participants