You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
影响範囲:computer history 設定ページのみ。history_summary_accounting_unavailable や不明エラーコードの表示ロジックは変更なし。
修复计划与定位过程
根因假设:narrationErrorMessage 계산 시 history_summary_budget_unavailable 및 history_summary_budget_paused 에러 코드에서 modelSource 를 확인하지 않아 account 모드에서도 BYOK 전용 에러 메시지가 표시됨
When the user is in account mode and narrationError is history_summary_budget_unavailable, the system shall NOT display the BYOK-specific error message
When modelSource is byok and narrationError is history_summary_budget_unavailable, the system shall display the BYOK-specific error message
验收条件
账号模式下(modelSource !== byok),narrationError 为 history_summary_budget_unavailable 或 history_summary_budget_paused 时,不展示「自定义 API Key」相关文案
This change deepens an already nested ternary chain to four levels and repeats the modelSource === "byok" check (the same comparison also appears at line 362), which hurts readability. Prefer a small mapping/helper so the per-code message and its model-source condition live in one place, e.g.:
and then narrationError === "history_summary_budget_unavailable" ? byokOnlyMessage(t(...)) : ..., or extract a narrationMessage(narrationError, isByok) function above the component.
Tested source: 887421897e02e3c6681b35e5237dc388b117d7a7
Tested base: 99b51b3759b12d1e5c93be5d5d7148200e443d3e
Tested commit: 887421897e02e3c6681b35e5237dc388b117d7a7
These results apply only to this immutable source/base snapshot.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Coding Agent 修复报告
云效工单:MEMMY-741 · 账号模式,computer history设置页,提示:暂时无法确认自定义 API Key 的 Token 用量和限额,将稍后自动重试。
memmy-agent · 第 2 轮 · 修复提交 88742189
修复已完成规定检查:22/30 项规定检查通过;8 项测试所在的包未受本次修改影响,未执行。
问题与根因
App/frontend/desktop/src/pages/memory/computer-history-sub-page.tsxのnarrationErrorMessage計算ロジック(旧 lines 353-359)が、history_summary_budget_unavailableとhistory_summary_budget_pausedの2つのエラーコードに対してmodelSourceを確認せず、常に BYOK 専用メッセージ(「暂时无法确认自定义 API Key 的 Token 用量和限额,将稍后自动重试。」)を返していた。account モード(modelSourceが"byok"でない場合)でも同じメッセージが表示されていた。本轮修改
App/frontend/desktop/src/pages/memory/computer-history-sub-page.tsx(narrationErrorMessage 计算):const modelSource = snapshot?.observation.modelSource;を追加し、history_summary_budget_unavailableとhistory_summary_budget_pausedの条件分岐にmodelSource === "byok"チェックを加えた。BYOK モードでのみ BYOK 専用メッセージを返し、account モードではnullを返すよう修正。同ファイル(レンダー条件):JSX の2箇所(外側コンテナ条件・内側 alert 条件)で
narrationErrorをnarrationErrorMessageに変更。narrationErrorMessageがnullの場合に空のrole="alert"div がレンダーされることを防ぐ。App/frontend/desktop/src/pages/tests/computer-history-sub-page.interaction.test.tsx:account モード(modelSourceなし)でhistory_summary_budget_unavailableおよびhistory_summary_budget_pausedが来たときに、BYOK 専用の alert が表示されないことを検証するit.eachテストブロックを追加。变更文件
2 个文件,+17 / −4 行。
验证结果
未验证项
验收步骤(给测试同学)
narrationError: "history_summary_budget_unavailable"または"history_summary_budget_paused"を返す状態を再現する。history_summary_accounting_unavailableエラーは引き続き「摘要用量记录暂未同步,将稍后自动重试。」が表示されること(このエラーは両モード共通)を確認する。history_summary_budget_unavailable/history_summary_budget_pausedを送信することがあるが、frontend 側でフィルタリングするのが正しい対応(後端の修正は将来別途検討)。observation.modelSourceがundefined(フィールド未設定)の場合は account モードと同等に扱い、BYOK 専用メッセージを表示しない。history_summary_budget_unavailableを送る場合、現在はこのエラーが静かに無視される(ユーザーに何も表示されない)。将来的に account モード向けの別メッセージが必要な場合は追加実装が必要。history_summary_accounting_unavailableや不明エラーコードの表示ロジックは変更なし。修复计划与定位过程
交付信息
待人工确认(不影响本次修复)
需求整理与定位证据
需求整理(EARS)
验收条件
定位证据
修复结果供人工 Review 与验收;Coding Agent 不自动合并。