Skip to content

Conversation

@Light2Dark
Copy link
Contributor

@Light2Dark Light2Dark commented Sep 29, 2025

📝 Summary

CleanShot 2025-09-30 at 00 25 38 CleanShot 2025-09-30 at 00 25 58

Next step:

  • The AI provides the entire autocompletion including _df = mo.sql. We should strip away the python code.
  • Going to pass in the schema and maybe sample values

🔍 Description of Changes

📋 Checklist

  • I have read the contributor guidelines.
  • For large changes, or changes that affect the public API: this change was discussed or approved through an issue, on Discord, or the community discussions (Please provide a link if applicable).
  • I have added tests for the changes made.
  • I have run the code and verified that it works as expected.

Note

Introduce an AI-driven auto-fix for SQL errors (gated by aiEnabled) and adjust AI prompts to output raw code/SQL; update UI usage and tests.

  • Frontend:
    • Auto-fix integration: AutoFixButton now considers aiEnabled and sets aiCompletionCell; accepts optional className and uses cn.
    • Errors API: getAutoFixes(error, { aiEnabled }) adds SQL support that triggers AI completion via setAiCompletionCell.
    • UI tweak: MarimoErrorOutput passes className="mt-2.5" to AutoFixButton for SQL errors.
  • AI/Prompts:
    • Remove SQL instructions to wrap queries with mo.sql(...); single-cell prompts now end with “return the code as just {language}”.
  • Tests:
    • Update getAutoFixes tests to pass aiEnabled and cover SQL error fix behavior.
    • Refresh chat/system prompt snapshots to match new prompt text.

Written by Cursor Bugbot for commit 8a45cdd. This will update automatically on new commits. Configure here.

@Light2Dark Light2Dark requested a review from manzt as a code owner September 29, 2025 16:27
@vercel
Copy link

vercel bot commented Sep 29, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
marimo-docs Ready Ready Preview Comment Sep 29, 2025 5:32pm

@Light2Dark Light2Dark marked this pull request as draft September 29, 2025 16:28
if (error.type === "sql-error") {
return [
{
title: "AI Fix: Fix the SQL error",
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe just Fix with AI

@dmadisetti dmadisetti added the enhancement New feature or request label Sep 29, 2025
@mscolnick mscolnick merged commit 406fced into main Sep 29, 2025
32 of 39 checks passed
@mscolnick mscolnick deleted the sham/ai-autofix-sql-cell branch September 29, 2025 17:55
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.

4 participants