[PR #35] [MERGED] feat: add gemini-3-flash support and comprehensive lint fixes #43

Closed
opened 2026-02-16 09:17:53 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langchain-ai/openwork/pull/35
Author: @Dhineshkumaran
Created: 1/18/2026
Status: Merged
Merged: 1/19/2026
Merged by: @hntrl

Base: mainHead: main


📝 Commits (1)

  • 29751fa feat: add gemini-3-flash support and comprehensive lint fixes

📊 Changes

24 files changed (+185 additions, -177 deletions)

View changed files

📝 bin/cli.js (+1 -0)
📝 electron.vite.config.ts (+2 -2)
📝 src/main/ipc/threads.ts (+2 -2)
📝 src/main/storage.ts (+1 -1)
📝 src/renderer/src/components/chat/ApiKeyDialog.tsx (+6 -6)
📝 src/renderer/src/components/chat/ChatContainer.tsx (+9 -8)
📝 src/renderer/src/components/chat/ContextUsageIndicator.tsx (+10 -5)
📝 src/renderer/src/components/chat/MessageBubble.tsx (+4 -4)
📝 src/renderer/src/components/chat/ModelSwitcher.tsx (+25 -34)
📝 src/renderer/src/components/chat/StreamingMarkdown.tsx (+1 -1)
📝 src/renderer/src/components/chat/ToolCallRenderer.tsx (+26 -26)
📝 src/renderer/src/components/chat/WorkspacePicker.tsx (+2 -27)
📝 src/renderer/src/components/settings/SettingsDialog.tsx (+5 -5)
📝 src/renderer/src/components/tabs/BinaryFileViewer.tsx (+3 -3)
📝 src/renderer/src/components/tabs/FileViewer.tsx (+11 -11)
📝 src/renderer/src/components/tabs/ImageViewer.tsx (+28 -24)
📝 src/renderer/src/components/tabs/MediaViewer.tsx (+1 -1)
📝 src/renderer/src/components/tabs/PDFViewer.tsx (+3 -3)
📝 src/renderer/src/components/tabs/TabBar.tsx (+5 -5)
📝 src/renderer/src/components/tabs/TabbedPanel.tsx (+1 -1)

...and 4 more files

📄 Description

  • 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

Lint Fixes (ESLint Cleanup)

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

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. 👍


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langchain-ai/openwork/pull/35 **Author:** [@Dhineshkumaran](https://github.com/Dhineshkumaran) **Created:** 1/18/2026 **Status:** ✅ Merged **Merged:** 1/19/2026 **Merged by:** [@hntrl](https://github.com/hntrl) **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (1) - [`29751fa`](https://github.com/langchain-ai/openwork/commit/29751fa966352b1f58162bc64362b4313732ca00) feat: add gemini-3-flash support and comprehensive lint fixes ### 📊 Changes **24 files changed** (+185 additions, -177 deletions) <details> <summary>View changed files</summary> 📝 `bin/cli.js` (+1 -0) 📝 `electron.vite.config.ts` (+2 -2) 📝 `src/main/ipc/threads.ts` (+2 -2) 📝 `src/main/storage.ts` (+1 -1) 📝 `src/renderer/src/components/chat/ApiKeyDialog.tsx` (+6 -6) 📝 `src/renderer/src/components/chat/ChatContainer.tsx` (+9 -8) 📝 `src/renderer/src/components/chat/ContextUsageIndicator.tsx` (+10 -5) 📝 `src/renderer/src/components/chat/MessageBubble.tsx` (+4 -4) 📝 `src/renderer/src/components/chat/ModelSwitcher.tsx` (+25 -34) 📝 `src/renderer/src/components/chat/StreamingMarkdown.tsx` (+1 -1) 📝 `src/renderer/src/components/chat/ToolCallRenderer.tsx` (+26 -26) 📝 `src/renderer/src/components/chat/WorkspacePicker.tsx` (+2 -27) 📝 `src/renderer/src/components/settings/SettingsDialog.tsx` (+5 -5) 📝 `src/renderer/src/components/tabs/BinaryFileViewer.tsx` (+3 -3) 📝 `src/renderer/src/components/tabs/FileViewer.tsx` (+11 -11) 📝 `src/renderer/src/components/tabs/ImageViewer.tsx` (+28 -24) 📝 `src/renderer/src/components/tabs/MediaViewer.tsx` (+1 -1) 📝 `src/renderer/src/components/tabs/PDFViewer.tsx` (+3 -3) 📝 `src/renderer/src/components/tabs/TabBar.tsx` (+5 -5) 📝 `src/renderer/src/components/tabs/TabbedPanel.tsx` (+1 -1) _...and 4 more files_ </details> ### 📄 Description - 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](cci:1://file:///c:/Users/gokul/Documents/openwork/src/renderer/src/components/chat/WorkspacePicker.tsx:16:0-114:1)**: Refactored logic to address a React Fast Refresh warning (`react-refresh/only-export-components`). The [selectWorkspaceFolder](cci:1://file:///c:/Users/gokul/Documents/openwork/src/renderer/src/lib/workspace-utils.ts:0:0-24:1) helper utility was moved to a separate file: [src/renderer/src/lib/workspace-utils.ts](cci:7://file:///c:/Users/gokul/Documents/openwork/src/renderer/src/lib/workspace-utils.ts:0:0-0:0). - **[ModelSwitcher](cci:1://file:///c:/Users/gokul/Documents/openwork/src/renderer/src/components/chat/ModelSwitcher.tsx:53:0-234:1)**: 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](cci:1://file:///c:/Users/gokul/Documents/openwork/src/renderer/src/components/chat/ChatContainer.tsx:32:0-415:1), [ModelSwitcher](cci:1://file:///c:/Users/gokul/Documents/openwork/src/renderer/src/components/chat/ModelSwitcher.tsx:53:0-234:1), [ApiKeyDialog](cci:1://file:///c:/Users/gokul/Documents/openwork/src/renderer/src/components/chat/ApiKeyDialog.tsx:26:0-157:1), [MessageBubble](cci:1://file:///c:/Users/gokul/Documents/openwork/src/renderer/src/components/chat/MessageBubble.tsx:19:0-152:1), and [ToolCallRenderer](cci:1://file:///c:/Users/gokul/Documents/openwork/src/renderer/src/components/chat/ToolCallRenderer.tsx:265:0-642:1). - **Tab Components**: Added return types to `ImageViewer`, `MediaViewer`, `PDFViewer`, `BinaryFileViewer`, and [TabBar](cci:1://file:///c:/Users/gokul/Documents/openwork/src/renderer/src/components/tabs/TabBar.tsx:10:0-55:1). - **Backend/IPC**: Fixed return types in [threads.ts](cci:7://file:///c:/Users/gokul/Documents/openwork/src/main/ipc/threads.ts:0:0-0:0) and resolved unused variables in [storage.ts](cci:7://file:///c:/Users/gokul/Documents/openwork/src/main/storage.ts:0:0-0:0). - **Context**: Cleaned up [thread-context.tsx](cci:7://file:///c:/Users/gokul/Documents/openwork/src/renderer/src/lib/thread-context.tsx:0:0-0:0) 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 - [x] 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 - [x] I have read the [Contributing Guide](CONTRIBUTING.md) - [x] I have tested my changes locally - [x] 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. 👍 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 09:17:53 -05:00
yindo closed this issue 2026-02-16 09:17:53 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/openwork#43