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

Function buildConfig

tests/message-priority.test.ts:14–62  ·  view source on GitHub ↗
(mode: "message" | "range" = "message")

Source from the content-addressed store, hash-verified

12import { createSessionState, type WithParts } from "../lib/state"
13
14function buildConfig(mode: "message" | "range" = "message"): PluginConfig {
15 return {
16 enabled: true,
17 debug: false,
18 pruneNotification: "off",
19 pruneNotificationType: "chat",
20 commands: {
21 enabled: true,
22 protectedTools: [],
23 },
24 manualMode: {
25 enabled: false,
26 automaticStrategies: true,
27 },
28 turnProtection: {
29 enabled: false,
30 turns: 4,
31 },
32 experimental: {
33 allowSubAgents: false,
34 customPrompts: false,
35 },
36 protectedFilePatterns: [],
37 compress: {
38 mode,
39 permission: "allow",
40 showCompression: false,
41 maxContextLimit: 150000,
42 minContextLimit: 50000,
43 nudgeFrequency: 5,
44 iterationNudgeThreshold: 15,
45 nudgeForce: "soft",
46 protectedTools: ["task"],
47 protectTags: false,
48 protectUserMessages: false,
49 },
50 strategies: {
51 deduplication: {
52 enabled: true,
53 protectedTools: [],
54 },
55 purgeErrors: {
56 enabled: true,
57 turns: 4,
58 protectedTools: [],
59 },
60 },
61 }
62}
63
64function textPart(messageID: string, sessionID: string, id: string, text: string) {
65 return {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected