Skip to content

Commit

Permalink
Fix prettier pass
Browse files Browse the repository at this point in the history
  • Loading branch information
elanzini committed Apr 1, 2023
1 parent 82b45d7 commit 6ff938d
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 29 deletions.
8 changes: 4 additions & 4 deletions src/components/markdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -350,9 +350,9 @@ export function ChatPopup() {
{/* Subtle padding to separate content from scroll bar*/}
<div>
<div className="markdownpopup__dismiss h-8 flex flex-col mt-3 items-center">
<CommandBarActionTips tips={commandBarActionTips} />
<CommandBarActionTips tips={commandBarActionTips} />
</div>
<div className="chatpopup__content px-4 overflow-auto ">
<div className="chatpopup__content px-4 overflow-auto ">
<div className="flex flex-col space-y-2">
{markdownPopups}
</div>
Expand All @@ -367,7 +367,7 @@ export function ChatPopup() {
<CommandBar parentCaller={'chat'} />
)}
</div>
</div>
</div>
</div>
{isChatHistoryOpen && (
<ChatHistory onSelect={handleSelectHistory} />
Expand Down Expand Up @@ -761,7 +761,7 @@ function formatPromptTime(sentAt: number): string {
const hours = date.getHours()
const minutes = date.getMinutes()
const ampm = hours >= 12 ? 'pm' : 'am'
const formattedHours = hours % 12 ? 12 : hours % 12
const formattedHours = hours % 12 ? 12 : hours % 12
const formattedMinutes = minutes < 10 ? `0${minutes}` : minutes
return `${formattedHours}:${formattedMinutes}${ampm}`
}
Expand Down
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
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

0 comments on commit 6ff938d

Please sign in to comment.