Skip to content

Update LLM configuration and fix island task cold start issues#390

Merged
wess09 merged 2 commits into
masterfrom
dev
Jun 25, 2026
Merged

Update LLM configuration and fix island task cold start issues#390
wess09 merged 2 commits into
masterfrom
dev

Conversation

@wess09

@wess09 wess09 commented Jun 25, 2026

Copy link
Copy Markdown
Owner

由 Sourcery 提供的摘要

优化海岛餐厅的季节菜品处理方式,改进海岛任务 UI 初始化以减少冷启动问题,并加强 LLM 错误分析的配置与响应逻辑。

新功能:

  • 支持可配置的餐厅季节菜品集合,包含优先级处理和商店商品的自动填充。

错误修复:

  • 确保海岛珍珠出售、每日订单、货物准备、每日互动、农场和牧场任务在运行前正确初始化海岛 UI,避免冷启动导致的失败。
  • 处理 LLM API 返回空结果或配置错误的情况,防止出现陈旧或误导性的缓存分析结果。

增强改进:

  • 将海岛餐厅季节菜品配置重构为可复用的映射结构,具备更清晰的优先级逻辑和更灵活的选择处理。
  • 改进 LLM 错误分析的日志消息和默认配置,包括更安全的默认 API 密钥、基础 URL 和模型设置。
Original summary in English

Summary by Sourcery

Refine island restaurant seasonal dish handling, improve island task UI initialization to reduce cold-start issues, and harden LLM error-analysis configuration and responses.

New Features:

  • Support a configurable set of seasonal restaurant dishes with priority handling and automatic shop-item population.

Bug Fixes:

  • Ensure island pearl selling, daily orders, cargo preparation, daily interactions, farm, and rancher tasks correctly initialize the island UI before running to avoid cold-start failures.
  • Handle cases where the LLM API returns empty results or is misconfigured, preventing stale or misleading cached analyses.

Enhancements:

  • Refactor island restaurant seasonal dish configuration into reusable mappings with clearer priority logic and more flexible selection handling.
  • Improve LLM error-analysis logging messages and configuration defaults, including safer default API key, base URL, and model settings.

wess09 and others added 2 commits June 24, 2026 12:49
* fix(island): 修正季节餐优先制作开关语义

- 将有鱼餐馆双笋开关调整为季节餐优先制作总开关

- 按当前季节动态注册餐馆季节餐,避免跨季节识别非当前季节餐品

- 更新有鱼餐馆与白熊饮品季节优先制作配置翻译

* fix(island): 修复岛屿任务冷启动卡死

- 每日互动、珍珠售卖、每日订单、货运筹备入口先进入岛屿页面检查链

- 农场、牧场在读取仓库前先走 ui_ensure,避免游戏未启动时直接 ui_goto 卡住

- 复用 ui_get_current_page 的 app_check 和上层 Restart 恢复逻辑,不新增业务侧运行检查
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@wess09 wess09 merged commit ac8c670 into master Jun 25, 2026
7 checks passed

@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

This pull request updates LLM configurations, refactors seasonal dish and drink prioritization in the island restaurant module (including i18n updates), and ensures the correct island page state across various island tasks. Feedback on the changes highlights two key issues: first, popping the error hash from the cache on LLM analysis failure can cause redundant API retries and log spam; second, a potential bug in the restaurant's product selection logic could trigger unintended clicks if both the product selection and normal selection are None.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread module/llm.py
Comment on lines 128 to +135
except ImportError:
logger.error('未安装 openai 库。请运行: pip install openai')
_analyzed_errors_cache.pop(error_hash, None)
logger.error('未安装 openai 库,无法进行 LLM 错误分析。')
except Exception as ex:
_analyzed_errors_cache.pop(error_hash, None)
# 避免循环日志问题,LLM 本身失败时使用简化的错误日志
logger.error(f'LLM 分析调用失败(严禁提交此模块的相关日志 群内机器人检测到将自动移出群聊): {ex}')
logger.warning(LLM_CONFIG_WARNING)

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.

high

Popping error_hash from _analyzed_errors_cache on failure will cause subsequent occurrences of the same error to trigger the LLM API call again. If the failure is due to a persistent issue (e.g., invalid API key, network issues, or missing openai library), this can lead to repeated slow API calls, potential application lag, and log spam. Consider caching the failure state (e.g., setting the cache value to a failure message) instead of removing the hash, to prevent redundant retries.

Suggested change
except ImportError:
logger.error('未安装 openai 库。请运行: pip install openai')
_analyzed_errors_cache.pop(error_hash, None)
logger.error('未安装 openai 库,无法进行 LLM 错误分析。')
except Exception as ex:
_analyzed_errors_cache.pop(error_hash, None)
# 避免循环日志问题,LLM 本身失败时使用简化的错误日志
logger.error(f'LLM 分析调用失败(严禁提交此模块的相关日志 群内机器人检测到将自动移出群聊): {ex}')
logger.warning(LLM_CONFIG_WARNING)
except ImportError:
_analyzed_errors_cache[error_hash] = '未安装 openai 库,无法进行 LLM 错误分析。'
logger.error('未安装 openai 库,无法进行 LLM 错误分析。')
except Exception as ex:
_analyzed_errors_cache[error_hash] = f'LLM 分析调用失败: {ex}'
# 避免循环日志问题,LLM 本身失败时使用简化的错误日志
logger.error(f'LLM 分析调用失败(严禁提交此模块的相关日志 群内机器人检测到将自动移出群聊): {ex}')
logger.warning(LLM_CONFIG_WARNING)

Comment on lines +215 to +222
if self.seasonal_dish_slot:
dish_name = self.seasonal_dish_slot['name']
fixed_selection = self.seasonal_dish_slot['selection']
normal_selection = self.name_to_config.get(dish_name, {}).get('selection')
if product_selection in (fixed_selection, normal_selection):
self.device.click(FIXED_SELECT_DOUBLE_BAMBOO_SHOOTS)
self.device.sleep(0.5)
return True

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.

medium

If product_selection is None and normal_selection is also None (which can happen if dish_name is not found in name_to_config), the membership check product_selection in (fixed_selection, normal_selection) will evaluate to True because None in (fixed_selection, None) is True. This will cause an unintended click on FIXED_SELECT_DOUBLE_BAMBOO_SHOOTS. Adding a None check for product_selection prevents this issue.

Suggested change
if self.seasonal_dish_slot:
dish_name = self.seasonal_dish_slot['name']
fixed_selection = self.seasonal_dish_slot['selection']
normal_selection = self.name_to_config.get(dish_name, {}).get('selection')
if product_selection in (fixed_selection, normal_selection):
self.device.click(FIXED_SELECT_DOUBLE_BAMBOO_SHOOTS)
self.device.sleep(0.5)
return True
if self.seasonal_dish_slot:
dish_name = self.seasonal_dish_slot['name']
fixed_selection = self.seasonal_dish_slot['selection']
normal_selection = self.name_to_config.get(dish_name, {}).get('selection')
if product_selection is not None and product_selection in (fixed_selection, normal_selection):
self.device.click(FIXED_SELECT_DOUBLE_BAMBOO_SHOOTS)
self.device.sleep(0.5)
return True

@sourcery-ai

sourcery-ai Bot commented Jun 25, 2026

Copy link
Copy Markdown

Reviewer's Guide

重构了岛屿餐厅的季节菜品处理逻辑,加固了 LLM 错误分析的配置与响应处理,更新了默认 LLM 配置值,并在多个岛屿任务中加入统一的 UI 预热步骤以避免冷启动问题。

Sequence diagram for LLM error analysis with improved config and response handling

sequenceDiagram
    participant Config
    participant LlmModule as module.llm
    participant OpenAIAPI as OpenAI_compatible_API
    participant Logger

    Config->>LlmModule: analyze_exception(config, e)
    LlmModule->>LlmModule: truncate(str(e), 4000)
    LlmModule->>LlmModule: hashlib.md5(...) -> error_hash
    LlmModule->>LlmModule: check _analyzed_errors_cache
    alt no api_key
        LlmModule->>Logger: warning(LLM 错误分析已启用,但 API Key 未配置。)
        LlmModule->>Logger: warning(LLM_CONFIG_WARNING)
        LlmModule-->>Config: return
    else api_key present
        LlmModule->>LlmModule: set _analyzed_errors_cache[error_hash]
        LlmModule->>Logger: hr/ info 调用 LLM 分析
        LlmModule->>OpenAIAPI: client.chat.completions.create(...)
        OpenAIAPI-->>LlmModule: response
        LlmModule->>LlmModule: _get_analysis_from_response(response)
        alt analysis empty
            LlmModule->>LlmModule: _analyzed_errors_cache.pop(error_hash)
            LlmModule->>Logger: warning(LLM_EMPTY_RESULT_WARNING)
            LlmModule->>Logger: warning(LLM_CONFIG_WARNING)
            LlmModule->>Logger: hr 分析结束
        else analysis nonempty
            LlmModule->>LlmModule: set _analyzed_errors_cache[error_hash]
            LlmModule->>Logger: info 打印分析报告
            LlmModule->>Logger: hr 分析结束
        end
    end
    note over LlmModule,Logger: On ImportError/Exception: pop cache, log error and LLM_CONFIG_WARNING
Loading

Sequence diagram for island tasks cold-start fix with ui_ensure

sequenceDiagram
    actor User
    participant Task as IslandTask.run
    participant UI as ui_ensure
    participant Nav as ui_goto

    User->>Task: run()
    Task->>UI: ui_ensure(page_island)
    UI-->>Task: ensured on page_island
    alt task navigates to phone
        Task->>Nav: ui_goto(page_island_phone, get_ship=False)
        Nav-->>Task: on page_island_phone
    end
    Task-->>User: continue task-specific logic
Loading

Flow diagram for updated seasonal dish handling in IslandRestaurant

flowchart TD
    A[IslandRestaurant.__init__] --> B[_init_season_config]
    B --> C[_get_high_priority_seasonal_dish]
    C -->|returns dish or None| D[seasonal_dish_slot]
    B --> E[_get_current_seasonal_shop_items]
    E --> F[shop_items initial seasonal dishes]
    D --> G{seasonal_dish_slot exists?}
    G -->|yes| H[logger.info 高优先级季节菜品]
    G -->|no| I[skip]
    F --> J[append regular dishes]

    subgraph SelectProduct
        K[select_product] --> L{seasonal_dish_slot exists?}
        L -->|no| M[super.select_product]
        L -->|yes| N[get dish_name and selections]
        N --> O{product_selection matches fixed or normal?}
        O -->|yes| P[device.click FIXED_SELECT_DOUBLE_BAMBOO_SHOOTS]
        P --> Q[device.sleep]
        O -->|no| M
    end
Loading

File-Level Changes

Change Details Files
重构岛屿餐厅的季节菜品配置和高优先级选择逻辑。
  • 引入 RESTAURANT_SEASONAL_DISHES 和 HIGH_PRIORITY_SEASONAL_DISHES 映射,用于集中管理季节菜品的元数据和固定选择的覆盖配置。
  • __init__ 中手动初始化 seasonal_dish_slot 的逻辑替换为 _get_high_priority_seasonal_dish,并调整 shop_items 的初始化,改为使用 _get_current_seasonal_shop_items
  • 新增辅助方法 _is_seasonal_priority_enabled_get_current_seasonal_shop_items_get_high_priority_seasonal_dish,在 season_config 周围加入防御性检查。
  • 更新 select_product,将当前高优先级季节菜品的“固定选择”和“普通选择”两类定位器都视为触发固定坐标点击的条件。
module/island/island_restaurant.py
提升基于 LLM 的错误分析的健壮性和用户反馈,并修改默认 LLM 配置。
  • 添加用于 LLM 配置与空结果警告的常量,以及辅助方法 _get_analysis_from_response,以安全地从兼容 OpenAI 的响应中提取文本。
  • 调整 analyze_exception,在 API key 缺失时记录本地化的配置警告,只在配置验证通过后才填充缓存,并在失败或缺少依赖时清理缓存条目。
  • 在 LLM 返回空响应时清理缓存、记录警告,并优雅地中止分析流程。
  • argument.yamlconfig_generated.py 中更新默认的 LLM API key、基础 URL 和模型,移除硬编码秘钥并指向新的服务提供方/模型。
module/llm.py
module/config/argument/argument.yaml
module/config/config_generated.py
确保岛屿任务从已知的 UI 状态开始,以修复冷启动问题。
  • 在需要的地方导入 page_island,并在若干 Island 任务的 run 方法开头调用 self.ui_ensure(page_island),以保证岛屿主页面处于激活状态。
  • 在珍珠出售、每日订单、货物准备、每日互动、农场和牧场流程中,在后续导航或逻辑之前应用 UI 预热步骤。
module/island/island_pearl_sell.py
module/island/island_daily_order.py
module/island/island_cargo_preparation.py
module/island/island_daily_interact.py
module/island/island_farm.py
module/island/island_rancher.py
更新配置模板和本地化文件,使其与新的 LLM 设置以及任何 UI 文本变更保持一致。
  • 调整 JSON 参数模板和多种 i18n 语言环境文件,以反映新的 LLM 配置标签、默认值或消息(具体细节取决于各模板和语言环境的内容)。
config/template.json
module/config/argument/args.json
module/config/i18n/en-US.json
module/config/i18n/ja-JP.json
module/config/i18n/zh-CN.json
module/config/i18n/zh-MIAO.json
module/config/i18n/zh-TW.json

Tips and commands

Interacting with Sourcery

  • 触发新的代码审查: 在 Pull Request 中评论 @sourcery-ai review
  • 继续讨论: 直接回复 Sourcery 的审查评论。
  • 从审查评论生成 GitHub Issue: 在回复某条审查评论时请求 Sourcery 从该评论创建一个 issue。你也可以在审查评论下回复 @sourcery-ai issue 来从该评论创建 issue。
  • 生成 Pull Request 标题: 在 Pull Request 标题的任意位置写上 @sourcery-ai,即可随时生成一个标题。你也可以在 Pull Request 中评论 @sourcery-ai title 来(重新)生成标题。
  • 生成 Pull Request 摘要: 在 Pull Request 正文的任意位置写上 @sourcery-ai summary,即可在该位置生成 PR 摘要。你也可以在 Pull Request 中评论 @sourcery-ai summary 来随时(重新)生成摘要。
  • 生成审查者指南: 在 Pull Request 中评论 @sourcery-ai guide,即可随时(重新)生成审查者指南。
  • 批量解决所有 Sourcery 评论: 在 Pull Request 中评论 @sourcery-ai resolve,以标记解决所有 Sourcery 评论。如果你已经处理完所有评论且不希望再看到它们,这会非常有用。
  • 批量关闭所有 Sourcery 审查: 在 Pull Request 中评论 @sourcery-ai dismiss,以关闭所有现有的 Sourcery 审查。尤其适合在你希望从一个全新的审查开始时使用——别忘了再评论 @sourcery-ai review 触发新一轮审查!

Customizing Your Experience

访问你的 dashboard 以:

  • 启用或禁用审查特性,例如 Sourcery 自动生成的 Pull Request 摘要、审查者指南等。
  • 更改审查语言。
  • 添加、移除或编辑自定义审查说明。
  • 调整其他审查设置。

Getting Help

Original review guide in English

Reviewer's Guide

Refactors island restaurant seasonal dish handling, hardens LLM error analysis configuration and response handling, updates default LLM config values, and adds a consistent UI warm-up step to several island tasks to avoid cold-start issues.

Sequence diagram for LLM error analysis with improved config and response handling

sequenceDiagram
    participant Config
    participant LlmModule as module.llm
    participant OpenAIAPI as OpenAI_compatible_API
    participant Logger

    Config->>LlmModule: analyze_exception(config, e)
    LlmModule->>LlmModule: truncate(str(e), 4000)
    LlmModule->>LlmModule: hashlib.md5(...) -> error_hash
    LlmModule->>LlmModule: check _analyzed_errors_cache
    alt no api_key
        LlmModule->>Logger: warning(LLM 错误分析已启用,但 API Key 未配置。)
        LlmModule->>Logger: warning(LLM_CONFIG_WARNING)
        LlmModule-->>Config: return
    else api_key present
        LlmModule->>LlmModule: set _analyzed_errors_cache[error_hash]
        LlmModule->>Logger: hr/ info 调用 LLM 分析
        LlmModule->>OpenAIAPI: client.chat.completions.create(...)
        OpenAIAPI-->>LlmModule: response
        LlmModule->>LlmModule: _get_analysis_from_response(response)
        alt analysis empty
            LlmModule->>LlmModule: _analyzed_errors_cache.pop(error_hash)
            LlmModule->>Logger: warning(LLM_EMPTY_RESULT_WARNING)
            LlmModule->>Logger: warning(LLM_CONFIG_WARNING)
            LlmModule->>Logger: hr 分析结束
        else analysis nonempty
            LlmModule->>LlmModule: set _analyzed_errors_cache[error_hash]
            LlmModule->>Logger: info 打印分析报告
            LlmModule->>Logger: hr 分析结束
        end
    end
    note over LlmModule,Logger: On ImportError/Exception: pop cache, log error and LLM_CONFIG_WARNING
Loading

Sequence diagram for island tasks cold-start fix with ui_ensure

sequenceDiagram
    actor User
    participant Task as IslandTask.run
    participant UI as ui_ensure
    participant Nav as ui_goto

    User->>Task: run()
    Task->>UI: ui_ensure(page_island)
    UI-->>Task: ensured on page_island
    alt task navigates to phone
        Task->>Nav: ui_goto(page_island_phone, get_ship=False)
        Nav-->>Task: on page_island_phone
    end
    Task-->>User: continue task-specific logic
Loading

Flow diagram for updated seasonal dish handling in IslandRestaurant

flowchart TD
    A[IslandRestaurant.__init__] --> B[_init_season_config]
    B --> C[_get_high_priority_seasonal_dish]
    C -->|returns dish or None| D[seasonal_dish_slot]
    B --> E[_get_current_seasonal_shop_items]
    E --> F[shop_items initial seasonal dishes]
    D --> G{seasonal_dish_slot exists?}
    G -->|yes| H[logger.info 高优先级季节菜品]
    G -->|no| I[skip]
    F --> J[append regular dishes]

    subgraph SelectProduct
        K[select_product] --> L{seasonal_dish_slot exists?}
        L -->|no| M[super.select_product]
        L -->|yes| N[get dish_name and selections]
        N --> O{product_selection matches fixed or normal?}
        O -->|yes| P[device.click FIXED_SELECT_DOUBLE_BAMBOO_SHOOTS]
        P --> Q[device.sleep]
        O -->|no| M
    end
Loading

File-Level Changes

Change Details Files
Refactor island restaurant seasonal dish configuration and high-priority selection logic.
  • Introduce RESTAURANT_SEASONAL_DISHES and HIGH_PRIORITY_SEASONAL_DISHES mappings to centralize seasonal dish metadata and fixed-selection overrides.
  • Replace manual seasonal_dish_slot initialization in init with _get_high_priority_seasonal_dish and adjust shop_items initialization to use _get_current_seasonal_shop_items.
  • Add helper methods _is_seasonal_priority_enabled, _get_current_seasonal_shop_items, and _get_high_priority_seasonal_dish with defensive checks around season_config.
  • Update select_product to treat both fixed and normal selection locators for the current high-priority seasonal dish as triggers for fixed-coordinate clicking.
module/island/island_restaurant.py
Improve robustness and user feedback of LLM-based error analysis and change default LLM configuration.
  • Add constants for LLM config and empty-result warnings and a helper _get_analysis_from_response to safely extract text from OpenAI-compatible responses.
  • Adjust analyze_exception to log localized configuration warnings when API key is missing, only populate the cache after config validation, and clear cache entries on failures or missing dependencies.
  • Handle empty LLM responses by clearing cache, logging warnings, and aborting analysis gracefully.
  • Update default LLM API key, base URL, and model in argument.yaml and config_generated.py to remove hard-coded secret and point to the new provider/model.
module/llm.py
module/config/argument/argument.yaml
module/config/config_generated.py
Ensure island tasks start from a known UI state to fix cold-start issues.
  • Import page_island where needed and call self.ui_ensure(page_island) at the beginning of several Island task run methods to guarantee the island main page is active.
  • Apply the UI warm-up step to pearl selling, daily order, cargo preparation, daily interact, farm, and rancher flows before further navigation or logic.
module/island/island_pearl_sell.py
module/island/island_daily_order.py
module/island/island_cargo_preparation.py
module/island/island_daily_interact.py
module/island/island_farm.py
module/island/island_rancher.py
Update configuration templates and localization files to align with new LLM settings and any UI text changes.
  • Adjust JSON argument templates and multiple i18n locale files to reflect new LLM configuration labels, defaults, or messages (details depend on the template and locale contents).
config/template.json
module/config/argument/args.json
module/config/i18n/en-US.json
module/config/i18n/ja-JP.json
module/config/i18n/zh-CN.json
module/config/i18n/zh-MIAO.json
module/config/i18n/zh-TW.json

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hey - 我在这里给出一些总体反馈:

  • RESTAURANT_SEASONAL_DISHESHIGH_PRIORITY_SEASONAL_DISHES 中,季节菜品条目不再定义 var_name,这可能会破坏任何依赖这些产品的 name_to_config/var_name 的逻辑;建议把 var_name 加回来,以保持与其他 shop_items 条目的一致性。
  • 新的 _get_high_priority_seasonal_dish 现在始终要求启用 IslandRestaurant_DoubleBambooShoots 并且存在 season_config,而之前 seasonal_dish_slot 可以仅基于季节菜品或 old_double_enabled 来设置;请仔细确认这种更严格的控制是否符合期望行为,并且不会导致旧配置退化。
给 AI 代理的提示
Please address the comments from this code review:

## Overall Comments
-`RESTAURANT_SEASONAL_DISHES``HIGH_PRIORITY_SEASONAL_DISHES` 中,季节菜品条目不再定义 `var_name`,这可能会破坏任何依赖这些产品的 `name_to_config`/`var_name` 的逻辑;建议把 `var_name` 加回来,以保持与其他 `shop_items` 条目的一致性。
- 新的 `_get_high_priority_seasonal_dish` 现在始终要求启用 `IslandRestaurant_DoubleBambooShoots` 并且存在 `season_config`,而之前 `seasonal_dish_slot` 可以仅基于季节菜品或 `old_double_enabled` 来设置;请仔细确认这种更严格的控制是否符合期望行为,并且不会导致旧配置退化。

Sourcery 对开源项目是免费的——如果你觉得我们的代码审查有帮助,欢迎分享 ✨
帮我变得更有用!请在每条评论上点 👍 或 👎,我会根据这些反馈改进后续的代码审查。
Original comment in English

Hey - I've left some high level feedback:

  • In RESTAURANT_SEASONAL_DISHES and HIGH_PRIORITY_SEASONAL_DISHES, the seasonal dish entries no longer define var_name, which may break any logic that relies on name_to_config/var_name for these products; consider adding var_name back for consistency with other shop_items entries.
  • The new _get_high_priority_seasonal_dish now always requires IslandRestaurant_DoubleBambooShoots to be enabled and season_config to be present, whereas previously seasonal_dish_slot could be set based solely on seasonal items or old_double_enabled; double-check that this stricter gating matches the desired behavior and doesn’t regress older configurations.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- In `RESTAURANT_SEASONAL_DISHES` and `HIGH_PRIORITY_SEASONAL_DISHES`, the seasonal dish entries no longer define `var_name`, which may break any logic that relies on `name_to_config`/`var_name` for these products; consider adding `var_name` back for consistency with other `shop_items` entries.
- The new `_get_high_priority_seasonal_dish` now always requires `IslandRestaurant_DoubleBambooShoots` to be enabled and `season_config` to be present, whereas previously `seasonal_dish_slot` could be set based solely on seasonal items or `old_double_enabled`; double-check that this stricter gating matches the desired behavior and doesn’t regress older configurations.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

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