Skip to content

Commit 5959e08

Browse files
committed
Rebranding
1 parent 3839dcf commit 5959e08

Some content is hidden

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

61 files changed

+136
-124
lines changed

.roomodes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ customModes:
7070

7171
```
7272
---
73-
"roo-cline": patch|minor|major
73+
"modelharbor-agent": patch|minor|major
7474
---
7575

7676
[list of changes]

src/.changeset/itchy-years-agree.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
"roo-cline": minor
2+
"modelharbor-agent": minor
33
---
44

55
Add ModelHarbor provider support

src/api/providers/lm-studio.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ export class LmStudioHandler extends BaseProvider implements SingleCompletionHan
125125
} as const
126126
} catch (error) {
127127
throw new Error(
128-
"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 Roo Code's prompts.",
128+
"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 ModelHarbor Agent's prompts.",
129129
)
130130
}
131131
}
@@ -156,7 +156,7 @@ export class LmStudioHandler extends BaseProvider implements SingleCompletionHan
156156
return response.choices[0]?.message.content || ""
157157
} catch (error) {
158158
throw new Error(
159-
"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 Roo Code's prompts.",
159+
"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 ModelHarbor Agent's prompts.",
160160
)
161161
}
162162
}

src/api/providers/vscode-lm.ts

Lines changed: 47 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export class VsCodeLmHandler extends BaseProvider implements SingleCompletionHan
7070
this.dispose()
7171

7272
throw new Error(
73-
`Roo Code <Language Model API>: Failed to initialize handler: ${error instanceof Error ? error.message : "Unknown error"}`,
73+
`ModelHarbor Agent <Language Model API>: Failed to initialize handler: ${error instanceof Error ? error.message : "Unknown error"}`,
7474
)
7575
}
7676
}
@@ -85,17 +85,17 @@ export class VsCodeLmHandler extends BaseProvider implements SingleCompletionHan
8585
try {
8686
// Check if the client is already initialized
8787
if (this.client) {
88-
console.debug("Roo Code <Language Model API>: Client already initialized")
88+
console.debug("ModelHarbor Agent <Language Model API>: Client already initialized")
8989
return
9090
}
9191
// Create a new client instance
9292
this.client = await this.createClient(this.options.vsCodeLmModelSelector || {})
93-
console.debug("Roo Code <Language Model API>: Client initialized successfully")
93+
console.debug("ModelHarbor Agent <Language Model API>: Client initialized successfully")
9494
} catch (error) {
9595
// Handle errors during client initialization
9696
const errorMessage = error instanceof Error ? error.message : "Unknown error"
97-
console.error("Roo Code <Language Model API>: Client initialization failed:", errorMessage)
98-
throw new Error(`Roo Code <Language Model API>: Failed to initialize client: ${errorMessage}`)
97+
console.error("ModelHarbor Agent <Language Model API>: Client initialization failed:", errorMessage)
98+
throw new Error(`ModelHarbor Agent <Language Model API>: Failed to initialize client: ${errorMessage}`)
9999
}
100100
}
101101
/**
@@ -143,7 +143,7 @@ export class VsCodeLmHandler extends BaseProvider implements SingleCompletionHan
143143
}
144144
} catch (error) {
145145
const errorMessage = error instanceof Error ? error.message : "Unknown error"
146-
throw new Error(`Roo Code <Language Model API>: Failed to select model: ${errorMessage}`)
146+
throw new Error(`ModelHarbor Agent <Language Model API>: Failed to select model: ${errorMessage}`)
147147
}
148148
}
149149

@@ -204,18 +204,18 @@ export class VsCodeLmHandler extends BaseProvider implements SingleCompletionHan
204204
private async internalCountTokens(text: string | vscode.LanguageModelChatMessage): Promise<number> {
205205
// Check for required dependencies
206206
if (!this.client) {
207-
console.warn("Roo Code <Language Model API>: No client available for token counting")
207+
console.warn("ModelHarbor Agent <Language Model API>: No client available for token counting")
208208
return 0
209209
}
210210

211211
if (!this.currentRequestCancellation) {
212-
console.warn("Roo Code <Language Model API>: No cancellation token available for token counting")
212+
console.warn("ModelHarbor Agent <Language Model API>: No cancellation token available for token counting")
213213
return 0
214214
}
215215

216216
// Validate input
217217
if (!text) {
218-
console.debug("Roo Code <Language Model API>: Empty text provided for token counting")
218+
console.debug("ModelHarbor Agent <Language Model API>: Empty text provided for token counting")
219219
return 0
220220
}
221221

@@ -228,36 +228,36 @@ export class VsCodeLmHandler extends BaseProvider implements SingleCompletionHan
228228
} else if (text instanceof vscode.LanguageModelChatMessage) {
229229
// For chat messages, ensure we have content
230230
if (!text.content || (Array.isArray(text.content) && text.content.length === 0)) {
231-
console.debug("Roo Code <Language Model API>: Empty chat message content")
231+
console.debug("ModelHarbor Agent <Language Model API>: Empty chat message content")
232232
return 0
233233
}
234234
tokenCount = await this.client.countTokens(text, this.currentRequestCancellation.token)
235235
} else {
236-
console.warn("Roo Code <Language Model API>: Invalid input type for token counting")
236+
console.warn("ModelHarbor Agent <Language Model API>: Invalid input type for token counting")
237237
return 0
238238
}
239239

240240
// Validate the result
241241
if (typeof tokenCount !== "number") {
242-
console.warn("Roo Code <Language Model API>: Non-numeric token count received:", tokenCount)
242+
console.warn("ModelHarbor Agent <Language Model API>: Non-numeric token count received:", tokenCount)
243243
return 0
244244
}
245245

246246
if (tokenCount < 0) {
247-
console.warn("Roo Code <Language Model API>: Negative token count received:", tokenCount)
247+
console.warn("ModelHarbor Agent <Language Model API>: Negative token count received:", tokenCount)
248248
return 0
249249
}
250250

251251
return tokenCount
252252
} catch (error) {
253253
// Handle specific error types
254254
if (error instanceof vscode.CancellationError) {
255-
console.debug("Roo Code <Language Model API>: Token counting cancelled by user")
255+
console.debug("ModelHarbor Agent <Language Model API>: Token counting cancelled by user")
256256
return 0
257257
}
258258

259259
const errorMessage = error instanceof Error ? error.message : "Unknown error"
260-
console.warn("Roo Code <Language Model API>: Token counting failed:", errorMessage)
260+
console.warn("ModelHarbor Agent <Language Model API>: Token counting failed:", errorMessage)
261261

262262
// Log additional error details if available
263263
if (error instanceof Error && error.stack) {
@@ -289,7 +289,7 @@ export class VsCodeLmHandler extends BaseProvider implements SingleCompletionHan
289289

290290
private async getClient(): Promise<vscode.LanguageModelChat> {
291291
if (!this.client) {
292-
console.debug("Roo Code <Language Model API>: Getting client with options:", {
292+
console.debug("ModelHarbor Agent <Language Model API>: Getting client with options:", {
293293
vsCodeLmModelSelector: this.options.vsCodeLmModelSelector,
294294
hasOptions: !!this.options,
295295
selectorKeys: this.options.vsCodeLmModelSelector ? Object.keys(this.options.vsCodeLmModelSelector) : [],
@@ -298,12 +298,12 @@ export class VsCodeLmHandler extends BaseProvider implements SingleCompletionHan
298298
try {
299299
// Use default empty selector if none provided to get all available models
300300
const selector = this.options?.vsCodeLmModelSelector || {}
301-
console.debug("Roo Code <Language Model API>: Creating client with selector:", selector)
301+
console.debug("ModelHarbor Agent <Language Model API>: Creating client with selector:", selector)
302302
this.client = await this.createClient(selector)
303303
} catch (error) {
304304
const message = error instanceof Error ? error.message : "Unknown error"
305-
console.error("Roo Code <Language Model API>: Client creation failed:", message)
306-
throw new Error(`Roo Code <Language Model API>: Failed to create client: ${message}`)
305+
console.error("ModelHarbor Agent <Language Model API>: Client creation failed:", message)
306+
throw new Error(`ModelHarbor Agent <Language Model API>: Failed to create client: ${message}`)
307307
}
308308
}
309309

@@ -367,7 +367,7 @@ export class VsCodeLmHandler extends BaseProvider implements SingleCompletionHan
367367
try {
368368
// Create the response stream with minimal required options
369369
const requestOptions: vscode.LanguageModelChatRequestOptions = {
370-
justification: `Roo Code would like to use '${client.name}' from '${client.vendor}', Click 'Allow' to proceed.`,
370+
justification: `ModelHarbor Agent would like to use '${client.name}' from '${client.vendor}', Click 'Allow' to proceed.`,
371371
}
372372

373373
// Note: Tool support is currently provided by the VSCode Language Model API directly
@@ -384,7 +384,10 @@ export class VsCodeLmHandler extends BaseProvider implements SingleCompletionHan
384384
if (chunk instanceof vscode.LanguageModelTextPart) {
385385
// Validate text part value
386386
if (typeof chunk.value !== "string") {
387-
console.warn("Roo Code <Language Model API>: Invalid text part value received:", chunk.value)
387+
console.warn(
388+
"ModelHarbor Agent <Language Model API>: Invalid text part value received:",
389+
chunk.value,
390+
)
388391
continue
389392
}
390393

@@ -397,18 +400,27 @@ export class VsCodeLmHandler extends BaseProvider implements SingleCompletionHan
397400
try {
398401
// Validate tool call parameters
399402
if (!chunk.name || typeof chunk.name !== "string") {
400-
console.warn("Roo Code <Language Model API>: Invalid tool name received:", chunk.name)
403+
console.warn(
404+
"ModelHarbor Agent <Language Model API>: Invalid tool name received:",
405+
chunk.name,
406+
)
401407
continue
402408
}
403409

404410
if (!chunk.callId || typeof chunk.callId !== "string") {
405-
console.warn("Roo Code <Language Model API>: Invalid tool callId received:", chunk.callId)
411+
console.warn(
412+
"ModelHarbor Agent <Language Model API>: Invalid tool callId received:",
413+
chunk.callId,
414+
)
406415
continue
407416
}
408417

409418
// Ensure input is a valid object
410419
if (!chunk.input || typeof chunk.input !== "object") {
411-
console.warn("Roo Code <Language Model API>: Invalid tool input received:", chunk.input)
420+
console.warn(
421+
"ModelHarbor Agent <Language Model API>: Invalid tool input received:",
422+
chunk.input,
423+
)
412424
continue
413425
}
414426

@@ -424,7 +436,7 @@ export class VsCodeLmHandler extends BaseProvider implements SingleCompletionHan
424436
accumulatedText += toolCallText
425437

426438
// Log tool call for debugging
427-
console.debug("Roo Code <Language Model API>: Processing tool call:", {
439+
console.debug("ModelHarbor Agent <Language Model API>: Processing tool call:", {
428440
name: chunk.name,
429441
callId: chunk.callId,
430442
inputSize: JSON.stringify(chunk.input).length,
@@ -435,12 +447,12 @@ export class VsCodeLmHandler extends BaseProvider implements SingleCompletionHan
435447
text: toolCallText,
436448
}
437449
} catch (error) {
438-
console.error("Roo Code <Language Model API>: Failed to process tool call:", error)
450+
console.error("ModelHarbor Agent <Language Model API>: Failed to process tool call:", error)
439451
// Continue processing other chunks even if one fails
440452
continue
441453
}
442454
} else {
443-
console.warn("Roo Code <Language Model API>: Unknown chunk type received:", chunk)
455+
console.warn("ModelHarbor Agent <Language Model API>: Unknown chunk type received:", chunk)
444456
}
445457
}
446458

@@ -457,11 +469,11 @@ export class VsCodeLmHandler extends BaseProvider implements SingleCompletionHan
457469
this.ensureCleanState()
458470

459471
if (error instanceof vscode.CancellationError) {
460-
throw new Error("Roo Code <Language Model API>: Request cancelled by user")
472+
throw new Error("ModelHarbor Agent <Language Model API>: Request cancelled by user")
461473
}
462474

463475
if (error instanceof Error) {
464-
console.error("Roo Code <Language Model API>: Stream error details:", {
476+
console.error("ModelHarbor Agent <Language Model API>: Stream error details:", {
465477
message: error.message,
466478
stack: error.stack,
467479
name: error.name,
@@ -472,13 +484,13 @@ export class VsCodeLmHandler extends BaseProvider implements SingleCompletionHan
472484
} else if (typeof error === "object" && error !== null) {
473485
// Handle error-like objects
474486
const errorDetails = JSON.stringify(error, null, 2)
475-
console.error("Roo Code <Language Model API>: Stream error object:", errorDetails)
476-
throw new Error(`Roo Code <Language Model API>: Response stream error: ${errorDetails}`)
487+
console.error("ModelHarbor Agent <Language Model API>: Stream error object:", errorDetails)
488+
throw new Error(`ModelHarbor Agent <Language Model API>: Response stream error: ${errorDetails}`)
477489
} else {
478490
// Fallback for unknown error types
479491
const errorMessage = String(error)
480-
console.error("Roo Code <Language Model API>: Unknown stream error:", errorMessage)
481-
throw new Error(`Roo Code <Language Model API>: Response stream error: ${errorMessage}`)
492+
console.error("ModelHarbor Agent <Language Model API>: Unknown stream error:", errorMessage)
493+
throw new Error(`ModelHarbor Agent <Language Model API>: Response stream error: ${errorMessage}`)
482494
}
483495
}
484496
}
@@ -498,7 +510,7 @@ export class VsCodeLmHandler extends BaseProvider implements SingleCompletionHan
498510
// Log any missing properties for debugging
499511
for (const [prop, value] of Object.entries(requiredProps)) {
500512
if (!value && value !== 0) {
501-
console.warn(`Roo Code <Language Model API>: Client missing ${prop} property`)
513+
console.warn(`ModelHarbor Agent <Language Model API>: Client missing ${prop} property`)
502514
}
503515
}
504516

@@ -529,7 +541,7 @@ export class VsCodeLmHandler extends BaseProvider implements SingleCompletionHan
529541
? stringifyVsCodeLmModelSelector(this.options.vsCodeLmModelSelector)
530542
: "vscode-lm"
531543

532-
console.debug("Roo Code <Language Model API>: No client available, using fallback model info")
544+
console.debug("ModelHarbor Agent <Language Model API>: No client available, using fallback model info")
533545

534546
return {
535547
id: fallbackId,

src/api/transform/vscode-lm-format.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ function asObjectSafe(value: any): object {
2323

2424
return {}
2525
} catch (error) {
26-
console.warn("Roo Code <Language Model API>: Failed to parse object:", error)
26+
console.warn("ModelHarbor Agent <Language Model API>: Failed to parse object:", error)
2727
return {}
2828
}
2929
}

src/core/diff/strategies/__tests__/multi-search-replace.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1847,12 +1847,12 @@ function sum(a, b) {
18471847

18481848
it("should match content with smart quotes", async () => {
18491849
const originalContent =
1850-
"**Enjoy Roo Code!** Whether you keep it on a short leash or let it roam autonomously, we can’t wait to see what you build. If you have questions or feature ideas, drop by our [Facebook](https://www.facebook.com/modelharbor/) or [X](https://x.com/modelharbor). Happy coding!"
1850+
"**Enjoy ModelHarbor Agent!** Whether you keep it on a short leash or let it roam autonomously, we can’t wait to see what you build. If you have questions or feature ideas, drop by our [Facebook](https://www.facebook.com/modelharbor/) or [X](https://x.com/modelharbor). Happy coding!"
18511851
const diffContent = `test.ts
18521852
<<<<<<< SEARCH
1853-
**Enjoy Roo Code!** Whether you keep it on a short leash or let it roam autonomously, we can’t wait to see what you build. If you have questions or feature ideas, drop by our [Facebook](https://www.facebook.com/modelharbor/) or [X](https://x.com/modelharbor). Happy coding!
1853+
**Enjoy ModelHarbor Agent!** Whether you keep it on a short leash or let it roam autonomously, we can’t wait to see what you build. If you have questions or feature ideas, drop by our [Facebook](https://www.facebook.com/modelharbor/) or [X](https://x.com/modelharbor). Happy coding!
18541854
=======
1855-
**Enjoy Roo Code!** Whether you keep it on a short leash or let it roam autonomously, we can't wait to see what you build. If you have questions or feature ideas, drop by our [Facebook](https://www.facebook.com/modelharbor/) or [X](https://x.com/modelharbor). Happy coding!
1855+
**Enjoy ModelHarbor Agent!** Whether you keep it on a short leash or let it roam autonomously, we can't wait to see what you build. If you have questions or feature ideas, drop by our [Facebook](https://www.facebook.com/modelharbor/) or [X](https://x.com/modelharbor). Happy coding!
18561856
18571857
You're still here?
18581858
>>>>>>> REPLACE`
@@ -1861,7 +1861,7 @@ You're still here?
18611861
expect(result.success).toBe(true)
18621862
if (result.success) {
18631863
expect(result.content).toBe(
1864-
"**Enjoy Roo Code!** Whether you keep it on a short leash or let it roam autonomously, we can't wait to see what you build. If you have questions or feature ideas, drop by our [Facebook](https://www.facebook.com/modelharbor/) or [X](https://x.com/modelharbor). Happy coding!\n\nYou're still here?",
1864+
"**Enjoy ModelHarbor Agent!** Whether you keep it on a short leash or let it roam autonomously, we can't wait to see what you build. If you have questions or feature ideas, drop by our [Facebook](https://www.facebook.com/modelharbor/) or [X](https://x.com/modelharbor). Happy coding!\n\nYou're still here?",
18651865
)
18661866
}
18671867
})

src/extension.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ export async function activate(context: vscode.ExtensionContext) {
7272
// Create logger for cloud services
7373
const cloudLogger = createDualLogger(createOutputChannelLogger(outputChannel))
7474

75-
// Initialize Roo Code Cloud service.
75+
// Initialize ModelHarbor Agent Cloud service.
7676
await CloudService.createInstance(context, {
7777
stateChanged: () => ClineProvider.getVisibleInstance()?.postStateToWebview(),
7878
log: cloudLogger,

src/i18n/locales/ca/common.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"input": {
3-
"task_prompt": "Què vols que faci Roo?",
3+
"task_prompt": "Què vols que faci ModelHarbor Agent?",
44
"task_placeholder": "Escriu la teva tasca aquí"
55
},
66
"extension": {

src/i18n/locales/ca/mcp.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"invalid_settings_validation": "Format de configuració MCP no vàlid: {{errorMessages}}",
66
"create_json": "Ha fallat la creació o obertura de .roo/mcp.json: {{error}}",
77
"failed_update_project": "Ha fallat l'actualització dels servidors MCP del projecte",
8-
"invalidJsonArgument": "Roo ha intentat utilitzar {{toolName}} amb un argument JSON no vàlid. Tornant a intentar..."
8+
"invalidJsonArgument": "ModelHarbor Agent ha intentat utilitzar {{toolName}} amb un argument JSON no vàlid. Tornant a intentar..."
99
},
1010
"info": {
1111
"server_restarting": "Reiniciant el servidor MCP {{serverName}}...",

src/i18n/locales/ca/tools.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"definitionsOnly": " (només definicions)",
55
"maxLines": " (màxim {{max}} línies)"
66
},
7-
"toolRepetitionLimitReached": "Roo sembla estar atrapat en un bucle, intentant la mateixa acció ({{toolName}}) repetidament. Això podria indicar un problema amb la seva estratègia actual. Considera reformular la tasca, proporcionar instruccions més específiques o guiar-lo cap a un enfocament diferent.",
7+
"toolRepetitionLimitReached": "ModelHarbor Agent sembla estar atrapat en un bucle, intentant la mateixa acció ({{toolName}}) repetidament. Això podria indicar un problema amb la seva estratègia actual. Considera reformular la tasca, proporcionar instruccions més específiques o guiar-lo cap a un enfocament diferent.",
88
"codebaseSearch": {
99
"approval": "Cercant '{{query}}' a la base de codi..."
1010
}

0 commit comments

Comments
 (0)