opencode-fast-apply 2.1.3 → 2.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.
package/README.md CHANGED
@@ -98,7 +98,6 @@ function validateToken(token) {
98
98
  | `FAST_APPLY_API_KEY` | `optional-api-key` | API key (optional for local servers) |
99
99
  | `FAST_APPLY_URL` | `http://localhost:1234/v1` | OpenAI-compatible API endpoint |
100
100
  | `FAST_APPLY_MODEL` | `fastapply-1.5b` | Model name |
101
- | `FAST_APPLY_TIMEOUT` | `30000` | Request timeout in ms |
102
101
  | `FAST_APPLY_TEMPERATURE` | `0.05` | Temperature (0.0-2.0) |
103
102
 
104
103
  ## How It Works
@@ -162,12 +161,6 @@ curl -X POST http://localhost:1234/v1/chat/completions \
162
161
  - Use Q4 quantization for faster inference
163
162
  - Increase `FAST_APPLY_MAX_TOKENS` if responses are truncated
164
163
 
165
- ### Timeout Errors
166
- ```bash
167
- # Increase timeout for slower hardware
168
- export FAST_APPLY_TIMEOUT="60000" # 60 seconds
169
- ```
170
-
171
164
  ## Contributing
172
165
 
173
166
  Contributions welcome! This plugin could potentially be integrated into OpenCode core.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,KAAK,MAAM,EAAQ,MAAM,qBAAqB,CAAA;AAwbvD,eAAO,MAAM,eAAe,EAAE,MA4J7B,CAAA;AAGD,eAAe,eAAe,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,KAAK,MAAM,EAAQ,MAAM,qBAAqB,CAAA;AA0avD,eAAO,MAAM,eAAe,EAAE,MA4J7B,CAAA;AAGD,eAAe,eAAe,CAAA"}
package/dist/index.js CHANGED
@@ -16,7 +16,6 @@ const sessionParamsCache = new Map();
16
16
  const FAST_APPLY_API_KEY = process.env.FAST_APPLY_API_KEY || "optional-api-key";
17
17
  const FAST_APPLY_URL = (process.env.FAST_APPLY_URL || "http://localhost:1234/v1").replace(/\/v1\/?$/, "");
18
18
  const FAST_APPLY_MODEL = process.env.FAST_APPLY_MODEL || "fastapply-1.5b";
19
- const FAST_APPLY_TIMEOUT = parseInt(process.env.FAST_APPLY_TIMEOUT || "30000", 10);
20
19
  const FAST_APPLY_TEMPERATURE = parseFloat(process.env.FAST_APPLY_TEMPERATURE || "0.05");
21
20
  const FAST_APPLY_SYSTEM_PROMPT = "You are a coding assistant that helps merge code updates, ensuring every modification is fully integrated.";
22
21
  const FAST_APPLY_USER_PROMPT = `Merge all changes from the <update> snippet into the <code> below.
@@ -229,8 +228,6 @@ async function callFastApply(originalCode, codeEdit, instructions) {
229
228
  error: "FAST_APPLY_API_KEY not set. Get one at https://openai.com/api",
230
229
  };
231
230
  }
232
- const controller = new AbortController();
233
- const timeoutId = setTimeout(() => controller.abort(), FAST_APPLY_TIMEOUT);
234
231
  try {
235
232
  const escapedOriginalCode = escapeXmlTags(originalCode);
236
233
  const escapedCodeEdit = escapeXmlTags(codeEdit);
@@ -257,9 +254,7 @@ async function callFastApply(originalCode, codeEdit, instructions) {
257
254
  ],
258
255
  temperature: FAST_APPLY_TEMPERATURE,
259
256
  }),
260
- signal: controller.signal,
261
257
  });
262
- clearTimeout(timeoutId);
263
258
  if (!response.ok) {
264
259
  const errorText = await response.text();
265
260
  return {
@@ -282,14 +277,7 @@ async function callFastApply(originalCode, codeEdit, instructions) {
282
277
  };
283
278
  }
284
279
  catch (err) {
285
- clearTimeout(timeoutId);
286
280
  const error = err;
287
- if (error.name === "AbortError") {
288
- return {
289
- success: false,
290
- error: `Fast Apply API timeout after ${FAST_APPLY_TIMEOUT}ms`,
291
- };
292
- }
293
281
  return {
294
282
  success: false,
295
283
  error: `Fast Apply API request failed: ${error.message}`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-fast-apply",
3
- "version": "2.1.3",
3
+ "version": "2.1.4",
4
4
  "description": "OpenCode plugin for Fast Apply - High-performance code editing with OpenAI-compatible APIs (LM Studio, Ollama)",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",