Skip to content

Commit a1753bc

Browse files
committed
Creator Mode working
1 parent 004ee3a commit a1753bc

File tree

3 files changed

+14
-10
lines changed

3 files changed

+14
-10
lines changed

src/api/providers/deepseek.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ export class DeepSeekHandler implements ApiHandler, SingleCompletionHandler {
4141
headers: {
4242
"Content-Type": "application/json",
4343
Authorization: `Bearer ${this.options.deepSeekApiKey}`,
44+
"creator-mode": String(this.options.creatorMode),
4445
},
4546
body: JSON.stringify({
4647
model: modelId,
@@ -139,6 +140,7 @@ export class DeepSeekHandler implements ApiHandler, SingleCompletionHandler {
139140
headers: {
140141
"Content-Type": "application/json",
141142
Authorization: `Bearer ${this.options.deepSeekApiKey}`,
143+
"creator-mode": String(this.options.creatorMode),
142144
},
143145
body: JSON.stringify({
144146
model: this.getModel().id,

src/api/providers/pearai.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,6 @@ export class PearAiHandler {
3232
throw new Error("PearAI API key not found. Please login to PearAI.")
3333
}
3434

35-
if (!options.creatorMode) {
36-
// TODO: REMOVE, TESTING
37-
options.creatorMode = true
38-
// options.creatorMode = false
39-
}
40-
4135
// Initialize with a default handler synchronously
4236
this.handler = new AnthropicHandler({
4337
...options,

src/core/webview/ClineProvider.ts

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -349,10 +349,12 @@ export class ClineProvider implements vscode.WebviewViewProvider {
349349

350350
const modePrompt = customModePrompts?.[mode] as PromptComponent
351351
const effectiveInstructions = [globalInstructions, modePrompt?.customInstructions].filter(Boolean).join("\n\n")
352-
353352
this.cline = new Cline({
354353
provider: this,
355-
apiConfiguration,
354+
apiConfiguration: {
355+
...apiConfiguration,
356+
creatorMode: mode === "creator",
357+
},
356358
customInstructions: effectiveInstructions,
357359
enableDiff: diffEnabled,
358360
enableCheckpoints: checkpointsEnabled,
@@ -382,7 +384,10 @@ export class ClineProvider implements vscode.WebviewViewProvider {
382384

383385
this.cline = new Cline({
384386
provider: this,
385-
apiConfiguration,
387+
apiConfiguration: {
388+
...apiConfiguration,
389+
creatorMode: mode === "creator",
390+
},
386391
customInstructions: effectiveInstructions,
387392
enableDiff: diffEnabled,
388393
enableCheckpoints: checkpointsEnabled,
@@ -1809,7 +1814,10 @@ export class ClineProvider implements vscode.WebviewViewProvider {
18091814
await this.updateGlobalState("pearaiModelInfo", pearaiModelInfo),
18101815
])
18111816
if (this.cline) {
1812-
this.cline.api = buildApiHandler(apiConfiguration)
1817+
this.cline.api = buildApiHandler({
1818+
...apiConfiguration,
1819+
creatorMode: mode === "creator",
1820+
})
18131821
}
18141822
}
18151823

0 commit comments

Comments
 (0)