Skip to content

Commit 6d75617

Browse files
j15zclaude
andcommitted
fix(copilot): apply the Searching Sim docs rename to the dynamic title case
The static TOOL_TITLES entry is unreachable for search_docs — the dynamic switch case returns first so it can include the query — so the rename only takes effect there. Tests updated to the new wording. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 3b0c9fd commit 6d75617

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

apps/sim/lib/copilot/tools/tool-display.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,23 +79,23 @@ describe('getToolDisplayTitle natural-language coverage', () => {
7979
})
8080

8181
it('includes the query in search_docs titles', () => {
82-
expect(getToolDisplayTitle('search_docs')).toBe('Searching docs')
82+
expect(getToolDisplayTitle('search_docs')).toBe('Searching Sim docs')
8383
expect(getToolDisplayTitle('search_docs', { query: 'loop blocks iteration' })).toBe(
84-
'Searching docs for "loop blocks iteration"'
84+
'Searching Sim docs for "loop blocks iteration"'
8585
)
8686
// The completed-state flip must keep the suffix, not drop back to the bare label.
8787
expect(
8888
getToolCompletedTitle(
8989
getToolDisplayTitle('search_docs', { query: 'how to read workflow logs' })
9090
)
91-
).toBe('Searched docs for "how to read workflow logs"')
91+
).toBe('Searched Sim docs for "how to read workflow logs"')
9292
// A long agent-written query is truncated rather than blowing out the chip.
9393
expect(
9494
getToolDisplayTitle('search_docs', {
9595
query:
9696
'reference block outputs connection tags blockname.field pass data between blocks in a workflow',
9797
})?.length
98-
).toBeLessThanOrEqual('Searching docs for ""'.length + 60 + '...'.length)
98+
).toBeLessThanOrEqual('Searching Sim docs for ""'.length + 60 + '...'.length)
9999
})
100100

101101
it('falls back to running code for function_execute without a title', () => {

apps/sim/lib/copilot/tools/tool-display.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -766,7 +766,7 @@ export function getToolDisplayTitle(name: string, args?: Record<string, unknown>
766766
}
767767
case 'search_docs': {
768768
const target = firstStringArg(args, 'toolTitle', 'title', 'query')
769-
return target ? `Searching docs for "${truncate(target, 60)}"` : 'Searching docs'
769+
return target ? `Searching Sim docs for "${truncate(target, 60)}"` : 'Searching Sim docs'
770770
}
771771
case 'grep': {
772772
const target = firstStringArg(args, 'toolTitle', 'title')

0 commit comments

Comments
 (0)