Skip to content

feat: add gemini-3-flash support and comprehensive lint fixes#35

Merged
Hunter Lovell (hntrl) merged 1 commit into
langchain-ai:mainfrom
Dhineshkumaran:main
Jan 19, 2026
Merged

feat: add gemini-3-flash support and comprehensive lint fixes#35
Hunter Lovell (hntrl) merged 1 commit into
langchain-ai:mainfrom
Dhineshkumaran:main

Conversation

@Dhineshkumaran
Copy link
Copy Markdown
Contributor

@Dhineshkumaran Dhinesh kumaran S (Dhineshkumaran) commented Jan 18, 2026

  • Add gemini-3-flash-preview and gemini-2.5-* context limits to ContextUsageIndicator.
  • Refactor WorkspacePicker to move selectWorkspaceFolder to lib/workspace-utils.ts to resolve React Fast Refresh warnings.
  • Fix missing explicit return types in ChatContainer, ModelSwitcher, ApiKeyDialog, MessageBubble, hreads.ts, and various Tab components.
  • Fix unused variable warnings in storage.ts and hread-context.tsx.
  • Fix import errors and ensure clean linting state across the renderer and main process.

Description

This PR adds support for gemini-3-flash and other recent Gemini models to the context awareness system, and performs a comprehensive linting pass to improve code quality and type safety across the application.

Detailed Changes

Feature: Gemini 3 Support

  • ContextUsageIndicator: Added explicit context window configurations for gemini-3-flash-preview and gemini-2.5-flash-lite (and their pro variants), ensuring accurate token usage tracking for these new models.

Refactoring & Performance

  • WorkspacePicker: Refactored logic to address a React Fast Refresh warning (react-refresh/only-export-components). The selectWorkspaceFolder helper utility was moved to a separate file: src/renderer/src/lib/workspace-utils.ts.
  • ModelSwitcher: Optimized component by removing unnecessary useEffect calls that were causing cascading renders and replaced them with derived state.

Lint Fixes (ESLint Cleanup)

Addressed extensive explicit-function-return-type and no-unused-vars lint errors across the codebase:

  • Chat Components: Added return types to ChatContainer, ModelSwitcher, ApiKeyDialog, MessageBubble, and ToolCallRenderer.
  • Tab Components: Added return types to ImageViewer, MediaViewer, PDFViewer, BinaryFileViewer, and TabBar.
  • Backend/IPC: Fixed return types in threads.ts and resolved unused variables in storage.ts.
  • Context: Cleaned up thread-context.tsx by properly handling unused variables and suppressing necessary Fast Refresh warnings for exported hooks.
  • Config: Fixed lint errors in electron.vite.config.ts.

Related Issue

Fixes #36

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Refactoring (no functional changes)

Checklist

  • I have read the Contributing Guide
  • I have tested my changes locally
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

Additional Notes

This fixes the lint error in #17 pull request. 👍

- Add gemini-3-flash-preview and gemini-2.5-* context limits to ContextUsageIndicator.
- Refactor WorkspacePicker to move selectWorkspaceFolder to lib/workspace-utils.ts to resolve React Fast Refresh warnings.
- Fix missing explicit return types in ChatContainer, ModelSwitcher, ApiKeyDialog, MessageBubble, 	hreads.ts, and various Tab components.
- Fix unused variable warnings in storage.ts and 	hread-context.tsx.
- Fix import errors and ensure clean linting state across the renderer and main process.
Copy link
Copy Markdown
Member

@hntrl Hunter Lovell (hntrl) left a comment

Choose a reason for hiding this comment

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

Thanks for the PR!

@hntrl
Copy link
Copy Markdown
Member

Merging with a failing build -- won't release until we merge build + format fixes across the whole stack.

@hntrl Hunter Lovell (hntrl) merged commit 3fdbc50 into langchain-ai:main Jan 19, 2026
0 of 4 checks passed
@Dhineshkumaran
Copy link
Copy Markdown
Contributor Author

Thanks for the update!
Happy to help with the build or formatting fixes if needed — let me know 👍

Sergio Masellis (sergiomasellis) pushed a commit to sergiomasellis/openwork that referenced this pull request Jan 19, 2026
feat: add gemini-3-flash support and comprehensive lint fixes
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.

Feature: Add Gemini 3 Support and Comprehensive Lint Cleanup

2 participants