mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-07 08:26:51 +00:00
Release: v1.105.0 (#10722)
This commit is contained in:
parent
d689de34f8
commit
4b17f985b4
3 changed files with 79 additions and 1 deletions
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@roo-code/types",
|
||||
"version": "1.103.0",
|
||||
"version": "1.105.0",
|
||||
"description": "TypeScript type definitions for Roo Code.",
|
||||
"publishConfig": {
|
||||
"access": "public",
|
||||
|
|
|
|||
|
|
@ -331,3 +331,79 @@ describe("organizationCloudSettingsSchema with workspaceTaskVisibility", () => {
|
|||
expect(result.data?.cloudSettings?.workspaceTaskVisibility).toBe("list-only")
|
||||
})
|
||||
})
|
||||
|
||||
describe("organizationCloudSettingsSchema with llmEnhancedFeaturesEnabled", () => {
|
||||
it("should validate without llmEnhancedFeaturesEnabled property", () => {
|
||||
const input = {
|
||||
recordTaskMessages: true,
|
||||
enableTaskSharing: true,
|
||||
}
|
||||
const result = organizationCloudSettingsSchema.safeParse(input)
|
||||
expect(result.success).toBe(true)
|
||||
expect(result.data?.llmEnhancedFeaturesEnabled).toBeUndefined()
|
||||
})
|
||||
|
||||
it("should validate with llmEnhancedFeaturesEnabled as true", () => {
|
||||
const input = {
|
||||
recordTaskMessages: true,
|
||||
enableTaskSharing: true,
|
||||
llmEnhancedFeaturesEnabled: true,
|
||||
}
|
||||
const result = organizationCloudSettingsSchema.safeParse(input)
|
||||
expect(result.success).toBe(true)
|
||||
expect(result.data?.llmEnhancedFeaturesEnabled).toBe(true)
|
||||
})
|
||||
|
||||
it("should validate with llmEnhancedFeaturesEnabled as false", () => {
|
||||
const input = {
|
||||
recordTaskMessages: true,
|
||||
enableTaskSharing: true,
|
||||
llmEnhancedFeaturesEnabled: false,
|
||||
}
|
||||
const result = organizationCloudSettingsSchema.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 = organizationCloudSettingsSchema.safeParse(input)
|
||||
expect(result.success).toBe(false)
|
||||
})
|
||||
|
||||
it("should have correct TypeScript type", () => {
|
||||
// Type-only test to ensure TypeScript compilation
|
||||
const settings: OrganizationCloudSettings = {
|
||||
recordTaskMessages: true,
|
||||
enableTaskSharing: true,
|
||||
llmEnhancedFeaturesEnabled: true,
|
||||
}
|
||||
expect(settings.llmEnhancedFeaturesEnabled).toBe(true)
|
||||
|
||||
const settingsWithoutLlmFeatures: OrganizationCloudSettings = {
|
||||
recordTaskMessages: false,
|
||||
}
|
||||
expect(settingsWithoutLlmFeatures.llmEnhancedFeaturesEnabled).toBeUndefined()
|
||||
})
|
||||
|
||||
it("should validate in organizationSettingsSchema with llmEnhancedFeaturesEnabled", () => {
|
||||
const input = {
|
||||
version: 1,
|
||||
cloudSettings: {
|
||||
recordTaskMessages: true,
|
||||
enableTaskSharing: true,
|
||||
llmEnhancedFeaturesEnabled: false,
|
||||
},
|
||||
defaultSettings: {},
|
||||
allowList: {
|
||||
allowAll: true,
|
||||
providers: {},
|
||||
},
|
||||
}
|
||||
const result = organizationSettingsSchema.safeParse(input)
|
||||
expect(result.success).toBe(true)
|
||||
expect(result.data?.cloudSettings?.llmEnhancedFeaturesEnabled).toBe(false)
|
||||
})
|
||||
})
|
||||
|
|
|
|||
|
|
@ -139,6 +139,7 @@ export const organizationCloudSettingsSchema = z.object({
|
|||
taskShareExpirationDays: z.number().int().positive().optional(),
|
||||
allowMembersViewAllTasks: z.boolean().optional(),
|
||||
workspaceTaskVisibility: workspaceTaskVisibilitySchema.optional(),
|
||||
llmEnhancedFeaturesEnabled: z.boolean().optional(),
|
||||
})
|
||||
|
||||
export type OrganizationCloudSettings = z.infer<typeof organizationCloudSettingsSchema>
|
||||
|
|
@ -213,6 +214,7 @@ export const ORGANIZATION_DEFAULT: OrganizationSettings = {
|
|||
allowPublicTaskSharing: true,
|
||||
taskShareExpirationDays: 30,
|
||||
allowMembersViewAllTasks: true,
|
||||
llmEnhancedFeaturesEnabled: false,
|
||||
},
|
||||
defaultSettings: {},
|
||||
allowList: ORGANIZATION_ALLOW_ALL,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue