Skip to content

fix: trim tool names#15304

Closed
motionharvest wants to merge 2 commits intoanomalyco:devfrom
motionharvest:fix/trim-tool-names
Closed

fix: trim tool names#15304
motionharvest wants to merge 2 commits intoanomalyco:devfrom
motionharvest:fix/trim-tool-names

Conversation

@motionharvest
Copy link

Issue for this PR

Closes #

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

In the function experimental_repairToolCall the failed.toolCall.toolName sometimes has whitespace attached to the name, such as read or grep. This PR is basic. It just uses trim() before toLowerCase(). That's it.

If you paste a large clearly AI generated description here your PR may be IGNORED or CLOSED!

How did you verify your code works?

I went into Chrome Dev Tools and pasted ' grep'.trim().toLowerCase() and it says 'grep'

Screenshots / recordings

N/A

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

If you do not follow this template your PR will be automatically rejected.

motionharvest and others added 2 commits February 17, 2026 11:15
* ci: use `useblacksmith/stickydisk` on linux runners only (anomalyco#13909)

* core: keep message part order stable when files resolve asynchronously (anomalyco#13915)

* ci: fixed Rust cache for 'cargo install' in publish.yml (anomalyco#13907)

* ci: fixed missing if condition (anomalyco#13934)

* Hide server CLI on windows (anomalyco#13936)

* zen: glm 5 free

* wip: zen

* ci: update triage workflow (anomalyco#13944)

* fix(app): keep Escape handling local to prompt input on macOS desktop (anomalyco#13963)

* docs(ko): improve Korean translation accuracy and clarity in Zen docs (anomalyco#13951)

* docs: improve zh-cn and zh-tw documentation translations (anomalyco#13942)

* fix(docs): correct reversed meaning in Korean plugins logging section (anomalyco#13945)

* chore: generate

* tweak(tui): new session banner with logo and details (anomalyco#13970)

* fix(app): recover state after sse reconnect and harden sse streams (anomalyco#13973)

* feat(app): session timeline/turn rework (anomalyco#13196)

Co-authored-by: David Hill <iamdavidhill@gmail.com>

* chore: app polish (anomalyco#13976)

Co-authored-by: David Hill <iamdavidhill@gmail.com>

* tweak(ui): icon button spacing

* chore: generate

* tweak(app): keep file tree toggle visible

Always show the titlebar file tree button (and space the right-side icon buttons at 4px) so it stays accessible regardless of the review panel state.

* tweak(app): reduce titlebar right padding

Use pr-2 (instead of pr-6) on the titlebar right section when not on Windows.

* tweak(app): use weak borders in titlebar actions

Use border-border-weak-base for the titlebar status and open actions (including the open button divider) and adjust the English copy-path label casing.

* tweak(app): match titlebar active bg to hover

Use the ghost hover background for active/expanded titlebar actions and tighten titlebar popover gutters to 4px.

* tweak(app): align titlebar search text size

Use the same 12px text style for the titlebar search placeholder as the status and open actions.

* tweak(ui): center titlebar search and soften keybind

Mount the titlebar search in the center area and tune its sizing/spacing; use regular weight for the keybind pill text.

* tweak(app): refine titlebar search and open padding

Ensure the titlebar search placeholder truncates cleanly and left-aligns; match the fallback copy-path button left padding to the open action.

* tweak(app): tighten titlebar action padding

Use pr-2 for the status and fallback copy-path actions, and tighten the copy icon/text gap to 1.5.

* tweak(ui): update magnifying-glass icon

Replace the magnifying-glass glyph with a 16px viewBox variant and keep default 1px stroke; adjust the titlebar search to render the icon at 16x16.

* feat(desktop): more e2e tests (anomalyco#13975)

* chore: generate

* tweak(ui): show user message meta on hover

Adds a hover-only metadata line under user messages showing agent, provider, model, and timestamp for quicker context.

* tweak(ui): use provider catalog names

Renders provider and model display names from the provider list instead of raw IDs in user message hover metadata.

* tweak(ui): refine user message hover meta

Moves the interrupted state into the user message hover metadata and updates the copy tooltip to 'Copy message'.

* tweak(ui): show assistant response meta on hover

Adds hover-only metadata after the assistant copy icon showing agent, provider, model, and response duration.

* tweak(ui): allow full-width user message meta

Moves the user message meta row out of the bubble width constraints and truncates long metadata while keeping the timestamp visible with consistent middot spacing.

* ui: add clearer 'Copy response' tooltip label for text parts

* tui: increase prompt mode toggle height for better clickability

* fix(desktop): avoid sidecar health-check timeout on shell startup (anomalyco#13925)

Co-authored-by: Brendan Allan <brendonovich@outlook.com>

* fix(app): ui flashing when switching tabs (anomalyco#13978)

* fix: Homepage video section layout shift (anomalyco#13987)

---------

Co-authored-by: Goni Zahavy <goni1993@gmail.com>
Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com>
Co-authored-by: Brendan Allan <brendonovich@outlook.com>
Co-authored-by: Frank <frank@anoma.ly>
Co-authored-by: Ganesh <179367536+itskritix@users.noreply.github.com>
Co-authored-by: vynn <163614291+vynnlee@users.noreply.github.com>
Co-authored-by: chenmi <jack_chenyuana@163.com>
Co-authored-by: Minung Han <hmu332233@gmail.com>
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
Co-authored-by: David Hill <1879069+iamdavidhill@users.noreply.github.com>
Co-authored-by: Shoubhit Dash <shoubhit2005@gmail.com>
Co-authored-by: Adam <2363879+adamdotdevin@users.noreply.github.com>
Co-authored-by: David Hill <iamdavidhill@gmail.com>
Co-authored-by: Filip <34747899+neriousy@users.noreply.github.com>
Co-authored-by: Chris Yang <18487241+ysm-dev@users.noreply.github.com>
Co-authored-by: Alex Carpenter <im.alexcarpenter@gmail.com>
@github-actions github-actions bot added needs:title needs:compliance This means the issue will auto-close after 2 hours. labels Feb 27, 2026
@github-actions
Copy link
Contributor

Hey! Your PR title Fix/trim tool names doesn't follow conventional commit format.

Please update it to start with one of:

  • feat: or feat(scope): new feature
  • fix: or fix(scope): bug fix
  • docs: or docs(scope): documentation changes
  • chore: or chore(scope): maintenance tasks
  • refactor: or refactor(scope): code refactoring
  • test: or test(scope): adding or updating tests

Where scope is the package name (e.g., app, desktop, opencode).

See CONTRIBUTING.md for details.

@github-actions
Copy link
Contributor

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • No issue referenced. Please add Closes #<number> linking to the relevant issue.

Please edit this PR description to address the above within 2 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

@github-actions
Copy link
Contributor

The following comment was made by an LLM, it may be inaccurate:

Based on my search, I found two potentially related PRs:

  1. PR fix: improve tool name repair for local/Ollama models #10558: "fix: improve tool name repair for local/Ollama models"

  2. PR feat: configurable tool alias map for repairing miscalled tools #14085: "feat: configurable tool alias map for repairing miscalled tools"

These PRs may have already addressed similar whitespace/tool name issues, or they might be working in the same area of code. You should check if either of these PRs already handles the whitespace trimming for tool names.

@motionharvest motionharvest changed the title Fix/trim tool names fix: trim tool names Feb 27, 2026
@github-actions
Copy link
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@motionharvest
Copy link
Author

Can someone please add .trim() on line 183 of llms.ts?? I guess ill just build locally and use my own copy, this is not worth the hoops.

@github-actions
Copy link
Contributor

This pull request has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window.

Feel free to open a new pull request that follows our guidelines.

@github-actions github-actions bot removed the needs:compliance This means the issue will auto-close after 2 hours. label Feb 27, 2026
@github-actions github-actions bot closed this Feb 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant