diff --git a/src/frontend/components/_features/[workspace]/ai-settings-panel/AcuExhaustionModal.tsx b/src/frontend/components/_features/[workspace]/ai-settings-panel/AcuExhaustionModal.tsx index fb57d7b8a..b6c1de015 100644 --- a/src/frontend/components/_features/[workspace]/ai-settings-panel/AcuExhaustionModal.tsx +++ b/src/frontend/components/_features/[workspace]/ai-settings-panel/AcuExhaustionModal.tsx @@ -51,7 +51,7 @@ export const AcuExhaustionModal = ({ const description = isInactive ? `Your subscription is ${billingError.subscriptionStatus ?? 'inactive'}. Reactivate it to keep using AI features.` : billingError.monthlyLimit != null - ? `You've used all ${billingError.monthlyLimit} ACU for this billing period. Buy more ACU or upgrade your plan to keep going.` + ? `You've used all ${Math.round(billingError.monthlyLimit)} ACU for this billing period. Buy more ACU or upgrade your plan to keep going.` : "You're out of ACU for this billing period. Buy more ACU or upgrade your plan to keep going." const ctaLabel = isInactive ? 'Reactivate subscription' : 'Upgrade plan' // subscription_inactive carries its own reactivation URL; insufficient_acu doesn't. @@ -76,7 +76,8 @@ export const AcuExhaustionModal = ({ typeof billingError.remaining === 'number' && typeof billingError.required === 'number' && (

- This request needed {billingError.required} ACU; only {billingError.remaining} remaining. + This request needed {Math.round(billingError.required)} ACU; only {Math.round(billingError.remaining)}{' '} + remaining.

)}
diff --git a/src/frontend/components/_features/[workspace]/editor/monaco/index.tsx b/src/frontend/components/_features/[workspace]/editor/monaco/index.tsx index 87a4452f7..c8b2bc264 100644 --- a/src/frontend/components/_features/[workspace]/editor/monaco/index.tsx +++ b/src/frontend/components/_features/[workspace]/editor/monaco/index.tsx @@ -1257,6 +1257,19 @@ void loop() // Editor options // ----------------------------------------------------------------------- + // Inline AI completions take over the suggest widget only while they are + // actually active (same gate as the provider registration above). When the + // user turns inline completions off, fall back to Monaco's normal quick + // suggestions (the auto-dropdown). Ctrl+Space still triggers the suggest + // widget manually in both modes — `quickSuggestions` only governs the + // automatic popup, and `suppressSuggestions` only suppresses the auto popup + // while an inline suggestion is showing. + const inlineCompletionsActive = + capabilities.hasAIAssistant && + aiState.isEnabled && + aiState.hasConsented && + aiState.preferences.inlineCompletionsEnabled + const monacoEditorUserOptions: monacoEditorOptionsType = { minimap: { enabled: false }, dropIntoEditor: { enabled: true }, @@ -1273,7 +1286,7 @@ void loop() tabSize: 4, insertSpaces: true, detectIndentation: false, - quickSuggestions: capabilities.hasAIAssistant ? false : undefined, + quickSuggestions: inlineCompletionsActive ? false : undefined, // Pinned for cross-platform consistency with the variables-code-editor. // Monaco's default is platform-dependent (12 on macOS, 14 elsewhere) — // without this both surfaces would mismatch on Linux/Windows even @@ -1295,7 +1308,7 @@ void loop() // `document.body` with `position: fixed`, so they escape both // the editor container and the variables table above it. fixedOverflowWidgets: true, - ...(capabilities.hasAIAssistant && { + ...(inlineCompletionsActive && { inlineSuggest: { enabled: true, suppressSuggestions: true,