Compare commits

...

7 Commits

Author SHA1 Message Date
lencx
8193104853 v0.6.2 2022-12-23 21:31:08 +08:00
lencx
11e07e87d4 fix: path not allowed on the configured scope 2022-12-23 21:30:08 +08:00
lencx
e4e56c7dbb v0.6.1 2022-12-23 20:04:59 +08:00
lencx
8a79c28398 readme 2022-12-23 20:04:42 +08:00
lencx
a7c4545dbf fix: path not allowed on the configured scope 2022-12-23 20:02:32 +08:00
lencx
d93079f682 Merge pull request #62 from lencx/dev 2022-12-23 19:20:38 +08:00
lencx
44dcdba10f v0.6.0 (#54 #55) 2022-12-23 19:18:40 +08:00
5 changed files with 19 additions and 15 deletions

View File

@@ -22,9 +22,9 @@
**最新版:** **最新版:**
- `Mac`: [ChatGPT_0.6.0_x64.dmg](https://github.com/lencx/ChatGPT/releases/download/v0.6.0/ChatGPT_0.6.0_x64.dmg) - `Mac`: [ChatGPT_0.6.2_x64.dmg](https://github.com/lencx/ChatGPT/releases/download/v0.6.2/ChatGPT_0.6.2_x64.dmg)
- `Linux`: [chat-gpt_0.6.0_amd64.deb](https://github.com/lencx/ChatGPT/releases/download/v0.6.0/chat-gpt_0.6.0_amd64.deb) - `Linux`: [chat-gpt_0.6.2_amd64.deb](https://github.com/lencx/ChatGPT/releases/download/v0.6.2/chat-gpt_0.6.2_amd64.deb)
- `Windows`: [ChatGPT_0.6.0_x64_en-US.msi](https://github.com/lencx/ChatGPT/releases/download/v0.6.0/ChatGPT_0.6.0_x64_en-US.msi) - `Windows`: [ChatGPT_0.6.2_x64_en-US.msi](https://github.com/lencx/ChatGPT/releases/download/v0.6.2/ChatGPT_0.6.2_x64_en-US.msi)
[其他版本...](https://github.com/lencx/ChatGPT/releases) [其他版本...](https://github.com/lencx/ChatGPT/releases)
@@ -73,7 +73,7 @@ cask "popcorn-time", args: { "no-quarantine": true }
- 丰富的快捷键 - 丰富的快捷键
- 系统托盘悬浮窗 - 系统托盘悬浮窗
- 应用菜单功能强大 - 应用菜单功能强大
- 支持斜杠命令及其配置(可手动配置或从文件同步) - 支持斜杠命令及其配置(可手动配置或从文件同步 [#55](https://github.com/lencx/ChatGPT/issues/55)
### 菜单项 ### 菜单项

View File

@@ -24,9 +24,9 @@
**Latest:** **Latest:**
- `Mac`: [ChatGPT_0.6.0_x64.dmg](https://github.com/lencx/ChatGPT/releases/download/v0.6.0/ChatGPT_0.6.0_x64.dmg) - `Mac`: [ChatGPT_0.6.2_x64.dmg](https://github.com/lencx/ChatGPT/releases/download/v0.6.2/ChatGPT_0.6.2_x64.dmg)
- `Linux`: [chat-gpt_0.6.0_amd64.deb](https://github.com/lencx/ChatGPT/releases/download/v0.6.0/chat-gpt_0.6.0_amd64.deb) - `Linux`: [chat-gpt_0.6.2_amd64.deb](https://github.com/lencx/ChatGPT/releases/download/v0.6.2/chat-gpt_0.6.2_amd64.deb)
- `Windows`: [ChatGPT_0.6.0_x64_en-US.msi](https://github.com/lencx/ChatGPT/releases/download/v0.6.0/ChatGPT_0.6.0_x64_en-US.msi) - `Windows`: [ChatGPT_0.6.2_x64_en-US.msi](https://github.com/lencx/ChatGPT/releases/download/v0.6.2/ChatGPT_0.6.2_x64_en-US.msi)
[Other version...](https://github.com/lencx/ChatGPT/releases) [Other version...](https://github.com/lencx/ChatGPT/releases)
@@ -75,7 +75,7 @@ In the chatgpt text input area, type a character starting with `/` to bring up t
- Common shortcut keys - Common shortcut keys
- System tray hover window - System tray hover window
- Powerful menu items - Powerful menu items
- Support for slash commands and their configuration (can be configured manually or synchronized from a file) - Support for slash commands and their configuration (can be configured manually or synchronized from a file [#55](https://github.com/lencx/ChatGPT/issues/55))
### MenuItem ### MenuItem

View File

@@ -1,9 +1,8 @@
# UPDATE LOG # UPDATE LOG
## v0.6.0 ## v0.6.2
fix: fix: path not allowed on the configured scope
- windows show Chinese when upgrading
feat: feat:
- optimize the generated pdf file size - optimize the generated pdf file size
@@ -12,6 +11,11 @@ feat:
- the slash command is triggered by the enter key - the slash command is triggered by the enter key
- under the slash command, use the tab key to modify the contents of the `{q}` tag (only single changes are supported (https://github.com/lencx/ChatGPT/issues/54) - under the slash command, use the tab key to modify the contents of the `{q}` tag (only single changes are supported (https://github.com/lencx/ChatGPT/issues/54)
## v0.6.0
fix:
- windows show Chinese when upgrading
## v0.5.1 ## v0.5.1
some optimization some optimization

View File

@@ -7,7 +7,7 @@
}, },
"package": { "package": {
"productName": "ChatGPT", "productName": "ChatGPT",
"version": "0.6.0" "version": "0.6.2"
}, },
"tauri": { "tauri": {
"allowlist": { "allowlist": {
@@ -22,7 +22,7 @@
"fs": { "fs": {
"all": true, "all": true,
"scope": [ "scope": [
"$HOME/.chatgpt/*" "$HOME/**"
] ]
} }
}, },

4
src/utils.ts vendored
View File

@@ -52,12 +52,12 @@ export const readJSON = async (path: string, opts: readJSONOpts = {}) => {
type writeJSONOpts = { dir?: string, isRoot?: boolean }; 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, dir = '' } = opts; const { isRoot = false } = opts;
const root = await chatRoot(); const root = await chatRoot();
const file = await join(isRoot ? '' : root, path); const file = await join(isRoot ? '' : root, path);
if (isRoot && !await exists(await dirname(file))) { if (isRoot && !await exists(await dirname(file))) {
await createDir(await join('.chatgpt', dir), { dir: BaseDirectory.Home }); await createDir(await dirname(file), { recursive: true });
} }
await writeTextFile(file, JSON.stringify(data, null, 2)); await writeTextFile(file, JSON.stringify(data, null, 2));