FluidVoice icon indicating copy to clipboard operation
FluidVoice copied to clipboard

Smooth bottom overlay hotkey-release animation

Open grohith327 opened this issue 8 months ago β€’ 1 comments

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

grohith327 avatar Mar 22 '26 18:03 grohith327

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.py
  • src/open_llm_vtuber/agent/stateless_llm/openai_compatible_llm.py
  • src/open_llm_vtuber/agent/stateless_llm_factory.py
  • src/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 think flag, so neat and so small, Controls the deep reasoning behind the curtain wall. extra_body travels 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.

❀️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

coderabbitai[bot] avatar Jun 15 '26 20:06 coderabbitai[bot]

Thanks for the review!

Won't fix:

  • Rename think to enable_thinking: think matches Ollama's own API parameter name ("think": false in 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, debug vs enable_proxy, use_cuda), so there's no strong precedent either way.

  • dict | None β†’ Mapping[str, Any] | None + shallow copy: The only caller is OllamaLLM.__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_body when not None: The OpenAI Python SDK handles extra_body=None as a no-op. Adding a conditional wrapper doesn't change behavior.

yuuhikaze avatar Jun 16 '26 13:06 yuuhikaze