Skip to content

Commit a70d7c5

Browse files
authored
Merge pull request #31 from Tarquinen/fix/delay-update-check
Delay update check to avoid blocking plugin init
2 parents 3d27337 + 5fa7a9c commit a70d7c5

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Add to your OpenCode config:
1313
```jsonc
1414
// opencode.jsonc
1515
{
16-
"plugins": ["@tarquinen/[email protected].18"]
16+
"plugins": ["@tarquinen/[email protected].19"]
1717
}
1818
```
1919

index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,9 @@ const plugin: Plugin = (async (ctx) => {
127127
model: config.model || "auto"
128128
})
129129

130-
checkForUpdates(ctx.client, logger).catch(() => { })
130+
setTimeout(() => {
131+
checkForUpdates(ctx.client, logger).catch(() => { })
132+
}, 5000)
131133

132134
if (migrations.length > 0) {
133135
setTimeout(async () => {

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "https://json.schemastore.org/package.json",
33
"name": "@tarquinen/opencode-dcp",
4-
"version": "0.3.18",
4+
"version": "0.3.19",
55
"type": "module",
66
"description": "OpenCode plugin that optimizes token usage by pruning obsolete tool outputs from conversation context",
77
"main": "./dist/index.js",

0 commit comments

Comments
 (0)