fix(claude): keep last good slash commands after a failed probe #7175
Closedmaslinedwin(GitHub profile, opens in a new tab)wants to merge 6 commits into
main fromrefs/pull/7175/headopened View on GitHubgithub-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:S
- @@ -165,7 +166,21 @@165166167+ const lastGoodSlashCommands = yield* Ref.make<ServerProvider["slashCommands"]>([]);166168 const checkProvider = checkClaudeProviderStatus(167169 effectiveConfig,168170 () => Cache.get(capabilitiesProbeCache, capabilitiesCacheKey),169171 processEnv,170172 cwd,171173 ).pipe(174+ Effect.flatMap((snapshot) =>175+ Effect.gen(function* () {176+ if (snapshot.slashCommands.length > 0) {177+ yield* Ref.set(lastGoodSlashCommands, snapshot.slashCommands);178+ return snapshot;179+ }180+ const previous = yield* Ref.get(lastGoodSlashCommands);181+ if (previous.length === 0) {182+ return snapshot;183+ }184+ return { ...snapshot, slashCommands: previous };185+ }),186+ ),
- apps/server/src/provider/Drivers/ClaudeDriver.ts line 185OutdatedResolvedby cursor[bot](GitHub profile, opens in a new tab)@@ -164,8 +165,21 @@164165 const capabilitiesCacheKey = yield* makeClaudeCapabilitiesCacheKey(effectiveConfig, cwd);165166167+ const lastGoodSlashCommands = yield* Ref.make<ServerProvider["slashCommands"]>([]);166168 const checkProvider = checkClaudeProviderStatus(167169 effectiveConfig,168170 () => Cache.get(capabilitiesProbeCache, capabilitiesCacheKey),169171 processEnv,170172 cwd,171173 ).pipe(174+ Effect.flatMap((snapshot) =>175+ Effect.gen(function* () {176+ if (snapshot.slashCommands.length > 0) {177+ yield* Ref.set(lastGoodSlashCommands, snapshot.slashCommands);178+ return snapshot;179+ }180+ const previous = yield* Ref.get(lastGoodSlashCommands);181+ if (previous.length === 0) {182+ return snapshot;183+ }184+ return { ...snapshot, slashCommands: previous };185+ }),
github-actions[bot](GitHub profile, opens in a new tab) removed labelssize:S
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:M
macroscopeapp[bot](GitHub profile, opens in a new tab) approved these changes
juliusmarminge closed this
Sign in to join this conversation.


Important
Review skipped#
Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
.coderabbit.yamlfile in this repository. To trigger a single review, invoke the@coderabbitai reviewcommand.⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID:
231d5c57-d671-471a-a30c-d1bfbafe9fcaYou can disable this status message by setting the
reviews.review_statustofalsein the CodeRabbit configuration file.Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share