Skip to content

Commit 02a8e6a

Browse files
committed
Rename User-Agent from 'roo-cline' to 'RooCode'
- Updated DEFAULT_HEADERS in constants.ts to use 'RooCode' instead of 'roo-cline' - Updated all related tests to expect the new User-Agent format - Fixed regex pattern in constants test to accept uppercase letters - All tests passing Addresses comment by @mrubens in PR #5492
1 parent 77d4505 commit 02a8e6a

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

src/api/providers/__tests__/constants.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@ describe("DEFAULT_HEADERS", () => {
2121

2222
it("should have correct User-Agent format", () => {
2323
const userAgent = DEFAULT_HEADERS["User-Agent"]
24-
expect(userAgent).toBe(`roo-cline/${Package.version}`)
24+
expect(userAgent).toBe(`RooCode/${Package.version}`)
2525

2626
// Verify it follows the tool_name/version pattern
27-
expect(userAgent).toMatch(/^[a-z-]+\/\d+\.\d+\.\d+$/)
27+
expect(userAgent).toMatch(/^[a-zA-Z-]+\/\d+\.\d+\.\d+$/)
2828
})
2929

3030
it("should have User-Agent with correct tool name", () => {
3131
const userAgent = DEFAULT_HEADERS["User-Agent"]
32-
expect(userAgent.startsWith("roo-cline/")).toBe(true)
32+
expect(userAgent.startsWith("RooCode/")).toBe(true)
3333
})
3434

3535
it("should have User-Agent with semantic version format", () => {

src/api/providers/__tests__/openai.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ describe("OpenAiHandler", () => {
104104
defaultHeaders: {
105105
"HTTP-Referer": "https://github.com/RooVetGit/Roo-Cline",
106106
"X-Title": "Roo Code",
107-
"User-Agent": "roo-cline/3.22.6",
107+
"User-Agent": "RooCode/3.22.6",
108108
},
109109
})
110110
})

src/api/providers/__tests__/openrouter.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ describe("OpenRouterHandler", () => {
6262
defaultHeaders: {
6363
"HTTP-Referer": "https://github.com/RooVetGit/Roo-Cline",
6464
"X-Title": "Roo Code",
65-
"User-Agent": "roo-cline/3.22.6",
65+
"User-Agent": "RooCode/3.22.6",
6666
},
6767
})
6868
})

src/api/providers/__tests__/requesty.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ describe("RequestyHandler", () => {
5959
defaultHeaders: {
6060
"HTTP-Referer": "https://github.com/RooVetGit/Roo-Cline",
6161
"X-Title": "Roo Code",
62-
"User-Agent": "roo-cline/3.22.6",
62+
"User-Agent": "RooCode/3.22.6",
6363
},
6464
})
6565
})

src/api/providers/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ import { Package } from "../../shared/package"
33
export const DEFAULT_HEADERS = {
44
"HTTP-Referer": "https://github.com/RooVetGit/Roo-Cline",
55
"X-Title": "Roo Code",
6-
"User-Agent": `roo-cline/${Package.version}`,
6+
"User-Agent": `RooCode/${Package.version}`,
77
}

0 commit comments

Comments
 (0)