@stablekernel/opencode-cursor 0.7.1-next.0 → 0.7.1-next.2

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.
@@ -146,6 +146,10 @@ function injectSubagentSessionId(parts, sessionId) {
146
146
  folded["metadata"] = metadata;
147
147
  }
148
148
  }
149
+ function effectiveToolDisplay(configured, tools) {
150
+ if (!Array.isArray(tools) || tools.length === 0) return "reasoning";
151
+ return configured ?? "blocks";
152
+ }
149
153
  var FINISH_STOP = {
150
154
  unified: "stop",
151
155
  raw: void 0
@@ -1418,15 +1422,17 @@ var CursorLanguageModel = class {
1418
1422
  const po = options.providerOptions?.[this.provider];
1419
1423
  const sessionID = typeof po?.["sessionID"] === "string" ? po["sessionID"] : void 0;
1420
1424
  return {
1421
- stream: cursorEventsToStream(this.agentRun(options), this.config.toolDisplay, {
1422
- sessionID
1423
- })
1425
+ stream: cursorEventsToStream(
1426
+ this.agentRun(options),
1427
+ effectiveToolDisplay(this.config.toolDisplay, options.tools),
1428
+ { sessionID }
1429
+ )
1424
1430
  };
1425
1431
  }
1426
1432
  async doGenerate(options) {
1427
1433
  const result = await cursorEventsToContent(
1428
1434
  this.agentRun(options),
1429
- this.config.toolDisplay
1435
+ effectiveToolDisplay(this.config.toolDisplay, options.tools)
1430
1436
  );
1431
1437
  return { ...result, warnings: [] };
1432
1438
  }