feat: 添加服务层增强与零散改进

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
unraid
2026-04-22 22:38:10 +08:00
parent 2247026bd5
commit c7e1c50b86
23 changed files with 861 additions and 100 deletions

View File

@@ -97,16 +97,13 @@ export function useIssueFlagBanner(
return false
}
// biome-ignore lint/correctness/useHookAtTopLevel: process.env.USER_TYPE is a compile-time constant
const lastTriggeredAtRef = useRef(0)
// biome-ignore lint/correctness/useHookAtTopLevel: process.env.USER_TYPE is a compile-time constant
const activeForSubmitRef = useRef(-1)
// Memoize the O(messages) scans. This hook runs on every REPL render
// (including every keystroke), but messages is stable during typing.
// isSessionContainerCompatible walks all messages + regex-tests each
// bash command — by far the heaviest work here.
// biome-ignore lint/correctness/useHookAtTopLevel: process.env.USER_TYPE is a compile-time constant
const shouldTrigger = useMemo(
() => isSessionContainerCompatible(messages) && hasFrictionSignal(messages),
[messages],