Refactor Kodu links

This commit is contained in:
Saoud Rizwan
2024-08-25 16:08:57 -04:00
parent 9c26980c06
commit 7fa7589ed0
12 changed files with 115 additions and 71 deletions

View File

@@ -25,6 +25,7 @@ export interface ExtensionState {
customInstructions?: string
alwaysAllowReadOnly?: boolean
themeName?: string
uriScheme?: string
claudeMessages: ClaudeMessage[]
taskHistory: HistoryItem[]
shouldShowAnnouncement: boolean

View File

@@ -16,9 +16,7 @@ export interface WebviewMessage {
| "showTaskWithId"
| "deleteTaskWithId"
| "exportTaskWithId"
| "didClickKoduSignIn"
| "didClickKoduSignOut"
| "didClickKoduAddCredits"
| "fetchKoduCredits"
text?: string
askResponse?: ClaudeAskResponse

17
src/shared/kodu.ts Normal file
View File

@@ -0,0 +1,17 @@
const KODU_BASE_URL = "https://claude-dev.com"
export function getKoduSignInUrl(uriScheme?: string) {
return `${KODU_BASE_URL}/auth/login?redirectTo=${uriScheme}://saoudrizwan.claude-dev&ext=1`
}
export function getKoduAddCreditsUrl(uriScheme?: string) {
return `${KODU_BASE_URL}/user/addCredits?redirectTo=${uriScheme}://saoudrizwan.claude-dev&ext=1`
}
export function getKoduCreditsUrl() {
return `${KODU_BASE_URL}/api/credits`
}
export function getKoduInferenceUrl() {
return `${KODU_BASE_URL}/api/inference`
}