Skip to content

Commit 4ee494b

Browse files
authored
Release: v1.106.0 (#10749)
1 parent 724571c commit 4ee494b

3 files changed

Lines changed: 76 additions & 1 deletion

File tree

packages/types/npm/package.metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@roo-code/types",
3-
"version": "1.105.0",
3+
"version": "1.106.0",
44
"description": "TypeScript type definitions for Roo Code.",
55
"publishConfig": {
66
"access": "public",

packages/types/src/__tests__/cloud.test.ts

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@ import {
44
organizationCloudSettingsSchema,
55
organizationFeaturesSchema,
66
organizationSettingsSchema,
7+
userSettingsConfigSchema,
78
type OrganizationCloudSettings,
89
type OrganizationFeatures,
910
type OrganizationSettings,
11+
type UserSettingsConfig,
1012
type WorkspaceTaskVisibility,
1113
} from "../cloud.js"
1214

@@ -407,3 +409,75 @@ describe("organizationCloudSettingsSchema with llmEnhancedFeaturesEnabled", () =
407409
expect(result.data?.cloudSettings?.llmEnhancedFeaturesEnabled).toBe(false)
408410
})
409411
})
412+
413+
describe("userSettingsConfigSchema with llmEnhancedFeaturesEnabled", () => {
414+
it("should validate without llmEnhancedFeaturesEnabled property", () => {
415+
const input = {
416+
extensionBridgeEnabled: true,
417+
taskSyncEnabled: true,
418+
}
419+
const result = userSettingsConfigSchema.safeParse(input)
420+
expect(result.success).toBe(true)
421+
expect(result.data?.llmEnhancedFeaturesEnabled).toBeUndefined()
422+
})
423+
424+
it("should validate with llmEnhancedFeaturesEnabled as true", () => {
425+
const input = {
426+
extensionBridgeEnabled: true,
427+
taskSyncEnabled: true,
428+
llmEnhancedFeaturesEnabled: true,
429+
}
430+
const result = userSettingsConfigSchema.safeParse(input)
431+
expect(result.success).toBe(true)
432+
expect(result.data?.llmEnhancedFeaturesEnabled).toBe(true)
433+
})
434+
435+
it("should validate with llmEnhancedFeaturesEnabled as false", () => {
436+
const input = {
437+
extensionBridgeEnabled: true,
438+
taskSyncEnabled: true,
439+
llmEnhancedFeaturesEnabled: false,
440+
}
441+
const result = userSettingsConfigSchema.safeParse(input)
442+
expect(result.success).toBe(true)
443+
expect(result.data?.llmEnhancedFeaturesEnabled).toBe(false)
444+
})
445+
446+
it("should reject non-boolean llmEnhancedFeaturesEnabled", () => {
447+
const input = {
448+
llmEnhancedFeaturesEnabled: "true",
449+
}
450+
const result = userSettingsConfigSchema.safeParse(input)
451+
expect(result.success).toBe(false)
452+
})
453+
454+
it("should have correct TypeScript type", () => {
455+
// Type-only test to ensure TypeScript compilation
456+
const settings: UserSettingsConfig = {
457+
extensionBridgeEnabled: true,
458+
taskSyncEnabled: true,
459+
llmEnhancedFeaturesEnabled: true,
460+
}
461+
expect(settings.llmEnhancedFeaturesEnabled).toBe(true)
462+
463+
const settingsWithoutLlmFeatures: UserSettingsConfig = {
464+
extensionBridgeEnabled: false,
465+
}
466+
expect(settingsWithoutLlmFeatures.llmEnhancedFeaturesEnabled).toBeUndefined()
467+
})
468+
469+
it("should validate empty object", () => {
470+
const result = userSettingsConfigSchema.safeParse({})
471+
expect(result.success).toBe(true)
472+
expect(result.data).toEqual({})
473+
})
474+
475+
it("should validate with only llmEnhancedFeaturesEnabled", () => {
476+
const input = {
477+
llmEnhancedFeaturesEnabled: true,
478+
}
479+
const result = userSettingsConfigSchema.safeParse(input)
480+
expect(result.success).toBe(true)
481+
expect(result.data?.llmEnhancedFeaturesEnabled).toBe(true)
482+
})
483+
})

packages/types/src/cloud.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ export type UserFeatures = z.infer<typeof userFeaturesSchema>
185185
export const userSettingsConfigSchema = z.object({
186186
extensionBridgeEnabled: z.boolean().optional(),
187187
taskSyncEnabled: z.boolean().optional(),
188+
llmEnhancedFeaturesEnabled: z.boolean().optional(),
188189
})
189190

190191
export type UserSettingsConfig = z.infer<typeof userSettingsConfigSchema>

0 commit comments

Comments
 (0)