Tech
[程序员] 用了一个代码重构的 skill 把我的屎山代码重构了一次,爽多了,可读性、复用性都大幅提升,可以进来瞅瞅案例
话不多说,直接上代码表现:
旧代码
const editorConfigured = isDesktop && (claudeEnabled || cursorEnabled);
const cliNeedsAttention = !cliStatus?.installed || (cliStatus.installed && !cliStatus.version_matches);
const showCliCapabilityCard = isDesktop && !cliCardDismissed && cliNeedsAttention;
const cliStatusText = !cliStatus
? t("dashboard.cliCardChecking")
: cliStatus.installed
? cliStatus.version_matches
? t("dashboard.cliCardInstalled", cliSta...
Read the full discussion on V2EX
This article was aggregated from V2EX. Click to join the conversation.
View on V2EX