Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(webview): relocate model selector #7288

Open
wants to merge 3 commits into
base: bee/mode-selector
Choose a base branch
from

Conversation

abeatrix
Copy link
Contributor

@abeatrix abeatrix commented Mar 1, 2025

This commit moves the model selection dropdown from the chat editor toolbar to the tab bar for better visibility and accessibility. It also simplifies the logic for determining the "new chat" command.

The changes include:

- Moving the `ModelSelectField` component from `vscode/webviews/chat/cells/messageCell/human/editor/toolbar/Toolbar.tsx` to `vscode/webviews/tabs/TabsBar.tsx`.
- Adding the `models` prop to the `TabsBar` component to pass available models to the `ModelSelectField`.
- Removing the `ModelSelectFieldToolbarItem` component.
- Adjusting the layout of the `TabsBar` to accommodate the new model selection dropdown.
- Simplifying the `getCreateNewChatCommand` function in `vscode/webviews/tabs/utils.ts` to always use `cody.chat.newPanel` instead of `cody.chat.newEditorPanel`.
- Adding a tooltip to the "New Chat" button in the tab bar.
@abeatrix abeatrix changed the base branch from main to bee/mode-selector March 1, 2025 01:59
@julialeex julialeex marked this pull request as ready for review March 1, 2025 18:38
@julialeex julialeex requested review from alexromano, julialeex and a team March 1, 2025 18:39
@alexromano
Copy link
Contributor

it definitely looks cleaner! but will take some getting used to i think. can we:

  • bold the text
  • can we have a keyboard shortcut to open the model menu? if so, let's try ⌘ + ⌥ + /
  • on hover, show the keyboard shortcut like "Select a model (⌘⌥/)"

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.

3 participants