Skip to content

Conversation

@wwwillchen
Copy link
Contributor

@wwwillchen wwwillchen commented Oct 14, 2025

Note

Introduces Smart Context v3 (Power/Beta), updates UI to Off/Balanced/Power, extends schema/engine support, and migrates deprecated conservative setting.

  • Smart Context (Pro):
    • UI in src/components/ProModeSelector.tsx now offers off, balanced, and new v3 (labeled “Power (Beta)”) options; removes the conservative button.
    • Handler updates to set proSmartContextOption: "v3" and enable mode when selected; value derivation recognizes v3.
  • Schema & Engine:
    • Extend proSmartContextOption enum to include "v3" in src/lib/schemas.ts.
    • Allow smartContextMode to be "v3" in src/ipc/utils/llm_engine_provider.ts.
  • Settings Migration:
    • In src/main/settings.ts, map deprecated "conservative" to undefined after validation to use defaults.

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

cursor[bot]

This comment was marked as outdated.

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

3 issues found across 4 files

Prompt for AI agents (all 3 issues)

Understand the root cause of the following 3 issues and fix them.


<file name="src/components/ProModeSelector.tsx">

<violation number="1" location="src/components/ProModeSelector.tsx:267">
Balanced (middle) button is using rightmost-edge styling; apply middle-segment classes (no rounding, right border) so the segmented control renders correctly</violation>

<violation number="2" location="src/components/ProModeSelector.tsx:274">
Selecting the new “Power (Beta)” option won’t persist anything because the parent handler never handles the &quot;v3&quot; value, so this click is a no-op and the mode cannot be enabled.</violation>

<violation number="3" location="src/components/ProModeSelector.tsx:276">
Power (Beta) button is using middle-segment styling; apply right-edge rounded class so the segmented control borders/rounding are correct</violation>
</file>

React with 👍 or 👎 to teach cubic. Mention @cubic-dev-ai to give feedback, ask questions, or re-run the review.

variant={currentValue === "v3" ? "default" : "ghost"}
size="sm"
onClick={() => onValueChange("balanced")}
onClick={() => onValueChange("v3")}
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Oct 14, 2025

Choose a reason for hiding this comment

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

Selecting the new “Power (Beta)” option won’t persist anything because the parent handler never handles the "v3" value, so this click is a no-op and the mode cannot be enabled.

Prompt for AI agents
Address the following comment on src/components/ProModeSelector.tsx at line 274:

<comment>Selecting the new “Power (Beta)” option won’t persist anything because the parent handler never handles the &quot;v3&quot; value, so this click is a no-op and the mode cannot be enabled.</comment>

<file context>
@@ -257,22 +260,22 @@ function SmartContextSelector({
+          variant={currentValue === &quot;v3&quot; ? &quot;default&quot; : &quot;ghost&quot;}
           size=&quot;sm&quot;
-          onClick={() =&gt; onValueChange(&quot;balanced&quot;)}
+          onClick={() =&gt; onValueChange(&quot;v3&quot;)}
           disabled={!isTogglable}
-          className=&quot;rounded-l-none h-8 px-3 text-xs flex-shrink-0&quot;
</file context>
Fix with Cubic

onClick={() => onValueChange("v3")}
disabled={!isTogglable}
className="rounded-l-none h-8 px-3 text-xs flex-shrink-0"
className="rounded-none border-r border-input h-8 px-3 text-xs flex-shrink-0"
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Oct 14, 2025

Choose a reason for hiding this comment

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

Power (Beta) button is using middle-segment styling; apply right-edge rounded class so the segmented control borders/rounding are correct

Prompt for AI agents
Address the following comment on src/components/ProModeSelector.tsx at line 276:

<comment>Power (Beta) button is using middle-segment styling; apply right-edge rounded class so the segmented control borders/rounding are correct</comment>

<file context>
@@ -257,22 +260,22 @@ function SmartContextSelector({
+          onClick={() =&gt; onValueChange(&quot;v3&quot;)}
           disabled={!isTogglable}
-          className=&quot;rounded-l-none h-8 px-3 text-xs flex-shrink-0&quot;
+          className=&quot;rounded-none border-r border-input h-8 px-3 text-xs flex-shrink-0&quot;
         &gt;
-          Balanced
</file context>
Suggested change
className="rounded-none border-r border-input h-8 px-3 text-xs flex-shrink-0"
className="rounded-l-none h-8 px-3 text-xs flex-shrink-0"
Fix with Cubic

onClick={() => onValueChange("balanced")}
disabled={!isTogglable}
className="rounded-none border-r border-input h-8 px-3 text-xs flex-shrink-0"
className="rounded-l-none h-8 px-3 text-xs flex-shrink-0"
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Oct 14, 2025

Choose a reason for hiding this comment

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

Balanced (middle) button is using rightmost-edge styling; apply middle-segment classes (no rounding, right border) so the segmented control renders correctly

Prompt for AI agents
Address the following comment on src/components/ProModeSelector.tsx at line 267:

<comment>Balanced (middle) button is using rightmost-edge styling; apply middle-segment classes (no rounding, right border) so the segmented control renders correctly</comment>

<file context>
@@ -257,22 +260,22 @@ function SmartContextSelector({
+          onClick={() =&gt; onValueChange(&quot;balanced&quot;)}
           disabled={!isTogglable}
-          className=&quot;rounded-none border-r border-input h-8 px-3 text-xs flex-shrink-0&quot;
+          className=&quot;rounded-l-none h-8 px-3 text-xs flex-shrink-0&quot;
         &gt;
-          Conservative
</file context>
Suggested change
className="rounded-l-none h-8 px-3 text-xs flex-shrink-0"
className="rounded-none border-r border-input h-8 px-3 text-xs flex-shrink-0"
Fix with Cubic

if (!settings?.enableProSmartFilesContextMode) {
return "off";
}
if (settings?.proSmartContextOption === "v3") {
Copy link

Choose a reason for hiding this comment

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

Bug: Type Mismatch Causes Settings Update Failure

The handleSmartContextChange function (line 34) no longer accepts "conservative", but the SmartContextSelector's onValueChange prop type (line 203) still includes it. This type mismatch causes a TypeScript error. If getCurrentValue (line 216) returns "conservative", the handleSmartContextChange function would silently ignore it, preventing settings from updating.

Fix in Cursor Fix in Web

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