Skip to content

Initialize _useToolsActual in constructor#80

Merged
nmaguiar merged 2 commits intoclearfrom
copilot/sub-pr-79
Nov 18, 2025
Merged

Initialize _useToolsActual in constructor#80
nmaguiar merged 2 commits intoclearfrom
copilot/sub-pr-79

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Nov 18, 2025

Addresses review feedback from PR #79 regarding uninitialized property access.

Changes

  • Initialize this._useToolsActual = false in MiniA constructor (line 48)

Context

The property was checked on line 7079 before being guaranteed to exist:

if (toBoolean(args.mcpproxy) === true && this._useToolsActual === true) {
  baseRules.push("When invoking MCP tools, use function calling with 'proxy-dispatch'...")
}

While _registerMcpToolsForGoal sets this property based on LLM capabilities, explicit initialization in the constructor prevents undefined state during early lifecycle checks.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: nmaguiar <11761746+nmaguiar@users.noreply.github.com>
Copilot AI changed the title [WIP] WIP Address feedback from review on 'Clarity' pull request Initialize _useToolsActual in constructor Nov 18, 2025
Copilot AI requested a review from nmaguiar November 18, 2025 05:21
@nmaguiar nmaguiar marked this pull request as ready for review November 18, 2025 05:24
@nmaguiar nmaguiar merged commit 61b7f18 into clear Nov 18, 2025
@nmaguiar nmaguiar deleted the copilot/sub-pr-79 branch November 18, 2025 05:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants