Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): keep Claude builtins in the command list #11094

Closedmdiniz97(GitHub profile, opens in a new tab)wants to merge 2 commits intomain fromrefs/pull/11094/headopened View on GitHub

Showing 2 changed files with 72 additions and 17 deletions.

x
0 of 2 viewed, 2 left
22 additions and 1 deletionapps/server/src/provider/Layers/ClaudeProvider.tsModified
View file
@@ -56,6 +56,19 @@
displayName: "Claude",
showInteractionModeToggle: true,
} as const;
+​
+/**
+ * Builtins the CLI advertises on a live session's `system/init`
+ * `slash_commands` but no longer returns from `initializationResult().commands`
+ * (SDK 0.3.260 returns skills only), so a capability probe alone loses them.
+ * Keep this list to stable builtins that do not depend on plugins or config.
+ */
+const CLAUDE_BUILTIN_SLASH_COMMANDS: ReadonlyArray<ServerProviderSlashCommand> = [
+ { name: "context" },
+ { name: "reload-plugins" },
+ { name: "reload-skills" },
+];
+​
function toTitleCaseWords(value: string): string {
const parts: Array<string> = [];
for (const part of value.split(/[\s_-]+/g)) {
@@ -415,6 +428,10 @@
return yield* spawnAndCollect(claudeSettings.binaryPath, command);
});
​
+/**
+ * Builds the Claude provider snapshot: version and auth, models, skills, usage
+ * limits, and the slash commands the composer should offer.
+ */
export const checkClaudeProviderStatus = Effect.fn("checkClaudeProviderStatus")(function* (