Skip to content
This repository was archived by the owner on Feb 20, 2026. It is now read-only.

Commit 9fb593f

Browse files
committed
refactor: remove ai clutter #2
1 parent 4574a98 commit 9fb593f

3 files changed

Lines changed: 1 addition & 189 deletions

File tree

__tests__/mocks.ts

Lines changed: 0 additions & 146 deletions
This file was deleted.

config-schema.json

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,6 @@
99
"description": "Enable task loop functionality",
1010
"default": true
1111
},
12-
"iterationLoop": {
13-
"type": "boolean",
14-
"description": "Enable iteration loop functionality",
15-
"default": true
16-
},
1712
"countdownSeconds": {
1813
"type": "integer",
1914
"description": "Default countdown seconds before auto-continuation",
@@ -32,14 +27,6 @@
3227
"minimum": 0,
3328
"default": 900
3429
},
35-
"agent": {
36-
"type": ["string", "null"],
37-
"description": "Agent name for continuation prompts"
38-
},
39-
"model": {
40-
"type": ["string", "null"],
41-
"description": "Model name for continuation prompts"
42-
},
4330
"debug": {
4431
"type": "boolean",
4532
"description": "Enable debug logging",
@@ -53,8 +40,6 @@
5340
"countdownSeconds": 2,
5441
"errorCooldownMs": 3000,
5542
"toastDurationMs": 900,
56-
"agent": null,
57-
"model": null,
5843
"debug": true
5944
}
6045
}

config.ts

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -22,59 +22,41 @@ const CONFIG_DIR = ".config/opencode"
2222
* Default plugin configuration
2323
*/
2424
export interface AgentLoopPluginOptions {
25-
/** Enable task loop functionality (default: true) */
2625
taskLoop?: boolean
27-
/** Enable iteration loop functionality (default: true) */
28-
iterationLoop?: boolean
2926
/** Default countdown seconds before auto-continuation (default: 2) */
3027
countdownSeconds?: number
3128
/** Cooldown period in ms after errors (default: 3000) */
3229
errorCooldownMs?: number
3330
/** Toast notification duration in ms (default: 900) */
3431
toastDurationMs?: number
35-
/** Agent name for continuation prompts */
36-
agent?: string
37-
/** Model name for continuation prompts */
38-
model?: string
3932
/** Enable debug logging (default: true) */
4033
debug?: boolean
4134
/** Path to log file for writing logs */
4235
logFilePath?: string
4336
/** Path to custom continuation prompt template file */
44-
continuationPromptFile?: string
4537
}
4638

4739
/**
4840
* Internal configuration with all fields required
4941
*/
5042
interface InternalConfig {
5143
// All fields are required for internal use
52-
taskLoop: boolean
53-
iterationLoop: boolean
5444
countdownSeconds: number
5545
errorCooldownMs: number
5646
toastDurationMs: number
57-
agent: string | undefined
58-
model: string | undefined
5947
debug: boolean
6048
logFilePath: string | undefined
61-
continuationPromptFile: string | undefined
6249
}
6350

6451
/**
6552
* Default configuration values
6653
*/
6754
const HARDCODED_DEFAULTS: InternalConfig = {
68-
taskLoop: true,
69-
iterationLoop: true,
7055
countdownSeconds: 2,
7156
errorCooldownMs: 3000,
7257
toastDurationMs: 900,
73-
agent: undefined,
74-
model: undefined,
7558
debug: true,
7659
logFilePath: undefined,
77-
continuationPromptFile: undefined,
7860
}
7961

8062
/**
@@ -116,23 +98,14 @@ function loadConfigFromFile(): AgentLoopPluginOptions | null {
11698

11799
// Return validated config (unknown properties are ignored)
118100
return {
119-
taskLoop: config.taskLoop,
120-
iterationLoop: config.iterationLoop,
121101
countdownSeconds: config.countdownSeconds,
122102
errorCooldownMs: config.errorCooldownMs,
123103
toastDurationMs: config.toastDurationMs,
124-
agent: config.agent,
125-
model: config.model,
126104
debug: config.debug,
127105
logFilePath: config.logFilePath,
128-
continuationPromptFile: config.continuationPromptFile,
129106
}
130107
} catch (error) {
131-
if (error instanceof SyntaxError) {
132-
console.warn("[agent-loop-plugin] Config file contains invalid JSON")
133-
} else {
134-
console.warn(`[agent-loop-plugin] Failed to read config file: ${error}`)
135-
}
108+
console.warn(`[agent-loop-plugin] Failed to read config file: ${error}`)
136109
return null
137110
}
138111
}

0 commit comments

Comments
 (0)