mirror of https://github.com/getcursor/cursor
Format
parent
8f5bab8e5a
commit
ea14a89b4d
|
@ -2,14 +2,19 @@ module.exports = {
|
|||
packagerConfig: {
|
||||
name: 'Cursor',
|
||||
icon: 'assets/icon/icon',
|
||||
extraResource: ['./lsp', './resources', './tutor', './todesktop-runtime-config.json'],
|
||||
extraResource: [
|
||||
'./lsp',
|
||||
'./resources',
|
||||
'./tutor',
|
||||
'./todesktop-runtime-config.json',
|
||||
],
|
||||
osxSign: {},
|
||||
protocols: [
|
||||
{
|
||||
name: "Electron Fiddle",
|
||||
schemes: ["electron-fiddle"]
|
||||
}
|
||||
]
|
||||
name: 'Electron Fiddle',
|
||||
schemes: ['electron-fiddle'],
|
||||
},
|
||||
],
|
||||
},
|
||||
rebuildConfig: {},
|
||||
makers: [
|
||||
|
@ -30,11 +35,11 @@ module.exports = {
|
|||
},
|
||||
},
|
||||
{
|
||||
"name": "@electron-forge/maker-deb",
|
||||
"config": {
|
||||
"mimeType": ["x-scheme-handler/electron-fiddle"]
|
||||
}
|
||||
}
|
||||
name: '@electron-forge/maker-deb',
|
||||
config: {
|
||||
mimeType: ['x-scheme-handler/electron-fiddle'],
|
||||
},
|
||||
},
|
||||
],
|
||||
plugins: [
|
||||
{
|
||||
|
|
|
@ -161,7 +161,7 @@ function runHistoryCommand(cm: CodeMirror, revert: boolean) {
|
|||
if (cm.curOp) {
|
||||
cm.curOp.$changeStart = undefined
|
||||
}
|
||||
(revert ? undo : redo)(cm.cm6)
|
||||
;(revert ? undo : redo)(cm.cm6)
|
||||
const changeStartIndex = cm.curOp?.$changeStart
|
||||
// vim mode expects the changed text to be either selected or cursor placed at the start
|
||||
if (changeStartIndex != null) {
|
||||
|
@ -568,7 +568,7 @@ export class CodeMirror {
|
|||
caseSensitive: !/i/.test(query.flags),
|
||||
})
|
||||
if (cm6Query.valid) {
|
||||
(cm6Query as any).forVim = true
|
||||
;(cm6Query as any).forVim = true
|
||||
this.cm6Query = cm6Query
|
||||
const effect = setSearchQuery.of(cm6Query)
|
||||
this.cm6.dispatch({ effects: effect })
|
||||
|
@ -784,7 +784,7 @@ export class CodeMirror {
|
|||
this.refresh()
|
||||
}
|
||||
refresh() {
|
||||
(this.cm6 as any).measure()
|
||||
;(this.cm6 as any).measure()
|
||||
}
|
||||
|
||||
// event listeners
|
||||
|
|
|
@ -4,9 +4,13 @@ import { getError, getShowErrors } from '../features/selectors'
|
|||
import { faClose } from '@fortawesome/pro-regular-svg-icons'
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
|
||||
import Modal from 'react-modal'
|
||||
import { NoAuthGlobalOldRateLimitError, NotLoggedInError, OpenAIError } from '../utils';
|
||||
import { CursorLogin, OpenAILoginPanel } from './settingsPane';
|
||||
import { signInCursor, upgradeCursor } from '../features/tools/toolSlice';
|
||||
import {
|
||||
NoAuthGlobalOldRateLimitError,
|
||||
NotLoggedInError,
|
||||
OpenAIError,
|
||||
} from '../utils'
|
||||
import { CursorLogin, OpenAILoginPanel } from './settingsPane'
|
||||
import { signInCursor, upgradeCursor } from '../features/tools/toolSlice'
|
||||
|
||||
const customStyles = {
|
||||
overlay: {
|
||||
|
@ -106,11 +110,23 @@ export function ErrorPopup() {
|
|||
<div className="signup__body">
|
||||
<div className="signup__title">Cursor</div>
|
||||
<div className="signup__module">
|
||||
<div className="signup__subtitle">To avoid abuse on our backend, we ask that you login in to use the AI features</div>
|
||||
<div className="signup__signup_button" onClick={() => dispatch(signInCursor(null))}>Log in</div>
|
||||
|
||||
<div className="signup__signup_button" onClick={() => dispatch(signInCursor(null))}>Sign up</div>
|
||||
<div className="signup__subtitle">
|
||||
To avoid abuse on our backend, we ask that you
|
||||
login in to use the AI features
|
||||
</div>
|
||||
<div
|
||||
className="signup__signup_button"
|
||||
onClick={() => dispatch(signInCursor(null))}
|
||||
>
|
||||
Log in
|
||||
</div>
|
||||
|
||||
<div
|
||||
className="signup__signup_button"
|
||||
onClick={() => dispatch(signInCursor(null))}
|
||||
>
|
||||
Sign up
|
||||
</div>
|
||||
</div>
|
||||
<div className="signup__signup_button">Log in</div>
|
||||
<div className="signup__signup_button">Sign up</div>
|
||||
|
@ -126,7 +142,6 @@ export function ErrorPopup() {
|
|||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</Modal>
|
||||
)
|
||||
} else if (error instanceof NoAuthGlobalOldRateLimitError) {
|
||||
|
@ -149,18 +164,27 @@ export function ErrorPopup() {
|
|||
</div>
|
||||
</div>
|
||||
<div className="signup__body">
|
||||
<div className="signup__title">Free tier limit exceeded</div>
|
||||
<div className="signup__title">
|
||||
Free tier limit exceeded
|
||||
</div>
|
||||
<div className="signup__module">
|
||||
<div className="signup__subtitle">If you've enjoyed using Cursor, please consider subscribing to one of our paid plans</div>
|
||||
<div className="signup__signup_button" onClick={() => dispatch(upgradeCursor(null))}>Upgrade</div>
|
||||
|
||||
<div className="signup__subtitle">
|
||||
If you've enjoyed using Cursor, please consider
|
||||
subscribing to one of our paid plans
|
||||
</div>
|
||||
<div
|
||||
className="signup__signup_button"
|
||||
onClick={() => dispatch(upgradeCursor(null))}
|
||||
>
|
||||
Upgrade
|
||||
</div>
|
||||
</div>
|
||||
<div className="signup__signup_button">Upgrade</div>
|
||||
</div>
|
||||
<div className="signup__module signup__last_module">
|
||||
<div className="signup__subtitle">
|
||||
Or enter your OpenAI API key to continue using
|
||||
the AI features at-cost
|
||||
Or enter your OpenAI API key to continue using the
|
||||
AI features at-cost
|
||||
</div>
|
||||
<OpenAILoginPanel
|
||||
onSubmit={() => {
|
||||
|
@ -169,7 +193,6 @@ export function ErrorPopup() {
|
|||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</Modal>
|
||||
)
|
||||
} else {
|
||||
|
|
|
@ -330,7 +330,7 @@ export function ChatPopup() {
|
|||
|
||||
function handleMouseDown() {
|
||||
if (document.activeElement) {
|
||||
(document.activeElement as HTMLElement).blur()
|
||||
;(document.activeElement as HTMLElement).blur()
|
||||
}
|
||||
}
|
||||
return (
|
||||
|
|
Loading…
Reference in New Issue