Skip to content

Remove the unused tool-call message constructor - #3163

Merged
zeroliu merged 1 commit into
masterfrom
jennifer/399-remove-unused-ai-message
Sep 9, 2026
Merged

Remove the unused tool-call message constructor#3163
zeroliu merged 1 commit into
masterfrom
jennifer/399-remove-unused-ai-message

Conversation

@brevilabs-agent-bot

Copy link
Copy Markdown
Contributor

Relates to Brevilabs/obsidian-copilot-private#399

Why

The native tool-call utilities retain an unused conversation-history constructor. No chat path calls it, so it adds a second construction path for maintainers to reason about without serving a user workflow.

What

Remove the unused constructor. Live chat history, streaming tool-call processing, and tool-result messages keep their current behavior.

Non goal

Changing provider request formats, conversation history, live streaming, tool execution, error handling, settings, storage, or dependencies.

Screenshot

Not applicable: this removes an unused internal helper with no visible change.

Risk

Low

Criterion Status Reason
No behavior change, or a cosmetic/copy/docs/config change visible where it renders, or deterministic tests cover the changed behavior The removed helper has no direct, dynamic, or test callers
A defect would fail CI or be obvious on first use Type checking catches typed callers; the reference audit found no dynamic consumers
A revert fully restores prior state, including persisted data No stored data is changed
No auth, permissions, secrets, or input-handling surface changes Live tool-call parsing and execution are untouched
No public API, plugin API, message, or on-disk contract changes The unused internal module export has no public registration or documented external consumer
No core-path concurrency, async-lifecycle, or state-machine changes No running path reaches the removed helper
No hot-path behavior lacks deterministic coverage No hot-path behavior changes; existing streaming tests remain intact
No new dependency Dependency manifests are unchanged
Human-only behavior stays in one feature area and surfaces quickly No human-only behavior changes

Review: inspect the removal of createAIMessageWithToolCalls and its exclusive import in src/LLMProviders/chainRunner/utils/nativeToolCalling.ts, then follow Verification steps 1–2.

Verification

  1. Search for createAIMessageWithToolCalls and confirm no references remain. Check that AutonomousAgentChainRunner still constructs its history messages and imports the surviving tool-call helpers.
  2. Run npm test -- --runInBand src/LLMProviders/chainRunner/AutonomousAgentChainRunner.test.ts and npm run build; the existing streaming cases and type checks should pass.

@vercel

vercel Bot commented Sep 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
obsidian-copilot-docs Ignored Ignored Sep 9, 2026 9:09pm UTC

Request Review

@brevilabs-agent-bot
brevilabs-agent-bot Bot marked this pull request as ready for review September 9, 2026 09:12
@zeroliu
zeroliu force-pushed the jennifer/399-remove-unused-ai-message branch from 83bbc2a to 05e6b31 Compare September 9, 2026 21:09
@zeroliu
zeroliu merged commit 192fdf2 into master Sep 9, 2026
7 checks passed
@zeroliu
zeroliu deleted the jennifer/399-remove-unused-ai-message branch September 9, 2026 21:17
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.

1 participant