- Add open-file tab strip below toolbar with tab selection and close buttons
- Track per-tab dirty state in TabData (`isDirty`)
- Mark tabs dirty on content change and clear dirty flag on successful save/save as
- Add close-confirmation dialog for unsaved tabs:
- Save
- Don't Save
- Cancel
- Implement close helpers in ContentView actions:
- requestCloseTab
- saveAndClosePendingTab
- discardAndClosePendingTab
- Keep tab open when Save As is cancelled
- Fix left sidebar toolbar icon to always use left-sidebar symbol
- Keep right sidebar toggle separate and unchanged
- Continue using blank-window toolbar action for new windows`
- Move LineNumberRulerView into its own file
- Fix line number updates while scrolling
- Preserve window translucency by avoiding opaque ruler drawing
- Remove unused textContainer binding
- Fix Swift code being misclassified as C# by unifying language detection
- Remove conflicting AI-based language detection on paste
- Route paste, open, and edit events through LanguageDetector
- Add toggle for translucent editor background
- Persist translucency preference across sessions
- Minor cleanup of conflicting or redundant editor logic
• Add robust availability checks for Apple Intelligence (iOS 18 / macOS 15) before using system language model
• Implement health check via LanguageModelSession to validate model responsiveness (“ping” -> “pong”)
• Provide synchronous completion API appleFMComplete(prompt:) returning model response text
• Implement streaming completion API appleFMStream(prompt:) that yields incremental deltas
• Fix optional handling in streaming: unwrap partial.content.text safely and remove force unwraps
• Correct delta computation using unwrapped current string and maintain last state
• Add graceful fallback to single-shot completion if streaming fails
• Provide stubbed implementations when USE_FOUNDATION_MODELS is disabled to ensure build stability across configs
• Remove HoverPopoverModifier and all .hoverPopover usages from toolbar
• Use .help(...) for OS-native tooltips on all toolbar items
• Ensure help strings are complete and descriptive (e.g., “Find & Replace”)
• Keep click-driven AI Model popover intact; only hover tooltips removed
• Prevents first-click dismissal behavior and avoids duplicate tooltips
- Wire up Grok (xAI) and Gemini (Google) API calls inside generateModelCompletion(...)
- Grok: POST https://api.x.ai/v1/chat/completions with OpenAI-style messages
- Gemini: POST v1beta/models/<model>:generateContent with contents/parts payload
- Reuse existing prompt and sanitizeCompletion(_:) to keep output concise
- Respect missing/empty tokens by short‑circuiting to no-op
- Ensure these providers are only used by inline completion, already gated by isAutoCompletionEnabled
- AIClientFactory: make switch exhaustive by adding `.anthropic` case (returns nil for now)
- Anthropic is handled directly in ContentView’s inline completion path
Notes:
- No changes to other features or UI flows
- OpenAI and Anthropic implementations remain as previously added
- Gemini model used: gemini-1.5-flash-latest
- Grok model used: grok-2-latest
Testing:
- Toggle code completion with the toolbar button; when disabled, no API calls occur
- With tokens set, select Grok/Gemini and type to trigger suggestions
- Verify suggestions insert without duplication and are trimmed via sanitizeCompletion
- Build to confirm AIClientFactory switch error is resolved