Problem
The search-actors tool text output has unwanted leading whitespace on all lines (headers, actor cards, instructions). This is caused by dedent padding multi-line interpolated strings (${actorCardText}) to match the surrounding template indentation level.
Affected files:
src/tools/default/search_actors.ts (lines 58-73)
src/tools/openai/search_actors.ts (similar pattern)
Expected
# Search results:
- **Search query:** google maps
- **Number of Actors found:** 5
# Actors:
## [Google Maps Scraper](...
Actual
# Search results:
- **Search query:** google maps
- **Number of Actors found:** 5
# Actors:
## [Google Maps Scraper](...
Fix
Don't embed actorCardText inside the dedent block. Build the string by joining header, card text, and footer separately:
const header = dedent\`
# Search results:
...
# Actors:
\`;
const footer = dedent\`
If you need more...
\`;
const instructions = [header, actorCardText, footer].join('\n\n');
Problem
The
search-actorstool text output has unwanted leading whitespace on all lines (headers, actor cards, instructions). This is caused bydedentpadding multi-line interpolated strings (${actorCardText}) to match the surrounding template indentation level.Affected files:
src/tools/default/search_actors.ts(lines 58-73)src/tools/openai/search_actors.ts(similar pattern)Expected
Actual
Fix
Don't embed
actorCardTextinside thededentblock. Build the string by joining header, card text, and footer separately: