@link-assistant/agent 0.16.11 → 0.16.12
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/package.json +1 -1
- package/src/provider/provider.ts +11 -3
package/package.json
CHANGED
package/src/provider/provider.ts
CHANGED
|
@@ -1201,15 +1201,23 @@ export namespace Provider {
|
|
|
1201
1201
|
sessionID: provider.id,
|
|
1202
1202
|
});
|
|
1203
1203
|
|
|
1204
|
-
// Wrap fetch with verbose HTTP logging
|
|
1205
|
-
//
|
|
1204
|
+
// Wrap fetch with verbose HTTP logging for debugging provider issues.
|
|
1205
|
+
// IMPORTANT: The verbose check is done at call time (not SDK creation time)
|
|
1206
|
+
// because the SDK is cached and Flag.OPENCODE_VERBOSE may change after creation.
|
|
1207
|
+
// When verbose is disabled, the wrapper is a no-op passthrough with negligible overhead.
|
|
1206
1208
|
// See: https://github.com/link-assistant/agent/issues/200
|
|
1207
|
-
|
|
1209
|
+
// See: https://github.com/link-assistant/agent/issues/206
|
|
1210
|
+
{
|
|
1208
1211
|
const innerFetch = options['fetch'];
|
|
1209
1212
|
options['fetch'] = async (
|
|
1210
1213
|
input: RequestInfo | URL,
|
|
1211
1214
|
init?: RequestInit
|
|
1212
1215
|
): Promise<Response> => {
|
|
1216
|
+
// Check verbose flag at call time — not at SDK creation time
|
|
1217
|
+
if (!Flag.OPENCODE_VERBOSE) {
|
|
1218
|
+
return innerFetch(input, init);
|
|
1219
|
+
}
|
|
1220
|
+
|
|
1213
1221
|
const url =
|
|
1214
1222
|
typeof input === 'string'
|
|
1215
1223
|
? input
|