Skip to content

Conversation

@tegnike
Copy link
Owner

@tegnike tegnike commented Jun 4, 2025

概要

マルチモーダルモデルに関係なく画面共有とカメラ共有を利用できるようにする改善。

変更内容

  • 画面共有・カメラ共有ボタンをデフォルトで表示
  • AI設定に「マルチモーダルモデルで画像を自動送信」トグルを追加
  • 画像アップロードボタンはマルチモーダルモデル時のみ表示(既存仕様維持)
  • 自動画像送信はトグル設定とマルチモーダルモデル判定に基づいて制御

Fixes #340

🤖 Generated with Claude Code

Summary by CodeRabbit

  • 新機能

    • マルチモーダルモデル利用時に、画面共有やカメラが有効な場合、画像を自動送信する設定を追加しました。
    • 設定画面に自動画像送信のオン・オフ切替トグルを追加しました。
  • UIの改善

    • 画面共有・カメラボタンが、AIモデルに関わらず表示されるようになりました(画像アップロードボタンはマルチモーダルモデル時のみ表示)。
  • 翻訳

    • 英語・日本語のローカライズに自動画像送信設定の説明文を追加しました。

tegnike and others added 2 commits June 3, 2025 09:20
- 画面共有・カメラ共有ボタンをデフォルトで表示
- AI設定に「マルチモーダルモデルで画像を自動送信」トグルを追加
- 画像アップロードボタンはマルチモーダルモデル時のみ表示(既存仕様維持)
- 自動画像送信はトグル設定とマルチモーダルモデル判定に基づいて制御

Fixes #340

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: tegnike <tegnike@users.noreply.github.com>
@vercel
Copy link

vercel bot commented Jun 4, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
aituber-kit ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 4, 2025 5:08pm

@coderabbitai
Copy link

coderabbitai bot commented Jun 4, 2025

Walkthrough

マルチモーダルモデル利用時の画像自動送信に関する新しい設定が追加されました。設定ストア、UI(設定画面)、フォーム処理、メニューのボタン表示ロジック、ローカライズファイル(英語・日本語)に変更が加えられています。

Changes

ファイル群 変更内容の概要
locales/en/translation.json
locales/ja/translation.json
画像自動送信設定のラベルと説明文の翻訳キーを追加
src/features/stores/settings.ts autoSendImagesInMultiModalブール型プロパティをGeneralインターフェースに追加し、ストアに初期化・永続化処理を実装
src/components/settings/modelProvider.tsx 設定画面に自動画像送信ON/OFFトグルUIを追加し、ストアの値を反映・更新。AIサービス・モデル変更時に非マルチモーダルモデルなら自動OFFにリセット
src/components/form.tsx フォーム送信時、設定とAIモデル種別に応じて画像キャプチャ・送信の制御ロジックを追加。マルチモーダルかつ自動送信ONなら画像キャプチャ後に送信
src/components/menu.tsx 画面共有・カメラボタンを常時表示(youtubeMode時以外)、画像アップロードボタンはマルチモーダル時のみ表示にロジックを分離

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant SettingsPanel
    participant SettingsStore
    participant Form
    participant AIModel

    User->>SettingsPanel: 「画像自動送信」トグルを操作
    SettingsPanel->>SettingsStore: autoSendImagesInMultiModal を更新

    User->>Form: メッセージ送信
    Form->>SettingsStore: autoSendImagesInMultiModal, AIモデル設定を参照
    alt autoSendImagesInMultiModal有効 & マルチモーダル & 画像共有中
        Form->>Form: 画像キャプチャ
        Form->>AIModel: 画像+テキスト送信
    else
        Form->>AIModel: テキストのみ送信
    end
Loading

Assessment against linked issues

Objective Addressed Explanation
画面共有・カメラ共有ボタンをデフォルトで表示する (#340)
マルチモーダル時のみ画像アップロードボタンを表示し、ON/OFF設定に関わらず利用可能にする (#340)
マルチモーダル時の画像自動送信ON/OFF設定をAI設定画面に追加する (#340)

Assessment against linked issues: Out-of-scope changes

(該当なし)

Possibly related PRs

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

npm error Exit handler never called!
npm error This is an error with npm itself. Please report this error at:
npm error https://github.com/npm/cli/issues
npm error A complete log of this run can be found in: /.npm/_logs/2025-06-04T17_08_37_358Z-debug-0.log


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1bb211a and 87ffa22.

📒 Files selected for processing (2)
  • src/components/form.tsx (3 hunks)
  • src/components/settings/modelProvider.tsx (17 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/components/form.tsx
  • src/components/settings/modelProvider.tsx
✨ Finishing Touches
  • 📝 Generate Docstrings

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@tegnike tegnike changed the base branch from main to develop June 4, 2025 16:41
@tegnike
Copy link
Owner Author

tegnike commented Jun 4, 2025

@claude
追加で以下を対応してください

  • マルチモーダルモデルを選択していないときは「マルチモーダルモデルで画像を自動送信」トグルをdisabledに
  • マルチモーダルモデルでないモデルを選択したときは「マルチモーダルモデルで画像を自動送信」トグルを自動的にオフに

@claude
Copy link
Contributor

claude bot commented Jun 4, 2025

Claude finished @tegnike's task in 5m 25s —— View job


完了 ✅

マルチモーダルモデル設定の追加改善を実装しました。

タスクリスト:

  • 現在の実装を確認(設定ストア、UI コンポーネント)
  • マルチモーダルモデル判定ロジックを理解
  • トグルのdisabled状態ロジックを実装
  • 非マルチモーダルモデル選択時の自動オフロジックを実装
  • 変更をコミット

実装内容:

  1. AIサービス変更時の自動オフ: handleAIServiceChangeで非マルチモーダルモデルが選択された場合、autoSendImagesInMultiModalfalseに設定
  2. モデル変更時の自動オフ: すべてのモデル選択ハンドラーで、非マルチモーダルモデルが選択された場合にトグルを自動的にオフに設定
  3. トグルのdisabled状態: TextButtondisabled={!isMultiModalModel(selectAIService, selectAIModel)}を追加

対象AI サービス:

  • OpenAI (通常、Realtime API、Audio API)
  • Anthropic、Google、xAI、Groq、Cohere、Mistral AI、Perplexity、Fireworks、DeepSeek

特殊対応:

  • LMStudio、Ollama、OpenRouter: 動的にモデル名を入力するため、マルチモーダル判定ができないので自動オフ機能は適用せず

これで、マルチモーダルモデルを選択していない時は「マルチモーダルモデルで画像を自動送信」トグルがdisabledになり、非マルチモーダルモデルを選択した際は自動的にオフになります。


Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9ed2c24 and 534dff8.

📒 Files selected for processing (6)
  • locales/en/translation.json (1 hunks)
  • locales/ja/translation.json (1 hunks)
  • src/components/form.tsx (3 hunks)
  • src/components/menu.tsx (2 hunks)
  • src/components/settings/modelProvider.tsx (2 hunks)
  • src/features/stores/settings.ts (3 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (3)
src/components/settings/modelProvider.tsx (1)
src/components/textButton.tsx (1)
  • TextButton (4-13)
src/components/menu.tsx (3)
src/components/iconButton.tsx (1)
  • IconButton (14-51)
src/features/constants/aiModels.ts (1)
  • isMultiModalModel (264-266)
src/features/constants/settings.ts (1)
  • AIService (63-63)
src/components/form.tsx (2)
src/features/constants/aiModels.ts (1)
  • isMultiModalModel (264-266)
src/features/constants/settings.ts (1)
  • AIService (63-63)
🪛 GitHub Actions: Lint and Format
src/components/settings/modelProvider.tsx

[error] 98-98: Prettier formatting error: Replace (s) => s.autoSendImagesInMultiModal with a multiline format. (prettier/prettier)


[error] 1351-1351: Prettier formatting error: Replace {t('AutoSendImagesInMultiModalDescription')} with a multiline format. (prettier/prettier)

src/components/form.tsx

[error] 21-21: Prettier formatting error: Replace (s) => s.autoSendImagesInMultiModal with a multiline format. (prettier/prettier)


[error] 38-38: Prettier formatting error: Replace autoSendImagesInMultiModal && with a multiline format. (prettier/prettier)


[error] 40-40: Prettier formatting error: Delete extra indentation. (prettier/prettier)


[error] 54-54: Prettier formatting error: Replace multiple props list with multiline format. (prettier/prettier)

🪛 GitHub Actions: Run Tests
src/components/settings/modelProvider.tsx

[error] 98-98: Prettier formatting error: Replace (s) => s.autoSendImagesInMultiModal with a multiline format.


[error] 1351-1351: Prettier formatting error: Replace {t('AutoSendImagesInMultiModalDescription')} with a multiline format.

src/components/form.tsx

[error] 21-21: Prettier formatting error: Replace (s) => s.autoSendImagesInMultiModal with a multiline format.


[error] 38-38: Prettier formatting error: Replace autoSendImagesInMultiModal && with a multiline format.


[error] 40-40: Prettier formatting error: Delete extra indentation.


[error] 54-54: Prettier formatting error: Replace long parameter list with multiline format.

🔇 Additional comments (9)
src/features/stores/settings.ts (3)

191-191: LGTM! 新しい設定プロパティが適切に追加されています。

プロパティ名が機能を明確に表現しており、型定義も適切です。


442-443: LGTM! 環境変数からのデフォルト値設定が適切です。

環境変数のロジックが他のboolean設定と一貫性があり、デフォルトでtrueになることでユーザビリティが向上します。


623-623: LGTM! 永続化設定が適切に追加されています。

ユーザーの設定選択が適切に保存され、ブラウザのリロード後も維持されます。

locales/en/translation.json (1)

225-226: LGTM! 英語の翻訳が適切に追加されています。

キー名が明確で、翻訳文も機能を正確に説明しています。

locales/ja/translation.json (1)

227-228: LGTM! 日本語の翻訳が適切に追加されています。

自然な日本語で機能が正確に説明されており、英語版と意味が一致しています。

src/components/menu.tsx (1)

232-278: 条件分岐ロジックの改善が適切に実装されています

画面共有とWebカメラボタンをマルチモーダルモデルから分離する変更が正しく実装されています。これにより、YouTubeモード以外では常にこれらの機能が利用可能になり、画像アップロードボタンのみがマルチモーダルモデル専用として残されています。PR目標に完全に合致した実装です。

src/components/form.tsx (3)

10-11: 新しいインポートが適切に追加されています

マルチモーダルモデル判定とAIサービス型定義のインポートが正しく追加され、新機能の実装に必要な依存関係が適切に管理されています。


21-23: 設定ストアからの状態取得ロジックが正しく実装されています

自動画像送信設定とAIサービス・モデル選択の状態取得が適切に実装されています。これにより条件分岐での適切な判定が可能になります。

🧰 Tools
🪛 GitHub Actions: Lint and Format

[error] 21-21: Prettier formatting error: Replace (s) => s.autoSendImagesInMultiModal with a multiline format. (prettier/prettier)

🪛 GitHub Actions: Run Tests

[error] 21-21: Prettier formatting error: Replace (s) => s.autoSendImagesInMultiModal with a multiline format.


37-52: 条件付き画像送信ロジックが正しく実装されています

マルチモーダルモデルと自動送信設定に基づく条件分岐ロジックが適切に実装されています。画像キャプチャが必要な場合のみ遅延送信を行い、それ以外は即座に送信する仕組みが正しく動作します。

🧰 Tools
🪛 GitHub Actions: Lint and Format

[error] 38-38: Prettier formatting error: Replace autoSendImagesInMultiModal && with a multiline format. (prettier/prettier)


[error] 40-40: Prettier formatting error: Delete extra indentation. (prettier/prettier)

🪛 GitHub Actions: Run Tests

[error] 38-38: Prettier formatting error: Replace autoSendImagesInMultiModal && with a multiline format.


[error] 40-40: Prettier formatting error: Delete extra indentation.

- Disable toggle when non-multimodal model is selected
- Auto-turn off toggle when switching from multimodal to non-multimodal model
- Apply to all AI service model selection handlers
- Skip auto-disable for LMStudio/Ollama/OpenRouter (dynamic model input)

Co-authored-by: tegnike <tegnike@users.noreply.github.com>
Co-Authored-By: nikechan <o3nike.teg.14@gmail.com>
@tegnike tegnike merged commit 49abe4a into develop Jun 4, 2025
5 checks passed
@tegnike tegnike deleted the claude/issue-340-20250604_142811 branch June 4, 2025 19:15
terisuke pushed a commit to terisuke/aituber-kit that referenced this pull request Dec 5, 2025
…_142811

feat: 画面共有とカメラ共有をマルチモーダルモデルに関係なく利用可能に
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.

マルチモーダルモデルにかかわらず画面共有できるようにする

2 participants