Skip to content

Feat/opiton recorder#802

Merged
yukieiji merged 3 commits into
feature/setting-web-uifrom
feat/opiton-recorder
Mar 8, 2026
Merged

Feat/opiton recorder#802
yukieiji merged 3 commits into
feature/setting-web-uifrom
feat/opiton-recorder

Conversation

@yukieiji

@yukieiji yukieiji commented Mar 8, 2026

Copy link
Copy Markdown
Owner

API返すようにオプションレコーダーを追加

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

このプルリクエストは、APIを通じてオプションの変更をより効果的に追跡し、クライアントに報告するための新しいオプション更新レコーダーシステムを導入します。これにより、オプションの更新がより透過的になり、APIの応答性が向上し、関連するコードベースの冗長性が削減されます。

Highlights

  • 新しいオプション更新レコーダーの導入: OptionUpdateRecorderクラスが追加され、オプションの変更を記録し、APIレスポンスでこれらの変更を返す機能を提供します。
  • APIレスポンスの強化: PutAuOptionPutExROptionのAPIハンドラーが、更新されたオプションのリストをAPIレスポンスに含めるように変更されました。
  • オプション選択ロジックの合理化: SequentialOptionCategoryFactoryFlexibleCombinationRoleManagerBaseHatterクラスから、動的オプションの選択を再設定する冗長なコードが削除されました。これは、新しいレコーダーが変更を追跡するため、手動での再設定が不要になったことを示唆しています。
  • 役割IDオフセットの調整: ExtremeRoleManagerで役割カテゴリIDと組み合わせ役割グループIDのオフセットが更新されました。
Changelog
  • ExtremeRoles/Module/ApiHandler/GetExROption.cs
    • createOptionDTOメソッドをCreateOptionDtoにリファクタリングし、可視性をpublic staticに変更しました。
  • ExtremeRoles/Module/ApiHandler/PutAuOption.cs
    • オプション更新レコーダーを統合し、APIレスポンスに更新されたオプションのリストを含めるようにしました。
  • ExtremeRoles/Module/ApiHandler/PutExROption.cs
    • プリセットオプションの処理を改善し、オプション更新レコーダーを使用して更新されたオプションの詳細をAPIレスポンスで返します。
  • ExtremeRoles/Module/CustomOption/Factory/SequentialOptionCategoryFactory.cs
    • 動的オプションのSelectionを再設定する冗長なコードを削除しました。
  • ExtremeRoles/Module/CustomOption/Implemented/CustomOption.cs
    • CustomOptionのコンストラクタでOptionUpdateRecorderにオプションを登録するようにしました。
  • ExtremeRoles/Module/CustomOption/OptionUpdateRecorder.cs
    • オプションの変更を記録するためのOptionUpdateRecorderクラスとRecordResultクラスを新規追加しました。
  • ExtremeRoles/Roles/API/FlexibleCombinationRoleManagerBase.cs
    • 役割割り当て数設定のSelectionを再設定する冗長なコードを削除しました。
  • ExtremeRoles/Roles/ExtremeRoleManager.cs
    • 役割カテゴリIDと組み合わせ役割グループIDのオフセット定数を更新しました。
  • ExtremeRoles/Roles/Solo/Neutral/Hatter.cs
    • Hatterの役割のオプション範囲のSelectionを再設定する冗長なコードを削除しました。
Activity
  • このプルリクエストには、現在記録されているアクティビティはありません。
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.


オプションは変わり、 レコーダーがそれを追う。 APIは語る、 何が新しくなったか。

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

このプルリクエストでは、オプションの変更を記録し、API経由で更新されたオプションを返すためのOptionUpdateRecorderが追加されています。全体的に、usingディレクティブの整理や不要なコードの削除など、優れたリファクタリングが含まれており、コードの品質が向上しています。1点、複数のファイルでコードが重複している箇所があり、これを共通のヘルパーメソッドにまとめることで、さらに可読性と保守性を高めることができると考えます。

Comment on lines +66 to +70
recordResult.Result.Select(x =>
{
var registered = new HashSet<int>();
return GetExrOption.CreateOptionDto(x, registered);
}).ToList()));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

low

このLINQクエリは PutAuOption.cs の110-114行目にも同じものがあり、コードが重複しています。保守性と可読性を向上させるために、このロジックを GetExrOption クラスに新しい static メソッドとして抽出することをお勧めします。

例えば、以下のようにリファクタリングできます。

// In GetExrOption.cs
public static IReadOnlyList<ExROptionDto> CreateOptionDtos(IReadOnlyList<IOption> options)
{
    return options.Select(x =>
    {
        var registered = new HashSet<int>();
        return CreateOptionDto(x, registered);
    }).ToList();
}

// In PutExROption.cs and PutAuOption.cs
var chainUpdatedOptions = GetExrOption.CreateOptionDtos(recordResult.Result);
References
  1. スタイルガイドでは、コードの可読性と柔軟性を重視することが推奨されています。コードの重複を排除し、共通のロジックをヘルパーメソッドにまとめることは、これらの原則に合致し、コードをより簡潔で変更しやすくします。 (link)

@yukieiji yukieiji merged commit 42b9d56 into feature/setting-web-ui Mar 8, 2026
4 checks passed
@yukieiji yukieiji deleted the feat/opiton-recorder branch March 8, 2026 10:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant