feat: enable /schedule by adding AGENT_TRIGGERS_REMOTE to default features#85
feat: enable /schedule by adding AGENT_TRIGGERS_REMOTE to default features#85amDosion wants to merge 1 commit intoclaude-code-best:mainfrom
Conversation
|
@amDosion 我看有些额外改动是不是得清理一下? |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThese changes introduce explicit default build features that are consistently applied across both build and dev configurations. The build system now merges default features with environment-derived features and removes duplicates before passing them to Bun. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
efc8141 to
72a3597
Compare
72a3597 to
ba8e1b1
Compare
There was a problem hiding this comment.
Actionable comments posted: 10
🧹 Nitpick comments (2)
src/components/StatusLine.tsx (1)
22-26: Remove unusedvimModeprop.The
vimModeprop is declared inPropsbut never used inStatusLineInner. The type was also weakened fromVimModetounknown, suggesting it was being phased out. Clean this up by removing it entirely.♻️ Proposed fix
type Props = { messagesRef: React.RefObject<Message[]>; lastAssistantMessageId: string | null; - vimMode?: unknown; };And update the function signature accordingly:
-function StatusLineInner({ messagesRef, lastAssistantMessageId }: Props): React.ReactNode { +function StatusLineInner({ messagesRef, lastAssistantMessageId }: Props): React.ReactNode {Note: Callers passing
vimModewill also need to be updated.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/components/StatusLine.tsx` around lines 22 - 26, The Props type declares a vimMode prop that is unused and weakened to unknown; remove vimMode from the Props definition and from the StatusLineInner component signature (and any other components/definitions that reference vimMode) so the prop is no longer accepted; update any callers that pass vimMode to stop passing it or to provide the new expected props; ensure imports/types related to VimMode are cleaned up if no longer used.src/components/BuiltinStatusLine.tsx (1)
56-66: Consider using a reducer or key-based re-render instead ofvoid tickworkaround.Using
void tickto suppress lint warnings for an unused state variable is a code smell. A cleaner approach is to use a self-incrementing key or leverage the dependency array more directly.♻️ Alternative approach using useReducer
- const [tick, setTick] = useState(0); + const [, forceUpdate] = React.useReducer(x => x + 1, 0); useEffect(() => { const hasResetTime = rateLimits.five_hour?.resets_at || rateLimits.seven_day?.resets_at; if (!hasResetTime) return; - const id = setInterval(() => setTick(t => t + 1), 60_000); + const id = setInterval(forceUpdate, 60_000); return () => clearInterval(id); }, [rateLimits.five_hour?.resets_at, rateLimits.seven_day?.resets_at]); - - // Suppress unused-variable lint for tick (it exists only to trigger re-renders) - void tick;🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/components/BuiltinStatusLine.tsx` around lines 56 - 66, Replace the "tick" state and the "void tick" lint-suppression with a useReducer-based forced re-render: remove useState call for tick and the void tick line, add a reducer like const [, forceTick] = useReducer(s => s + 1, 0), and change the interval callback in the useEffect to call forceTick() instead of setTick; keep the same dependency array (rateLimits.five_hour?.resets_at, rateLimits.seven_day?.resets_at) and cleanup to clearInterval to preserve behavior in BuiltinStatusLine.tsx.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@analysis/recovered/schedule-remote-agents/README.md`:
- Around line 11-17: The fenced code blocks in the README.md containing the
stack trace (showing main.tsx → initBundledSkills() →
registerScheduleRemoteAgentsSkill() → RemoteTriggerTool) are missing a language
marker and trigger markdownlint MD040; open the README.md and update each
triple-backtick block (the one around the stack trace at the top and the other
at lines referenced as 48-52) to include an appropriate language tag such as
```text or ```bash so the blocks have a language identifier.
- Around line 21-25: “只改编译开关”段落遗漏了对 build.ts 中默认构建特性变更的说明;请在该段落补充说明 build.ts 中的
DEFAULT_BUILD_FEATURES 已加入 "AGENT_TRIGGERS_REMOTE"(与 scripts/dev.ts 的
DEFAULT_FEATURES 对应),并说明在构建时可通过 FEATURE_AGENT_TRIGGERS_REMOTE=1 或修改
DEFAULT_BUILD_FEATURES 来启用该特性,以保证文档与实际构建行为一致。
In `@analysis/recovered/schedule-remote-agents/RECOVERY-MAP.md`:
- Around line 20-26: The note in RECOVERY-MAP.md claiming `/schedule` is omitted
unless FEATURE_AGENT_TRIGGERS_REMOTE is set is stale; update the text to reflect
that build.ts now includes AGENT_TRIGGERS_REMOTE in DEFAULT_BUILD_FEATURES so
the `/schedule` path is built by default. Edit the section that mentions
FEATURE_AGENT_TRIGGERS_REMOTE and the suggested build command to instead note
the current default behavior (or reference AGENT_TRIGGERS_REMOTE and
DEFAULT_BUILD_FEATURES in build.ts) and remove or modify the recovery
instruction that tells readers to run FEATURE_AGENT_TRIGGERS_REMOTE=1 bun run
build.
In `@analysis/recovered/schedule-remote-agents/schedule-remote-agents.md`:
- Around line 420-426: The markdown table starting with "| 字段 | 官方 v2.1.91 | 本仓库
| 倍数 |" violates MD058 because it lacks blank lines around it; fix by adding one
empty line immediately before the table and one empty line immediately after the
table (i.e., ensure a blank line separates the preceding paragraph and the
following paragraph from the table) so the block now has surrounding whitespace.
- Around line 277-279: The documentation text incorrectly states that build.ts
only reads FEATURE_* and does not enable AGENT_TRIGGERS_REMOTE by default;
update the paragraph to reflect the current build.ts behavior which now enables
AGENT_TRIGGERS_REMOTE by default (instead of being gated by FEATURE_*), and note
the consequence that dist/ may be built with that feature enabled (affecting Bun
DCE of require chains). Edit the section referencing build.ts and
FEATURE_*/AGENT_TRIGGERS_REMOTE to accurately describe the new default and its
impact.
In `@build.ts`:
- Around line 16-19: The current envFeatures computation turns on any FEATURE_*
variable regardless of its value; update the filter to only include keys whose
value equals "1" (e.g., filter(k => k.startsWith("FEATURE_") && process.env[k]
=== "1")), then map as before and keep the dedup with DEFAULT_BUILD_FEATURES
(variables: envFeatures, features, DEFAULT_BUILD_FEATURES) so only
FEATURE_<NAME>=1 enables a flag.
In `@docs/features/schedule-remote-agents.md`:
- Around line 420-426: The markdown table block showing differences (containing
fields like `recurringFrac` and `recurringCapMs`) needs a blank line before and
after it to satisfy markdownlint rule MD058; edit the surrounding content in
docs/features/schedule-remote-agents.md to insert a single empty line
immediately above the table start ("**差异**:") and a single empty line
immediately after the table end so the table is separated from adjacent
paragraphs.
- Around line 277-279: Update the outdated docs to match the current build
behavior: change the description that says build.ts "默认只读取 FEATURE_*" to reflect
that build.ts defines DEFAULT_BUILD_FEATURES = ["AGENT_TRIGGERS_REMOTE"] so this
feature is enabled by default during build; reference build.ts and the
DEFAULT_BUILD_FEATURES constant and adjust the text around lines mentioning Bun
DCE and dist/ so it no longer claims the feature is disabled by default.
In `@src/components/BuiltinStatusLine.tsx`:
- Around line 29-40: formatCountdown currently yields "0m" for positive diffs
under 60 seconds; update the function (formatCountdown) to detect diff > 0 and
diff < 60 and return a more user-friendly string (e.g. "<1m") instead of
`${minutes}m`. Keep the existing diff <= 0 => "now" behavior, and ensure this
new branch is checked before the final `return `${minutes}m`` so sub-minute
values (using the diff/minutes variables) are handled correctly.
In `@src/components/StatusLine.tsx`:
- Around line 17-20: statusLineShouldDisplay currently ignores the settings
parameter and always returns true (except when KAIROS is active), which breaks
suppressHint logic in PromptInputFooter (suppressHintFromProps ||
statusLineShouldDisplay(settings) || isSearching); restore the original behavior
by making statusLineShouldDisplay(settings: ReadonlySettings) return
settings?.statusLine (unless KAIROS is active) so the user setting is respected,
or if the change was intentional remove the unused settings parameter and update
callers (e.g., PromptInputFooter) accordingly to reflect the new API.
---
Nitpick comments:
In `@src/components/BuiltinStatusLine.tsx`:
- Around line 56-66: Replace the "tick" state and the "void tick"
lint-suppression with a useReducer-based forced re-render: remove useState call
for tick and the void tick line, add a reducer like const [, forceTick] =
useReducer(s => s + 1, 0), and change the interval callback in the useEffect to
call forceTick() instead of setTick; keep the same dependency array
(rateLimits.five_hour?.resets_at, rateLimits.seven_day?.resets_at) and cleanup
to clearInterval to preserve behavior in BuiltinStatusLine.tsx.
In `@src/components/StatusLine.tsx`:
- Around line 22-26: The Props type declares a vimMode prop that is unused and
weakened to unknown; remove vimMode from the Props definition and from the
StatusLineInner component signature (and any other components/definitions that
reference vimMode) so the prop is no longer accepted; update any callers that
pass vimMode to stop passing it or to provide the new expected props; ensure
imports/types related to VimMode are cleaned up if no longer used.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: a98d2f09-d744-4b18-bd6b-c353f232365a
📒 Files selected for processing (8)
analysis/recovered/schedule-remote-agents/README.mdanalysis/recovered/schedule-remote-agents/RECOVERY-MAP.mdanalysis/recovered/schedule-remote-agents/schedule-remote-agents.mdbuild.tsdocs/features/schedule-remote-agents.mdscripts/dev.tssrc/components/BuiltinStatusLine.tsxsrc/components/StatusLine.tsx
analysis/recovered/schedule-remote-agents/schedule-remote-agents.md
Outdated
Show resolved
Hide resolved
| **差异**: | ||
| | 字段 | 官方 v2.1.91 | 本仓库 | 倍数 | | ||
| |------|------------|--------|------| | ||
| | `recurringFrac` | **0.5** | 0.1 | 5× | | ||
| | `recurringCapMs` | **1,800,000** (30min) | 900,000 (15min) | 2× | | ||
| | 其余 4 个字段 | 相同 | 相同 | — | | ||
|
|
There was a problem hiding this comment.
请为该表格段落补齐前后空行(MD058)。
当前格式会触发 markdownlint 警告,建议在表格前后各留一空行。
🧰 Tools
🪛 markdownlint-cli2 (0.22.0)
[warning] 421-421: Tables should be surrounded by blank lines
(MD058, blanks-around-tables)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@analysis/recovered/schedule-remote-agents/schedule-remote-agents.md` around
lines 420 - 426, The markdown table starting with "| 字段 | 官方 v2.1.91 | 本仓库 | 倍数
|" violates MD058 because it lacks blank lines around it; fix by adding one
empty line immediately before the table and one empty line immediately after the
table (i.e., ensure a blank line separates the preceding paragraph and the
following paragraph from the table) so the block now has surrounding whitespace.
| const envFeatures = Object.keys(process.env) | ||
| .filter(k => k.startsWith("FEATURE_")) | ||
| .map(k => k.replace("FEATURE_", "")); | ||
| const features = [...new Set([...DEFAULT_BUILD_FEATURES, ...envFeatures])]; |
There was a problem hiding this comment.
FEATURE_* parsing currently enables flags even when value is not 1.
Line 16-Line 19 only checks key names, so FEATURE_AGENT_TRIGGERS_REMOTE=0 still turns the feature on. That conflicts with the stated FEATURE_<NAME>=1 contract and can unintentionally ship gated code.
Suggested fix
-const envFeatures = Object.keys(process.env)
- .filter(k => k.startsWith("FEATURE_"))
- .map(k => k.replace("FEATURE_", ""));
+const envFeatures = Object.entries(process.env)
+ .filter(([k, v]) => k.startsWith("FEATURE_") && v === "1")
+ .map(([k]) => k.replace("FEATURE_", ""));
const features = [...new Set([...DEFAULT_BUILD_FEATURES, ...envFeatures])];📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| const envFeatures = Object.keys(process.env) | |
| .filter(k => k.startsWith("FEATURE_")) | |
| .map(k => k.replace("FEATURE_", "")); | |
| const features = [...new Set([...DEFAULT_BUILD_FEATURES, ...envFeatures])]; | |
| const envFeatures = Object.entries(process.env) | |
| .filter(([k, v]) => k.startsWith("FEATURE_") && v === "1") | |
| .map(([k]) => k.replace("FEATURE_", "")); | |
| const features = [...new Set([...DEFAULT_BUILD_FEATURES, ...envFeatures])]; |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@build.ts` around lines 16 - 19, The current envFeatures computation turns on
any FEATURE_* variable regardless of its value; update the filter to only
include keys whose value equals "1" (e.g., filter(k => k.startsWith("FEATURE_")
&& process.env[k] === "1")), then map as before and keep the dedup with
DEFAULT_BUILD_FEATURES (variables: envFeatures, features,
DEFAULT_BUILD_FEATURES) so only FEATURE_<NAME>=1 enables a flag.
| **差异**: | ||
| | 字段 | 官方 v2.1.91 | 本仓库 | 倍数 | | ||
| |------|------------|--------|------| | ||
| | `recurringFrac` | **0.5** | 0.1 | 5× | | ||
| | `recurringCapMs` | **1,800,000** (30min) | 900,000 (15min) | 2× | | ||
| | 其余 4 个字段 | 相同 | 相同 | — | | ||
|
|
There was a problem hiding this comment.
表格前后请补空行(MD058)。
该表格段落需要与上下文之间保留空行以满足 markdownlint。
🧰 Tools
🪛 markdownlint-cli2 (0.22.0)
[warning] 421-421: Tables should be surrounded by blank lines
(MD058, blanks-around-tables)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@docs/features/schedule-remote-agents.md` around lines 420 - 426, The markdown
table block showing differences (containing fields like `recurringFrac` and
`recurringCapMs`) needs a blank line before and after it to satisfy markdownlint
rule MD058; edit the surrounding content in
docs/features/schedule-remote-agents.md to insert a single empty line
immediately above the table start ("**差异**:") and a single empty line
immediately after the table end so the table is separated from adjacent
paragraphs.
src/components/BuiltinStatusLine.tsx
Outdated
| export function formatCountdown(epochSeconds: number): string { | ||
| const diff = epochSeconds - Date.now() / 1000; | ||
| if (diff <= 0) return 'now'; | ||
|
|
||
| const days = Math.floor(diff / 86400); | ||
| const hours = Math.floor((diff % 86400) / 3600); | ||
| const minutes = Math.floor((diff % 3600) / 60); | ||
|
|
||
| if (days >= 1) return `${days}d${hours}h`; | ||
| if (hours >= 1) return `${hours}h${minutes}m`; | ||
| return `${minutes}m`; | ||
| } |
There was a problem hiding this comment.
formatCountdown returns "0m" for sub-minute remaining time.
When diff is between 0 and 60 seconds, minutes will be 0, resulting in "0m" being displayed. Consider returning "now" or "<1m" for better UX.
💡 Proposed fix
if (days >= 1) return `${days}d${hours}h`;
if (hours >= 1) return `${hours}h${minutes}m`;
+ if (minutes < 1) return 'now';
return `${minutes}m`;🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@src/components/BuiltinStatusLine.tsx` around lines 29 - 40, formatCountdown
currently yields "0m" for positive diffs under 60 seconds; update the function
(formatCountdown) to detect diff > 0 and diff < 60 and return a more
user-friendly string (e.g. "<1m") instead of `${minutes}m`. Keep the existing
diff <= 0 => "now" behavior, and ensure this new branch is checked before the
final `return `${minutes}m`` so sub-minute values (using the diff/minutes
variables) are handled correctly.
| export function statusLineShouldDisplay(settings: ReadonlySettings): boolean { | ||
| // Assistant mode: statusline fields (model, permission mode, cwd) reflect the | ||
| // REPL/daemon process, not what the agent child is actually running. Hide it. | ||
| if (feature('KAIROS') && getKairosActive()) return false; | ||
| return settings?.statusLine !== undefined; | ||
| } | ||
| function buildStatusLineCommandInput(permissionMode: PermissionMode, exceeds200kTokens: boolean, settings: ReadonlySettings, messages: Message[], addedDirs: string[], mainLoopModel: ModelName, vimMode?: VimMode): StatusLineCommandInput { | ||
| const agentType = getMainThreadAgentType(); | ||
| const worktreeSession = getCurrentWorktreeSession(); | ||
| const runtimeModel = getRuntimeMainLoopModel({ | ||
| permissionMode, | ||
| mainLoopModel, | ||
| exceeds200kTokens | ||
| }); | ||
| const outputStyleName = settings?.outputStyle || DEFAULT_OUTPUT_STYLE_NAME; | ||
| const currentUsage = getCurrentUsage(messages); | ||
| const contextWindowSize = getContextWindowForModel(runtimeModel, getSdkBetas()); | ||
| const contextPercentages = calculateContextPercentages(currentUsage, contextWindowSize); | ||
| const sessionId = getSessionId(); | ||
| const sessionName = getCurrentSessionTitle(sessionId); | ||
| const rawUtil = getRawUtilization(); | ||
| const rateLimits: StatusLineCommandInput['rate_limits'] = { | ||
| ...(rawUtil.five_hour && { | ||
| five_hour: { | ||
| used_percentage: rawUtil.five_hour.utilization * 100, | ||
| resets_at: rawUtil.five_hour.resets_at | ||
| } | ||
| }), | ||
| ...(rawUtil.seven_day && { | ||
| seven_day: { | ||
| used_percentage: rawUtil.seven_day.utilization * 100, | ||
| resets_at: rawUtil.seven_day.resets_at | ||
| } | ||
| }) | ||
| }; | ||
| return { | ||
| ...createBaseHookInput(), | ||
| ...(sessionName && { | ||
| session_name: sessionName | ||
| }), | ||
| model: { | ||
| id: runtimeModel, | ||
| display_name: renderModelName(runtimeModel) | ||
| }, | ||
| workspace: { | ||
| current_dir: getCwd(), | ||
| project_dir: getOriginalCwd(), | ||
| added_dirs: addedDirs | ||
| }, | ||
| version: MACRO.VERSION, | ||
| output_style: { | ||
| name: outputStyleName | ||
| }, | ||
| cost: { | ||
| total_cost_usd: getTotalCost(), | ||
| total_duration_ms: getTotalDuration(), | ||
| total_api_duration_ms: getTotalAPIDuration(), | ||
| total_lines_added: getTotalLinesAdded(), | ||
| total_lines_removed: getTotalLinesRemoved() | ||
| }, | ||
| context_window: { | ||
| total_input_tokens: getTotalInputTokens(), | ||
| total_output_tokens: getTotalOutputTokens(), | ||
| context_window_size: contextWindowSize, | ||
| current_usage: currentUsage, | ||
| used_percentage: contextPercentages.used, | ||
| remaining_percentage: contextPercentages.remaining | ||
| }, | ||
| exceeds_200k_tokens: exceeds200kTokens, | ||
| ...((rateLimits.five_hour || rateLimits.seven_day) && { | ||
| rate_limits: rateLimits | ||
| }), | ||
| ...(isVimModeEnabled() && { | ||
| vim: { | ||
| mode: vimMode ?? 'INSERT' | ||
| } | ||
| }), | ||
| ...(agentType && { | ||
| agent: { | ||
| name: agentType | ||
| } | ||
| }), | ||
| ...(getIsRemoteMode() && { | ||
| remote: { | ||
| session_id: getSessionId() | ||
| } | ||
| }), | ||
| ...(worktreeSession && { | ||
| worktree: { | ||
| name: worktreeSession.worktreeName, | ||
| path: worktreeSession.worktreePath, | ||
| branch: worktreeSession.worktreeBranch, | ||
| original_cwd: worktreeSession.originalCwd, | ||
| original_branch: worktreeSession.originalBranch | ||
| } | ||
| }) | ||
| }; | ||
| return true; | ||
| } |
There was a problem hiding this comment.
statusLineShouldDisplay now always returns true, breaking suppressHint logic.
The old implementation checked settings?.statusLine to determine display. Now it unconditionally returns true (unless KAIROS is active). Per PromptInputFooter.tsx:122, this means:
const suppressHint = suppressHintFromProps || statusLineShouldDisplay(settings) || isSearching;The ? for shortcuts hint will always be suppressed, regardless of user settings. If this is intentional, the function parameter settings is now unused and should be removed. If unintentional, the original settings?.statusLine check should be restored.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@src/components/StatusLine.tsx` around lines 17 - 20, statusLineShouldDisplay
currently ignores the settings parameter and always returns true (except when
KAIROS is active), which breaks suppressHint logic in PromptInputFooter
(suppressHintFromProps || statusLineShouldDisplay(settings) || isSearching);
restore the original behavior by making statusLineShouldDisplay(settings:
ReadonlySettings) return settings?.statusLine (unless KAIROS is active) so the
user setting is respected, or if the change was intentional remove the unused
settings parameter and update callers (e.g., PromptInputFooter) accordingly to
reflect the new API.
There was a problem hiding this comment.
♻️ Duplicate comments (2)
src/components/BuiltinStatusLine.tsx (1)
29-40:⚠️ Potential issue | 🟡 MinorHandle sub-minute countdowns without showing
0m.For
0 < diff < 60, this currently renders0m, which is misleading.Suggested fix
export function formatCountdown(epochSeconds: number): string { const diff = epochSeconds - Date.now() / 1000; if (diff <= 0) return 'now'; @@ if (days >= 1) return `${days}d${hours}h`; if (hours >= 1) return `${hours}h${minutes}m`; + if (minutes < 1) return '<1m'; return `${minutes}m`; }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/components/BuiltinStatusLine.tsx` around lines 29 - 40, The formatCountdown function shows "0m" for 0 < diff < 60; change its logic so when diff > 0 but Math.floor(diff / 60) === 0 it returns "<1m" (or similar user-friendly string) instead of "0m". Update formatCountdown (the function that computes diff, days, hours, minutes) to detect the sub-minute case before returning minutes and return the "<1m" string for that case. Ensure existing behavior for days, hours, and minutes remains unchanged.src/components/StatusLine.tsx (1)
17-20:⚠️ Potential issue | 🟠 MajorRespect the settings gate in
statusLineShouldDisplay.Line 19 now always returns
true, which effectively ignores user config and can forcesuppressHintbehavior insrc/components/PromptInput/PromptInputFooter.tsx.Suggested fix
export function statusLineShouldDisplay(settings: ReadonlySettings): boolean { if (feature('KAIROS') && getKairosActive()) return false; - return true; + return settings?.statusLine ?? true; }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/components/StatusLine.tsx` around lines 17 - 20, The function statusLineShouldDisplay currently ignores the passed-in settings and always returns true; update it to consult the settings gate before returning so user config can disable the status line (and avoid forcing suppressHint in PromptInputFooter.tsx). Specifically, inside statusLineShouldDisplay, keep the existing feature('KAIROS') && getKairosActive() check, then read the appropriate flag from the settings object (e.g., a showStatusLine or suppressHint/suppressStatusLine boolean) and return based on that flag combined with the Kairos check, so the function only returns true when Kairos is inactive and the user setting allows the status line.
🧹 Nitpick comments (2)
src/components/StatusLine.tsx (1)
5-6: Usesrc/alias imports for changed TSX imports.These updated imports use relative paths; switch them to
src/...aliases to match project import conventions.As per coding guidelines,
**/*.{ts,tsx}should “Importsrc/path alias via tsconfig mapping instead of relative paths in imports.”Also applies to: 8-8, 13-13, 15-15
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/components/StatusLine.tsx` around lines 5 - 6, Update the imports in StatusLine.tsx to use the project's tsconfig path alias ("src/...") instead of relative paths: replace imports of getSdkBetas and getKairosActive (from '../bootstrap/state.js') and getTotalCost, getTotalInputTokens, getTotalOutputTokens (from '../cost-tracker.js') with their corresponding "src/..." aliases; also adjust the other changed import lines referenced (lines importing any other modules at 8, 13, 15) to use "src/..." so all TSX imports follow the src path mapping.src/components/BuiltinStatusLine.tsx (1)
2-7: Usesrc/alias imports in this new TSX component.The new imports are relative; please align them with the repository alias convention for TS/TSX modules.
As per coding guidelines,
**/*.{ts,tsx}should “Importsrc/path alias via tsconfig mapping instead of relative paths in imports.”🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/components/BuiltinStatusLine.tsx` around lines 2 - 7, The imports in BuiltinStatusLine.tsx use relative paths; replace them with the repository TS/TSX alias (src/) so the module resolver follows tsconfig mappings. Update the import statements for formatCost, formatTokens, useTerminalSize and the components Box, Text, and ProgressBar to use "src/..." alias paths (e.g., import { formatCost } from 'src/...' etc.), keeping the same named symbols (formatCost, formatTokens, useTerminalSize, Box, Text, ProgressBar) so references in this file remain unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Duplicate comments:
In `@src/components/BuiltinStatusLine.tsx`:
- Around line 29-40: The formatCountdown function shows "0m" for 0 < diff < 60;
change its logic so when diff > 0 but Math.floor(diff / 60) === 0 it returns
"<1m" (or similar user-friendly string) instead of "0m". Update formatCountdown
(the function that computes diff, days, hours, minutes) to detect the sub-minute
case before returning minutes and return the "<1m" string for that case. Ensure
existing behavior for days, hours, and minutes remains unchanged.
In `@src/components/StatusLine.tsx`:
- Around line 17-20: The function statusLineShouldDisplay currently ignores the
passed-in settings and always returns true; update it to consult the settings
gate before returning so user config can disable the status line (and avoid
forcing suppressHint in PromptInputFooter.tsx). Specifically, inside
statusLineShouldDisplay, keep the existing feature('KAIROS') &&
getKairosActive() check, then read the appropriate flag from the settings object
(e.g., a showStatusLine or suppressHint/suppressStatusLine boolean) and return
based on that flag combined with the Kairos check, so the function only returns
true when Kairos is inactive and the user setting allows the status line.
---
Nitpick comments:
In `@src/components/BuiltinStatusLine.tsx`:
- Around line 2-7: The imports in BuiltinStatusLine.tsx use relative paths;
replace them with the repository TS/TSX alias (src/) so the module resolver
follows tsconfig mappings. Update the import statements for formatCost,
formatTokens, useTerminalSize and the components Box, Text, and ProgressBar to
use "src/..." alias paths (e.g., import { formatCost } from 'src/...' etc.),
keeping the same named symbols (formatCost, formatTokens, useTerminalSize, Box,
Text, ProgressBar) so references in this file remain unchanged.
In `@src/components/StatusLine.tsx`:
- Around line 5-6: Update the imports in StatusLine.tsx to use the project's
tsconfig path alias ("src/...") instead of relative paths: replace imports of
getSdkBetas and getKairosActive (from '../bootstrap/state.js') and getTotalCost,
getTotalInputTokens, getTotalOutputTokens (from '../cost-tracker.js') with their
corresponding "src/..." aliases; also adjust the other changed import lines
referenced (lines importing any other modules at 8, 13, 15) to use "src/..." so
all TSX imports follow the src path mapping.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: dfaaded6-a0c0-448a-991f-0aacc575373c
⛔ Files ignored due to path filters (1)
QQ20260402-192932.pngis excluded by!**/*.png
📒 Files selected for processing (5)
build.tsscripts/dev.tssrc/components/BuiltinStatusLine.tsxsrc/components/StatusLine.tsxsrc/components/__tests__/BuiltinStatusLine.test.ts
✅ Files skipped from review due to trivial changes (2)
- build.ts
- src/components/tests/BuiltinStatusLine.test.ts
🚧 Files skipped from review as they are similar to previous changes (1)
- scripts/dev.ts
…tures Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
ba8e1b1 to
97b9b96
Compare

Summary
scripts/dev.ts:DEFAULT_FEATURES加入"AGENT_TRIGGERS_REMOTE"build.ts: 新增DEFAULT_BUILD_FEATURES = ["AGENT_TRIGGERS_REMOTE"],与 env 合并Why
/scheduleskill 和RemoteTriggerTool源码已在src/中,但feature('AGENT_TRIGGERS_REMOTE')构建时默认false,Bun DCE 把整条链路裁掉了。只需开启编译开关即可恢复。Test plan
bun run dev→ 输入/schedule能看到交互式工作流bun run build→dist/中包含"scheduled remote agents"字符串/loop和 CronCreate/Delete/List 不受影响🤖 Generated with Claude Code
Summary by CodeRabbit