opencode-cliproxyapi-sync 1.1.2 → 1.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +12 -18
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -166,14 +166,6 @@ var ConfigSyncPlugin = async (ctx) => {
166
166
  console.log("[cliproxyapi-sync] No config found. Skipping sync.");
167
167
  return {};
168
168
  }
169
- ctx.client.tui.showToast({
170
- body: {
171
- title: "CLIProxyAPI Sync",
172
- message: "Connected to dashboard",
173
- variant: "success",
174
- duration: 3000
175
- }
176
- });
177
169
  const versionResult = await checkVersion(config.dashboardUrl, config.syncToken);
178
170
  if (!versionResult) {
179
171
  console.error("[cliproxyapi-sync] Failed to check version. Skipping sync.");
@@ -196,18 +188,20 @@ var ConfigSyncPlugin = async (ctx) => {
196
188
  await writeConfigAtomic(ohMyConfigPath, JSON.stringify(bundle.ohMyOpencode, null, 2));
197
189
  }
198
190
  const newOpencodeHash = await readFileHash(opencodeConfigPath);
199
- if (oldOpencodeHash !== null && oldOpencodeHash !== newOpencodeHash) {
200
- ctx.client.tui.showToast({
201
- body: {
202
- title: "Config Sync",
203
- message: "opencode.json updated. Restart OpenCode to apply provider changes.",
204
- variant: "warning",
205
- duration: 8000
206
- }
207
- });
208
- }
209
191
  config.lastKnownVersion = bundle.version;
210
192
  savePluginConfig(config);
193
+ if (oldOpencodeHash !== null && oldOpencodeHash !== newOpencodeHash) {
194
+ setTimeout(() => {
195
+ ctx.client.tui.showToast({
196
+ body: {
197
+ title: "CLIProxyAPI Config Updated",
198
+ message: "Restart OpenCode to apply changes",
199
+ variant: "warning",
200
+ duration: 8000
201
+ }
202
+ });
203
+ }, 1000);
204
+ }
211
205
  console.log(`[cliproxyapi-sync] Synced to version ${bundle.version}`);
212
206
  } catch (error) {
213
207
  console.error("[cliproxyapi-sync] Sync error:", error);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-cliproxyapi-sync",
3
- "version": "1.1.2",
3
+ "version": "1.1.4",
4
4
  "description": "Auto-sync OpenCode configs from CLIProxyAPI Dashboard",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",