Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/revert-organization-button.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"kilo-code": patch
---

Revert "Using Kilo for work?" button in low credit warning, restore free models link
7 changes: 1 addition & 6 deletions webview-ui/src/components/chat/ChatRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1870,12 +1870,7 @@ export const ChatRowContent = ({
)

case "payment_required_prompt": {
return (
<LowCreditWarning
message={message}
isOrganization={!!apiConfiguration.kilocodeOrganizationId}
/>
)
return <LowCreditWarning message={message} />
}
case "invalid_model": {
return <InvalidModelWarning message={message} isLast={isLast} />
Expand Down
22 changes: 4 additions & 18 deletions webview-ui/src/components/kilocode/chat/LowCreditWarning.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
import { ClineMessage, getAppUrl, TelemetryEventName } from "@roo-code/types"
import { ClineMessage } from "@roo-code/types"
import { vscode } from "@src/utils/vscode"
import { VSCodeButton } from "@vscode/webview-ui-toolkit/react"
import { RetryIconButton } from "../common/RetryIconButton"
import styled from "styled-components"
import { useTranslation } from "react-i18next"
import { VSCodeButtonLink } from "@/components/common/VSCodeButtonLink"
import { telemetryClient } from "@/utils/TelemetryClient"
import { FreeModelsLink } from "../FreeModelsLink"

type LowCreditWarningProps = {
message: ClineMessage
isOrganization: boolean
}

const HeaderContainer = styled.div`
Expand All @@ -26,7 +24,7 @@ const Description = styled.div`
overflow-wrap: anywhere;
`

export const LowCreditWarning = ({ message, isOrganization }: LowCreditWarningProps) => {
export const LowCreditWarning = ({ message }: LowCreditWarningProps) => {
const { t } = useTranslation()
let data = { title: "Error", message: "Payment required.", balance: "-?.??", buyCreditsUrl: "" }

Expand Down Expand Up @@ -79,19 +77,7 @@ export const LowCreditWarning = ({ message, isOrganization }: LowCreditWarningPr
}}>
{t("kilocode:lowCreditWarning.addCredit")}
</VSCodeButton>
{!isOrganization && (
<VSCodeButtonLink
onClick={() => {
telemetryClient.capture(TelemetryEventName.CREATE_ORGANIZATION_LINK_CLICKED, {
origin: "low-credit-warning",
})
}}
href={getAppUrl("/organizations/new")}
appearance="primary"
className="p-1 w-full rounded">
{t("kilocode:lowCreditWarning.newOrganization")}
</VSCodeButtonLink>
)}
<FreeModelsLink className="p-1 w-full rounded mt-1" origin="chat" />
</div>
</>
)
Expand Down
3 changes: 1 addition & 2 deletions webview-ui/src/i18n/locales/ar/kilocode.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions webview-ui/src/i18n/locales/ca/kilocode.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions webview-ui/src/i18n/locales/cs/kilocode.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions webview-ui/src/i18n/locales/de/kilocode.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions webview-ui/src/i18n/locales/en/kilocode.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
},
"lowCreditWarning": {
"addCredit": "Add Credit",
"lowBalance": "Your Kilo Code balance is low",
"newOrganization": "Using Kilo for work?"
"lowBalance": "Your Kilo Code balance is low"
},
"memoryWarning": {
"message": "Memory usage is at {{percentage}}%. Please restart your IDE to prevent crashes."
Expand Down
3 changes: 1 addition & 2 deletions webview-ui/src/i18n/locales/es/kilocode.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions webview-ui/src/i18n/locales/fr/kilocode.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions webview-ui/src/i18n/locales/hi/kilocode.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions webview-ui/src/i18n/locales/id/kilocode.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions webview-ui/src/i18n/locales/it/kilocode.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions webview-ui/src/i18n/locales/ja/kilocode.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions webview-ui/src/i18n/locales/ko/kilocode.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions webview-ui/src/i18n/locales/nl/kilocode.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions webview-ui/src/i18n/locales/pl/kilocode.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions webview-ui/src/i18n/locales/pt-BR/kilocode.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions webview-ui/src/i18n/locales/ru/kilocode.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions webview-ui/src/i18n/locales/th/kilocode.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions webview-ui/src/i18n/locales/tr/kilocode.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions webview-ui/src/i18n/locales/uk/kilocode.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions webview-ui/src/i18n/locales/vi/kilocode.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions webview-ui/src/i18n/locales/zh-CN/kilocode.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions webview-ui/src/i18n/locales/zh-TW/kilocode.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading