Skip to content

Move AI model configs to presets and add a dropdown to swap between configs#1024

Merged
esimkowitz merged 12 commits into
mainfrom
evan/model-switching
Oct 12, 2024
Merged

Move AI model configs to presets and add a dropdown to swap between configs#1024
esimkowitz merged 12 commits into
mainfrom
evan/model-switching

Conversation

@esimkowitz
Copy link
Copy Markdown
Contributor

@esimkowitz esimkowitz commented Oct 11, 2024

Adds the ability to specify multiple AI configs using the presets.json file and adds a new UI dropdown to switch between model configs. Will move to a separate ai-presets.json file later. To use the existing config from settings.json, use the "Global Default" preset

Updates the Menu component to use the floating-ui library, which provides some really nice primitives for floating overlays.

Also fixes useDimensions to better handle null refs.

Screen.Recording.2024-10-12.at.5.28.47.PM.mov

closes #945

@esimkowitz esimkowitz marked this pull request as ready for review October 12, 2024 16:27
@esimkowitz
Copy link
Copy Markdown
Contributor Author

esimkowitz commented Oct 12, 2024

  • TODO: reintroduce the settings compatibility and use UpdateMetaObject to apply the presets

@esimkowitz esimkowitz merged commit 0b88fa5 into main Oct 12, 2024
@esimkowitz esimkowitz deleted the evan/model-switching branch October 12, 2024 22:40
@C0sm0cats
Copy link
Copy Markdown

Hello
When opening multiple AI windows, the labels in the title (e.g., "global Default") accumulate additional values (e.g., "gpt-4o-mini"). This seems to be related to the logic of recalculating the presetMap, which is executed each time the map is recalculated.

The function that modifies the display:name of presets is called every time the presetMap is recalculated, leading to additional labels in the title. The current conditions for determining the display:name do not appear to be strict enough, allowing values to accumulate.

cosmo
Manjaro user

@esimkowitz
Copy link
Copy Markdown
Contributor Author

Haha whoops, will fix

xxyy2024 pushed a commit to xxyy2024/waveterm_aipy that referenced this pull request Jun 24, 2025
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 a toggle to switch between the default AI handler and a custom setup

2 participants