mirror of
https://github.com/FranP-code/ChatGPT.git
synced 2025-10-13 00:13:25 +00:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
95a9f12b68 | ||
|
|
252b0f3e15 | ||
|
|
e2319f2fda | ||
|
|
9ec69631f3 | ||
|
|
be9846dc22 | ||
|
|
f071e0d6bc |
@@ -22,9 +22,9 @@
|
|||||||
|
|
||||||
**最新版:**
|
**最新版:**
|
||||||
|
|
||||||
- `Mac`: [ChatGPT_0.6.7_x64.dmg](https://github.com/lencx/ChatGPT/releases/download/v0.6.7/ChatGPT_0.6.7_x64.dmg)
|
- `Mac`: [ChatGPT_0.6.10_x64.dmg](https://github.com/lencx/ChatGPT/releases/download/v0.6.10/ChatGPT_0.6.10_x64.dmg)
|
||||||
- `Linux`: [chat-gpt_0.6.7_amd64.deb](https://github.com/lencx/ChatGPT/releases/download/v0.6.7/chat-gpt_0.6.7_amd64.deb)
|
- `Linux`: [chat-gpt_0.6.10_amd64.deb](https://github.com/lencx/ChatGPT/releases/download/v0.6.10/chat-gpt_0.6.10_amd64.deb)
|
||||||
- `Windows`: [ChatGPT_0.6.7_x64_en-US.msi](https://github.com/lencx/ChatGPT/releases/download/v0.6.7/ChatGPT_0.6.7_x64_en-US.msi)
|
- `Windows`: [ChatGPT_0.6.10_x64_en-US.msi](https://github.com/lencx/ChatGPT/releases/download/v0.6.10/ChatGPT_0.6.10_x64_en-US.msi)
|
||||||
|
|
||||||
[其他版本...](https://github.com/lencx/ChatGPT/releases)
|
[其他版本...](https://github.com/lencx/ChatGPT/releases)
|
||||||
|
|
||||||
|
|||||||
@@ -24,9 +24,9 @@
|
|||||||
|
|
||||||
**Latest:**
|
**Latest:**
|
||||||
|
|
||||||
- `Mac`: [ChatGPT_0.6.7_x64.dmg](https://github.com/lencx/ChatGPT/releases/download/v0.6.7/ChatGPT_0.6.7_x64.dmg)
|
- `Mac`: [ChatGPT_0.6.10_x64.dmg](https://github.com/lencx/ChatGPT/releases/download/v0.6.10/ChatGPT_0.6.10_x64.dmg)
|
||||||
- `Linux`: [chat-gpt_0.6.7_amd64.deb](https://github.com/lencx/ChatGPT/releases/download/v0.6.7/chat-gpt_0.6.7_amd64.deb)
|
- `Linux`: [chat-gpt_0.6.10_amd64.deb](https://github.com/lencx/ChatGPT/releases/download/v0.6.10/chat-gpt_0.6.10_amd64.deb)
|
||||||
- `Windows`: [ChatGPT_0.6.7_x64_en-US.msi](https://github.com/lencx/ChatGPT/releases/download/v0.6.7/ChatGPT_0.6.7_x64_en-US.msi)
|
- `Windows`: [ChatGPT_0.6.10_x64_en-US.msi](https://github.com/lencx/ChatGPT/releases/download/v0.6.10/ChatGPT_0.6.10_x64_en-US.msi)
|
||||||
|
|
||||||
[Other version...](https://github.com/lencx/ChatGPT/releases)
|
[Other version...](https://github.com/lencx/ChatGPT/releases)
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
# UPDATE LOG
|
# UPDATE LOG
|
||||||
|
|
||||||
## v0.6.7
|
## v0.6.10
|
||||||
|
|
||||||
fix: unable to synchronize
|
fix: sync failure on windows
|
||||||
|
|
||||||
## v0.6.4
|
## v0.6.4
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
},
|
},
|
||||||
"package": {
|
"package": {
|
||||||
"productName": "ChatGPT",
|
"productName": "ChatGPT",
|
||||||
"version": "0.6.7"
|
"version": "0.6.10"
|
||||||
},
|
},
|
||||||
"tauri": {
|
"tauri": {
|
||||||
"allowlist": {
|
"allowlist": {
|
||||||
@@ -22,9 +22,7 @@
|
|||||||
"fs": {
|
"fs": {
|
||||||
"all": true,
|
"all": true,
|
||||||
"scope": [
|
"scope": [
|
||||||
"$HOME/*",
|
"$HOME/.chatgpt/**"
|
||||||
"$HOME/.chatgpt/*",
|
|
||||||
"$HOME/.chatgpt/cache_sync/*"
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
14
src/utils.ts
vendored
14
src/utils.ts
vendored
@@ -1,4 +1,4 @@
|
|||||||
import { readTextFile, writeTextFile, exists, createDir, BaseDirectory } from '@tauri-apps/api/fs';
|
import { readTextFile, writeTextFile, exists, createDir } from '@tauri-apps/api/fs';
|
||||||
import { homeDir, join, dirname } from '@tauri-apps/api/path';
|
import { homeDir, join, dirname } from '@tauri-apps/api/path';
|
||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
|
|
||||||
@@ -28,7 +28,11 @@ type readJSONOpts = { defaultVal?: Record<string, any>, isRoot?: boolean, isList
|
|||||||
export const readJSON = async (path: string, opts: readJSONOpts = {}) => {
|
export const readJSON = async (path: string, opts: readJSONOpts = {}) => {
|
||||||
const { defaultVal = {}, isRoot = false, isList = false } = opts;
|
const { defaultVal = {}, isRoot = false, isList = false } = opts;
|
||||||
const root = await chatRoot();
|
const root = await chatRoot();
|
||||||
const file = await join(isRoot ? '' : root, path);
|
let file = path;
|
||||||
|
|
||||||
|
if (!isRoot) {
|
||||||
|
file = await join(root, path);
|
||||||
|
}
|
||||||
|
|
||||||
if (!await exists(file)) {
|
if (!await exists(file)) {
|
||||||
if (await dirname(file) !== root) {
|
if (await dirname(file) !== root) {
|
||||||
@@ -52,7 +56,11 @@ type writeJSONOpts = { dir?: string, isRoot?: boolean };
|
|||||||
export const writeJSON = async (path: string, data: Record<string, any>, opts: writeJSONOpts = {}) => {
|
export const writeJSON = async (path: string, data: Record<string, any>, opts: writeJSONOpts = {}) => {
|
||||||
const { isRoot = false } = opts;
|
const { isRoot = false } = opts;
|
||||||
const root = await chatRoot();
|
const root = await chatRoot();
|
||||||
const file = await join(isRoot ? '' : root, path);
|
let file = path;
|
||||||
|
|
||||||
|
if (!isRoot) {
|
||||||
|
file = await join(root, path);
|
||||||
|
}
|
||||||
|
|
||||||
if (isRoot && !await exists(await dirname(file))) {
|
if (isRoot && !await exists(await dirname(file))) {
|
||||||
await createDir(await dirname(file), { recursive: true });
|
await createDir(await dirname(file), { recursive: true });
|
||||||
|
|||||||
Reference in New Issue
Block a user