Skip to content

Commit

Permalink
[Fix] 🐛 BaseURL wrong
Browse files Browse the repository at this point in the history
  • Loading branch information
Harry-zklcdc committed Aug 3, 2023
1 parent 80dde82 commit fe2a577
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
9 changes: 7 additions & 2 deletions frontend/src/views/chat/components/Chat/Chat.vue
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ const hackDevMode = () => {
const initChatService = () => {
if (selectedSydneyBaseUrl.value) {
CIB.config.sydney.baseUrl = selectedSydneyBaseUrl.value;
CIB.config.bing.baseUrl = location.origin;
isShowChatServiceSelectModal.value = false;
} else {
isShowChatServiceSelectModal.value = true;
Expand All @@ -94,6 +93,13 @@ const initChatService = () => {
}
chatStore.checkAllSydneyConfig();
}
CIB.config.bing.baseUrl = location.origin;
CIB.config.bing.signIn.baseUrl = location.origin;
CIB.config.answers.baseUrl = location.origin;
CIB.config.answers.secondTurnScreenshotBaseUrl = location.origin;
CIB.config.contentCreator.baseUrl = location.origin;
CIB.config.visualSearch.baseUrl = location.origin;
CIB.config.suggestionsv2.baseUrl = location.origin;
};
const initSysConfig = async () => {
Expand Down Expand Up @@ -140,7 +146,6 @@ const hackStyle = () => {
serpEle?.shadowRoot?.querySelector('cib-serp-feedback')?.remove();
if (isMobile()) {
welcomeEle?.shadowRoot?.querySelector('.container-item')?.remove();
// serpEle?.querySelector('.b_wlcmTileCont')?.remove();
CIB.vm.actionBar.input.placeholder = '有问题尽管问我...("/" 触发提示词)';
}
// 加入css
Expand Down
16 changes: 16 additions & 0 deletions frontend/types/bing/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,18 @@ declare const CIB: {
};
};
config: {
answers: {
baseUrl: string;
secondTurnScreenshotBaseUrl: string;
};
bing: {
baseUrl: string;
signIn: {
baseUrl: string;
};
};
contentCreator: {
baseUrl: string;
};
edgeAction: {
/**
Expand All @@ -213,6 +223,9 @@ declare const CIB: {
*/
enableGetChats: boolean;
};
suggestionsv2: {
baseUrl: string;
};
sydney: {
baseUrl: string;
/**
Expand All @@ -231,6 +244,9 @@ declare const CIB: {
*/
messageBufferWorkerStreamDelayMS: number;
};
visualSearch: {
baseUrl: string;
}
};
manager: {
chat: BingChat;
Expand Down

0 comments on commit fe2a577

Please sign in to comment.