This commit is contained in:
Saoud Rizwan
2024-10-06 04:03:27 -04:00
parent 372c4df3bf
commit 34f160b35a
3 changed files with 6 additions and 28 deletions

View File

@@ -75,28 +75,6 @@ export class ClineProvider implements vscode.WebviewViewProvider {
this.outputChannel.appendLine("ClineProvider instantiated") this.outputChannel.appendLine("ClineProvider instantiated")
ClineProvider.activeInstances.add(this) ClineProvider.activeInstances.add(this)
this.workspaceTracker = new WorkspaceTracker(this) this.workspaceTracker = new WorkspaceTracker(this)
this.revertKodu()
}
async revertKodu() {
const apiProvider = await this.getGlobalState("apiProvider")
if (apiProvider === "kodu") {
// switch back to previous provider
const anthropicKey = await this.getSecret("apiKey")
if (anthropicKey) {
await this.updateGlobalState("apiProvider", "anthropic" as ApiProvider)
} else {
const openRouterApiKey = await this.getSecret("openRouterApiKey")
if (openRouterApiKey) {
await this.updateGlobalState("apiProvider", "openrouter" as ApiProvider)
} else {
const awsAccessKey = await this.getSecret("awsAccessKey")
if (awsAccessKey) {
await this.updateGlobalState("apiProvider", "bedrock" as ApiProvider)
}
}
}
}
} }
/* /*

View File

@@ -460,7 +460,7 @@ const ChatRowContent = ({ message, isExpanded, onToggleExpand, lastModifiedMessa
)} )}
</p> </p>
{/* {apiProvider === "kodu" && ( {/* {apiProvider === "" && (
<div <div
style={{ style={{
display: "flex", display: "flex",
@@ -481,7 +481,7 @@ const ChatRowContent = ({ message, isExpanded, onToggleExpand, lastModifiedMessa
color: "var(--vscode-errorForeground)", color: "var(--vscode-errorForeground)",
}}></i> }}></i>
<span> <span>
Uh-oh, this could be a problem on Kodu's end. We've been alerted and Uh-oh, this could be a problem on end. We've been alerted and
will resolve this ASAP. You can also{" "} will resolve this ASAP. You can also{" "}
<a <a
href="https://discord.gg/claudedev" href="https://discord.gg/claudedev"

View File

@@ -308,7 +308,7 @@ const TaskHeader: React.FC<TaskHeaderProps> = ({
</> </>
)} )}
</div> </div>
{/* {apiProvider === "kodu" && ( {/* {apiProvider === "" && (
<div <div
style={{ style={{
backgroundColor: "color-mix(in srgb, var(--vscode-badge-background) 50%, transparent)", backgroundColor: "color-mix(in srgb, var(--vscode-badge-background) 50%, transparent)",
@@ -324,11 +324,11 @@ const TaskHeader: React.FC<TaskHeaderProps> = ({
}}> }}>
<div style={{ fontWeight: "500" }}>Credits Remaining:</div> <div style={{ fontWeight: "500" }}>Credits Remaining:</div>
<div> <div>
{formatPrice(koduCredits || 0)} {formatPrice(Credits || 0)}
{(koduCredits || 0) < 1 && ( {(Credits || 0) < 1 && (
<> <>
{" "} {" "}
<VSCodeLink style={{ fontSize: "0.9em" }} href={getKoduAddCreditsUrl(vscodeUriScheme)}> <VSCodeLink style={{ fontSize: "0.9em" }} href={getAddCreditsUrl(vscodeUriScheme)}>
(get more?) (get more?)
</VSCodeLink> </VSCodeLink>
</> </>