mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
Release: v1.106.0 (#10749)
This commit is contained in:
parent
724571c7bd
commit
4ee494b08c
3 changed files with 76 additions and 1 deletions
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@roo-code/types",
|
||||
"version": "1.105.0",
|
||||
"version": "1.106.0",
|
||||
"description": "TypeScript type definitions for Roo Code.",
|
||||
"publishConfig": {
|
||||
"access": "public",
|
||||
|
|
|
|||
|
|
@ -4,9 +4,11 @@ import {
|
|||
organizationCloudSettingsSchema,
|
||||
organizationFeaturesSchema,
|
||||
organizationSettingsSchema,
|
||||
userSettingsConfigSchema,
|
||||
type OrganizationCloudSettings,
|
||||
type OrganizationFeatures,
|
||||
type OrganizationSettings,
|
||||
type UserSettingsConfig,
|
||||
type WorkspaceTaskVisibility,
|
||||
} from "../cloud.js"
|
||||
|
||||
|
|
@ -407,3 +409,75 @@ describe("organizationCloudSettingsSchema with llmEnhancedFeaturesEnabled", () =
|
|||
expect(result.data?.cloudSettings?.llmEnhancedFeaturesEnabled).toBe(false)
|
||||
})
|
||||
})
|
||||
|
||||
describe("userSettingsConfigSchema with llmEnhancedFeaturesEnabled", () => {
|
||||
it("should validate without llmEnhancedFeaturesEnabled property", () => {
|
||||
const input = {
|
||||
extensionBridgeEnabled: true,
|
||||
taskSyncEnabled: true,
|
||||
}
|
||||
const result = userSettingsConfigSchema.safeParse(input)
|
||||
expect(result.success).toBe(true)
|
||||
expect(result.data?.llmEnhancedFeaturesEnabled).toBeUndefined()
|
||||
})
|
||||
|
||||
it("should validate with llmEnhancedFeaturesEnabled as true", () => {
|
||||
const input = {
|
||||
extensionBridgeEnabled: true,
|
||||
taskSyncEnabled: true,
|
||||
llmEnhancedFeaturesEnabled: true,
|
||||
}
|
||||
const result = userSettingsConfigSchema.safeParse(input)
|
||||
expect(result.success).toBe(true)
|
||||
expect(result.data?.llmEnhancedFeaturesEnabled).toBe(true)
|
||||
})
|
||||
|
||||
it("should validate with llmEnhancedFeaturesEnabled as false", () => {
|
||||
const input = {
|
||||
extensionBridgeEnabled: true,
|
||||
taskSyncEnabled: true,
|
||||
llmEnhancedFeaturesEnabled: false,
|
||||
}
|
||||
const result = userSettingsConfigSchema.safeParse(input)
|
||||
expect(result.success).toBe(true)
|
||||
expect(result.data?.llmEnhancedFeaturesEnabled).toBe(false)
|
||||
})
|
||||
|
||||
it("should reject non-boolean llmEnhancedFeaturesEnabled", () => {
|
||||
const input = {
|
||||
llmEnhancedFeaturesEnabled: "true",
|
||||
}
|
||||
const result = userSettingsConfigSchema.safeParse(input)
|
||||
expect(result.success).toBe(false)
|
||||
})
|
||||
|
||||
it("should have correct TypeScript type", () => {
|
||||
// Type-only test to ensure TypeScript compilation
|
||||
const settings: UserSettingsConfig = {
|
||||
extensionBridgeEnabled: true,
|
||||
taskSyncEnabled: true,
|
||||
llmEnhancedFeaturesEnabled: true,
|
||||
}
|
||||
expect(settings.llmEnhancedFeaturesEnabled).toBe(true)
|
||||
|
||||
const settingsWithoutLlmFeatures: UserSettingsConfig = {
|
||||
extensionBridgeEnabled: false,
|
||||
}
|
||||
expect(settingsWithoutLlmFeatures.llmEnhancedFeaturesEnabled).toBeUndefined()
|
||||
})
|
||||
|
||||
it("should validate empty object", () => {
|
||||
const result = userSettingsConfigSchema.safeParse({})
|
||||
expect(result.success).toBe(true)
|
||||
expect(result.data).toEqual({})
|
||||
})
|
||||
|
||||
it("should validate with only llmEnhancedFeaturesEnabled", () => {
|
||||
const input = {
|
||||
llmEnhancedFeaturesEnabled: true,
|
||||
}
|
||||
const result = userSettingsConfigSchema.safeParse(input)
|
||||
expect(result.success).toBe(true)
|
||||
expect(result.data?.llmEnhancedFeaturesEnabled).toBe(true)
|
||||
})
|
||||
})
|
||||
|
|
|
|||
|
|
@ -185,6 +185,7 @@ export type UserFeatures = z.infer<typeof userFeaturesSchema>
|
|||
export const userSettingsConfigSchema = z.object({
|
||||
extensionBridgeEnabled: z.boolean().optional(),
|
||||
taskSyncEnabled: z.boolean().optional(),
|
||||
llmEnhancedFeaturesEnabled: z.boolean().optional(),
|
||||
})
|
||||
|
||||
export type UserSettingsConfig = z.infer<typeof userSettingsConfigSchema>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue