opencode-cliproxyapi-sync 1.1.3 → 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 -20
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -166,16 +166,6 @@ var ConfigSyncPlugin = async (ctx) => {
166
166
  console.log("[cliproxyapi-sync] No config found. Skipping sync.");
167
167
  return {};
168
168
  }
169
- setTimeout(() => {
170
- ctx.client.tui.showToast({
171
- body: {
172
- title: "CLIProxyAPI Sync",
173
- message: "Connected to dashboard",
174
- variant: "success",
175
- duration: 3000
176
- }
177
- });
178
- }, 1000);
179
169
  const versionResult = await checkVersion(config.dashboardUrl, config.syncToken);
180
170
  if (!versionResult) {
181
171
  console.error("[cliproxyapi-sync] Failed to check version. Skipping sync.");
@@ -198,18 +188,20 @@ var ConfigSyncPlugin = async (ctx) => {
198
188
  await writeConfigAtomic(ohMyConfigPath, JSON.stringify(bundle.ohMyOpencode, null, 2));
199
189
  }
200
190
  const newOpencodeHash = await readFileHash(opencodeConfigPath);
201
- if (oldOpencodeHash !== null && oldOpencodeHash !== newOpencodeHash) {
202
- ctx.client.tui.showToast({
203
- body: {
204
- title: "Config Sync",
205
- message: "opencode.json updated. Restart OpenCode to apply provider changes.",
206
- variant: "warning",
207
- duration: 8000
208
- }
209
- });
210
- }
211
191
  config.lastKnownVersion = bundle.version;
212
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
+ }
213
205
  console.log(`[cliproxyapi-sync] Synced to version ${bundle.version}`);
214
206
  } catch (error) {
215
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.3",
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",