Skip to content

Commit ded7575

Browse files
rrewllroomoteedelauna
authored
fix(branding): replace remaining user-facing "Roo" strings with "Zoo" (#971)
* fix(branding): replace remaining user-facing "Roo" strings with "Zoo" Replace user-facing product references from "Roo" to "Zoo": - Webview panel and editor tab titles - Integrated terminal names - Diff view labels - VS Code LM authorization justification - LM Studio error messages - Missing-parameter tool error (now i18n-keyed via tools:missingToolParameter[WithPath] across all 16 locales) - Webview-ui localization strings (chat, settings, prompts across all locales) Per review feedback, references to the external Roo provider/router remain untouched: the routerRemoval messages, errors.roo/info.roo i18n keys, Roo credit-balance notices, and other internal identifiers that reference the legacy Roo provider rather than our brand. * test: bump coverage for Roo-to-Zoo user-facing string changes (#971) * chore: simplify i18n mocking in Task.spec.ts * test: increase coverage of vscode-lm.ts and vscode-lm-format.ts * fix(types): eliminate any casts in vscode-lm provider and format transform --------- Co-authored-by: Roomote <roomote@roomote.dev> Co-authored-by: Elliott de Launay <edelauna@gmail.com>
1 parent 85f6f27 commit ded7575

69 files changed

Lines changed: 1074 additions & 349 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/activate/__tests__/registerCommands.spec.ts

Lines changed: 59 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import type { Mock } from "vitest"
22
import * as vscode from "vscode"
33
import { ClineProvider } from "../../core/webview/ClineProvider"
44

5-
import { getVisibleProviderOrLog, registerCommands, setPanel } from "../registerCommands"
5+
import { getVisibleProviderOrLog, openClineInNewTab, registerCommands, setPanel } from "../registerCommands"
66

77
vi.mock("execa", () => ({
88
execa: vi.fn(),
@@ -13,8 +13,16 @@ vi.mock("vscode", () => ({
1313
QuickFix: { value: "quickfix" },
1414
RefactorRewrite: { value: "refactor.rewrite" },
1515
},
16+
Uri: {
17+
joinPath: vi.fn((_base: unknown, ..._pathSegments: string[]) => ({ path: _pathSegments.join("/") })),
18+
},
19+
ViewColumn: {
20+
Two: 2,
21+
},
1622
window: {
1723
createTextEditorDecorationType: vi.fn().mockReturnValue({ dispose: vi.fn() }),
24+
createWebviewPanel: vi.fn(),
25+
visibleTextEditors: [],
1826
},
1927
workspace: {
2028
workspaceFolders: [
@@ -367,3 +375,53 @@ describe("registerCommands handlers", () => {
367375
await handlers["zoo-code.plusButtonClicked"]()
368376
})
369377
})
378+
379+
describe("openClineInNewTab", () => {
380+
let mockOutputChannel: vscode.OutputChannel
381+
let mockContext: vscode.ExtensionContext
382+
383+
beforeEach(() => {
384+
vi.clearAllMocks()
385+
386+
mockOutputChannel = {
387+
appendLine: vi.fn(),
388+
append: vi.fn(),
389+
clear: vi.fn(),
390+
hide: vi.fn(),
391+
name: "mock",
392+
replace: vi.fn(),
393+
show: vi.fn(),
394+
dispose: vi.fn(),
395+
}
396+
397+
mockContext = {
398+
subscriptions: [],
399+
extensionUri: { path: "/mock/ext" },
400+
} as unknown as vscode.ExtensionContext
401+
402+
const mockPanel = {
403+
webview: { postMessage: vi.fn() },
404+
onDidChangeViewState: vi.fn(),
405+
onDidDispose: vi.fn(),
406+
}
407+
;(vscode.window.createWebviewPanel as Mock).mockReturnValue(mockPanel)
408+
409+
// Reset module-level panel state.
410+
setPanel(undefined, "sidebar")
411+
setPanel(undefined, "tab")
412+
})
413+
414+
it("creates a webview panel with title 'Zoo Code'", async () => {
415+
await openClineInNewTab({ context: mockContext, outputChannel: mockOutputChannel })
416+
417+
expect(vscode.window.createWebviewPanel).toHaveBeenCalledWith(
418+
"zoo-code.TabPanelProvider",
419+
"Zoo Code",
420+
expect.any(Number),
421+
expect.objectContaining({
422+
enableScripts: true,
423+
retainContextWhenHidden: true,
424+
}),
425+
)
426+
})
427+
})

src/activate/registerCommands.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ export const openClineInNewTab = async ({ context, outputChannel }: Omit<Registe
251251

252252
const targetCol = hasVisibleEditors ? Math.max(lastCol + 1, 1) : vscode.ViewColumn.Two
253253

254-
const newPanel = vscode.window.createWebviewPanel(ClineProvider.tabPanelId, "Roo Code", targetCol, {
254+
const newPanel = vscode.window.createWebviewPanel(ClineProvider.tabPanelId, "Zoo Code", targetCol, {
255255
enableScripts: true,
256256
retainContextWhenHidden: true,
257257
localResourceRoots: [context.extensionUri],

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,9 @@ describe("LmStudioHandler", () => {
125125
for await (const _chunk of stream) {
126126
// Should not reach here
127127
}
128-
}).rejects.toThrow("Please check the LM Studio developer logs to debug what went wrong")
128+
}).rejects.toThrow(
129+
"Please check the LM Studio developer logs to debug what went wrong. You may need to load the model with a larger context length to work with Zoo Code's prompts.",
130+
)
129131
})
130132
})
131133

@@ -144,7 +146,7 @@ describe("LmStudioHandler", () => {
144146
it("should handle API errors", async () => {
145147
mockCreate.mockRejectedValueOnce(new Error("API Error"))
146148
await expect(handler.completePrompt("Test prompt")).rejects.toThrow(
147-
"Please check the LM Studio developer logs to debug what went wrong",
149+
"Please check the LM Studio developer logs to debug what went wrong. You may need to load the model with a larger context length to work with Zoo Code's prompts.",
148150
)
149151
})
150152

0 commit comments

Comments
 (0)