MCPcopy Index your code
hub / github.com/Opencode-DCP/opencode-dynamic-context-pruning / deepCloneConfig

Function deepCloneConfig

lib/config.ts:899–930  ·  view source on GitHub ↗
(config: PluginConfig)

Source from the content-addressed store, hash-verified

897}
898
899function deepCloneConfig(config: PluginConfig): PluginConfig {
900 return {
901 ...config,
902 commands: {
903 enabled: config.commands.enabled,
904 protectedTools: [...config.commands.protectedTools],
905 },
906 manualMode: {
907 enabled: config.manualMode.enabled,
908 automaticStrategies: config.manualMode.automaticStrategies,
909 },
910 turnProtection: { ...config.turnProtection },
911 experimental: { ...config.experimental },
912 protectedFilePatterns: [...config.protectedFilePatterns],
913 compress: {
914 ...config.compress,
915 modelMaxLimits: { ...config.compress.modelMaxLimits },
916 modelMinLimits: { ...config.compress.modelMinLimits },
917 protectedTools: [...config.compress.protectedTools],
918 },
919 strategies: {
920 deduplication: {
921 ...config.strategies.deduplication,
922 protectedTools: [...config.strategies.deduplication.protectedTools],
923 },
924 purgeErrors: {
925 ...config.strategies.purgeErrors,
926 protectedTools: [...config.strategies.purgeErrors.protectedTools],
927 },
928 },
929 }
930}
931
932function mergeLayer(config: PluginConfig, data: Record<string, any>): PluginConfig {
933 return {

Callers 1

getConfigFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected