mirror of
https://github.com/wassname/chatGPTBox.git
synced 2026-08-01 12:20:35 +08:00
Add support for kimi.moonshot.cn (#656)
* Add support for kimi.moonshot.cn * some improvements --------- Co-authored-by: josc146 <josStorer@outlook.com>
This commit is contained in:
@@ -10,6 +10,7 @@ import {
|
||||
getPreferredLanguageKey,
|
||||
getUserConfig,
|
||||
setAccessToken,
|
||||
setUserConfig,
|
||||
} from '../config/index.mjs'
|
||||
import {
|
||||
createElementAtPosition,
|
||||
@@ -289,7 +290,14 @@ async function prepareForStaticCard() {
|
||||
}
|
||||
|
||||
async function overwriteAccessToken() {
|
||||
if (location.hostname !== 'chat.openai.com') return
|
||||
if (location.hostname !== 'chat.openai.com') {
|
||||
if (location.hostname === 'kimi.moonshot.cn') {
|
||||
setUserConfig({
|
||||
kimiMoonShotRefreshToken: window.localStorage.refresh_token,
|
||||
})
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
let data
|
||||
if (location.pathname === '/api/auth/session') {
|
||||
|
||||
Reference in New Issue
Block a user