Skip to content

Commit

Permalink
feat: merge upstream branch
Browse files Browse the repository at this point in the history
  • Loading branch information
boxizen committed Mar 31, 2023
1 parent 158e696 commit a060d54
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 34 deletions.
49 changes: 25 additions & 24 deletions src/components/settingsPane.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,9 @@ export function OpenAILoginPanel({ onSubmit }: { onSubmit: () => void }) {
changeSettings({
openAIKey: localAPIKey,
useOpenAIKey: true,
openAIModel: models.at(0) ?? null
}))
openAIModel: models.at(0) ?? null,
})
)
onSubmit()
}
}, [dispatch, localAPIKey])
Expand Down Expand Up @@ -346,12 +347,12 @@ export function OpenAIPanel() {
changeSettings({
openAIKey: localAPIKey,
useOpenAIKey: true,
openAIModel: models.at(0) ?? null
}))
openAIModel: models.at(0) ?? null,
})
)
}
}, [dispatch, localAPIKey])


return (
<div className="settings__item">
<div className="settings__item_title">OpenAI API Key</div>
Expand Down Expand Up @@ -485,34 +486,36 @@ export function CursorLogin({
<div className="copilot__signin">
<button onClick={signOut}>Log out</button>
{showSettings && (
<>
<br />
<button onClick={openAccountSettings}>
Manage settings
</button>
</>
)}
<>
<br />
<button onClick={openAccountSettings}>
Manage settings
</button>
</>
)}
</div>
</div>
)
} else {
currentPanel = (
<>
<div className="settings__item">
<div className="settings__item_title">Cursor Account</div>
<div className="settings__item_title">
Cursor Account
</div>
<div className="settings__item_description">
Login to use the AI without an API key
</div>
<div className="copilot__signin">
<button onClick={signOut}>Log out</button>
{showSettings && (
<>
<br />
<button onClick={openAccountSettings}>
Manage settings
</button>
</>
)}
<>
<br />
<button onClick={openAccountSettings}>
Manage settings
</button>
</>
)}
<br />
</div>
</div>
Expand All @@ -522,17 +525,15 @@ export function CursorLogin({
Upgrade for unlimited generations
</div>
<div className="copilot__signin">
<button onClick={upgrade}>Upgrade to Pro</button>
<button onClick={upgrade}>Upgrade to Pro</button>
</div>
</div>
</>
)
}
}

return (
currentPanel
)
return currentPanel
}

function CopilotPanel() {
Expand Down
4 changes: 0 additions & 4 deletions src/features/chat/promptUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ import {
getContentsIfNeeded,
getPathForFileId,
getPathForFolderId,
<<<<<<< HEAD
getContentsIfNeeded,
=======
>>>>>>> main
} from '../window/fileUtils'
import { FullState } from '../window/state'
import { joinAdvanced } from '../../utils'
Expand Down
4 changes: 0 additions & 4 deletions src/features/linter/fixLSPExtension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@ import { StateEffect, StateField, Text } from '@codemirror/state'

import { setDiff } from '../extensions/diff'
import { EditorView } from '@codemirror/view'
<<<<<<< HEAD
import { getDiagnostics, lintState, activeLintField } from './lint'
=======
import { activeLintField, getDiagnostics, lintState } from './lint'
>>>>>>> main
import { LineChange } from '../window/state'

// Define the resetLineNumbers effect
Expand Down
2 changes: 1 addition & 1 deletion src/main/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ export async function login() {
}

export async function signup() {
await shell.openExternal(addRandomQueryParam(signUpUrl))
await shell.openExternal(addRandomQueryParam(signUpUrl))
}

export async function pay() {
Expand Down
2 changes: 1 addition & 1 deletion src/preload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ const electronConnector = {
},
registerCloseErrors(callback: Callback) {
ipcRenderer.on('closeErrors', callback)
}
},
}

contextBridge.exposeInMainWorld('connector', electronConnector)
Expand Down

0 comments on commit a060d54

Please sign in to comment.