From 6942f5393f47590716ced7c78290e1dd435b927a Mon Sep 17 00:00:00 2001 From: claude-code-best Date: Thu, 11 Jun 2026 15:35:30 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20goalState.js=20?= =?UTF-8?q?=E6=A8=A1=E5=9D=97=E4=B8=8D=E5=AD=98=E5=9C=A8=E7=9A=84=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PromptInput/PromptInputFooterLeftSide.tsx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/components/PromptInput/PromptInputFooterLeftSide.tsx b/src/components/PromptInput/PromptInputFooterLeftSide.tsx index 4ac476bf2..d307dcb1b 100644 --- a/src/components/PromptInput/PromptInputFooterLeftSide.tsx +++ b/src/components/PromptInput/PromptInputFooterLeftSide.tsx @@ -137,12 +137,14 @@ function GoalElapsedIndicator(): React.ReactNode { }, []); void tick; - const { getGoal, getActiveElapsedMs } = - require('../../services/goal/goalState.js') as typeof import('../../services/goal/goalState.js'); - const goal = getGoal(); + const goalModule = require('../../services/goal/goalState.js') as unknown as { + getGoal: () => { status: string; [k: string]: unknown } | null; + getActiveElapsedMs: (g: { status: string; [k: string]: unknown }) => number; + }; + const goal = goalModule.getGoal(); if (!goal) return null; - const elapsedMs = getActiveElapsedMs(goal); + const elapsedMs = goalModule.getActiveElapsedMs(goal); const totalSeconds = Math.floor(elapsedMs / 1000); const hours = Math.floor(totalSeconds / 3600); const minutes = Math.floor((totalSeconds % 3600) / 60); @@ -429,7 +431,7 @@ function ModeIndicator({ : []), // Goal elapsed indicator — compact "goal (XhYmin)" after PID ...(feature('GOAL') && - (require('../../services/goal/goalState.js') as typeof import('../../services/goal/goalState.js')).getGoal() + (require('../../services/goal/goalState.js') as unknown as { getGoal: () => unknown }).getGoal() ? [] : []), ];