Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): Claude provider checks no longer crash on a non-string argument hint #49571

ClosedTuanNancy(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/49571/headopened View on GitHub

Showing 2 changed files with 44 additions and 1 deletion.

x
0 of 2 viewed, 2 left
42 additions and 0 deletionsapps/server/src/provider/ClaudeCapabilitiesProbe.test.tsModified
View file
@@ -9,6 +9,7 @@
​
import {
buildClaudeCapabilitiesProbeQueryOptions,
+ probeClaudeCapabilities,
probeClaudeWorkspaceSnapshot,
} from "./ClaudeProvider.ts";
​
@@ -34,6 +35,47 @@
assert.equal(options.env?.ENABLE_CLAUDEAI_MCP_SERVERS, "false");
});
​
+it.effect("ignores a non-string command argument hint instead of failing the check", () =>
+ Effect.gen(function* () {
+ const query = vi.spyOn(ClaudeSdk, "query").mockImplementation(
+ () =>
+ ({
+ initializationResult: async () => ({
+ account: {
+ email: "dev@example.com",
+ subscriptionType: "pro",
+ tokenSource: "oauth",
+ },
+ commands: [
+ {
+ name: "backup-setup",
+ description: "Back up or restore",
+ argumentHint: ["setup|restore|status"],
+ },