Smooth bottom overlay hotkey-release animation
Description
Smoothen the animation of the bottom overlay
Type of Change
- [x] π Bug fix (non-breaking change which fixes an issue)
- [ ] β¨ New feature (non-breaking change which adds functionality)
- [ ] π₯ Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] π Documentation update
Testing
- [x] Tested on Apple Silicon Mac
- [x] Tested on macOS 26.2
- [x] Ran linter locally:
swiftlint --strict --config .swiftlint.yml Sources - [x] Ran formatter locally:
swiftformat --config .swiftformat Sources
Screenshots / Video
https://drive.google.com/file/d/1BLZ0QM7V-ETxc6Otd5CbAPLWtx3GSBm6/view?usp=sharing
No actionable comments were generated in the recent review. π
βΉοΈ Recent review info
βοΈ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 438e6a6b-c54c-44c9-a269-7b23702d5c73
π₯ Commits
Reviewing files that changed from the base of the PR and between 992309c0aa19845960228f880013d4685fde93b5 and 70c5026cf1890ff1c2fe1556fcd9aca5de0444ef.
π Files selected for processing (4)
src/open_llm_vtuber/agent/stateless_llm/ollama_llm.pysrc/open_llm_vtuber/agent/stateless_llm/openai_compatible_llm.pysrc/open_llm_vtuber/agent/stateless_llm_factory.pysrc/open_llm_vtuber/config_manager/stateless_llm.py
π Walkthrough
Walkthrough
Adds a think boolean option to Ollama's configuration and LLM class to toggle the <think> extended reasoning feature. The base AsyncLLM class gains an extra_body parameter forwarded in every chat.completions.create call, which OllamaLLM uses to set think: False when disabled. The factory and config model are updated accordingly.
Changes
Ollama think option via extra_body
| Layer / File(s) | Summary |
|---|---|
AsyncLLM extra_body support src/open_llm_vtuber/agent/stateless_llm/openai_compatible_llm.py |
Adds optional extra_body: dict | None = None parameter to AsyncLLM.__init__, stores it on the instance, and passes extra_body=self.extra_body into the streaming chat.completions.create(...) call. |
think option: config, OllamaLLM, and factory wiring src/open_llm_vtuber/config_manager/stateless_llm.py, src/open_llm_vtuber/agent/stateless_llm/ollama_llm.py, src/open_llm_vtuber/agent/stateless_llm_factory.py |
OllamaConfig gains a think: bool = True Pydantic field with description metadata. OllamaLLM.__init__ accepts think, conditionally builds extra_body = {"think": False}, and forwards it to super().__init__. LLMFactory.create_llm passes think from kwargs (defaulting True) when constructing OllamaLLM. |
Estimated code review effort
π― 2 (Simple) | β±οΈ ~10 minutes
Poem
π° A little
thinkflag, so neat and so small, Controls the deep reasoning behind the curtain wall.extra_bodytravels from config to call, One boolean to toggle the thoughts of them all. Hop hop! The rabbit approves of it all. π
π₯ Pre-merge checks | β 4 | β 1
β Failed checks (1 warning)
| Check name | Status | Explanation | Resolution |
|---|---|---|---|
| Docstring Coverage | β οΈ Warning | Docstring coverage is 75.00% which is insufficient. The required threshold is 80.00%. | Write docstrings for the functions missing them to satisfy the coverage threshold. |
β Passed checks (4 passed)
| Check name | Status | Explanation |
|---|---|---|
| Description Check | β Passed | Check skipped - CodeRabbitβs high-level summary is enabled. |
| Title check | β Passed | The title 'feat(ollama): add think toggle and extra_body support' accurately summarizes the main changes: adding a think toggle for Ollama models and implementing extra_body support for provider-specific parameters. |
| Linked Issues check | β Passed | Check skipped because no linked issues were found for this pull request. |
| Out of Scope Changes check | β Passed | Check skipped because no linked issues were found for this pull request. |
βοΈ Tip: You can configure your own custom pre-merge checks in the settings.
β¨ Finishing Touches
π§ͺ Generate unit tests (beta)
- [ ] Create PR with unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands and usage tips.
Thanks for the review!
Won't fix:
-
Rename
thinktoenable_thinking:thinkmatches Ollama's own API parameter name ("think": falsein the request body). Renaming it would create a mismatch between the config and what's actually sent to the API. Users familiar with Ollama will recognize the field immediately. The codebase has mixed conventions for boolean names anyway (stream,debugvsenable_proxy,use_cuda), so there's no strong precedent either way. -
dict | NoneβMapping[str, Any] | None+ shallow copy: The only caller isOllamaLLM.__init__, which creates a fresh local dict, populates it, and passes it in β no external code holds a reference to it, so mutation risk is zero. A defensive copy would protect against a scenario that can't happen here. -
Only pass
extra_bodywhen notNone: The OpenAI Python SDK handlesextra_body=Noneas a no-op. Adding a conditional wrapper doesn't change behavior.