diff --git a/README.md b/README.md index bd85d19..8eb2797 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@
- + icon @@ -10,21 +10,21 @@

注意:软件本身不提供 API KEY,需要自行准备

- + macOS - + Windows - + Linux
- - - + + +
@@ -133,12 +133,12 @@ npm run build:icon ## Star History -[![Star History Chart](https://api.star-history.com/svg?repos=ChatGPT-Desktop/ChatGPT-Desktop&type=Date)](https://star-history.com/#ChatGPT-Desktop/ChatGPT-Desktop&Date) +[![Star History Chart](https://api.star-history.com/svg?repos=Synaptrix/ChatGPT-Desktop&type=Date)](https://star-history.com/#Synaptrix/ChatGPT-Desktop&Date) ## Contributors - - + + ## License diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 77c56e3..3e92ef0 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -4,7 +4,7 @@ version = "1.0.0" description = "ChatGPT-Desktop" authors = ["orangelckc", "bilibili-ayang"] license = "MIT" -repository = "https://github.com/bilibili-ayang/ChatGPT-Desktop" +repository = "https://github.com/Synaptrix/ChatGPT-Desktop" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/src/api/request.ts b/src/api/request.ts index 1875ec2..3042189 100644 --- a/src/api/request.ts +++ b/src/api/request.ts @@ -1,5 +1,5 @@ import { fetch, type FetchOptions } from '@tauri-apps/api/http' -import type { REQUEST_HOST } from '@/types' +import type { RequestHost } from '@/types' /** * 普通请求 @@ -8,7 +8,7 @@ import type { REQUEST_HOST } from '@/types' */ export const request = async ( url: string, - options?: FetchOptions & { host?: REQUEST_HOST } + options?: FetchOptions & { host?: RequestHost } ) => { try { const { method = 'GET', headers, host = 'OPENAI' } = options || {} diff --git a/src/assets/css/global.scss b/src/assets/css/global.scss index f501be7..224c91a 100644 --- a/src/assets/css/global.scss +++ b/src/assets/css/global.scss @@ -14,6 +14,10 @@ background-color: var(--scroll-thumb-color-hover); } } + + &::selection { + background-color: #b4d0f6; + } } @font-face { diff --git a/src/components/Function/components/TokenUsage.vue b/src/components/Function/components/TokenUsage.vue index 206dd35..02f0a98 100644 --- a/src/components/Function/components/TokenUsage.vue +++ b/src/components/Function/components/TokenUsage.vue @@ -1,24 +1,25 @@ diff --git a/src/components/Session/components/SessionAvatar.vue b/src/components/Session/components/SessionAvatar.vue index 42c4ef1..dac5fef 100644 --- a/src/components/Session/components/SessionAvatar.vue +++ b/src/components/Session/components/SessionAvatar.vue @@ -5,7 +5,7 @@ defineProps<{ data: SessionData }>() const roleStore = useRoleStore() const { updateRole } = roleStore const { currentRole } = storeToRefs(roleStore) -const { uuid, isTokenUsage } = storeToRefs(useSettingsStore()) +const { uuid, isTokenUsage, tokenUnit } = storeToRefs(useSettingsStore()) const { sessionDataList, currentSession } = storeToRefs(useSessionStore()) const { modalMaskStyle } = useModalStyle() @@ -50,12 +50,14 @@ const calcToken = (data: SessionData) => { } if (data.is_ask) { - return `${roleToken + contentToken + memoryToken}TK${ - data.is_memory ? '*' : '' - }` + const token = roleToken + contentToken + memoryToken + + return `${tokenUnit.value === 'TK' ? token : Number(token.toFixed(3))}${ + tokenUnit.value + }${data.is_memory ? '*' : ''}` } - return `${contentToken}TK` + return contentToken + tokenUnit.value } if (currentSession.value?.type === 'image') { @@ -74,11 +76,11 @@ const calcToken = (data: SessionData) => {