Skip to content

Commit 23b1c19

Browse files
committed
chore: lil switchup
1 parent 1749a56 commit 23b1c19

1 file changed

Lines changed: 7 additions & 11 deletions

File tree

src/activate/registerPearListener.ts

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -39,25 +39,21 @@ export const registerPearListener = async () => {
3939

4040
// Wait for the view to be ready using a helper function
4141
await ensureViewIsReady(sidebarProvider)
42-
43-
if (msg.creatorModeConfig?.creatorMode) {
44-
// Switch to creator mode
45-
await sidebarProvider.handleModeSwitch("creator")
46-
await sidebarProvider.postStateToWebview()
47-
}
48-
// Navigate to chat view
49-
await sidebarProvider.postMessageToWebview({ type: "action", action: "chatButtonClicked" })
50-
5142
// Wait a brief moment for UI to update
5243
await new Promise((resolve) => setTimeout(resolve, 300))
5344

54-
let creatorModeConfig = {
45+
// * This does actually work but the UI update does not happen. This method calls this.postStateToWebview() so not sure what is going on - James
46+
await sidebarProvider.handleModeSwitch("Creator")
47+
48+
// Clicl the chat btn
49+
await sidebarProvider.postMessageToWebview({ type: "action", action: "chatButtonClicked" })
50+
51+
const creatorModeConfig = {
5552
creatorMode: true,
5653
newProjectType: msg.newProjectType,
5754
newProjectPath: msg.newProjectPath,
5855
}
5956

60-
console.log('Called init with taskk', msg.plan, undefined, undefined, undefined, creatorModeConfig);
6157

6258
// Initialize with task
6359
await sidebarProvider.initClineWithTask(msg.plan, undefined, undefined, undefined, creatorModeConfig);

0 commit comments

Comments
 (0)